I down load the Motor Control Development Toolbox for MPC564xL v1.3.0,I used the GFLIB_ControllerPIp building a PI model,comparing the model built by the PI from simulink,the question is the paramater of Kp and Ki is the same ,but the answer is not

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

I down load the Motor Control Development Toolbox for MPC564xL v1.3.0,I used the GFLIB_ControllerPIp building a PI model,comparing the model built by the PI from simulink,the question is the paramater of Kp and Ki is the same ,but the answer is not

跳至解决方案
1,528 次查看
edenli
Contributor V

The model buit by NXP GFLIB_ControllerPIp ,as shown Part B in the fig. 1:

pastedImage_1.png

                                                                                                 Fig.1

The model buit by PI module from Matlab/Simulink,As shown Part A in the Fig. 1

 The analysis of simuliation result as shown below:

   pastedImage_3.png

why the result is arisen?I Cannt resolve the question,who can help me......

标记 (1)
1 解答
1,317 次查看
Daniel_Popa
NXP Employee
NXP Employee

Hi Eden Li,

The model used in GFLIB_ControllerPIp does not take into account the Ts/2 factor for discrete time domain trasformation using the bilinear method. This factor is transferred into the Integral gain to simplify the mathematical computations.

Therefore, if you implement your own controller in Simulink, just modify the Gain Value for the Discrete-Time Integrator to 2/(simulation sample time). This way you will get the same output as the GFLIB_ControllerPIp.

The other way around would be consider Ts/2 factor when computing the GFLIB_ControllerPIp.s32IntegGain.

Hope this helps!

Daniel

在原帖中查看解决方案

3 回复数
1,318 次查看
Daniel_Popa
NXP Employee
NXP Employee

Hi Eden Li,

The model used in GFLIB_ControllerPIp does not take into account the Ts/2 factor for discrete time domain trasformation using the bilinear method. This factor is transferred into the Integral gain to simplify the mathematical computations.

Therefore, if you implement your own controller in Simulink, just modify the Gain Value for the Discrete-Time Integrator to 2/(simulation sample time). This way you will get the same output as the GFLIB_ControllerPIp.

The other way around would be consider Ts/2 factor when computing the GFLIB_ControllerPIp.s32IntegGain.

Hope this helps!

Daniel

1,317 次查看
edenli
Contributor V

Thank you very much!

0 项奖励
回复
1,317 次查看
Daniel_Popa
NXP Employee
NXP Employee

FYI, this is a model and the corresponding comparison results:

InputValue =  Controllers Error (simulated as a sine wave)

PIPvalue = output of NXP controller (yellow)

SIMULINKPIPvalue = output of SIMULINK controller (blue)

Comparison.jpg