About PI control library function for S12ZVM128

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

About PI control library function for S12ZVM128

1,377 Views
pratibhasurabhi
Contributor V

Hi,

We are using MC9S12ZVM128 controller and PI control library function in our code for PI control as below,

SpeedPIOut = GFLIB_ControllerPIrAW(Error, (GFLIB_CONTROLLER_PIAW_R_T_F16 *)&SpeedPIPrms, F16);

We referred the document for PI control library, we get to know that there are three options to calculate CC1 and CC2 coefficients as below,

pastedImage_1.png

We want to know that,

how to know which option is get selected while using above library function?

What is the significance of these three options?

Please guide us.

Thank you!

4 Replies

898 Views
petrz_
NXP Employee
NXP Employee

Hello,

a control system implemented in a digital computer is a discrete system. When designing a discrete controller, you have two options:

  1. To design the discrete controller directly from scratch.
  2. To design a continuous-time controller first and then find a discrete equivalent.

Since there is a vast body of knowledge available on continuous-control design, engineers typically take the option No. 2.

The AMMCLIB function GFLIB_ControllerPIrAW assumes that you have already designed your continuous-time controller and want to implement it in the digital computer. Based on your continuous-time gain values Kp and Ki, and the selected sampling period Ts, you can calculate the discrete controller parameters using any of the discretization methods:

  • Forward rectangular rule
  • Backward rectangular rule
  • Trapezoid rule

Once you select the discretization method which best suits your needs, you can use the equations provided in the AMMCLIB User's Guide to calculate the required parameters f16CC1sc and f16CC2sc for your GFLIB_ControllerPIrAW_F16.

Refer to any textbook on discrete control theory to learn more about the discretization methods and their properties. You can also find plenty useful resources online, e.g.:

Regards,

Petr

898 Views
pratibhasurabhi
Contributor V

Hi Petr,

We want to know,

1. What is impact of increasing/decreasing values of CC1/CC2 parameters?

      Our understanding is that if CC1 increased response time will reduce, OR if CC2 increased steady state error will reduce

2. What is significance and difference of anti-windup PI controller and normal PI controller?

Note: We have not designed any "control equation" beforehand. We want to tune this PI for motor control application using trial - and - error method.

Please guide us for the same as early as possible.

Thank you.

0 Kudos

898 Views
petrz_
NXP Employee
NXP Employee
  1. If your application uses a permanent magnet synchronous motor, you can use the Motor Control Application Tuning (MCAT) tool to easily tune the parameters of the controllers on-the-fly. MCAT is a part of NXP development kits.
  2. Closed-loop performance will signifcantly deteriorate in terms of the expected linear performance if the anti-windup is not used. You can learn about the integral windup in any textbook on control theory. A brief overview can be found on wikipedia.

Regards,

Petr

898 Views
pratibhasurabhi
Contributor V

Hi Petr,

Thanks for information!

We want to know,

1. What is the impact of increasing/decreasing of CC1 and CC2 parameters?

      Our understanding is that  if CC1 is increased,response will reduce,Or if CC2 is increased steady state error will reduce.

2. What is significance and difference of anti-windup PI controller and normal PI controller?

Note: We have not designed any "control equation" beforehand. We want to tune this PI for motor control application using trial - and - error method.

Please guide for the same as early as possible.

Thank You.

0 Kudos