B) Methods based on numerical integration techniques: B-1 forward difference method (forward Euler), B-2 backward difference method (backward Euler), B-3 bilinear transformation method (Tustin).
C) Pole-zero matching method.
The slides list method C in the outline but do not develop it in the pages read here.
Selection of the sampling frequency
The differences in behaviour between the controller C(s) and its discretized version C(z) generally depend on the discretization method and on the sampling frequency. To obtain satisfactory results the sampling frequency ωs=2π/Ts must be chosen much higher than the control bandwidthωB of the continuous-time control system: typically 10 to 20 times higher, depending on the discretization method.
Running example: position control of a DC motor
Plant P(s)=s(s+1)1 with controller C(s) in the usual unit-feedback loop. Control design specifications:
steady-state tracking error ∣ess∣≤0.1 with r(t)=δ−2(t) (a ramp; it is implicitly assumed that ess=0 for r(t)=δ−1(t));
gain crossover frequency ωgc≈5 rad/s;
phase margin φm≈53∘.
The controller given in the slides is the lead network
Its Bode plot has ∣C(jω)∣ rising from 20 dB (low-frequency gain 50⋅2/10=10) to about 34 dB (high-frequency gain 50) between the corners at 2 and 10 rad/s, and a phase lead up to about 42∘; the loop L crosses 0 dB at ωgc≈5 rad/s with phase margin φm≈53∘ (the dB values are read from the plot).
Choice of Ts. The sampling frequency is chosen as
Idea. The discretized controller Cˉ(z) is obtained by imposing that its output uˉ[k] matches the sampled outputu[k] of the analog controller C(s), in response to the same canonical input signal. The analog controller is driven by e(t) and its output sampled with period Ts; the discrete controller is driven by the samples eˉ[k] of the same e(t).
A-1) Impulse invariance
Input e(t)=δ(t) (so eˉ[k]=δ[k]). The analog output is u(t)=L−1[C(s)](t), whose samples are u[k]=L−1[C(s)](kTs); the discrete output is uˉ[k]=Z−1{Cˉ(z)}[k]. Imposing u[k]=uˉ[k]:
Input e(t)=δ−1(t) (so eˉ[k]=δ−1[k]). The analog output samples are u[k]=L−1[sC(s)](kTs), and the discrete output is uˉ[k]=Z−1{1−z−1Cˉ(z)}[k] (the Z-transform of the step is 1/(1−z−1)). Imposing u[k]=uˉ[k]:
The slides compare the two controllers: the step responses coincide at the sampling instants (starting at 50 and settling at 10), while the frequency responses of C(s) and Cˉ(z) (plotted up to the Nyquist frequency ωN) differ at high frequency: the magnitude of Cˉ(z) goes up to about 35.5 dB against about 34 dB for C(s), and the phase of Cˉ(z) goes to 0∘ at ωN.
B) Methods based on numerical integration
Idea. Approximate the continuous-time integration operator with a discrete-time algorithm that "simulates" it.
So 1/s is replaced by Ts/(z−1), which is the substitution
s=Tsz−1,C(z)=C(s)s=Tsz−1.
Stability.Re[s]<0 maps to Re[Tsz−1]z=σ+jω=Re[Tsσ+jω−1]=Tsσ−1<0, i.e. σ<1: the left half-plane of s becomes the half-plane Re[z]<1, which contains the unit disc and much more. Consequence: a stable continuous-time C(s) can be transformed into an unstable discrete-time C(z).
B-2) Backward Euler (backward difference)
The rectangle has height equal to the value at the end of the interval: ∫(k−1)TskTsudt≈u(kTs)Ts. Hence
The left half-plane of s is mapped into the disc of center 1/2 and radius 1/2, inside the unit disc. Consequences: every stable C(s) is transformed into a stable C(z), but some unstableC(s) may be transformed into a stable C(z).
B-3) Tustin (bilinear transformation)
The area is approximated by the trapezoid: ∫(k−1)TskTsudt≈[u((k−1)Ts)+u(kTs)]2Ts. Hence
The left half-plane of s is mapped exactly onto the unit disc. Consequences: every stable C(s) becomes a stable C(z), and every unstable C(s) becomes an unstable C(z).
Method
Substitution
Image of Re[s]<0
Stability preserved
Forward Euler
s=Tsz−1
half-plane Re[z]<1
no: stable may become unstable
Backward Euler
s=Tszz−1
disc centre 1/2, radius 1/2
stable stays stable; some unstable become stable
Tustin
s=Ts2z+1z−1
unit disc
yes, in both directions
Note (slides): in general, the stability of the controller does not imply the stability of the closed-loop system, and vice versa.
Example: the three rules on C(s)=50s+10s+2, Ts=0.05 s
Frequency-response comparison (slide plot up to the Nyquist frequency ωN, values read from the plot): all discretized controllers match C(s) at low frequency; towards ωN the forward-Euler version has the highest magnitude (about 36 dB, above the 34 dB of C(s)) and the largest phase lead (peak about 47∘ against about 42∘ for C(s)); the backward-Euler version is lower (about 32.5 dB, peak phase about 38∘); the Tustin version follows C(s) most closely (about 34 dB, peak phase about 42∘). All discrete phases fall to 0∘ at ωN.
Effect of the zero-order hold
Note. Even if u[k] is a perfect replica at time t=kTs of the output u(t) of the analog controller to emulate, the "hold" process of the ZOH introduces an effective time delayTd≈Ts/2.
Continuous-time model of the ZOH. Replace the discrete-time input with its impulsive representation u⋆(t) (an impulse train); the ZOH becomes a continuous-time system H0(s) whose impulse response is a rectangular pulse of height 1 and width Ts:
The plots in the slides, against ω/ωs: Ts1∣H0∣ starts at 1 and has zeros at integer multiples of ωs with decreasing lobes; the phase is a sawtooth falling linearly from 0∘ to −180∘ between consecutive multiples of ωs and jumping back to 0∘ at each multiple.
Low-frequency approximation.
H0(jω)≈Tse−jωTs/2for ∣ω∣≤ωN=2ωs.
So H0(s) is like a low-pass filter with bandwidth ≈ωN (the −3 dB point is close to ωN on the slide plot).
Consequence: phase lag in the loop. The time delay introduced by the ZOH produces a phase lag in the loop transfer function:
∠H0(jω)≈−2ωTsfor ω<ωN≜2ωs,
which reduces the phase marginφm achieved in the continuous-time design. This may result in a large overshoot in the step response of the sampled-data system.
Remedy (slides). The reduction of phase margin caused by the ZOH can be accounted for in the design of the continuous-time controller, by allocating an extra phase margin equal to the phase lag introduced by the ZOH at the desired gain crossover frequency, ωgcTs/2.
Illustration with the running example (computed here from the slide formula, not stated on the slides): ωgc=5 rad/s and Ts=0.05 s give a lag ωgcTs/2=0.125 rad ≈7∘.
Versione ripasso
Design by emulation: design C(s) in continuous time, then discretize to Cˉ(z). Choose ωs=2π/Ts about 10 to 20 times ωB (example: ωgc=5, ωs=25ωgc=125 rad/s, Ts≈0.05 s, about 6 samples in tr≈0.29 s).
Response invariance: match the sampled output for the same canonical input.
Impulse: Cˉ(z)=Z{L−1[C(s)](kTs)}.
Step: Cˉ(z)=(1−z−1)Z{C(s)/s}.
Example C=50(s+2)/(s+10): C/s=10/s+40/(s+10), samples 10+40e−0.5k, Cˉ(z)=z−0.6150z−46.07.
Numerical integration of 1/s (area over last period):
Method
1/s→
substitution s=
stable image
Forward Euler
z−1Ts
Tsz−1
Rez<1 (stable can become unstable)
Backward Euler
z−1Tsz
Tszz−1
disc centre 1/2, radius 1/2
Tustin
2Tsz−1z+1
Ts2z+1z−1
exactly the unit disc
Example results (Ts=0.05): FE 50z−0.5z−0.9; BE 36.67z−0.67z−0.91; Tustin 42z−0.6z−0.9. Tustin follows C(s) best.
ZOH:H0(s)=s1−e−sTs, H0(jω)=Tse−jωTs/2ωTs/2sin(ωTs/2); for ∣ω∣≤ωN=ωs/2: H0≈Tse−jωTs/2, a delay Td≈Ts/2.
Consequence: phase lag ≈−ωTs/2 lowers φm and can cause large overshoot; allocate extra phase margin equal to ωgcTs/2 in the continuous design.
Typical error: assuming a stable C(s) always gives a stable C(z) (false for forward Euler); stable controller does not imply stable closed loop.
Esempio di riferimento:P(s)=s(s+1)1, specifiche ∣ess∣≤0.1 con rampa, ωgc≈5 rad/s, φm≈53∘. Regolatore: C(s)=50s+10s+2, guadagno a bassa frequenza 10, ad alta frequenza 50.
Procedura:
Scegliere Ts con ωs=2π/Ts circa 10-20 volte ωB (qui ωs=25ωgc=125 rad/s, Ts≈0.05 s).
Scegliere il metodo di discretizzazione.
Sostituire la variabile di Laplace (o la trasformata del campionato) e semplificare in rapporto di polinomi in z.
Verificare la stabilità del C(z) e confrontare le risposte in frequenza con C(s).
Invarianza allo step, passi:
sC(s)=s10+s+1040.
Antitrasformata campionata: 10+40e−0.5k per k≥0.
Z{C(s)/s}=z−1z⋅z−e−0.550z−(40+10e−0.5).
Cˉ(z)=(1−z−1)Z{C(s)/s}=z−0.6150z−46.07.
Equazione alle differenze di ciascun metodo (con y′=u):
Forward Euler: y[k]=y[k−1]+Tsu[k−1], cioè z−1Ts.
Backward Euler: y[k]=y[k−1]+Tsu[k], cioè z−1Tsz.
Tustin: y[k]=y[k−1]+2Ts(u[k−1]+u[k]), cioè 2Tsz−1z+1.
Stabilità, in breve: FE mappa il semipiano sinistro in Re[z]<1 (contiene il disco e oltre); BE nel disco di centro 1/2 e raggio 1/2; Tustin esattamente nel disco unitario, quindi conserva la stabilità in entrambe le direzioni.
Confronto in frequenza (letto dal grafico): FE ha il picco più alto (circa 36 dB, fase fino a circa 47∘); BE è più basso (circa 32.5 dB, fase circa 38∘); Tustin segue meglio C(s) (circa 34 dB, fase circa 42∘). Tutte le fasi tendono a 0∘ a ωN.
Ritardo dello ZOH:
h0(t)=δ−1(t)−δ−1(t−Ts), quindi H0(s)=s1−e−sTs.
Per ∣ω∣≤ωN=ωs/2: H0(jω)≈Tse−jωTs/2, cioè un ritardo di Ts/2.
Ritardo di fase nel loop: ∠H0≈−ωTs/2, che riduce φm.
Errori tipici:
Usare FE senza verificare la stabilità del C(z): FE può rendere instabile un C(s) stabile.
Ignorare il ritardo di Ts/2 dello ZOH nel margine di fase.
Confondere le formule di sostituzione: FE s=(z−1)/Ts, BE s=(z−1)/(Tsz), Tustin s=Ts2z+1z−1.