One of the first problems that we need to solve when designing a control system is to determine allowable values of controller parameters such that the closed-loop system is stable. After this problem is solved, then we can tune these parameters to achieve the desired system performance.
In this post and in the accompanying YouTube video, we explain how to use the Routh stability criterion to determine allowable ranges of proportional and integral control parameters that will ensure that the closed-loop system is stable. The parameters of the derivative control action can be selected at a later stage. The Youtube video accompanying this post is given below.
A basic control structure is shown in Fig. 1 below.
The system that we want to control is denoted by “P” (plant). The controller is denoted by “C”. The reference signal is denoted by
(1)
Let us assume that the plant’s model is defined by the following ordinary differential equation of the second order:
(2)
The Proportional-Integral (PI) control law is given by the following equation
(3)
where
To tackle this problem, we first compute the transfer functions of the plant and controller. The transfer function of the plant is computed from Eq.(2) by performing the Laplace transformation. From Eq.(2) we obtain:
(4)
where
(5)
Similarly, from Eq.(3), we obtain
(6)
where the
(7)
The next step is to derive the transfer function of the closed-loop system, denoted by
(8)
where
(9)
on the other hand
(10)
By substituting Eq.(10) in Eq.(9), we obtain
(11)
and consequently
(12)
which gives
(13)
From Eq.(13), we see that the characteristic equation of the closed-loop system is given by
(14)
By substituting the values for
(15)
The first necessary condition for the system to be asymptotically stable is that all the coefficients of the above polynomial are positive. That is, we need to have
(16)
Let us now apply the Routh stability criterion in order to determine the ranges of values of
(17)
According to the Routh stability criterion, the coefficients in the first column have to be positive in order for the closed-loop system to be asymptotically stable.
That is, if
(18)
then the system is asymptotically stable. The system of inequalities in Eq. (18) define a region in the K_{I}-K plane that is shown in the figure below.
The last step is to verify our theoretical predictions numerically in MATLAB.
The MATLAB code is given below
s = tf('s')
Ki= 1
% this is the boundary: K= (1/5)*Ki-6, stability region is Ki>0 and K> (1/5)*Ki-6
K= (1/5)*Ki-6+0.21
P=1/(s^2+5*s+6)
C=K+Ki/s
% closed-loop transfer function
W=P*C/(1+P*C)
pole(W)
step(W)
X0=randn(6,1)
initial(ss(W),X0)
The code lines 1-11 are used to define the closed-loop transfer function. Then, code line 13 is used to compute the closed-loop system poles. The step response of the system is computed and graphed in code line 15. In code line 19, we compute and graph the system response for zero inputs and for the non-zero initial conditions. We have selected the control parameters
The step response is shown in the figure below.
The response of the system to non-zero initial conditions is shown below.