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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,878 次查看
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 项奖励
回复
1 解答
1,669 次查看
Daniel_Popa
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 项奖励
回复
2 回复数
1,669 次查看
Daniel_Popa
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 项奖励
回复
1,670 次查看
Daniel_Popa
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 项奖励
回复