May 4, 2024

Application of Routh Stability Criterion to Select Parameters of Proportional Integral (PI) Controllers


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.

Figure 1: A basic block diagram of the system.

The system that we want to control is denoted by “P” (plant). The controller is denoted by “C”. The reference signal is denoted by r and the output of the system is denoted by y. The control signal is denoted by u. The control error e is computed as follows

(1)   \begin{align*}e=r-y\end{align*}

Let us assume that the plant’s model is defined by the following ordinary differential equation of the second order:

(2)   \begin{align*} \ddot{y}+5\dot{y}+6y=u(t)\end{align*}

The Proportional-Integral (PI) control law is given by the following equation

(3)   \begin{align*}u(t)=Ke(t)+K_{I}\int_{0}^{t} e(\tau) d\tau\end{align*}

where K and K_{I} are proportional and integral control gains. Our goal is to choose the control parameters K and K_{I} such that the closed-loop system is asymptotically stable.

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)   \begin{align*}(s^{2}+5s+6)Y(s)=U(s)  \end{align*}

where s is a complex variable and Y(s) and U(s) are Laplace transforms of y(t) and u(t), respectively. We can use the last equation to define a plant transfer function, denoted by P(s), and consequently

(5)   \begin{align*}P(s)=\frac{Y(s)}{U(s)}=\frac{1}{s^{2}+5s+6}\end{align*}

Similarly, from Eq.(3), we obtain

(6)   \begin{align*}U(s)=KE(s)+\frac{K_{I}}{s}E(s)\end{align*}

where the U(s) and E(s) are Laplace transform of u(t) and e(t). From Eq.(6), we obtain the controller transfer function

(7)   \begin{align*}C(s)=\frac{U(s)}{E(s)}=K+\frac{K_{I}}{s}\end{align*}

The next step is to derive the transfer function of the closed-loop system, denoted by W(s):

(8)   \begin{align*}W(s)=\frac{Y(s)}{R(s)}\end{align*}

where R(s) is the Laplace transform of r(t). From the block diagram in Fig. 1., we obtain:

(9)   \begin{align*}Y(s)=P(s)C(s)E(s)\end{align*}

on the other hand

(10)   \begin{align*}E(s)=R(s)-Y(s)\end{align*}

By substituting Eq.(10) in Eq.(9), we obtain

(11)   \begin{align*}Y(s)=P(s)C(s)R(s)-P(s)C(s)Y(s)  \end{align*}

and consequently

(12)   \begin{align*}(1+P(s)C(s))Y(s)=P(s)C(s)R(s)\end{align*}

which gives

(13)   \begin{align*}W(s)=\frac{Y(s)}{R(s)}=\frac{P(s)C(s)}{1+P(s)C(s)}\end{align*}

From Eq.(13), we see that the characteristic equation of the closed-loop system is given by

(14)   \begin{align*}1+P(s)C(s)=0\end{align*}

By substituting the values for P(s) and C(s), that are defined in Eqs. (5) and (6), respectively, in Eq. (14), and by transforming the resulting expression, we obtain

(15)   \begin{align*}s^{3}+5s^2+(6+K)s+K_{I}=0\end{align*}

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)   \begin{align*}K_{I}>0,\;\;\; 6+K>0 \end{align*}

Let us now apply the Routh stability criterion in order to determine the ranges of values of K_{I} and K that will render the closed-loop system stable. The Routh array for the third-order characteristic polynomial given in Eq. (15) is

(17)   \begin{align*} \begin{matrix} 1 & &  6+K \\ 5 & & K_{I} \\ \frac{30+5K-K_{I}}{5} &  & 0  \\ K_{I} & & 0  \end{matrix}\end{align*}

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)   \begin{align*}K_{I}>0,\;\;\;\; K>\frac{K_{I}}{5}-6\end{align*}

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 K_{i} and K such that the system is asymptotically stable. You can easily verify that the system becomes unstable if you select the control parameters to be in the unstable region illustrated in Fig. 1.

The step response is shown in the figure below.

Figure 2: System unit step response.

The response of the system to non-zero initial conditions is shown below.

Figure 3: System response to non-zero initial condition computed using the MATLAB function initial.