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

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

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

Jump to solution
1,688 Views
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......

Tags (1)
1 Solution
1,477 Views
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

View solution in original post

3 Replies
1,478 Views
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,477 Views
edenli
Contributor V

Thank you very much!

0 Kudos
Reply
1,477 Views
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