In this post and the accompanying video, we explain how to simulate a control system with actuator constraints in Simulink. The YouTube video accompanying this post is given below.
The Simulink model is given below. If you cannot see this graph clearly, please open the YouTube video, where this diagram is explained.
This Simulink block diagram simulates the PID control algorithm having the following form
(1)
where
- is the controller transfer function
- – are the controller constants that are used as tuning parameters
- is the Laplace transform
This form of the PID controller is based on replacing the ideal derivative term by its filtered version
(2)
This filtered derivative action acts as a derivative for low-frequency signals, while for the high-frequency signals it acts as a low-pass filter. In this way, we can avoid the amplification of high-frequency signal components by the pure derivative action.
The plan mode is a mass-spring-damper system, described by the following differential equation
(3)
where
- is the mass
- is the damping constant
- is the spring constant
- F is the applied force
The transfer function corresponding to this model is given by
(4)
In reality, the control actuators cannot exert an infinite amount of force. To take this constraint into account, we add the actuator limits to the system model. The actuator limits are shown in Figure 1.
The purpose of this tutorial is not to explain how to tune the PID controllers. Instead, we mainly focus on explaining how to simulate the system behavior. We simulate the system behavior for the following parameters:
- , , , , , , and , and we set the actuator limits to -100 and 100. Also, the step input signal is equal to 1.
The output of the closed-loop system is shown in the figure below. This graph is obtained by using the probe “Position” in the Simulink diagram.
The control signal that is a direct output of the control algorithm is shown in the figure below. This signal is obtained by using the probe “Control” in the Simulink diagram.
We can see that this output has large values. However, in practice, we cannot achieve these large values. These values are filtered through the actuator limit filter. The limited signal that is applied to the system is shown in the figure below. Note that this signal is obtained by the probe “Limited control”.
From Fig. 3, we can observe the effect of the actuator saturation.