About the acos and square module in  the Motor Control Development Toolbox for MPC564xL v1.3.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

About the acos and square module in  the Motor Control Development Toolbox for MPC564xL v1.3.0

Jump to solution
1,144 Views
edenli
Contributor V

These days,I testing the MCLIB of the  Motor Control Development Toolbox for MPC564xL, up to now,i built the model using the acos and square in NXP_MCLIB,comparing the model with acos and squre module in Matlab/simulink, but the answer is not the same,i don't know the reason.

the model shown:

181069_181069.pngpastedImage_1.png

the attachment is the model about Acos &Sqrt:

Original Attachment has been moved to: Acos_and_Squrt.mdl.zip

0 Kudos
1 Solution
935 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi Eden Li,

I found the issue. The SQRT implementation used in the toolbox is faulty. The “MC Toolbox for MPC564xL v1.3.0” from the web contains a very old Beta release rev 0.91 of the Automotive Math and Motor Control Library Set (AMMCLIB) for MPC564xL (released in 15. August 2011). In the mean time, some of the issues were fixed and the latest available AMMCLIB RTM release v1.1.8 (available for evaluation purposes via web http://www.nxp.com/automclib) contains a fix for the issue.

All you have to do, is to download the v1.1.8 and then to copy-paste 4 files from the v1.1.8 into the MPC564xL v1.3.0 installation folder.

The files needed to be replaced are:

GFLIB_Sqrt_SF_FLT.c

GFLIB_Sqrt_SF_FLT.mexw64

GFLIB_Sqrt_SF_FLT.mexw32

GFLIB_Sqrt_SF_FLT.tlc

Those files can be found in the v1.1.8 library under ..\bam\GFLIB\bam_flt\ folder and should be copy into ..\rappid564xl\MCLIB for MPC564xL\bam\ folder

You should get this result.

sqrt.JPG

Hope this helps!

Daniel

View solution in original post

0 Kudos
2 Replies
935 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi Eden Li, 

In this particular use case, the sqrt() has an issue. Basically it outputs the same value as the input - no processing is done. I'm investigating this and come back with a feedback.

In respect with ACOS() a similar explanation as for ASIN() is applicable. See The question About the GFLIB_Asin function in NXP.

Best regards,
Daniel

0 Kudos
936 Views
dumitru-daniel_
NXP Employee
NXP Employee

Hi Eden Li,

I found the issue. The SQRT implementation used in the toolbox is faulty. The “MC Toolbox for MPC564xL v1.3.0” from the web contains a very old Beta release rev 0.91 of the Automotive Math and Motor Control Library Set (AMMCLIB) for MPC564xL (released in 15. August 2011). In the mean time, some of the issues were fixed and the latest available AMMCLIB RTM release v1.1.8 (available for evaluation purposes via web http://www.nxp.com/automclib) contains a fix for the issue.

All you have to do, is to download the v1.1.8 and then to copy-paste 4 files from the v1.1.8 into the MPC564xL v1.3.0 installation folder.

The files needed to be replaced are:

GFLIB_Sqrt_SF_FLT.c

GFLIB_Sqrt_SF_FLT.mexw64

GFLIB_Sqrt_SF_FLT.mexw32

GFLIB_Sqrt_SF_FLT.tlc

Those files can be found in the v1.1.8 library under ..\bam\GFLIB\bam_flt\ folder and should be copy into ..\rappid564xl\MCLIB for MPC564xL\bam\ folder

You should get this result.

sqrt.JPG

Hope this helps!

Daniel

0 Kudos