This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Proportional-Integral-Derivative (PID) Controllers

You can represent PID controllers using the specialized model objects pid and pidstd. This topic describes the representation of PID controllers in MATLAB®. For information about automatic PID controller tuning, see PID Controller Tuning.

Continuous-Time PID Controller Representations

You can represent continuous-time Proportional-Integral-Derivative (PID) controllers in either parallel or standard form. The two forms differ in the parameters used to express the proportional, integral, and derivative actions and the filter on the derivative term, as shown in the following table.

FormFormula
Parallel (pid object)

C=Kp+Kis+KdsTfs+1,

where:

  • Kp = proportional gain

  • Ki = integrator gain

  • Kd = derivative gain

  • Tf = derivative filter time

Standard (pidstd object)

C=Kp(1+1Tis+TdsTdNs+1),

where:

  • Kp = proportional gain

  • Ti = integrator time

  • Td = derivative time

  • N = derivative filter divisor

Use a controller form that is convenient for your application. For example, if you want to express the integrator and derivative actions in terms of time constants, use standard form.

For information on representing PID Controllers in discrete time, see Discrete-Time Proportional-Integral-Derivative (PID) Controllers

Create Continuous-Time Parallel-Form PID Controller

This example shows how to create a continuous-time Proportional-Integral-Derivative (PID) controller in parallel form using pid.

Create the following parallel-form PID controller: C=29.5+26.2s4.3s0.06s+1.

Kp = 29.5;
Ki = 26.2;
Kd = 4.3;
Tf = 0.06;
C = pid(Kp,Ki,Kd,Tf)

C is a pid model object, which is a data container for representing parallel-form PID controllers. For more examples of how to create PID controllers, see the pid reference page.

Create Continuous-Time Standard-Form PID Controller

This example shows how to create a continuous-time Proportional-Integral-Derivative (PID) controller in standard form using pidstd.

Create the following standard-form PID controller: C=29.5(1+11.13s+0.15s0.152.3s+1).

Kp = 29.5;
Ti = 1.13;
Td = 0.15;
N = 2.3;
C = pidstd(Kp,Ti,Td,N)

C is a pidstd model object, which is a data container for representing standard-form PID controllers. For more examples of how to create standard-form PID controllers, see the pidstd reference page.

See Also

| | |

Related Examples

More About