Outline Digital Control System Models M. Sami Fadali Professor of Electrical Engineering University of Nevada Model of ADC. Model of DAC. Model of ADC, analog subsystem and DAC. Systems with transport lag. Examples 1 2 Common Digital Control System Configuration Computer or Microprocessor DAC Analog Subsystem ADC 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. T 3 4
Assume that DAC DAC Model (i)outputs are exactly equal in magnitude to their inputs. (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. _ Transfer Function of ZOH Use impulse sampling and Laplace transform of a unit pulse _ kt kt (k+1)t kt (k+1)t Hold 5 6 Zero-order Effect of Sampler on Transfer Function of a Cascade In the s-domain U(s) X(s) Y(s) H 1 (s) H 2 (s) 7 Time Response Change order and variables of integration 8
Punch Line Equivalent impulse response for cascade = the convolution of cascaded impulse responses. Impossible to separate convolved time function Sample the output 9 Convolving & CT Signal Repetitions of the CT function each in the location of an impulse in the train U(s) U * (s) H(s) Y(s) 10 Sampled Output Change the order of summation and integration Sample and transform 11 Transfer Function for Cascade 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: blocks separated: 12
Example Find the equivalent sampled impulse response sequence and the equivalent z-transfer function for the cascade of the two analog systems with sampled input (a) If the systems are directly connected. (b) If the systems are separated by a sampler. (a) Systems Directly Connected Impulse response Sampled impulse response z-transfer function 13 14 (b) Systems Separated By Samplers Partial fractions Impulse response sequence TF for DAC, Analog Subsystem, ADC Combination L kt Zero-order kt (k+1)t Hold Analog Subsystem T 15 16
1.5 1.0 0.5 0.0 0.5 1.0 Impulse Response of DAC and Analog Subsystem Positive Step Delayed Negative Step 1.5 0.2 0 2 4 6 8 1 0 2 4 6 8 10 time s time s (a) Response of analog system to step inputs. 1.0 0.8 0.6 0.4 0.2 0.0 (b) Response of analog system to a unit pulse input. 17 Sample & z-transform Sampled impulse response z-transfer function of DAC (zero-order hold), analog subsystem, ADC (ideal sampler) cascade Z Simplify Notation Z L Z 18 Example Find the z-domain transfer function for ADC, DAC, and the shown series R-L circuit with the inductor voltage as output. V in R L V o Voltage divider Use Solution Z Z / / / / / 19 20
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 Solution Partial fraction expansion 21 22 Use Solution (Cont.) Z Z 1 1 1 1 Systems with Transport Lag Transfer function for systems with a transport delay = positive integer. Example: time delay = 3.1 s, and Z L 23 24
Delay Theorem Z _ Define the transfer function Advance theorem of Laplace transforms Z _ Use Modified z-transform Z Causal time function Sampling & shifting Shifting a step function has no effect on samples, shifting a decaying exponential does. Z 25 26 Modified z-transform Z Transfer function Example If the sampling period is 0.1 s, determine the z-transfer function for the ADC, DAC and analog transfer function. 27 28
Solution Delay in terms of the sampling period as 0.31 = 3.1 0.1 = (4 0.9) 0.1 l = 4 m = 0.9 Partial fraction expansion Desired transfer function... CT Function 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.5 1 1.5 2 t s 29 30 R(z) + Block Diagram of Single-loop Digital Control System E(z) C(z) U(z) G ZAS (z) Y(z) 31 Closed-loop Transfer Function CL characteristic equation Closed-loop System Poles Roots of the characteristic equation (selected for desired time response specifications as in s-domain design) 32
MATLAB Commands z-transfer function for ADC, DAC & analog subsystem. >> g= tf(num, den) % Enter analog transfer function >> gd= c2d(g,t, 'method') % Sampling period T 'method' = method to obtain the digital transfer function MATLAB Example G(s) = (2s 2 +4s+3)/(s 3 +4s 2 +6s+8) >> g = tf( [2,4,3], [1,4,6,8]) >> gd= c2d(g, 0.1, 'zoh') % zero-order hold >> gd = c2d(g, 0.1, 'foh') % first-order hold >> gd = c2d(g, 0.1, 'impulse') % z-transform T 33 34 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