Skip to Main Content Skip to Search
Product Documentation

C2000 PID Controller - Digital PID controller

Library

Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C2000/ Optimization/ C28x DMC

Description

This block implements a 32-bit digital PID controller with antiwindup correction. The inputs are a reference input (ref) and a feedback input (fdb) and the output (out) is the saturated PID output. The following diagram shows a PID controller with antiwindup.

The differential equation describing the PID controller before saturation that is implemented in this block is

upresat(t) = up(t) + ui(t) + ud(t)

where upresat is the PID output before saturation, up is the proportional term, ui is the integral term with saturation correction, and ud is the derivative term.

The proportional term is

up(t) = Kpe(t)

where Kp is the proportional gain of the PID controller and e(t) is the error between the reference and feedback inputs.

The integral term with saturation correction is

where Kc is the integral correction gain of the PID controller.

The derivative term is

where Td is the derivative time of the PID controller. In discrete terms, the derivative gain is defined as Kd = Td/T, and the integral gain is defined as Ki = T/Ti, where T is the sampling period and Ti is the integral time of the PID controller.

Using backward approximation, the preceding differential equations can be transformed into the following discrete equations.

Dialog Box

Proportional gain

Amount of proportional gain (Kp) to apply to the PID

Integral gain

Amount of gain (Ki) to apply to the integration equation

Integral correction gain

Amount of correction gain (Kc) to apply to the integration equation

Derivative gain

Amount of gain (Kd) to apply to the derivative equation.

Minimum output

Minimum allowable value of the PID output

Maximum output

Maximum allowable value of the PID output

References

For detailed information on the DMC library, see C/F 28xx Digital Motor Control Library, Literature Number SPRC080, available at the Texas Instruments Web site.

See Also

C2000 Clarke Transformation, C2000 Inverse Park Transformation, C2000 Park Transformation, C2000 Space Vector Generator, C2000 Speed Measurement

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS