Various Discretization Methods [P-1]

6.3 Various Discretization Methods [P-1]

A continuous-time LTI system can be described by the system or transfer function as

where X (s) and Y (s) are the Laplace transforms of the input and output. Its input- output relationship can be written as an integro-differential equation. We often use the numerical methods to convert the integro-differential equation into the corre- sponding difference equation, which can easily be solved on a digital computer.

The difference equation may be represented by a discrete system function G D [z] (Sect. 4.4), which can be thought of representing a discrete-time equivalent to G A (s)

(see Fig. 6.4).

Continuous–time system Discrete–time system Transfer function

Transfer function

G D Y [z ] = [z ] = j=0 X (s)

= Σ j=0

b j s Y (s) j Discretization

⇔ (Laplace transform)

(z–transform) Z Integro–differential equation

Difference equation

d j x (t ) Numerical

i=0 a i d y (t ) i = Σ b j

approximation

Σ i=0 a i y [n –i ] = Σ j=0 b j x [n–j ]

dt j=0

dt j

Fig. 6.4 Discretization and numerical approximation Some numerical approximation techniques on differentiation/integration will

now be presented with the corresponding discretization methods.

6.3.1 Backward Difference Rule on Numerical Differentiation

We could replace the derivative of a function x(t )

(s) = s X(s) by

(nT ) − x(nT − T )

: Y [z] =

X [z]

T where the initial values have been neglected since we are focusing on describing

the input-output relationship. This numerical differentiation method suggests the backward difference mapping rule (Fig. 6.5(a)):

1−z −1

s→

or equivalently,

→z

1−sT

6.3 Various Discretization Methods [P-1] 285

Im{z } y(t

d )= t

1 z –plane → y(nT )= x (nT ) – x (nT–T ) T

dt x (t ) y (t )=∫ x( 0 τ )d τ

→ y(nT ) = y (nT–T ) + T x (nT )

0 1/2 1 Re{z } t

–1 (a) Backward difference rule

0 (n – 1)T nT

0 (n –1)T nT

(c) Mapping of stable region Fig. 6.5 Backward difference or right–side integration rule

(b) Right–side integration rule

Example 6.3 Backward Difference Rule For a continuous-time system with the system function G A (s) = a/(s + a), the backward difference rule yields the following discrete system function:

(1 − z s=(1−z −1 )/ T + a aT

(E6.3.1) z − 1/(1 + aT )

1 + aT − z −1

This implies that the s-plane pole is mapped into the z-plane through the backward difference or right-side integration rule as

1 for |s p T |<<1

This implies that if the s-plane pole s p is so close to the origin and/or the sampling period is so short that |s p T | << 1, then the location of the pole mapped to the

z -plane from the s-plane is

z p ∼ s p T =e

This relationship between the s-plane poles and the corresponding z-plane poles is almost the same as those for other discretization methods.

Remark 6.6 Mapping of Stability Region and Frequency Transformation From Eq. (6.3.1), it can be seen that the j ω-axis (the stability boundary) in the s -plane is mapped to

2 (1 + e ) with θ = 2 tan (6.3.2)

This describes the circle of radius 1/2 and with the center at z = 1/2, which is inside the unit circle in the z-plane (see Fig. 6.5(c)). It is implied that the backward

286 6 Continuous-Time Systems and Discrete-Time Systems difference rule always maps stable analog systems into stable discrete equivalents,

but some unstable analog systems also yield stable discrete ones. Besides, since the jω -axis in the s-plane does not map to the unit circle in the z-plane, the digital

frequency response will deviate from the analog frequency response as ω → ±∞ or Ω → ±π (farther from s = 0 or z = 1). Thus, in order to make the frequency response of the discrete-time equivalent close to that of the original analog system (for the principal frequency range), we must decrease the sampling T or equiva- lently, increase the sampling frequency ω s so that significant pole/zeros are mapped to the neighborhood of z = 1.

6.3.2 Forward Difference Rule on Numerical Differentiation

We could replace the derivative of a function x(t )

(s) = s X(s) by

(nT + T ) − x(nT )

: Y [z] = T This numerical differentiation method suggests the forward difference mapping rule

X [z]

(Fig. 6.6(a)):

z−1

s→ or equivalently, 1 + s T → z (6.3.3)

Example 6.4 Forward Difference Rule For a continuous-time system with the system function G A (s) = a/(s + a), the forward difference rule yields the following discrete system function:

a a aT

G f [z] =

(E6.4.1) s+a s=(z−1)/T

(z − 1)/T + a

z − (1 − aT )

Im{z }

z – plane → y(nT )= x (nT + T ) – x (nT ) → y(nT )=y(nT–T ) + Tx (nT – T ) T

y (t )= dt d x (t ) y (t )=∫ x( 0 τ )d τ

0 z=1 Re{z }

0 nT (n + 1)T t

(n – 1)T nT (n + 1)T

(a) Forward difference rule

(c) Mapping of stable region Fig. 6.6 Forward difference or left–side integration rule

(b) Left–side integration rule

6.3 Various Discretization Methods [P-1] 287 This implies that the s-plane pole is mapped into the z-plane through the forward

difference or left-side integration rule as

e s=s s p = −a → z = z p =1+s p p T (E6.4.2) for |s p = T |<<1 This implies that if the s-plane pole s p is so close to the origin and/or the sampling

(D.25)

period is so short that |s p T | << 1, then the location of the poles mapped to the z -plane from the s-plane is

p ∼ p T =e

Remark 6.7 Mapping of Stability Region By Forward Difference Rule From Eq. (6.3.3), it can be seen that the j ω-axis (the stability boundary) in the s -plane is mapped to

(6.3.4) This describes the straight line parallel to the imaginary axis and crossing the real

z = 1 + jωT

axis at z = 1. It is implied that the forward difference rule maps the left half plane (LHP) in the s-plane to the left of z = 1 in the z-plane with some por- tion outside the unit circle. Consequently, some stable analog systems may yield unstable discrete equivalents, while unstable analog systems always make unsta- ble discrete ones. Hence, this is an undesirable mapping that cannot be used in practice.

6.3.3 Left-Side (Rectangular) Rule on Numerical Integration

We could replace the integral of a function x(t )

y (t ) = x (τ )dτ : Y (s) = X (s)

by Tz −1 y (nT ) = y(nT − T ) + T x(nT − T ) : Y [z] =

X [z] 1−z −1

This numerical integration method suggests the left-side integration rule (Fig. 6.6(b)):

z−1 s→ T or equivalently, 1 + s T → z

This is identical to the forward difference rule (6.3.3).

288 6 Continuous-Time Systems and Discrete-Time Systems

6.3.4 Right-Side (Rectangular) Rule on Numerical Integration

We could replace the integral of a function x(t )

y (t ) = x (τ )dτ : Y (s) = X (s)

by T y (nT ) = y(nT − T ) + T x(nT ) : Y [z] = 1−z −1

X [z]

This numerical integration method suggests the right-side integration rule (Fig. 6.5(b)):

1−z −1

s→

or equivalently,

This is identical to the backward difference rule (6.3.1).

6.3.5 Bilinear Transformation (BLT) – Trapezoidal Rule on Numerical Integration

By the trapezoidal rule (or Tustin’s method), we could replace the integral of a function x(t )

y (t ) = x (τ )dτ : Y (s) = X (s)

by

1+z −1 (nT ) = y(nT − T ) + 2 (x(nT ) + x(nT − T )) : Y [z] = 2 −1 X [z] 1−z

which suggests the bilinear transformation rule (Fig. 6.7(a)):

1 + sT /2 s→ T

2 1−z −1

or equivalently,

Im{z } y (t t )=∫ x(

0 τ )d τ

→ y(nT )=y(nT–T z –plane

Unit circle T

)+ 2 ( x (nT ) + x (nT –T ) )

0 z=1 Re{z }

(n – 1)T nT (n +1)T

(a) Trapezoidal integration rule (b) Mapping of stable region Fig. 6.7 Trapezoidal integration rule or Tustin’s method – Bilinear transformation

6.3 Various Discretization Methods [P-1] 289 Example 6.5 Bilinear Transformation (BLT)

For a continuous-time system with the system function G A (s) = a/(s+a) having

a pole at s = −a and cutoff frequency ω A,c = a, the bilinear transformation (BLT) yields the following discrete system function:

G bl (z + 1)/(2 + aT )

a a aT

[z] =

(E6.5.1) s+a

1−aT /2 s= T (1+z−1)

= 2(1−z −1 )

2(1−z−1)

T (1+z −1 ) +a

z− 1+aT /2

This implies that the s-plane pole is mapped into the z-plane through the BLT as

1+s p T/ 2 1 − aT /2 s=s = −a → z = z =

(E6.5.2) 1−s p T/ 2 1 + aT /2

The cutoff frequency of this discrete-time equivalent can be found as

a a |G bl [z]|| z=e j ωT = 2(e j ωT / 2

A,c T (E6.5.3)

Remark 6.8 Mapping of Stability Region and Frequency Transformation by BLT From Eq. (6.3.7), it can be seen that the j ω-axis (the stability boundary) in the s -plane is mapped to

=e jΩ =e (6.3.8) which describes the unit circle itself (see Fig. 6.7(b)). It is implied that the BLT

j 2 tan(ωT /2)

always maps stable/unstable analog systems into stable/unstable discrete-time equiv- alents. However, since the entire j ω-axis in the s-plane maps exactly once onto the unit circle in the z-plane, the digital frequency response will be distorted (warped) from the analog frequency response while no frequency aliasing occurs in the fre- quency response, i.e., the analog frequency response in the high frequency range is not wrapped up into the digital frequency response in the low frequency (see

jω D Fig. 6.8). We set z = e T =e with Ω = ω D T in Eq. (6.3.8) to get the

290 6 Continuous-Time Systems and Discrete-Time Systems

= ω = ω D T A T+2π T ]⎜

⎜G frequency aliasing

π/T π/T 3π/T A

c frequency warping

(a) Frequency transformation through the impulse-invariant D,c T and bilinear transformation

A prewarping:

ω ω A,c ω′ A,c

A,c ω′ T A,c = 2 tan ω T

2 (b) Frequency warping and prewarping

Fig. 6.8 Frequency transformation

relationship between the digital frequency (Ω or ω D = Ω/T ) in the z-plane and the analog frequency ω A in the s-plane as

j Ω (6.3.8)

2 tan e −1 e (ω A T/ = 2) ;

2 A T Ω ≡ω D T = 2 tan

;ω D =

tan −1

: warping (6.3.9)

6.3 Various Discretization Methods [P-1] 291 For low frequencies such that |ω A | << 1 → tan −1 (ω A T/

2) ∼ =ω A T/ 2, this relationship collapses down to

ω D ∼ =ω A (6.3.10) On the other hand, the nonlinear compression for high frequencies is more apparent,

causing the frequency response at high frequencies to be highly distorted through the bilinear transformation.

Remark 6.9 Prewarping (1) To compensate for the frequency warping so that frequency characteristics of

the discrete-time equivalent in the frequency range of interest is reasonably similar to those of the continuous-time system, we should prewarp the critical frequencies before applying the BLT, by

tan

: prewarping (6.3.11)

so that frequency transformation (6.3.9) with prewarping becomes

′ (6.3.9) 2 ω ′ D tan −1 A = T

2 ≡ω (2) The BLT with prewarping at an analog frequency ω c can be performed by

−1 × (2/ T ) tan(ω T/ 2) 1+z = c tan(ω c T/ 2) 1+z −1

2 1−z −1

instead of s → (6.3.13)

T 1+z −1 for s in G A (s) where ω c (< π/ T ) is a critical (prewarp) frequency.

(3) The warping and prewarping (against warping) by the frequency scale conver- sion is depicted in Fig. 6.8. It is implied that, if we design an analog filter, i.e., determine G A (jω ′ A ) to satisfy the specifications on frequency ω ′ A , the orig- inal frequency response specifications on ω A will be satisfied by the digital filter

G bl [z] that is to be obtained by applying the BLT to G A (s ′ ). Figure 6.8 show the frequency transformation through BLT (accompanied with

frequency warping, but no frequency aliasing) and that through impulse-invariant transformation (accompanied with frequency aliasing, but no frequency warping).

Example 6.6 Bilinear Transformation with Prewarping For a continuous-time system with the system function G A (s) = a/(s+a) having

a pole at s = −a and cutoff frequency ω A,c = a, the bilinear transformation (BLT) with prewarping yields the following discrete system function:

292 6 Continuous-Time Systems and Discrete-Time Systems

a (2/ T ) tan(aT /2)

G bl, pr e [z] =

2 s+a (E6.6.1)

T (1+z −1 ) + T tan(aT /2) This implies that the s-plane pole is mapped into the z-plane through the BLT as

tan(aT /2)(1+z−1)

tan(aT /2)/a s=s p = −a → z = z p

1+s p

1−s p tan(aT /2)/a ∼

for |s p T | << 1 (E6.6.2)

1 + aT /2

e −s p T/ 2

Note that G A (s) and its discrete-time equivalent obtained by the BLT with prewarp- ing have the same cutoff frequency (half-power point) ω D = a at which

|G A (jω A ) || ω A =a = G bl, pr e [e

jω D T

] ω D =a = √ = −3 [dB] (E6.6.3)

6.3.6 Pole-Zero Mapping – Matched z-Transform [F-1]

This technique consists of a set of heuristic rules given below. (1) All poles and all finite zeros of G A (s) are mapped according to z = e sT .

(2) All zeros of G A (s) at s = ∞ are mapped to the point z = −1 in G[z]. (Note that s = j∞ and z = −1 = e jπ represent the highest frequency in the s-plane

and in the z-plane, respectively.) (3) If a unit delay in the digital system is desired for any reason (e.g., because of computation time needed to process each sample), one zero of G A (s) at s = ∞ is mapped into z = ∞ so that G[z] is proper, that is, the order of the numerator is less than that of the denominator.

(4) The DC gain of G pz [z] at z = 1 is chosen to match the DC gain of G A (s) at s = 0 so that

G D [z] | z=e jωpT =1 ≡ G A (s) | s= jω A =0 ;G pz [1] ≡ G A (0) Example 6.7 Pole-Zero Mapping

For a continuous-time system with the system function G A (s) = a/(s + a), we can apply the pole-zero mapping procedure as

a zero at s = ∞ Rule 1, 2 zero at z = −1 z+1

pole at s = −a pole at z = e s+a −aT z−e −aT

Rule 3

1−e →

zero at z = ∞,

1 Rule 4

−aT

pole at z = e −aT z−e −aT

→ G pz [z] = z−e −aT

(E6.7.1)

6.4 Time and Frequency Responses of Discrete-Time Equivalents 293 At the last stage, (1−e −aT ) is multiplied so that the DC gain is the same as that of the

analog system: G pz [1] ≡ G A (0) = 1. This happens to be identical with Eq. (E6.2.2), which is obtained through the step-invariant (or z.o.h. equivalent) transformation.

Remark 6.10 DC Gain Adjustment Irrespective of which transformation method is used, we often adjust the DC gain of G[z] by multiplying a scaling factor to match the DC steady-state response:

G D [z] | z=e jωpT =1 ≡ G A (s) | s= jω A =0 ;G pz [1] ≡ G A (0) (6.3.14)

6.3.7 Transport Delay – Dead Time

If an analog system contains a pure delay of d s in time, it can be represented by a continuous-time model of the form

(6.3.15) If the time delay is an integer multiple of the sampling period T , say, d = M T ,

G (s) = H (s)e −sd

then the delay factor e −sd =e −s M T can be mapped to z −M (with M poles at z = 0). More generally, if we have d = M T + d 1 with 0 ≤ d 1 < T , then we can

write

e −sd =e −s M T e −sd 1 (6.3.16)

1, we can make a rational approximation of

With sufficiently high sampling rate such that d 1 < T <<

Now we can substitute Eq. (6.3.16) with Eq. (6.3.17) into Eq. (6.3.15) and apply a discretization method to obtain the discrete-time equivalent.