Part 7 · Chapter 28

Analysis and Design of Digital Control Systems

Chapter 27 gave us the machinery — the sampler, the zero-order hold and the pulse transfer function; this chapter turns that machinery into a design method, replacing the imaginary axis by the unit circle and then rebuilding, one by one, every tool of the continuous course so that a controller can be designed directly in the z-domain and written straight out as a difference equation.

Control Systems Prof. Mithun Mondal Reading time ≈ 48 min
i What you'll learn
  • Why the stability boundary moves from the imaginary axis to the unit circle, and how Jury's test checks it without finding roots.
  • How a pole pair specified by \(\zeta\) and \(\omega_n\) is mapped into the z-plane by \(z=e^{sT}\), and what settling time means in samples.
  • The discrete error constants \(K_p,K_v,K_a\) and why the sampling period appears in two of them.
  • How the root locus transfers unchanged to the z-plane, and what the unit-circle crossing tells you.
  • The bilinear \(w\)-transformation, which restores Bode and Nyquist design to sampled systems — with frequency warping as the price.
  • Design by emulation: forward and backward Euler, Tustin, and matched pole–zero, and which of them preserves stability.
  • Direct digital design: the digital PID difference equation, deadbeat control, and the discrete state-feedback law.
Section 28-1

The Digital Design Problem

Chapter 27 built the description of a sampled-data loop: a sampler that reads the error every \(T\) seconds, a zero-order hold that freezes the computed command between samples, and the z-transform that turns the resulting difference equations into algebra. What it did not do was design anything. That is the work of this chapter.

The layout is fixed by the hardware. The plant \(G_p(s)\) is continuous — a motor, a heater, an aircraft. The controller is a program running on a processor: it wakes on a clock tick, reads the sampled error \(e(kT)\), computes a number \(u(kT)\), writes it to a converter, and sleeps. Everything the designer chooses lives inside that program, and everything the program can do is captured by one discrete transfer function \(D(z)\).

r(t) + e(t) A/D, period T e(kT) D(z) the program u(kT) D/A + ZOH (1−e^−sT)/s u(t) G_p(s) y(t) measured output discrete: everything here is a number sequence
The digital loop — the design freedom lies entirely inside D(z)

Chapter 27 showed that the hold and the plant together form a single pulse transfer function, and it is that object — not \(G_p(s)\) — that the controller sees:

🔑
The plant as the computer sees it
\[ G(z) \;=\; \mathcal{Z}\!\left\{\frac{1-e^{-sT}}{s}\,G_p(s)\right\} \;=\; \left(1-z^{-1}\right)\mathcal{Z}\!\left\{\frac{G_p(s)}{s}\right\} \]

The closed-loop pulse transfer function then follows exactly the pattern of Chapter 4: \(\dfrac{C(z)}{R(z)}=\dfrac{D(z)G(z)}{1+D(z)G(z)}\), and the characteristic equation is \(1+D(z)G(z)=0\).

From here the argument writes itself. Every question the continuous course asked — is the loop stable, how fast does it respond, what error remains, how much gain can I afford — has a z-domain counterpart obtained by asking the same question of \(1+D(z)G(z)=0\). Two things change, and only two. First, the stability boundary is the unit circle rather than the imaginary axis. Second, the sampling period \(T\) is now a design variable in its own right: choose it badly and no \(D(z)\) will rescue the loop.

Two roads to the same controller. There are exactly two ways to arrive at \(D(z)\). Emulation designs a continuous compensator \(D(s)\) by the methods of Chapters 13 and 21–22, then converts it to a difference equation; it is quick, familiar, and only trustworthy when the sampling is fast. Direct digital design works in \(z\) from the start, treats the hold and the sampling delay honestly, and remains valid at any sampling rate. Sections 28-7 and 28-8 take one road each.
Section 28-2

Stability in the z-Plane

Chapter 10 established that a continuous system is stable when every characteristic root has a negative real part. The discrete criterion follows from that statement and from the defining relation \(z=e^{sT}\), with no new physics at all.

Write a characteristic root of the sampled system as \(s=\sigma+j\omega\). The corresponding point in the z-plane is \(z=e^{\sigma T}e^{j\omega T}\), so \(|z|=e^{\sigma T}\). The condition \(\sigma<0\) is therefore the condition \(|z|<1\): the left half of the s-plane maps onto the interior of the unit circle, the imaginary axis maps onto the circle itself, and the right half maps outside. A discrete mode \(z_i^{\,k}\) decays if and only if \(|z_i|<1\), which is the same statement read directly in the time domain.

🔑
Discrete stability criterion
\[ \text{stable} \iff |z_i| \lt 1 \ \ \text{for every root of } 1+D(z)G(z)=0 \]

Roots on the unit circle give a sustained oscillation (marginal stability); roots outside give a diverging one. A root at \(z=1\) is the discrete integrator, the counterpart of the pole at \(s=0\).

Chapter 11 gave us Routh–Hurwitz so that stability could be settled without solving for roots. The same convenience is wanted here, but Routh cannot be applied directly: it tests for roots to the left of a line, and we need a test for roots inside a circle. Two responses are possible. One is to map the unit circle onto the imaginary axis with a bilinear substitution and then run Routh — that is the \(w\)-transformation of Section 28-6. The other is a test built for the circle from the start: Jury's stability test.

Jury's test operates on the characteristic polynomial \(P(z)=a_nz^n+a_{n-1}z^{n-1}+\dots+a_1z+a_0\) with \(a_n>0\). Three of its conditions are immediate and are worth understanding before the array. The requirement \(P(1)>0\) says the polynomial has not changed sign between the stability region and the point \(z=1\); since \(P(z)\to+\infty\) as \(z\to+\infty\), a value \(P(1)\le 0\) forces a real root at or beyond \(z=1\), which is outside the circle. The requirement \((-1)^nP(-1)>0\) is the same argument applied on the negative real axis, the sign factor accounting for the behaviour of \(P\) as \(z\to-\infty\). The requirement \(|a_0|<a_n\) comes from the fact that \(|a_0/a_n|\) is the product of the magnitudes of all the roots: if that product already exceeds one, at least one root must lie outside the circle.

OrderPolynomialNecessary and sufficient conditions
\(n=1\)\(z+a_0\)\(|a_0|\lt 1\)
\(n=2\)\(z^2+a_1z+a_0\)\(P(1)\gt0\), \(P(-1)\gt0\), \(|a_0|\lt1\)
\(n=3\)\(z^3+a_2z^2+a_1z+a_0\)\(P(1)\gt0\), \(P(-1)\lt0\), \(|a_0|\lt1\), \(\left|a_0^2-1\right|\gt\left|a_0a_2-a_1\right|\)
general \(n\)\(a_nz^n+\dots+a_0\)the three conditions above plus \(n-2\) inequalities read off the Jury array

For the second-order case the three conditions are not merely necessary but sufficient, and they are the ones a GATE problem will almost always want. The last of them, \(|a_0|<1\), is worth remembering in words: for a monic quadratic, \(a_0\) is the product of the two roots, so it is the squared magnitude of a complex pair. Requiring \(|a_0|<1\) is requiring that pair to sit inside the unit circle.

Sampling can destabilise a loop that was unconditionally stable. A continuous type-1 second-order loop \(K/[s(s+1)]\) is stable for every positive \(K\) — its root locus never leaves the left half-plane. Put a sampler and a hold in front of it and the same loop goes unstable above a finite gain, as Example 2 shows. The hold contributes an average delay of \(T/2\), and delay is what eats phase margin. This single fact is why sampled-data stability must always be checked in \(z\) and never inferred from the continuous design.
Section 28-3

Mapping Specifications from s to z

Specifications arrive in the language of Chapter 8: a damping ratio \(\zeta\), a natural frequency \(\omega_n\), an overshoot, a settling time. Those quantities describe a complex pole pair in the s-plane. To design in \(z\) we need to know where that pair lands.

The dominant pair is \(s=-\zeta\omega_n\pm j\omega_d\) with \(\omega_d=\omega_n\sqrt{1-\zeta^{2}}\). Applying \(z=e^{sT}\) term by term separates the magnitude from the angle.

🔑
Where a specified pole pair lands
\[ z \;=\; e^{-\zeta\omega_n T}\,\angle\,\pm\,\omega_d T \qquad\Longleftrightarrow\qquad |z|=e^{-\zeta\omega_n T},\quad \theta=\omega_n T\sqrt{1-\zeta^{2}} \]

Read backwards, a discrete pole \(z=r\angle\theta\) corresponds to \(\displaystyle \omega_n=\frac{\sqrt{\ln^2 r+\theta^{2}}}{T}\) and \(\displaystyle \zeta=\frac{-\ln r}{\sqrt{\ln^2 r+\theta^{2}}}\).

Two families of curves follow at once. Fixing \(\omega_n\) and sweeping \(\zeta\) traces a curve of constant natural frequency; fixing \(\zeta\) and sweeping \(\omega_n\) traces a curve of constant damping. The latter is the more useful, and it is a logarithmic spiral: eliminating \(\omega_n\) between \(|z|=e^{-\zeta\omega_nT}\) and \(\theta=\omega_nT\sqrt{1-\zeta^2}\) gives

Worked derivation — the constant-damping locus
\[ \omega_n T = \frac{\theta}{\sqrt{1-\zeta^{2}}} \;\Longrightarrow\; |z| = \exp\!\left(-\frac{\zeta\,\theta}{\sqrt{1-\zeta^{2}}}\right) \]

The radius shrinks as the angle grows, so a constant-\(\zeta\) locus spirals inward from \(z=1\) toward the origin. Poles near \(z=1\) are slow; poles near \(z=0\) are extremely fast — a pole at the origin corresponds to a mode that vanishes in a single sample. That observation, followed to its conclusion, is deadbeat control.

σ +jω_s/2 −jω_s/2 primary strip, stable half ζ × × −ζω_n ± jω_d s-plane Re z Im z |z| = 1 constant ζ (spiral) constant ω_n × × θ = ω_d T z-plane, z = e^{sT}
The primary strip of the s-plane folds onto the unit disc; constant ζ becomes a spiral

The shaded band in the left panel is the primary strip, \(-\omega_s/2<\omega<\omega_s/2\) where \(\omega_s=2\pi/T\). That strip alone covers the whole z-plane. Every strip above and below it maps onto exactly the same points, which is aliasing seen geometrically: a continuous mode at \(\omega\) and one at \(\omega+\omega_s\) produce identical sample sequences and are indistinguishable to the controller. Chapter 27 stated Shannon's condition; here we see why violating it is not merely inconvenient but genuinely irreversible.

Two transient specifications translate cleanly. Overshoot depends only on \(\zeta\), so the formula \(M_p=e^{-\pi\zeta/\sqrt{1-\zeta^2}}\) of Chapter 8 carries over unchanged. Settling time is more instructive when counted in samples: since \(|z|=e^{-\zeta\omega_nT}\), the 2% settling time \(t_s\approx4/(\zeta\omega_n)\) corresponds to

Settling measured in samples
\[ N \;=\; \frac{t_s}{T} \;=\; \frac{4}{\zeta\omega_n T} \;=\; \frac{-4}{\ln|z|} \]

A pole at \(|z|=0.9\) needs about \(38\) samples to settle; one at \(|z|=0.5\) needs about six. The number of samples, not the number of seconds, is what determines whether the controller has enough resolution to shape the transient.

Section 28-4

Steady-State Error in the z-Domain

Chapter 9 built the whole steady-state theory on two ingredients: the error expression \(E=R/(1+G)\) and the final-value theorem. Both have exact discrete counterparts, so the theory rebuilds itself with almost no new work.

For a unity-feedback sampled loop the error transform is \(E(z)=R(z)/[1+D(z)G(z)]\). Writing \(G_{\!L}(z)=D(z)G(z)\) for the open-loop pulse transfer function, the discrete final-value theorem gives

🔑
Steady-state error of a sampled loop
\[ e_{ss}=\lim_{k\to\infty}e(kT)=\lim_{z\to1}\left(1-z^{-1}\right)E(z)=\lim_{z\to1}\frac{(z-1)}{z}\cdot\frac{R(z)}{1+G_{\!L}(z)} \]

Valid, exactly as in Chapter 9, only if the closed loop is stable — here meaning all roots inside the unit circle. The factor \((1-z^{-1})\) plays the role that \(s\) played in the continuous theorem.

The type of a discrete system is the number of poles of \(G_{\!L}(z)\) at \(z=1\), because \(z=1\) is the image of \(s=0\) and \(1/(1-z^{-1})\) is the discrete integrator. Feeding in the three standard inputs produces three constants. The step \(r(kT)=A\) has transform \(Az/(z-1)\); substituting and cancelling gives \(e_{ss}=A/[1+G_{\!L}(1)]\), so the position constant is simply the DC gain of the loop.

The ramp \(r(kT)=AkT\) has transform \(ATz/(z-1)^2\). Substituting,

Worked derivation — the discrete velocity constant
\[ e_{ss}=\lim_{z\to1}\frac{z-1}{z}\cdot\frac{ATz}{(z-1)^2\left[1+G_{\!L}(z)\right]}=\lim_{z\to1}\frac{AT}{(z-1)\left[1+G_{\!L}(z)\right]}=\frac{A}{\displaystyle\frac{1}{T}\lim_{z\to1}(z-1)G_{\!L}(z)} \]

The bracket in the denominator becomes \((z-1)G_{\!L}(z)\) in the limit because a type-1 loop has \(G_{\!L}\to\infty\) at \(z=1\), which swallows the \(1\). The quantity that emerges is defined as \(K_v\). The parabola \(r(kT)=A(kT)^2/2\), with transform \(AT^2z(z+1)/[2(z-1)^3]\), yields \(K_a\) by the same route.

ConstantDefinitionInputSteady-state error
Position \(K_p\)\(\displaystyle\lim_{z\to1}G_{\!L}(z)\)Step \(A\)\(\dfrac{A}{1+K_p}\)
Velocity \(K_v\)\(\displaystyle\frac{1}{T}\lim_{z\to1}(z-1)G_{\!L}(z)\)Ramp \(AkT\)\(\dfrac{A}{K_v}\)
Acceleration \(K_a\)\(\displaystyle\frac{1}{T^{2}}\lim_{z\to1}(z-1)^{2}G_{\!L}(z)\)Parabola \(A(kT)^2/2\)\(\dfrac{A}{K_a}\)

The diagonal rule of Chapter 9 survives intact: a type-\(N\) discrete loop tracks inputs of order below \(N\) exactly, the order-\(N\) input with finite error, and higher inputs not at all. The one structural difference is the explicit \(T\) in \(K_v\) and \(K_a\). It is there because a discrete ramp advances by \(AT\) per sample rather than by \(A\) per second; the factor makes the discrete constants numerically comparable with their continuous originals, and in fact for a plant preceded by a zero-order hold the two agree exactly, as Example 3 confirms.

The hold does not cost accuracy, only phase. Sampling leaves \(K_p\), \(K_v\) and \(K_a\) unchanged — steady-state accuracy is a low-frequency property, and at low frequency the hold is transparent. What sampling costs is phase margin, and therefore the gain you are allowed to use. Since accuracy improves with gain, the loss of stable gain range is an indirect but very real loss of accuracy. That is the whole trade-off of digital control in one sentence.
Section 28-5

Root Locus in the z-Plane

The root-locus construction of Chapter 12 was never about the s-plane. It was about the equation \(1+KP(z)=0\), which splits into an angle condition \(\angle P=180^\circ(2q+1)\) and a magnitude condition \(K=1/|P|\). Nothing in the derivation of the rules — real-axis segments, asymptotes, breakaway points, departure angles — mentions the imaginary axis. Every rule therefore transfers to the z-plane verbatim.

What changes is the interpretation. In the s-plane we watched for the locus crossing the imaginary axis; in the z-plane we watch for it crossing the unit circle. The gain at that crossing is the limit of stability, and the angle of the crossing point gives the frequency of the sustained oscillation through \(\omega=\theta/T\).

Re z Im z unit circle × × z = 1 z = 0.368 z = −0.718 0.648 −2.084 K = 2.39, θ = 75.9° limit of stability locus of 1 + K·0.368(z+0.718)/[(z−1)(z−0.368)] = 0
The locus is a circle about the zero; stability ends where it leaves the unit circle

The figure is the locus of the running example of this chapter, the plant \(1/[s(s+1)]\) sampled at \(T=1\,\text{s}\). Two branches leave the poles at \(z=1\) and \(z=0.368\), meet at the breakaway point \(z=0.648\), travel round a circle centred on the finite zero at \(z=-0.718\), and return to the real axis at \(z=-2.084\). One branch then runs into the zero and the other to infinity. The circle leaves the unit circle at \(z=0.244\pm j0.970\), an angle of \(75.9^\circ\); at that point \(K=2.39\), the same number Jury's test produces in Example 2.

Read the frequency off the crossing: \(\theta=75.9^\circ=1.325\) rad and \(T=1\,\text{s}\), so the loop would oscillate at \(\omega=1.325\) rad/s at the critical gain. The continuous loop, by contrast, has no critical gain at all. The whole of that difference is contained in the finite zero at \(z=-0.718\) and the pole at \(z=0.368\), which are the algebraic fingerprints of the hold.

Zeros appear from nowhere. The continuous plant \(1/[s(s+1)]\) has no zeros. Its zero-order-hold equivalent has one, at \(z=-0.718\). Discretisation systematically manufactures zeros — for a plant of relative degree \(r\) sampled with a hold, \(r-1\) of them appear — and as \(T\) is made small some of them migrate toward \(z=-1\) and beyond, becoming non-minimum-phase. This is why a controller that blithely cancels plant zeros, safe advice in continuous design, becomes dangerous in the discrete world.
Section 28-6

The w-Plane and Frequency Response

Chapters 14 to 22 built an entire design methodology on the frequency response: Bode asymptotes, gain and phase margins, lead and lag compensation. All of it rests on being able to sweep a frequency along a straight boundary and plot straight-line asymptotes against \(\log\omega\). In the z-plane the boundary is a circle and the substitution \(z=e^{j\omega T}\) produces transcendental expressions with no asymptotes at all. The frequency-response toolkit appears to be lost.

It is recovered by one substitution. Define the bilinear or \(w\)-transformation

🔑
The w-transformation
\[ w=\frac{2}{T}\cdot\frac{z-1}{z+1} \qquad\Longleftrightarrow\qquad z=\frac{1+\tfrac{T}{2}w}{1-\tfrac{T}{2}w} \]

This maps the interior of the unit circle onto the left half of the \(w\)-plane and the unit circle itself onto the imaginary axis. A stable discrete system becomes a "stable" \(w\)-plane system, so Routh, Bode, Nyquist and every margin definition apply again without modification.

The mapping is easy to verify on the boundary. Put \(z=e^{j\omega T}\) and factor out a half-angle:

Worked derivation — the warped frequency
\[ w=\frac{2}{T}\cdot\frac{e^{j\omega T}-1}{e^{j\omega T}+1}=\frac{2}{T}\cdot\frac{e^{j\omega T/2}-e^{-j\omega T/2}}{e^{j\omega T/2}+e^{-j\omega T/2}}=j\,\frac{2}{T}\tan\frac{\omega T}{2}\;\equiv\;j\nu \]

So the unit circle does become the imaginary axis, but the frequency scale is stretched. The fictitious frequency \(\nu=(2/T)\tan(\omega T/2)\) agrees with \(\omega\) at low frequency — \(\tan x\approx x\) — and then runs away, reaching infinity at \(\omega=\pi/T\), the Nyquist frequency. The entire physical frequency range \(0\le\omega<\omega_s/2\) is spread across the whole positive \(\nu\) axis. This frequency warping is the price of recovering the Bode machinery, and it must be undone at the end: a crossover placed at \(\nu_c\) in the \(w\)-plane corresponds to the physical frequency \(\omega_c=(2/T)\arctan(\nu_cT/2)\).

Transformed into \(w\), the running example becomes something a Bode plot can handle:

The running example in the w-plane, T = 1 s
\[ G(z)=\frac{0.3679(z+0.7181)}{(z-1)(z-0.3679)} \;\xrightarrow{\;z=\frac{2+w}{2-w}\;}\; G(w)=\frac{\left(1-\dfrac{w}{2}\right)\left(1+\dfrac{w}{12.19}\right)}{w\left(1+\dfrac{w}{0.9243}\right)} \]

Three features of this expression carry the whole message of digital control. There is a pole at \(w=0\): the loop is still type 1, and its \(w\)-plane velocity constant is \(1\), matching the continuous plant exactly. There is a fast, harmless zero at \(w=-12.19\). And there is a zero at \(w=+2\) — in the right half-plane. That non-minimum-phase zero is not an artefact of the algebra: \(2/T\) is precisely where the zero-order hold's half-sample delay makes itself felt, and it contributes phase lag while contributing gain, capping the achievable bandwidth at a fraction of the sampling rate no matter how clever the controller. Design in the \(w\)-plane by the lead–lag procedures of Chapter 21, then map \(D(w)\) back through \(w=2(z-1)/[T(z+1)]\) to obtain \(D(z)\).

Section 28-7

Design by Emulation

The quickest route to a digital controller is to pretend the sampling is not there. Design \(D(s)\) by any continuous method — root locus from Chapter 13, lead–lag from Chapter 21, PID from Chapters 19 and 20 — and then find a discrete transfer function that behaves like it. This is emulation, or redesign, and it is what most industrial controllers actually are.

Every emulation rule is a rule for approximating the derivative or the integral. Consider the simplest possible continuous controller, the integrator \(U(s)/E(s)=1/s\), whose time-domain statement is \(\dot u=e\). Approximate the derivative by a difference over one sample and three natural choices appear.

Three approximations of one integral
\[ \underbrace{u_k=u_{k-1}+Te_{k-1}}_{\text{forward rectangle}}\qquad \underbrace{u_k=u_{k-1}+Te_{k}}_{\text{backward rectangle}}\qquad \underbrace{u_k=u_{k-1}+\tfrac{T}{2}(e_k+e_{k-1})}_{\text{trapezoid}} \]

Taking z-transforms of each and solving for \(U(z)/E(z)\) gives \(T/(z-1)\), \(Tz/(z-1)\) and \((T/2)(z+1)/(z-1)\). Comparing each with \(1/s\) identifies the substitution to make in any \(D(s)\):

MethodSubstitution for \(s\)Maps stable \(s\) toComment
Forward (Euler) rectangular\(\dfrac{z-1}{T}\)the half-plane \(\operatorname{Re}z\lt1\)can produce an unstable \(D(z)\) from a stable \(D(s)\); avoid unless \(T\) is very small
Backward rectangular\(\dfrac{z-1}{Tz}\)a disc of radius \(\tfrac12\) centred at \(z=\tfrac12\)always stable, but distorts fast dynamics badly
Tustin (bilinear, trapezoidal)\(\dfrac{2}{T}\cdot\dfrac{z-1}{z+1}\)exactly the unit discthe default choice; preserves stability and DC gain, warps frequency
Tustin with pre-warping\(\dfrac{\omega_1}{\tan(\omega_1T/2)}\cdot\dfrac{z-1}{z+1}\)exactly the unit discTustin corrected so that one chosen frequency \(\omega_1\) is exact
Matched pole–zeromap each root: \(s=-a\mapsto z=e^{-aT}\)the unit discreproduces pole locations exactly; gain matched separately at DC

The stability column deserves a moment. Forward Euler sets \(z=1+sT\), so a continuous pole at \(s=-a\) is placed at \(z=1-aT\); if \(aT>2\) that lands outside the unit circle and a perfectly good compensator has been turned into an unstable one. Tustin is the inverse of the \(w\)-transformation of Section 28-6, and Section 28-6 already established that the \(w\)-map carries the left half-plane onto the unit disc exactly. Tustin can therefore never destabilise a stable design — its only sin is the same frequency warping, which is why pre-warping exists: choosing \(\omega_1\) as the crossover frequency forces the discrete controller to be exact where the loop is most sensitive.

Matched pole–zero takes a different view. Rather than approximating an operator, it applies \(z=e^{sT}\) to each pole and zero of \(D(s)\) individually — the exact mapping, applied root by root. Zeros at infinity are conventionally mapped to \(z=-1\) (or one of them dropped, to leave the controller one sample of computational headroom), and an overall constant is chosen to make \(D(z)\big|_{z=1}=D(s)\big|_{s=0}\).

Emulation only works if you sample fast enough. Every rule in the table converges to the continuous controller as \(T\to0\), and every one of them is wrong at a rate proportional to \(T\). The hold contributes a phase lag of \(\omega T/2\) radians, so at the gain crossover \(\omega_c\) the design loses \(\omega_cT/2\) radians of margin it never accounted for. Requiring that loss to stay under \(5^\circ\) gives \(T\lt0.175/\omega_c\); tolerating \(10^\circ\) gives \(T\lt0.35/\omega_c\). Both amount to the familiar workshop rule: sample somewhere between 20 and 40 times per closed-loop time constant.
Rule of thumb for choosing \(T\)StatementTypical use
Shannon (absolute floor)\(\omega_s\gt2\omega_{\max}\)never sufficient on its own; an anti-aliasing filter is mandatory
Bandwidth rule\(\omega_s\approx(8\text{ to }20)\,\omega_b\)the standard engineering choice for emulation
Rise-time rule4 to 10 samples per rise timequick check from a step-response requirement
Phase-budget rule\(\omega_cT/2\le\) allowed margin losswhen phase margin is the binding specification

Sampling faster is not free. Every doubling of the rate doubles the processor load, halves the time available per computation, and — because differences of nearly equal numbers appear in the derivative term — amplifies quantisation noise. There is a genuine optimum, and it usually sits well below the fastest rate the hardware could manage.

Section 28-8

Direct Digital Design

Direct design abandons the continuous intermediary. The plant is described by \(G(z)\), which already contains the hold and the sampling delay exactly, and the controller is chosen in \(z\) to place the closed-loop roots or to realise a specified closed-loop response. Nothing is approximated, and the design remains correct even at sampling rates where emulation would fail outright.

The most common direct design is simply the PID controller of Chapter 19, written as a difference equation. Start from the continuous law and discretise the two dynamic terms with a rectangular sum and a backward difference:

Worked derivation — the digital PID
\[ u(k)=K_p\left[e(k)+\frac{T}{T_i}\sum_{i=0}^{k}e(i)+\frac{T_d}{T}\bigl(e(k)-e(k-1)\bigr)\right] \]
\[ D(z)=\frac{U(z)}{E(z)}=K_p\left[1+\frac{T/T_i}{1-z^{-1}}+\frac{T_d}{T}\left(1-z^{-1}\right)\right] \]

The form on the second line is not what one programs. Writing \(u(k-1)\) from the same expression and subtracting removes the running sum entirely, leaving the velocity or incremental form:

🔑
Digital PID, incremental form
\[ u(k)=u(k-1)+q_0e(k)+q_1e(k-1)+q_2e(k-2) \]

\[ q_0=K_p\left(1+\frac{T}{T_i}+\frac{T_d}{T}\right),\qquad q_1=-K_p\left(1+\frac{2T_d}{T}\right),\qquad q_2=K_p\frac{T_d}{T} \]

Three multiplications, three additions and three stored numbers per sample — the entire controller. The incremental form also handles actuator saturation gracefully: because the algorithm never accumulates a sum, integral windup is limited simply by clamping \(u(k)\).

A more ambitious direct method specifies the closed-loop pulse transfer function outright. Let \(M(z)=C(z)/R(z)\) be the response we want. Solving \(M=DG/(1+DG)\) for the controller gives the direct synthesis or Ragazzini formula

🔑
Direct synthesis
\[ D(z)=\frac{1}{G(z)}\cdot\frac{M(z)}{1-M(z)} \]

Free only in appearance. Three constraints bind \(M(z)\): it must contain every unstable pole and every unstable zero of \(G(z)\) as a factor in the appropriate place, or \(D(z)\) will try to cancel them and hide an unstable mode; it must have at least the delay of \(G(z)\), or \(D(z)\) will be non-causal; and \(1-M(z)\) must contain the factor \((1-z^{-1})\) if a step is to be tracked without error.

Choosing \(M(z)=z^{-N}\) — the output equal to the input, delayed by \(N\) samples and thereafter exact — is deadbeat control. The error becomes zero in a finite number of samples, something no continuous controller can achieve. Example 6 designs one and then shows its characteristic weakness: the response is exact at the sampling instants only, and between them the output can ripple substantially while the control signal rings.

The same idea appears in state-space clothing. Chapter 24 discretised \(\dot{\mathbf{x}}=A\mathbf{x}+B u\) into \(\mathbf{x}(k+1)=\Phi\,\mathbf{x}(k)+\Gamma u(k)\) with \(\Phi=e^{AT}\) and \(\Gamma=\left(\int_0^Te^{A\lambda}\,d\lambda\right)B\). Chapter 26's pole-placement argument then applies unchanged to \(\Phi-\Gamma K\), the only difference being that the target eigenvalues must lie inside the unit circle instead of in the left half-plane. Ackermann's formula computes \(K\) exactly as before. Placing all \(n\) eigenvalues at \(z=0\) makes \(\Phi-\Gamma K\) nilpotent, so any initial state is driven to zero in at most \(n\) steps: deadbeat control recovered from the state-space side, and a clean illustration that the two descriptions are one subject.

Deadbeat is a warning as much as a technique. Driving the error to zero in \(n\) samples requires enormous control effort in the first sample — the faster the deadbeat, the larger the demand — and it depends on the plant model being exact, since the design is a disguised cancellation. Real digital controllers almost never use it. Its value is conceptual: it marks the boundary of what sampling makes possible, and it shows why intersample behaviour, invisible to \(z\)-domain algebra, must always be checked separately with the modified z-transform or a simulation.
Section 28-9

Worked Examples

1 The zero-order-hold equivalent

Problem. A plant \(G_p(s)=\dfrac{1}{s(s+1)}\) is driven through a zero-order hold and sampled at \(T=1\,\text{s}\). Find \(G(z)\).

Solution. Use \(G(z)=(1-z^{-1})\,\mathcal{Z}\{G_p(s)/s\}\). Expand \(G_p(s)/s\) in partial fractions first, so that each term is a standard transform pair.

Working
\[ \frac{1}{s^{2}(s+1)}=\frac{1}{s^{2}}-\frac{1}{s}+\frac{1}{s+1}\;\Longrightarrow\;\mathcal{Z}\{\cdot\}=\frac{Tz}{(z-1)^{2}}-\frac{z}{z-1}+\frac{z}{z-e^{-T}} \]
\[ G(z)=\frac{z-1}{z}\left[\frac{z}{(z-1)^{2}}-\frac{z}{z-1}+\frac{z}{z-0.3679}\right]=\frac{1}{z-1}-1+\frac{z-1}{z-0.3679} \]

Placing the three terms over the common denominator \((z-1)(z-0.3679)\), the numerator is \((z-0.3679)-(z^{2}-1.3679z+0.3679)+(z^{2}-2z+1)=0.3679z+0.2642\). Hence

Result
\[ G(z)=\frac{0.3679\,(z+0.7181)}{(z-1)(z-0.3679)} \]

The pole at \(z=1\) is the image of the integrator; the pole at \(z=e^{-1}=0.3679\) is the image of \(s=-1\). The zero at \(z=-0.7181\) has no continuous ancestor — the hold created it.

2 Stability range by Jury's test

Problem. A proportional controller \(D(z)=K\) closes the loop around the \(G(z)\) of Example 1. For what \(K\) is the closed loop stable? Compare with the continuous loop.

Solution. The characteristic equation is \(1+KG(z)=0\), that is \((z-1)(z-0.3679)+0.3679K(z+0.7181)=0\). Expanding,

Working
\[ P(z)=z^{2}+\left(0.3679K-1.3679\right)z+\left(0.3679+0.2642K\right) \]

Apply the three second-order Jury conditions in turn.

The three conditions
\[ P(1)=0.6321K\gt0 \;\Longrightarrow\; K\gt0 \]
\[ P(-1)=2.7358-0.1037K\gt0 \;\Longrightarrow\; K\lt26.4 \]
\[ |a_0|=\left|0.3679+0.2642K\right|\lt1 \;\Longrightarrow\; K\lt2.39 \]

The third condition binds, so the loop is stable for \(0<K<2.39\). The continuous loop \(K/[s(s+1)]\) is stable for every positive \(K\). Sampling at \(T=1\,\text{s}\) has converted an unconditionally stable system into a conditionally stable one, and the culprit is the hold's half-sample lag.

3 Discrete error constants

Problem. For the loop of Example 2 with \(K=1\), find \(K_p\), \(K_v\) and the steady-state error to a unit ramp.

Solution. The open-loop pulse transfer function has one pole at \(z=1\), so the system is type 1: \(K_p=\infty\) and the step error is zero. For the ramp,

Working
\[ K_v=\frac{1}{T}\lim_{z\to1}(z-1)G(z)=\lim_{z\to1}\frac{0.3679(z+0.7181)}{z-0.3679}=\frac{0.3679\times1.7181}{0.6321}=1.00 \]
\[ e_{ss}=\frac{1}{K_v}=1.00 \]

The continuous plant has \(K_v=\lim_{s\to0}sG_p(s)=1\) as well. Sampling has left the velocity constant untouched, exactly as Section 28-4 predicted: accuracy is a low-frequency property and the hold is transparent at low frequency. What sampling took away is the freedom to raise \(K\) beyond \(2.39\) to improve that error.

4 Reading a design point off the locus

Problem. On the locus of Section 28-5 the point \(z=0.589+j0.397\) is a candidate closed-loop pole. Find its \(\zeta\) and \(\omega_n\), the gain that places it there, the settling time in samples, and the ramp error that results.

Solution. First convert the pole to polar form and apply the inverse mapping of Section 28-3.

Damping and natural frequency
\[ r=\sqrt{0.589^{2}+0.397^{2}}=0.710,\qquad \theta=\arctan\frac{0.397}{0.589}=0.593\ \text{rad} \]
\[ \omega_n=\frac{\sqrt{\ln^{2}r+\theta^{2}}}{T}=\frac{\sqrt{0.3424^{2}+0.593^{2}}}{1}=0.685\ \text{rad/s},\qquad \zeta=\frac{0.3424}{0.685}=0.50 \]

The gain follows from the magnitude condition \(K=1/|G(z)|\) evaluated at that point. The three factor lengths are \(|z+0.7181|=1.366\), \(|z-1|=0.572\) and \(|z-0.3679|=0.454\):

Magnitude condition
\[ |G(z)|=\frac{0.3679\times1.366}{0.572\times0.454}=1.935 \;\Longrightarrow\; K=\frac{1}{1.935}=0.517 \]

Settling takes \(N=-4/\ln(0.710)=4/0.3424\approx12\) samples, that is about \(12\,\text{s}\) at \(T=1\,\text{s}\). The ramp error is \(1/K_v=1/0.517=1.93\), since Example 3 showed \(K_v=K\) for this loop. So \(\zeta=0.5\) costs a large steady-state error, and the only remedies are a shorter sampling period or a controller with dynamics — which is the argument for Sections 28-7 and 28-8.

5 Emulating a lead compensator

Problem. A continuous design produced \(D(s)=\dfrac{10(s+2)}{s+10}\), with the loop crossing over near \(\omega_c=4\) rad/s. Choose a sampling period, then discretise by Tustin and by matched pole–zero and compare.

Solution. The phase-budget rule of Section 28-7 allows \(T<0.175/\omega_c=0.044\,\text{s}\) for a \(5^\circ\) loss. Take \(T=0.1\,\text{s}\) if only \(10^\circ\)–\(11^\circ\) can be spared, or \(T=0.04\,\text{s}\) to be safe. Work the arithmetic at \(T=0.1\,\text{s}\).

Tustin: substitute s → 20(z−1)/(z+1)
\[ D(z)=\frac{10\left[20(z-1)+2(z+1)\right]}{20(z-1)+10(z+1)}=\frac{10(22z-18)}{30z-10}=\frac{7.333z-6}{z-0.3333} \]

Check the DC gain: at \(z=1\) this is \(1.333/0.667=2.00\), matching \(D(0)=20/10=2\). Tustin preserves DC gain automatically, which is one reason it is the default.

Matched pole–zero: map each root by z = e^{sT}
\[ s=-2\mapsto z=e^{-0.2}=0.8187,\qquad s=-10\mapsto z=e^{-1}=0.3679 \]
\[ D(z)=K_d\,\frac{z-0.8187}{z-0.3679},\qquad K_d\,\frac{0.1813}{0.6321}=2 \;\Longrightarrow\; K_d=6.97 \]

Compare the two. Both are stable, both give a DC gain of 2, and their zeros almost coincide: \(6/7.333=0.8182\) against \(e^{-0.2}=0.8187\). The poles differ more, \(0.3333\) against \(e^{-1}=0.3679\), because the slow zero at \(s=-2\) is sampled about thirty times per time constant while the fast pole at \(s=-10\) is sampled only ten times — Tustin's warping bites hardest on the fastest root. Both discrepancies shrink linearly with \(T\). As a difference equation the Tustin version reads \(u(k)=0.3333\,u(k-1)+7.333\,e(k)-6\,e(k-1)\).

6 A deadbeat controller and its ripple

Problem. Design a deadbeat controller for the plant of Example 1 so that the unit-step response reaches its final value in one sample. Then examine the control signal.

Solution. The plant has relative degree one, so the fastest realisable target is \(M(z)=z^{-1}\). Apply the direct-synthesis formula.

Working
\[ D(z)=\frac{1}{G(z)}\cdot\frac{z^{-1}}{1-z^{-1}}=\frac{(z-1)(z-0.3679)}{0.3679(z+0.7181)}\cdot\frac{1}{z-1}=\frac{2.718\,(z-0.3679)}{z+0.7181} \]

The controller is proper and its own pole at \(z=-0.7181\) lies inside the unit circle, so it is realisable and stable. Check the response: with \(R(z)=z/(z-1)\), the error transform is \(E(z)=R(z)[1-M(z)]=\dfrac{z}{z-1}\cdot\dfrac{z-1}{z}=1\), so \(e(0)=1\) and \(e(k)=0\) for all \(k\ge1\). The output is exact from the first sample onward.

The control sequence
\[ U(z)=D(z)E(z)=\frac{2.718(z-0.3679)}{z+0.7181}\;\Longrightarrow\; u(0)=2.72,\;u(1)=-2.95,\;u(2)=2.12,\;\dots \]

The control alternates in sign, decaying only as \((-0.7181)^k\). The output is correct at every sampling instant, yet the actuator is being driven hard back and forth between them, and the true continuous output ripples accordingly. The cause is the controller's pole placed on top of the plant's hold-induced zero at \(z=-0.7181\). Retaining that zero inside \(M(z)\) instead of cancelling it removes the ringing at the cost of one extra sample of settling — the standard ripple-free deadbeat design.

Review

Chapter Summary

Unit circle

Stability means \(|z_i|\lt1\), because \(|z|=e^{\sigma T}\). Jury's test checks it without root-finding.

Specification mapping

\(|z|=e^{-\zeta\omega_nT}\), \(\theta=\omega_dT\); constant \(\zeta\) is a spiral, settling is \(-4/\ln|z|\) samples.

Error constants

Type = poles at \(z=1\); \(K_v=\frac1T\lim(z-1)G_L\), \(K_a=\frac1{T^2}\lim(z-1)^2G_L\).

Root locus

Every rule of Chapter 12 applies; read the critical gain and \(\omega=\theta/T\) at the unit-circle crossing.

w-plane

\(w=\frac2T\frac{z-1}{z+1}\) restores Bode and Nyquist, at the cost of warping \(\nu=\frac2T\tan\frac{\omega T}{2}\).

Emulation

Tustin preserves stability and DC gain; forward Euler need not. Sample 8–20 times the bandwidth.

Digital PID

\(u_k=u_{k-1}+q_0e_k+q_1e_{k-1}+q_2e_{k-2}\) — three coefficients, no windup accumulator.

Direct design

\(D=\frac{1}{G}\frac{M}{1-M}\); all poles at \(z=0\) gives deadbeat, exact at samples but prone to ripple.

Practice

Problems

Assume a zero-order hold in front of every continuous plant and unity feedback throughout. Where a numerical answer is wanted, carry four significant figures through the working. Difficulty rises down the list.

  1. A discrete closed-loop system has characteristic equation \(z^{2}-0.9z+0.2=0\). Use Jury's conditions to decide stability, then confirm by factoring.
  2. Find the range of \(K\) for which \(z^{2}+(K-1.2)z+0.5=0\) has both roots inside the unit circle.
  3. A dominant closed-loop pole pair sits at \(z=0.8\angle\pm30^\circ\) with \(T=0.05\,\text{s}\). Find \(\zeta\), \(\omega_n\), the percentage overshoot, and the settling time in seconds.
  4. A specification asks for \(\zeta=0.7\) and \(\omega_n=6\) rad/s with \(T=0.1\,\text{s}\). Locate the required pole pair in the z-plane and write the desired characteristic polynomial.
  5. For \(G_p(s)=\dfrac{1}{s+2}\) and \(T=0.2\,\text{s}\), find the zero-order-hold equivalent \(G(z)\) and its position error constant.
  6. A type-1 sampled loop has \(G_{\!L}(z)=\dfrac{0.1(z+0.9)}{(z-1)(z-0.6)}\) with \(T=0.1\,\text{s}\). Find \(K_v\) and the steady-state error to the ramp \(r(kT)=2kT\).
  7. Discretise \(D(s)=\dfrac{5(s+1)}{s+8}\) at \(T=0.05\,\text{s}\) by Tustin and by backward rectangular substitution, and comment on which pole location is closer to \(e^{-8T}\).
  8. A PID controller has \(K_p=2\), \(T_i=0.5\,\text{s}\), \(T_d=0.1\,\text{s}\), running at \(T=0.05\,\text{s}\). Compute \(q_0\), \(q_1\), \(q_2\) and write the difference equation the processor executes.
  9. Transform \(G(z)=\dfrac{0.2(z+0.85)}{(z-1)(z-0.7)}\), \(T=0.2\,\text{s}\), into the \(w\)-plane. Identify the right-half-plane zero and state the physical frequency corresponding to \(\nu=5\).
  10. For the plant of Problem 5, design a deadbeat controller for a unit step and verify that the error is zero from the first sample.
  11. A continuous design has gain crossover at \(\omega_c=20\) rad/s and phase margin \(45^\circ\). Estimate the largest \(T\) for which emulation leaves at least \(35^\circ\) of margin, and comment on whether Shannon's condition alone would have warned you.
  12. Explain, using the \(w\)-plane expression of Section 28-6, why reducing \(T\) both improves the phase available for design and eventually makes the numerical conditioning of \(D(z)\) worse.
Tip: in almost every digital-control problem the first two lines of working are the same. Write down \(G(z)=(1-z^{-1})\mathcal{Z}\{G_p(s)/s\}\) and then count the poles at \(z=1\). Those two facts fix the plant the controller actually sees and fix the type, which in turn fixes which error constant is worth computing. Only after that should you decide whether the question wants Jury, a locus, a \(w\)-plane Bode plot, or a difference equation — and resist the temptation to check stability in the s-plane, where the answer will be right for a system that does not exist.