Digital control system analysis

Report 0 Downloads 85 Views
Digital control system analysis • Analysis of ideal sampling • Aliasing • Analysis of hybrid systems • Handling the ZOH in D/A converter

Control Systems

Introduction to Digital Control

1

Ideal sampling with train of impulses ¥

å d(t - kT) =

k = -¥

( ) åC e T ¥

n

j 2 pn t

n = -¥ T 2 æ ¥

( )

- j 2pn t ö 1 where Cn = ò çç å [d(t - kT)] e T ÷÷dt T T è k = -¥ ø 2

T 2

( )

æ - j 2pn t ö 1 1 T ÷dt = = ò çç d(t) e ÷ T T Tè ø 2

Control Systems

Introduction to Digital Control

2

( )

1 ¥ j 2Tpn t 1 ¥ j(n ws )t = å d(t - kT ) = åe åe T n = -¥ T n = -¥ k = -¥ ¥

Then the sampled signal is ¥

e(t) ¥ j(n ws )t e * (t) = e(t) å d(t - kT) = åe T n=-¥ k =-¥

Control Systems

Introduction to Digital Control

3

which is, in the frequency domain, ¥

æ e(t) é ¥ j(n ws )t ù -jwt ö ÷ E * (jw) = ò çç e e dt å ê ú ÷ û -¥ è T ën=-¥ ø 1é ¥ ¥ - j(w-nws )t ù dtú = ê å ò e(t)e T ën=-¥-¥ û so 1 ¥ E * (jw) = åE[j(w - nws )] T n=-¥ Control Systems

Introduction to Digital Control

4

If we use Laplace instead of Fourier transform 1 ¥ E * (s ) = å E(s - jnws ) T n = -¥ The spectrum of the sampled signal is just the spectrum of the original signal, scaled in amplitude 1/T, and with the addition of an infinite number of sidebands shifted by n times the sampling frequency ws. Control Systems

Introduction to Digital Control

5

Aliasing • Sidebands created by sampling overlap with the signal bandwidth, unless the signal is band-limited to less than ws/2 rad/sec – This aliasing or folding causes distortion – To prevent aliasing, use an analog prefilter (before sampling) to limit the signal bandwidth to less than ws/2 rad/sec, or less than fs/2 Hz. Control Systems

Introduction to Digital Control

6

1

1

E( w ) 0.5

0

0

1 1.5

0 w

1 1.5

Original signal bandlimited to wc = 1 rad/sec Control Systems

Introduction to Digital Control

7

1

1

E( w ) T .E' ( w )

0.5

0

0

1 1.5

0 w

1 1.5

Sampled at ws = 1.9 wc. Notice distortion of sampled signal (dotted line) Control Systems

Introduction to Digital Control

8

1

1

E( w )

0.5 . T E'( w )

0

0

1 1.5

0 w

1 1.5

Sampled signal ws = 2.1 wc. Notice no distortion of sampled signal (dotted line) Control Systems

Introduction to Digital Control

9

Typically, control systems using sampled data will need an analog prefilter to prevent aliasing of high frequency noise into the control bandwidth. In particular, noise at wnoise will produce aliased spectra at wnoise – n ws, where n = 1, 2, ... For example, noise at 1001 Hz will fold to 1 Hz for fs = 10 Hz. Control Systems

Introduction to Digital Control

10

analog signal

Antialias analog prefilter

digital signal

A/D Converter

Antialias (analog low-pass) filter used to avoid aliasing of signal before sampling

Control Systems

Introduction to Digital Control

11

Shannon's sampling theorem • A signal which is band-limited to wc rad/sec and sampled at ws rad/sec can be reconstructed exactly as long as wc < ws/2 (Nyquist frequency) – The reconstruction formula is not useful for real-time applications like control – We will sample faster than 2 wc usually about 10 wc Control Systems

Introduction to Digital Control

12

D/A converter data hold • D/A converter must hold the sampled data input value until the next sample arrives – Usually a zero-order hold: maintain output at a constant value equal to the latest sample – We consider only zero-order hold (ZOH) here Control Systems

Introduction to Digital Control

13

–Impulse response of the ZOH is a square pulse: gzo (t) = u-1 (t) - u-1 (t - T ) ZOH

1 T

–Taking Laplace transform gives the ZOH transfer function: Control Systems

Introduction to Digital Control

14

1-e Gzo (s) = s

- sT

Gzo(s)

z=e

sT

z

-1

=e

- sT

z-1 is Z-transform representation of a one-time-step delay Control Systems

Introduction to Digital Control

15

Z Transform • The Laplace transform E*(s) of a sampled function e*(t) is given below: ¥

e * (t) = å e(kT) d(t - kT) k =0

¥

E * (s) = å e(kT)e -kTs k =0

Control Systems

Introduction to Digital Control

16

• Substitute z = esT into E*(s): ¥

E(z) = å e(kT )z -k k =0

• Definition of Z transform: ¥

E(z) = Z[e * (t)] = å e(kT )z -k k =0

a power series in z-1 where z is a complex variable Control Systems

Introduction to Digital Control

17

Table of Z transforms f(t) d(t) u-1(t) e-at t

Control Systems

F(s) 1 1/s 1/(s+a) 1/s2

f(kT) d(kT) u-1(kT) e-akT kT

Introduction to Digital Control

F(z) 1 z/(z-1) z/(z-e-aT) Tz/(z-1)2

18

Mapping between z and s • For sampling frequency ws: the primary strip of the s-plane is –ws/2 < w < ws/2 with infinite numbers of complementary strips above and below the primary strip

Control Systems

Introduction to Digital Control

19

•The sampling process: –maps the primary strip into the z-plane –also folds (aliases) all the complementary strips into the z-plane

Control Systems

Introduction to Digital Control

20

• Mapping the primary strip into the z-plane z=e

Ts

=e

sT ± jwT

e

=e

sT

Ð ± wT

jw j Im(z)

c

b

jws/2

a j0

s

b e

d

Control Systems

c d

1

wT

Re(z) a

e -jws/2

Introduction to Digital Control

21

• Mapping constant w loci: s = s + jw where w is constant and s varies j Im(z)

wT Re(z)

Control Systems

Introduction to Digital Control

22

• Mapping constant s loci: s = s + jw where s is constant and w varies j Im(z)

esT Re(z)

Control Systems

Introduction to Digital Control

23

• Note that inside of unit circle in z-plane is equivalent to the part of the primary strip that lies in the left half of the splane (stable region) • For convenience, we use damping ratio z and undamped natural frequency wn wn = [s2 + w2]1/2 and s = z wn 2w T j 1 z n z(z , wn ) = e - zwn T e

Control Systems

Introduction to Digital Control

24

• Mapping constant damping ratio z 1.5

Im z 0.0 , w n i

1

Im z 0.5 , w n i Im z 1.0 , w n i

0.5

0 1

0.5 Re z 0.0 , w n i

Control Systems

0 , Re z 0.5 , w n i

Introduction to Digital Control

0.5

1

, Re z 1.0 , w n i

25

• Mapping constant natural frequency wn 1.5

Im z z j , Im z z j , Im z z j ,

ws 2

1

ws 4 ws

0.5

8 0 1

0.5 ws Re z z j , 2

Control Systems

0 ws , Re z zj , 4

Introduction to Digital Control

0.5

1

ws , Re z zj , 8

26

• Mapping constrained region of plane – for example 8 < wn