7.7: Root Locus Design of Digital Controllers
- Page ID
- 24423
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Digital Controller Design
The root locus technique (Chapter 5) employs the open-loop transfer function, \(KGH(s)\), to describe the locus of the roots of the closed-loop characteristic polynomial: \(\mathit{\Delta}\left(s\right)=1+KGH(s)\), with variation in the controller gain, \(K\).
The \(z\)-plane root locus similarly describes the locus of the roots of closed-loop pulse characteristic polynomial, \(\Delta (z)=1+KG(z)\), as controller gain \(K\) is varied. A suitable value of \(K\) can then be selected form the RL plot.
To ensure closed-loop stability, the closed-loop roots should be confined to inside the unit circle.
In the MATLAB Control Systems Toolbox, ‘rlocus’ command is used to plot both the \(s\)-plane and \(z\)-plane root loci. The RL design of digital controller is described below.
Design for a Desired Damping Ratio
Assuming that the controller design specifications include a desired damping ratio, \(\zeta ,\) of the closed-loop poles, we consider the \(z\)-plane root locus design based on the \(\zeta\) requirement.
For a prototype second-order transfer function: \(T(s)=\frac{\omega _{n}^{2} }{s^{2} +2\zeta \omega _{n} s+\omega _{n}^{2} }\), the constant \(\zeta\) lines are defined by: \(\frac{\sigma }{\omega } =\mp \frac{\zeta }{\sqrt{1-\zeta ^{2} } }\). The constant \(\zeta\) lines in the z-plane are obtained by: \(z=e^{Ts} =e^{\sigma T} e^{\pm j\omega T}\), where \(\sigma =\mp \frac{\zeta }{\sqrt{1-\zeta ^{2} } } \omega\) and \(\omega T\) ranges from \(0\) to \(\pi\).
In the MATLAB Control Systems Toolbox, the ‘grid’ command displays the constant \(\zeta\) lines in the complex \(z\)-plane. The grid command additionally displays constant frequency \((\omega _{n} )\) contours that are helpful in selecting a suitable sampling time \((T)\) given the natural frequency of the model. The desired region in the \(z\)-plane for closed-loop root locations may be specified as: \(0.1\pi \le \omega _{n} T\le 0.5\pi ,\; \, \, \zeta \ge 0.6\), which assumes a sampling frequency between \(2\ and10\) times the natural frequency of the analog system.
Let \(G(s)=\frac{1}{s(s+1)}\), \(T=0.2\rm s\); then, we have: \(G(z)=\frac{0.0187z+0.0175}{(z-1)(z-0.819)}\). Assume that the design specifications call for \(\zeta =0.7\).
The closed-loop pulse characteristic polynomial is obtained as: \(\Delta (z)=z^{2} +(0.0187\, K-1.819)z+0.0175\, K+0.819.\)
The \(z\)-plane root locus is plotted using MATLAB 'rlocus' command and is shown in Fig. 7.7.1. From the z-plane RL plot (Figure 7.7.1), we can choose, e.g., \(K=0.46\), to have \(\zeta =0.7\) for the closed-loop roots.

The resulting pulse characteristic polynomial is: \(\Delta (z)=z^{2} -1.81z+0.827,\) with closed-loop roots located at: \(z=0.9\pm j0.09.\) The use of MALTAB ‘damp’ command shows a damping ratio of \(\zeta =0.7\) with a natural frequency \(\omega _{n} =0.68\, \, {\rm rad/s}\).
For comparison, the continuous-time system has a characteristic polynomial: \(\Delta (s)=s^{2} +s+K,\); for \(K=0.46\), the closed-loop roots are located at \(s=0.5\pm j0.46\)with \(\zeta =0.74\) with \(\omega _{n} =0.68\, \, {\rm rad/s}\).
The step responses of analog and discrete systems are compared in Figure 7.7.2.

Design for Settling Time and Damping Ratio
The settling time and the damping ratio of the dominant closed-loop roots in the \(z\)-plane are related as: \(re^{\pm j\theta } =e^{-\zeta \omega _{n} T} e^{\pm j\omega _ d T} ,\; \; \omega _ d =\omega _{n} \sqrt{1-\zeta ^{2} } .\)
By separating into real and imaginary part gives two equations: \(\ln r\; =-\zeta \omega _{n} T\) and \(\theta =\omega _{d} T\), which can be solved to obtain:
\[\zeta =-\ln r/\sqrt{\ln ^{2} r\; +\theta ^{2} } \nonumber \]
\[\omega _{n} =\sqrt{\ln ^{2} r\; +\theta ^{2} } /T \nonumber \]
\[\tau =\frac{1}{\zeta \omega _{n} } =-\frac{T}{\ln r\; } . \nonumber \]
Let \(G(z)=\frac{0.0187z+0.0175}{(z-1)(z-0.819)}\). The closed-loop pulse characteristic polynomial is obtained as: \(\Delta (z)=z^{2} +(0.0187\, K-1.819)z+0.0175\, K+0.819.\)
For \(\zeta =0.7\), the \(z\)-plane closed-loop roots are located at: \(z=0.905\pm j0.0875=0.91\; e^{\pm j0.096}\). Then, from the above relations, we obtain: \(\zeta =0.7,\; \omega _{n} =0.74,\; \tau =2.1\; {\rm s,\; }t_\rm s =4.6\, \tau =9.5\, \rm s.\)
A Comparison of Analog and Digital Controllers
The following example compares the root locus design of analog and digital controllers in the case of a DC motor model.
A DC motor model is described as: \(G\left(s\right)=\frac{500}{s^2+110s+1025}\); the design specifications are for the motor step response to have: \(OS\le 10\%\ (\zeta \ge 0.59),\ \ t_s\le 100ms,\ \ e{\left(\infty \right)|}_{step}=0.\)
The sampling time is selected as: \(T=0.01s\); then, from the MATLAB ‘c2d’ command, the motor pulse transfer function is obtained as:\(\ G\left(z\right)=\frac{0.0178z+0.0123}{z^2-1.27z+0.333}\).
In order to obtain zero steady-state error, we may choose a PI controller, where the controller zero approximately cancels a plant pole, i.e., let \(K\left(s\right)=\frac{K\left(s+10\right)}{s}\).
A comparable PI controller for the sampled-data system is obtained by using the transformation: \(z=e^{Ts}\), and is given as: \(K\left(z\right)=\frac{K\left(z-0.905\right)}{z-1}\).
The \(s\)-plane and \(z\)-plane root locus plots are shown in Figure 7.7.3. From the plots, we may choose, e.g., \(K=8\) for the closed-loop system to achieve a time constant: \(\tau \cong 25ms\).


For \(K=8\), the resulting closed-loop transfer functions for analog and discrete system are obtained as:
Analog: \(T\left(s\right)=\frac{4000\left(s+10\right)}{s^3+110s^2+5025s+40,000}\)
Discrete: \(T\left(z\right)=\frac{0.14z^2-0.03z-0.089}{z^3-2.13z^2+1.57z-0.42}\)
The use of the MATLAB ‘damp’ command shows a damping of \(\zeta =0.79\) for the analog system and a damping of \(\zeta =0.68\) for the digital system.
The step responses of the analog and discrete systems are compared in Figure 7.7.4. As seen from the figure, both analog and discrete systems meet the settling time and overshoot requirements.

MATLAB Tuned PID Controller Design
The MATLAB Control Systems Toolbox provide ‘pidtune’ command that can be used with both analog and discrete system models. The tuned PID controller design in the case of a DC motor is explored in the next example.
Let \(G\left(s\right)=\frac{500}{s^2+110s+1025}\); the design specifications are for the motor step response to have: \(OS\le 10\%\ (\zeta \ge 0.59),\ \ t_s\le 100ms,\ \ e{\left(\infty \right)|}_{step}=0.\)
Let \(T=0.01s\); from the MATLAB ‘c2d’ command, the motor pulse transfer function is obtained as:\(\ G\left(z\right)=\frac{0.0178z+0.0123}{z^2-1.27z+0.333}\).
By using the MATLAB ‘pidtune’ command, an analog PID controller for the DC motor model with a crossover frequency of \(100rad/s\) is obtained as: \(K\left(s\right)=25.1+0.189s+\frac{567}{s}\).
The ‘pidtune’ command is used to design a similar PID controller for the discrete model. The result is: \(K\left(z\right)=23.4+0.368\left(\frac{z-1}{T}\right)+202\left(\frac{T}{z-1}\right)\).
The unit-step responses of the closed-loop systems for the analog and discrete models are compared in Figure 7.7.5. Both controller achieve a settling time \(t_s<0.1s\) with no steady-state error. However, in this case, the tuned digital PID controller has a lower settling time.
