Sunteți pe pagina 1din 42

Control Systems Design

r(t) y(t)
Gc Plant

Objective:
Determine controller Gc so that y(t) tracks r(t)
Additional Requirements:
Disturbance rejection
Steady-state errors
Transient characteristics
Sensitivity to parameter changes (robustness)

Page 1 ELE709 F2008


Solving control problem requires:
Selection of sensors

Selection of actuators

Development of models for the plant, actuators and sensors

Design of the controller based on the developed models and design spec's

Controllers studied in previous course:


Lead, Lag, Lead-Lag

P, PI, PD, PID

Designed in the continuous-time (CT) domain

Implemented using analog components

Based on transfer function (TF) models

Digital controllers are:


Designed either in the continuous-time or discrete-time (DT) domain

Implemented as software programs on digital computers

Page 2 ELE709 F2008


Analog Implementation

V o s Z 2 s
=
V i s Z 1 s

Page 3 ELE709 F2008


Page 4 ELE709 F2008
Typical Digital Control System

Plant
y(t)
r(kT) + Control
u(kT) u(t)
D/A Gp(s)
Program
-

yh(t)
A/D H(s)
yh(kT)
Sensor
Digital Computer

Page 5 ELE709 F2008


Classes of Signals:
Continuous-Time:

CT analog

CT quanitzed

Discrete-Time:
Sampled-Data
Digital

Notes:
In the design and analysis of digital control systems, the signals are

assumed to be sampled-data signals.


In the implementation of the digital control systems, the signals are

really digital signals.


The performance of the controller therefore depends on how many

quantization levels are used, which depends on the resolution of


the D/A and A/D converters.

Page 6 ELE709 F2008


Advantages of digital controllers:
Less susceptible to ageing and environmental variations.

Less sensitive to noise and disturbance.

Can be easily implemented using DSP chips or single-chip

micro-controller which are light and compact -> versatile.


Different control algorithms can be implemented by changing the

software only. No need to change the hardware.


Complicated controllers can be easily implemented.

Disadvantages of digital controllers:


Finite word size of digital computer limits the resolution of quantized

signals -> accuracy.


Limitation in computing speed causes time delays in the control

loop -> performance degradation and/or instability.

Page 7 ELE709 F2008


Hardware components:

A/D converter
- converts analog input signals to digital words
D/A converter

- converts digital words to analog output signals


Digital computer

- samples analog inputs throught A/D


- implements control algorithm
- outputs control signals through D/A

Page 8 ELE709 F2008


D/A Converter
Digital
Input Analog
(binary Decoder S/H
output
word)

Analog output range:


Vmin to Vmax (or Imin to Imax)

Bipolar or Unipolar
V maxV min
Resolution - usually as N number of bits, or Q= N
Quantization levels, 2 N 2
Coding scheme for input
Bipolar: offset binary or 2's complement

Unipolar: straight binary

Conversion time

Page 9 ELE709 F2008


Example: A 4-bit D/A converter, unipolar, straight binary coding.

V o=
Ro
R b 2 b1 b 0
b 3
2 4 8
V ref

Suppose V ref =5V , Ro=R , Then

b3 b 2 b1 b0=11112 V o=9.375V =V max


b3 b 2 b1 b0=00002 V o=0V =V min
9.375
Q= 4 =0.5859375V
2
Page 10 ELE709 F2008
Example: 3-bit D/A, unipolar, straight binary coding.

Assume V min =0V , V max =2V , then Q=2/8=1/4V.

Binary Code Voltage


%000 0
%001 Q = 0.25
%010 2Q = 0.50
%011 3Q = 0.75
%100 4Q = 1.00
%101 5Q = 1.25
%110 6Q = 1.50
%111 7Q = 1.75

Page 11 ELE709 F2008


Example: 3-bit D/A, bipolar, offset binary coding.

Assume V min =1V , V max =1V , then Q=2/8=1/4V.

Binary Code Voltage


%000 -4Q = -1.00
%001 -3Q = -0.75
%010 -2Q = -0.50
%011 -Q = -0.25
%100 0.00
%101 Q = 0.25
%110 2Q = 0.50
%111 3Q = 0.75

Page 12 ELE709 F2008


Example: 3-bit D/A, bipolar, 2's complement coding.

Assume V min =1V , V max =1V , then Q=2/8=1/4V.

Binary Code Voltage


%000 0.00
%001 Q = 0.25
%010 2Q = 0.50
%011 3Q = 0.75
%100 -4Q = -1.00
%101 -3Q = -0.75
%110 -2Q = -0.50
%111 -Q = -0.25

Page 13 ELE709 F2008


A/D Converter
Digital
Analog output
input S/H Quanitzer Encoder (binary
word)

Analog input range


Vmin to Vmax (or Imin to Imax)

Bipolar or Unipolar

V maxV min
Resolution - usually as N number of bits, or Q= N
N 2
Quantization levels, 2
Coding scheme for output
Bipolar: offset binary or 2's complement

Unipolar: straight binary

Conversion time
Page 14 ELE709 F2008
Sampled-Data Signals

Arise when an analog (continuous-time) signal is sampled.


The sampled-data signal obtained by sampling x(t) at an
uniform sampling period of T is a sequence of numbers:
{x kT }={x 0 , x T , x 2T , x 3T ,}
or simply as
{x k }={x 0, x 1, x 2, }
for fixed T.

Page 15 ELE709 F2008


Sampled-Data Systems

These are systems in which sampled-data signals are present.

How to model such a system?

How to analyze such a model?

Two devices found in sampled-data system:

A/D - modeled as an ideal sampler.

D/A - modeled as a hold device.

Page 16 ELE709 F2008


Difference Equation

Describes relationship between sampled-data signals.


LTI discrete-time systems can be described by linear difference
equations with constant coefficients.

Input Output
LTI
{u k } {y k }

y k a1 y k1 a n y kn=b0 u k b1 u k1 b m u km mn

Page 17 ELE709 F2008


Example: A Digital Integrator
Divide the interval[0,t f ]into k equal intervals of width T :
ut

(k-2)T kT=tf
0 T 2T (k-1)T
k 1 k 2
y k := y kT u jT T = u jT T uk 1T T
j=0 j=0
i.e.
y k = y k 1u k 1 T
where
u k 1 :=uk 1T

Page 18 ELE709 F2008


The z-Transform

Given a sequence of numbers {x k }, its z-transform is defined as


X z = [{x k }] := x k zk .
k =

If x k =0 for k 0 , i.e. {x k }={x 0 , x 1 , x 2 , , x k ,}, then


X z = [{x k }] := x k zk .
k =0

Page 19 ELE709 F2008


Properties of z-Transform
{x kT } X z , {y kT }Y z , {ukT }U z
Time Delay
i
{x k iT } z X z.

Time Advance
i1
i
{x k iT } z X zz
i
x kT z .
j

j=0
Convolution
k k
If ukT = x jT y k jT = x k jT y kT
j=0 j=0
then U z= X zY z.

Page 20 ELE709 F2008


Properties of Z-Transform

Linearity

{a x kT } {b y kT } a X z b Y z.

Initial Value Theorem

x 0=lim x kT =lim X z.
k 0 z
Final Value Theorem

1
lim x kT =lim 1z X z.
k z 1

Page 21 ELE709 F2008


Discrete Transfer Function

Describes input/output relationship of LTI discrete-time system.


Can be obtained by applying Z-Transform to difference equation
for the system.

Input Output
H z
U z = {u k } Y z = {y k }

Y z
H z =
U z

Page 22 ELE709 F2008


Example: Determine the discrete transfer function for the digital integrator
discused earlier.

The difference equation for the digital integrator was


y k = y k 1u k 1 T .
Taking Z-Transform of the above equation (ignoring all initial conditions)
gives
Y z = z1 Y zz1 U zT
i.e.
Y z z1 T T
= = .
U z 1z 1
z1

Page 23 ELE709 F2008


The Ideal Sampler
impulse modulation of r t
r t T *
r t


r * t =r t pt , pt = tkT

{ }

1 2
1
*
R =
2
R
T
k s =
T
Rk s
k = k =

2
T =sampling period s= =sampling frequency
T
Page 24 ELE709 F2008
Frequency Spectrum
R
1


m m

*
R

1/T


s m m s
s m s m s m
s m

Page 25 ELE709 F2008


Data Reconstruction: Ideal LPF
H
R*
T
R r
r * t r r t
c c


r r t =ht r t = ht r d
* *

T c
ht =

sincc t , r * = r kT
k =
T c
r c t = r kT sinc c tkT
k =

tkT
s

or r r t = r kT sinc if c =
k = T 2
Page 26 ELE709 F2008
Zero-Order Hold (ZOH)

r * t r r t

ZOH

t k t k 1 t k t k 1

r r t = r * t k , t k tt k 1

Page 27 ELE709 F2008


Zero-Order Hold

Implulse Response
ht =stept steptT , stept =unit step
Transfer Function
1
H s = [ht ] = [ 1e ]
sT
s
Frequnce Response
H j = T e j T / 2 sincT / 2

H j = T sincT / 2
H j = T / 2 (plus 180 degrees phase shift when sinc changes sign)

Page 28 ELE709 F2008


Example
r t =3 sin 100 t/6 T =0.01sec

Page 29 Source: FPW ELE709 F2008


Example: ZOH

Page 30 Source: FPW ELE709 F2008


First-Order Hold (FOH)

r * t r r t

FOH

t k1 t k t k1 t k1 t k t k 1

tt k *
*
r r t = r t k
t k t k 1
[ r t k r
*
t k1 ] , t k tt k 1

Page 31 ELE709 F2008


First-Order Hold (FOH)
ht
Impulse Response
2
tt 0
r r t = 1 , t 0tt 1 1
T T T

tt 1 t0 t1 t2
r r t = , t 1tt 2
T -1

Transfer Function


sT 2
1e
H s = T Ts1
sT
Page 32 ELE709 F2008
Frequency Response

Page 33 Source: FPW ELE709 F2008


Errors

ZOH

e ZOH T max t
dr t
dt

FOH


2
2 d r t
e FOH T max t
dt 2

Page 34 ELE709 F2008


Discrete-Time Model
for Sampled-Data Systems

Page 35 ELE709 F2008


Discrete-Time Model
of Sampled-Data Systems

Page 36 ELE709 F2008


Discrete-Time Model
of Sampled-Data Systems

uk ut y t yk
D/A G(s) A/D

Y z
What is G z := ?
U z

uk ut y t T yk
ZOH G(s)

Find the unit-pulse response:


uk ut
1 1

T
Page 37 ELE709 F2008
Y s = G s [ut ] = G s
1esT
s
1
Let y t = [Y s] , then G z = [ y kT ].

Define G zas
G z := [Y s]

= [
1esT
s
G s ]
[ ] [ ]
sT
G s e G s
=
s s

[ ]
i.e.
G s

G z = 1z (for ZOH only)
1

s
Page 38 ELE709 F2008
What does [ F s] mean ?

To obtain [ F s]:

F s

f t
sample with
period T

{ f kT }

F z =[ F s]

Page 39 ELE709 F2008


a
Example: If G s= , determine G z.
sa

By definition, G z=1z
1
s [ ]
G s

G s 1 a 1 1
But = =
s s sa s sa

Therefore [ ]1 G s
s
=stept eat stept

So that [ ]
G s
s
= [ {stepkT e akT
stepkT }]

= [ {stepkT }] [ {eakT step kT }]

Page 40 ELE709 F2008


But
z
[ {stepkT }] =
z1
z
[ {eakT stepkT }] = aT
ze
Therefore,

G z = 1z1 [ ]
G s
s

= 1z1
[ z

z
z1 zeaT ]
aT
1e
= aT
ze

Page 41 ELE709 F2008


MATLAB Commands
To define G(s) = N(s)/D(s):
>> sys_c = tf(N,D)
where N and D are the numerator and denominator
polynomials respectively.
To define state space system:
>> sys_c = ss(A,B,C,D)
where A, B, C, D are the system matrices.
To obtain discrete-time model:
>> sys_d = c2d(sys_c, T, method)
where T is the sampling period, and
method = 'zoh' for zero-order hold, or
method = 'foh' for first-order hold.

Page 42 ELE709 F2008

S-ar putea să vă placă și