Modeling Digital Control Systems

12 downloads 365 Views 385KB Size Report
1. Digital Control. System Models. M. Sami Fadali. Professor of Electrical Engineering. University of Nevada. 2. Outline. • Model of ADC. • Model of DAC.
Outline • Model of ADC. • Model of DAC. • Model of ADC, analog subsystem and DAC. • Systems with transport lag. • Examples

Digital Control System Models M. Sami Fadali Professor of Electrical Engineering University of Nevada 1

Common Digital Control System Configuration Computer or Microprocessor

DAC

2

ADC Model Assume that (i) ADC outputs are exactly equal in magnitude to their inputs. (i.e. neglect quantization errors). (ii) ADC yields digital output instantaneously. (iii) Sampling is perfectly uniform. Model ADC as ideal sampler with sampling period T.

Analog Subsystem

ADC

T

3

4

DAC Model

Transfer Function of ZOH

Assume that DAC (i)outputs are exactly equal in magnitude to their inputs.

Use impulse sampling and Laplace transform of a unit pulse

(ii) yields an analog output instantaneously. (iii) outputs are constant over each sampling period. zero-order-hold: piecewise constant analog output.

_

first-order hold constructs signals in terms of straight lines

_

second-order hold constructs them in terms of parabolas.

Zero-order Hold

kT

kT

(k+1)T

kT

(k+1)T

5

6

Time Response

Effect of Sampler on Transfer Function of a Cascade In the s-domain

Change order and variables of integration U(s)

H1(s)

X(s)

H2(s)

Y(s)

7

8

Convolving

Punch Line

& CT Signal

Equivalent impulse response for cascade = the convolution of cascaded impulse responses. • Impossible to separate convolved time function Repetitions of the CT function each in the location of an impulse in the train

• Sample the output

U(s)

U*(s) H(s)

Y(s)

9

Sampled Output

10

Transfer Function for Cascade

• Change the order of summation and integration

• Cascade not separated by samplers: components cannot be separated after sampling. • Cascade separated by samplers: each block has a sampled output and input as well as a z-domain transfer function. blocks not separated:

• Sample and transform

blocks separated: ∗



∗ 11

12

Example

(a) Systems Directly Connected

Find the equivalent sampled impulse response sequence and the equivalent z-transfer function for the cascade of the two analog systems with sampled input

• Impulse response • Sampled impulse response

(a) If the systems are directly connected. (b) If the systems are separated by a sampler.

• z-transfer function

13

(b) Systems Separated By Samplers

14

TF for DAC, Analog Subsystem, ADC Combination

• Partial fractions

L

• Impulse response sequence

T kT

15

Zero-order Hold

kT

(k+1)T

Analog Subsystem 16

Sample & z-Transform

Impulse Response of DAC and Analog Subsystem 1.5

• Sampled impulse response

1.0

1.0

• z-transfer function of DAC (zero-order hold), analog subsystem, ADC (ideal sampler) cascade

0.8

Positive Step 0.5

0.6

0.0

0.4

0.5

Z

0.2

Delayed Negative Step 1.0 1.5 2

4

6

8

1 time s

(a) Response of analog system to step inputs.



Z L

0.0

0



0.2 0

2

4

6

8



10

time s

Simplify Notation Z

(b) Response of analog system to a unit pulse input. 17

18

Solution

Example

/

• Voltage divider

Find the z-domain transfer function for ADC, DAC, and the shown series R-L circuit with the inductor voltage as output.

/

Z

• Use R

Z

L Vin

Vo

/ /

19

/ 20

Solution

Example Find the z-domain transfer function of an amplifier, an armature controlled DC motor, ADC and DAC if the s-domain transfer function of the motor and amplifier is

• Partial fraction expansion

⁄ 21

Systems with Transport Lag

Solution (Cont.)

• Transfer function for systems with a transport delay

Z

• Use

22

Z

= positive integer.  Example: time delay = 3.1 s,







1 1



1



and

1





Z L 23

24

Use Modified z-Transform

Delay Theorem

Z



Z _

• Causal time function • Sampling & shifting

• Define the transfer function • Advance theorem of Laplace transforms

Z _ Z



• Shifting a step function has no effect on samples, shifting a decaying exponential does.

25

Modified z-Transform

26

Example

Z

If the sampling period is 0.1 s, determine the z-transfer function for the ADC, DAC and analog transfer function

• Transfer function

.

27

28

Solution

CT Function

• Delay in terms of the sampling period • Integer

1 0.9 0.8 0.7

• Partial fraction expansion

0.6 0.5

• z-transfer function

.

0.4

.

0.3 0.2

.

0.1 0 0

0.5

1

1.5

2

t s 29

Block Diagram of Single-loop Digital Control System R(z) +

U(z)

E(z) C(z)

GZAS(z)

30

Closed-loop Transfer Function Y(z)

• CL characteristic equation



• Closed-loop System Poles • Roots of the characteristic equation (selected for desired time response specifications as in s-domain design) 31

32

MATLAB Commands

MATLAB Example

z-transfer function for ADC, DAC & analog subsystem.

G(s) = (2s2+4s+3)/(s3+4s2+6s+8)

>> g= tf(num, den) % Enter analog transfer function >> gd= c2d(g,T, 'method') % Sampling period T

>> g = tf( [2,4,3], [1,4,6,8]) >> gd= c2d(g, 0.1, 'zoh')

'method' = method to obtain the digital transfer function

% zero-order hold

>> gd = c2d(g, 0.1, 'foh') % first-order hold >> gd = c2d(g, 0.1, 'impulse') % z-transform T 33

Transport Delay >> g=tf(3,[1,3],'InputDelay', 0.31) Transfer function: 3 exp(-0.31*s) * ------s+3 >> c2d(g,.1) Transfer function: 0.2366 z + 0.02256 z^(-4) * ----------------------z - 0.7408

35

34