PIDLowPass

This block implements a PID controller with a second-order low pass filter in series.

PIDLowPass structure

PIDLowPass structure

Discretization

The supported discretization methods are:

  • Tustin

  • Matched pole-zero

Note

Once the filter is implemented the discretization method cannot be changed.

Configuration

When implementing the PIDLowPass filter it can be chosen to bypass the low pass filter for the integral term. This is the default configuration.

Note

Once the filter is implemented, the configured path for the integral term cannot be changed.

In this case, the PIDLowPass filter has the following transfer function:

\begin{eqnarray} H(s) & = & H_1(s) + H_2(s) \\ H_1(s) & = & \frac{\frac{K_p (2\pi f_{lp})^2}{2\pi f_d}s + K_p (2\pi f_{lp})^2}{s^2 + 4\pi f_{lp}b_{lp}s + (2\pi f_{lp})^2} \\ H_2(s) & = & \frac{2\pi K_p f_i}{s} \end{eqnarray}
Transfer function symbols

\(K_p\)

ProportionalGain

\(f_{lp}\)

LowPassFrequency

\(b_{lp}\)

LowPassDamping

\(f_d\)

DifferentiatorFrequency

\(f_i\)

IntegratorFrequency

The transfer function of the PIDLowPass filter with enable integrator low-pass option enabled is:

\begin{eqnarray} H(s) & = & H_1(s) + H_2(s) \\ H_1(s) & = & \frac{\left(\frac{2\pi K_p f_{lp}^2}{f_d} - 2\pi K_p f_i \right)s + K_p(2\pi f_{lp})^2 - 8\pi^2 K_p f_i b_{lp} f_{lp}}{s^2+4\pi b_{lp}f_{lp} s+(2\pi f_{lp})^2} \\ H_2(s) & = & \frac{2\pi K_p f_i}{s} \end{eqnarray}

Due to the frequency response of the differentiator and integrator (20 dB/dec magnitude increase and decay respectively), the configuration of the DifferentiatorFrequency and IntegratorFrequency signals resembles the configuration of a derivative and integral gain. I.e. doubling the frequency effectively means doubling the gain.

Parameter sets

The required signals to update the filter via a parameter set are shown in the table below.

PIDLowPass-signals

Added parameters

Applied parameters

ProportionalGain

PdLowPassB0

DifferentiatorFrequency

PdLowPassB1

LowPassFrequency

PdLowPassB2

LowPassDamping

PdLowPassA1

IntegratorFrequency

PdLowPassA2

IntegratorB0

IntegratorB1

Total: 5

Total: 7

Note

The number of applied parameters should be used to determine the size of a parameter set.

Integration

The input port Reset is used to clear the states in the filter.

Hint

When connected to the (inverted) CloseLoopRequest signal of the command queue, the Reset input can be used to ensure that the output of the filter is zero when the control loop is open.

The IntegratorLock input is used to disconnect the input from the integrator. This can be useful when using saturation blocks in the control loop. When the control output saturates, the integrator state will keep accumulating, eventually preventing the control output from leaving the saturated state. This can be prevented by setting the IntegratorLock input to true when saturating the control output.

See also

PIDLowPass

Documentation of PIDLowPass block in the PMP Simulink® toolbox.