[go: up one dir, main page]

0% found this document useful (0 votes)
29 views57 pages

Digital Control Systems For Class

The document discusses the differences between analog and digital signals, emphasizing that digital signals are discrete and suited for electronic devices like computers. It explains the sampling theorem, analog to digital conversion, and the importance of sampling rates in digital control systems. Additionally, it covers the stability analysis of digital systems in the z-plane and the implications of sampling rates on system stability.

Uploaded by

Havoc Gaming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views57 pages

Digital Control Systems For Class

The document discusses the differences between analog and digital signals, emphasizing that digital signals are discrete and suited for electronic devices like computers. It explains the sampling theorem, analog to digital conversion, and the importance of sampling rates in digital control systems. Additionally, it covers the stability analysis of digital systems in the z-plane and the implications of sampling rates on system stability.

Uploaded by

Havoc Gaming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 57

Digital Control Systems

Prof. V. R. Kale

1
Digital Control Systems

1
Difference Between Analog And Digital Signal

Analog Signals Digital Signals


Continuous signals Discrete signals

Represented by sine waves Represented by square waves

Human voice, natural sound, analog electronic Computers, optical drives, and other electronic
devices are a few examples devices

Continuous range of values Discontinuous values

Records sound waves as they are Converts into a binary waveform.

Only used in analog devices. Suited for digital electronics like computers.

1
Sampling Theorem: Statement

A continuous time signal can be represented


in its sampled form and can be recovered back when
sampling frequency fs is greater than or equal to the
twice the highest frequency component of
message signal.

Fs ≥ 2fm

1
Analog to Digital Conversion: Sampling

An input signal is converted from continuous-varying physical value


(e.g. pressure in air, or frequency or wavelength of light), by some
electro-mechanical device into a continuously varying electrical signal.
This signal has a range of amplitude, and a range of frequencies that
can present. This continuously varying electrical signal may then be
converted to a sequence of digital values, called samples, by some
analog to digital conversion circuit.

There are two factors which determine the accuracy with which the
digital sequence of values captures the original continuous signal: the
maximum rate at which we sample, and the number of bits used in
each sample. This latter value is known as the quantization level

1
Analog to Digital Conversion: Quantization
Advantages and Disadvantages

• Improved sensitivity. • Develop complex math


• Use digital components. algorithms.
• Control algorithms easily • Lose information during
modified. conversions due to
• Many systems inherently technical problems.
are digital. • Most signals continuous
in nature.
Digitization
• The difference between the continuous and digital systems is that
the digital system operates on samples of the sensed plant rather
than the continuous signal and that the control provided by the
digital controller D(s) must be generated by algebraic equations.
• In this regard, we will consider the action of the analog-to-digital
(A/D) converter on the signal. This device samples a physical signal,
mostly voltage, and convert it to binary number that usually consists
of 10 to 16 bits.
• Conversion from the analog signal y(t) to the samples y(kt), occurs
repeatedly at instants of time T seconds apart.
• A system having both discrete and continuous signals is called
sampled data system.
• The sample rate required depends on the closed-loop bandwidth of
the system. Generally, sample rates should be about 20 times the
bandwidth or faster in order to assure that the digital controller will
match the performance of the continuous controller.
3
Digital Control System

A D D A
Micro Correction
+ ADC Processor
DAC Element
Process
-

Clock

Measurement

A: Analog
D: Digital

4
Continuous Controller and Digital Control

R(t) y(t)
+ Gc(s) Plant
-

Continuous Controller
Digital Controller

r(t) r(kT) D/A and p(t) y(t)


Digital
A/D Plant
+ Controller Hold
-

m(kT) m(t)
D/A
5
Applications of Automatic Computer
Controlled Systems
• Most control systems today use digital computers
(usually microprocessors) to implement the controllers).
Some applications are:
• Machine Tools
• Metal Working Processes
• Chemical Processes
• Aircraft Control
• Automobile Traffic Control
• Automobile Air-Fuel Ratio
• Digital Control Improves Sensitivity to Signal Noise.

6
Digital Control System
• Analog electronics can integrate and differentiate signals. In order
for a digital computer to accomplish these tasks, the differential
equations describing compensation must be approximated by
reducing them to algebraic equations involving addition, division,
and multiplication.
• A digital computer may serve as a compensator or controller in a
feedback control system. Since the computer receives data only at
specific intervals, it is necessary to develop a method for describing
and analyzing the performance of computer control systems.
• The computer system uses data sampled at prescribed intervals,
resulting in a series of signals. These time series, called sampled
data, can be transformed to the s-domain, and then to the z-domain
by the relation z = ezt.
• Assume that all numbers that enter or leave the computer has the
same fixed period T, called the sampling period.
• A sampler is basically a switch that closes every T seconds for one
instant of time.
7
Sampler

r(t) r*(t) Zero-order P(t)


Hold
Continuous Sampled
Go(s)

0 T 2T 3T 4T

r(2T)
r(3T)
r(4T)
1 1 sT
G0 (s)   e  1 esT
 
s s s
r(kT) r(T)

T 2T 3T 4T

8
Modeling of Digital Computer
r(t) e(t) e*(t) Computer u*(t) u(t) c(t)
A/D D/A Process

Measure

Sampling analysis
Expression of the sampling signal

 

x *(t) x(t)  T (t) x(t)   (t  kT)  x(kT) (t  kT)


k 0 k 0
10
Zero-Order Hold
• The Zero-Order Hold block samples and holds its input
for the specified sample period.
• The block accepts one input and generates one output,
both of which can be scalar or vector. If the input is a
vector, all elements of the vector are held for the same
sample period.
• This device provides a mechanism for discretizing one or
more signals in time, or resampling the signal at a
different rate.
• The sample rate of the Zero-Order Hold must be set to
that of the slower block. For slow-to-fast transitions, use
the unit delay block.

11
The z-Transform
The z-Transform is used to take discrete time domain signals into a complex-
variable frequency domain. It plays a similar role to the one the Laplace
transform does in the continuous time domain. The z-transform opens up new
ways of solving problems and designing discrete domain applications. The z-
transform converts a discrete time domain signal, which is a sequence of real
numbers, into a complex frequency domain representation.

r *(t)   r(kT)  (t  kT)
k 0
For a signal t  0, Using the Laplace transforms, we have

{r *(t)}   r(kT)e ksT
k 0

z  esT

Z{r(t)} Z{r *(t)}   r(kT)z k
k 0

U (z)  z
z 1

Z{ f (t)} F (z)   f (kT)z k 12
k 0
Transfer Function of Open-Loop System

Zero-order
Process
r(t) T=1 r*(t) Hold Go(s)

(1 est ) 1
Go (s)  ; G p (s) 
s s(s 1)
Y (s) 1 est
 Go (s)G p (s)  G(s)  2
R *(s) s (s 1)
Expanding into partialfraction : G(s)  1est
( 
1 1
  1 )
 s 2 s s 1
G(z)  0.3678z  0.2644
z 2 1.3678z  0.3678

13
14
Z-Transform
Z-transform method: Partial-fraction expansion approaches
A(s)  K K2  Kn
If : X(s)   1    
(s  a1 )(s  a2 )  (s  an ) s  a1 s  a2 s  an

  

n
Then : X (z)   z Kez i
aiT
i1
  
Example:  5(s  4)  10 15  5   10 z  15z
Z  s(s 1)(s  2)   Z   s 1  s  2   z 1  z  eT 
5z
z  e2T
  

 s
 
 

 

Inverse Z-transform method: Partial-fraction expansion approaches

If : X(z) 
A(z) 
 K1az  K 2azT  
s e 2
(z  e a1T )( z  e a2T )  (s  e anT ) z  e 1T
n

then : X (kT)  
i1
K i e ai kT

1 
z(1 e2T )  Z 1  z  z   1 e 2kT
Example: x(kT)  Z (z 1)(z  e2T ) z 1 z  e2T 

 
Closed-Loop Feedback Sampled-Data Systems

r(t) R(z) E(z) Y(z)


G(z)

Y(z)

R(z) E(z) Y(z)


D(z) G(z)

Y(z) 
Y (z) G(z) G(z)D(z)
 T (z)  
R(z) 1 G(z) 1 G(z)D(z) 16
Now Let us Continue with the Closed-Loop System for the
Same Problem

Y (z)  G(z) 0.3678z  0.2644


  2
R(z) 1 G(z) z  z  0.6322
z
Assumean a unit stepinput : R(z) 
z 1
z(0.3678z  0.2644) 0.3678z2  0.2644z
Y (z)  
(z 1)(z 2  z  0.6322) z 3  2z 2 1.6322z  0.6322
Y (z)  0.3678z 1  z 2 1.4z  3 1.4z  4 1.147z  5

17
Stability
• The difference between the stability of the continuous
system and digital system is the effect of sampling rate
on the transient response.
• Changes in sampling rate not only change the nature of
the response from overdamped to underdamped, but
also can turn the system to an unstable.
• Stability of a digital system can be discussed from two
perspectives:
• z-plane
• s-plane

18
Stability Analysis in the z-Plane

A linear continuous feedback control system is stable if all poles of the


closed-loop transfer function T(s) lie in the left half of the s-plane.

In the left-hand s-plane,   0; therefore, the related magnitude of z


varies between 0 and 1. Accordingly the imaginary axis of the s-plane
corresponds to the unit circle in the z-plane, and the inside of the unit
circle corresponds to the left half of the s-plane.

A sampled system is stable if all the poles of the closed-loop transfer


function T(z) lie within the unit circle of the z-plane.

z e sT
 e( j )T
T
z e
z  T
19
The Stability Analysis Critical stability Im z-plane

The graphic expression of the stability 1


Re
condition for the sampling control systems

Stable zone
The stability criterion Unstable zone
In the characteristic equation 1+GH(z)=0, substitute z with
s 1 —— Bilinear transformation
z
s 1
We can analyze the stability of the sampling control systems the same as we did
in chapter 3 (Routh criterion in the s-plane) .

 Proof : suppose w    j , z  x  jy , then : 


 
 z 1 x  jy 1  x 1 jy  x 2  y 2 1 2y 
 s    j      j 
 z 1 x  jy 1 x 1 jy  (x 1)  y
2 2
(x 1)2  y 2 
 
  0  x 2  y 2 1  0  x 2  y 2  1
 
 ( for the left half of the s-plane)  (inside the unit circle of the z-plane) 
 
The Stability Analysis
0.632 Kz
1 G(z)  1 0
 z 1.368 z  0.368
2

Determine K for the stable system

Make s 1
Solution: z
s 1
0.632 Kz 
1  0  0.632 Ks 1.264 s  (2.736  0.632 K )  0
z 2 1.368 z  0.368

0.632 K 2.736  0.632 K


In terms of the Routh criterion : 1.264
2.736  0.632 K

We have: 0 < K < 4.33


Example: Stability of a closed-loop system
r(t) Y(t)
Go(s) Gp(s)

K K (0.3678z  0.2644) K (az  b)


G p (s)  ;G(z)  
s(s 1) z 2 1.3678z  0.3678 z 2  (1 a)z  a
The poles of the losed - loop transfer function t(z) are the roots of the equation
[1 G(z)] 0 : z2  (1 a)z  a  Kaz  Kb  0
K  1; z 2  z  0.6322  (z  0.5  j0.6182)(z  0.5  j0.6182)  0
Thesystemis stable because the roots lie within the unit circle, When K  10
z 2  2.310z  3.012  (z 1.115 j1.295) (z 1.115  j1.295) (unstable)
This systemis stable for : 0  K  2.39
Second - order sampled systemis unstable for increased gain where the continuous22is
stable for all values of gain.
Example

23
The Steady State Error Analysis
ess  lim(z 1)E(z)
z1
r e c
R(z)G(z) R(z) -
G(s)
E(z)  R(z)  c(z)  R(z)  
1 G(z) 1 G(z)

e  lim (z 1)E(z)  lim (z 1) R(z)


ss
z1 z1 1 G(z)
 1 z
* r(t)  1(t)  R(z)  ; K *  lim G(z)
1 K p z 1 p
z1
 T Tz
 * r(t)  t  R(z)  ; K *  lim (z 1)G(z)
 Kv (z 1)2 v
z1
 T 2
 * T 2 z(z 1)
 a
K r(t)  t 2
 R(z)  ; K
*
a
 lim (z 1)2
G(z)
(z 1) 3 z1
Example
r e c
Z.O.H G (s)

K
T  1s G(s) 
s(s  5)
1) Determine K for the stable system.
2) If r(t) = 1+t, determine ess=?
Solution
1)
 KTz 5 Kz 5 Kz 
 1 eTs K   (1 z )
1
  25 
G(z)  Z     (z 1)2 z 1 z  e5T 
 s s(s  5)    T 1
K 2
Ts )Z 
 2
K 
  z  2.2067 z  0.2135

 (1 e s (s  5) 

5  (z 1)( z  0.0067 )
 
K  K 5 K 
 (1 e )Z 
Ts 5   25 
s 2 s s  5 
 

The charecteristic equation of the system:


K 2
1 G(z)  1  z  2.2067 z  0.2135  0
5 (z 1)( z  0.0067 )
(5-K )z 2  (2.2067 K  5.0335 )z  (0.0335  0.2135 K )  0
s 1 
z  0.9932 w  (9.993 1.573 K )w  (10.067  2.4202 K )  0
s 1
0  K  4.16

2)
 lim G(z)  lim K  z  2.2067 z  0.2135  
2
*
Kp
z1 z1 5 (z 1)( z  0.0067 )
K z2
*
 lim (z 1)G(z)  lim    2.2067 z  0.2135  0.2K
Kv
z1 z1 5 (z  0.0067 )
1 T T 5
ess    0  
1 K *p K v* 0.2K T1 K
Steady State Error and System Type
1) For unity feedback in figure below,

2)
Design of Digital Control Systems
The Procedure:

• Start with continuous system.


• Add sampled-data system elements.
• Chose sample period, usually small but not too small.
Use sampling period T = 1 / 10 fB, where fB = B / 2 and
B is the bandwidth of the closed-loop system.
– Practical limit for sampling frequency: 20 ˂ s / B ˃40
• Digitize control law.
• Check performance using discrete model or SIMULINK.

30
31
Start with a Continuous Design
D(s) may be given as an existing design or by using root
locus or bode design.

E(z)

r(t) R(z) Y(z)


D(z) G(z)

Y(z)

32
Add Samples Necessary for Digital Control
• Transform D(s) to D(z): We will obtain a discrete system
with a similar behavior to the continuous one.

• Include D/A converter, usually a zero-order-device.

• Include A/D converter modeled as an ideal sampler.

• And an antialiasing filter, a low pass filter, unity gain filter


with a sharp cutoff frequency.

• Chose a sample frequency based on the closed-loop


bandwidth B of the continuous system.

33
Closed-Loop System with Digital Computer Compensation

Y (z) G(z)D(z)
 T (z) 
R(z) 1 G(z)D(z)
U (z)
The tranfer function of the computer is  D(z)
E(z)
Consider the second order systemwith a zero- order hold and a plant

1 0.3678z  0.7189 k(z  0.3678)
Gp(s)  when T  1;G(z)  ; If we select D(z) 
s(s 1) z 1z  0.3678 (z  r)
We cancer the poleof G(z)at z  0.3678 and have the twoparameters r and K.
1.359z  0.7189 0.5z  0.7189
D(z)  ; G(z)D(z) 
z  0.240 z 1z  0.240
zA
G (s)  K s  a D(z)  C ; Z{G (s)}  D(z); A  eaT ; B  ebT ; 1 A a
; C K
c
s b zB c
1 B  b

34
Compensation Networks (10.3; page 747)
The compensation network, Gc(s) is cascaded with the unalterable process
G(s) in order to provide a suitable loop transfer function Gc(s)G(s)H(s).

Compensation
R(s) Y(s)
+ Gc(s) G(s)
-
j

 H(s)
M
K  (s zi )

Gc (s)  N
i1

 (s  pi ) -p -z
j1


G (s)  K (s 
z)
First  order compensator

c
(s  p)
When zp, the network is called a phase- lead network 35
Closed-Loop System with Digital Computer Compensation
There are two methods of compensator design:
(1) Gc(s)-to-D(z) conversion method, and
(2) Root locus z-plane method.

The Gc(s)-to-D(z) Conversion Method

G (s)  K s  a (First - Order Compensator)


c
s b
zA
D(z)  C (Digital Controller)
zB
Z{Gc (s)}  D(z) (z - transform)
A  eaT ; B  ebT ; C 1 A K a when s  0

1 B b
36
The Frequency Response
The frequency response of a system is defined as the
steady-state response of the system to a sinusoidal input
signal.
The sinusoid is a unique input signal, and the resulting
output signal for a linear system, as well as signals
throughout the system, is sinusoidal in the steady-state; it
differs form the input waveform only in amplitude and
phase.

37
Phase-Lead Compensator Using Frequency Response
A first-order phase-lead compensator can be designed using the frequency
response. A lead compensator in frequency response form is given by
1  s 1 1 1

 

m

Gc(s) p z zp sin m
 1  s    1

In frequency response design, the phase-lead compensator adds positive phase to


the system over the frequency range. A bode plot of a phase-lead compensator
looks like the following
Phase-Lead Compensator Using Frequency Response

Additional positive phase increases the phase margin and


thus increases the stability of the system. This type of
compensator is designed by determining alfa from the
amount of phase needed to satisfy the phase margin
requirements.

Another effect of the lead compensator can be seen in the


magnitude plot. The lead compensator increases the gain of
the system at high frequencies (the amount of this gain is
equal to alfa. This can increase the crossover frequency,
which will help to decrease the rise time and settling time of
the system.
Phase-Lag Compensator Using Root Locus
A first-order lag compensator can be designed using the root locus. A lag
compensator in root locus form is given by

(s  z)
Gc(s)
(s  p)
where the magnitude of z is greater than the magnitude of p. A phase-lag
compensator tends to shift the root locus to the right, which is undesirable. For this
reason, the pole and zero of a lag compensator must be placed close together
(usually near the origin) so they do not appreciably change the transient response
or stability characteristics of the system.

When a lag compensator is added to a system, the value of this intersection will be
a smaller negative number than it was before. The net number of zeros and poles
will be the same (one zero and one pole are added), but the added pole is a
smaller negative number than the added zero. Thus, the result of a lag
compensator is that the asymptotes' intersection is moved closer to the right half
plane, and the entire root locus will be shifted to the right.
Lag or Phase-Lag Compensator using Frequency Response

A first-order phase-lag compensator can be designed using the frequency


response. A lag compensator in frequency response form is given by
1  s
Gc(s)
  1  s  

The phase-lag compensator looks similar to a phase-lead compensator, except


that a is now less than 1. The main difference is that the lag compensator adds
negative phase to the system over the specified frequency range, while a lead
compensator adds positive phase over the specified frequency. A bode plot of a
phase-lag compensator looks like the following
Example: Design to meet a Phase Margin Specification
Based on Chapter 10 (Dorf): Example 13.7

1740
G p (s)  . We will attempt to design G c (s) so that we achieve
s(0.25s 1)
a phase margin of 45 o with a crossover frequeny c  125 rad/s (Fig 10.10).
Using the Bode diagram of G p (s), we find that the phase margin is 2 o (Eq 10.24).
Based on 10.4, we find 1that the required pole - zero ratio is 6.25 (Eq 10.18).
    50; and b  312;G (s)  K (s  50)
c ab 2 ; a
c (s  312)
We select K in order to yield GG c ( jω)  1
When  c  125 rad/s. Then K  5.6.
Now the compensator G c (s) is to be realized by D(z).
Set T  0.001second. We have
4.85(z  0.95)
A  e0.05  0.95, B  e-0.312  0.73, and C  4.85; D (z) 
(z  0.73)
If we select another value for the sampling period, the the coefficient of D (z) would differ!

42
The Root Locus of Digital Control Systems

R(s) Zero Y(s)


D(z) Order KGp(s)
+
hold
-

Y (z) KG(z)D(z)
 ; 1 KG(z)D(z)  0 (Characteristic equation)
R(z) 1 KG(z)D(z)
Plot theroot locus for thecharacteristic equation of thesampled systemas K varies.
1. The root locus startsat thepoles and progresses to the zeros.
2. The root locus lies on a section of the real axis to the left of an odd number of poles and zeros.
3. The root locus is symmetrical with respect tothe horizontalreal axis.
4. 1 KG(z)D(z)  0 or KG(z)D(z)  1 and KG(z)D(z)  180o  k360o

43
Root Locus of a Second Order System
K increasing
Unstable Im {z}

Root locus

Unit circle
One zero
At z = -1 Re {z}
-3 -2 -1 0 2 poles at
z=1
K (z 1)
1 KG(z)  1 0
(z 1) 2

Let z   and solve for K


(1)2
K    F ( )
( 1)
dF ( )
 0;1  3; 2  1
d  44
Design of a Digital Controller

In order to achieve a specified responseutilizing a root locus method,


(z  a)
we will select a controller D(z) 
(z  b)
Use(z - a) to cancel one poleat G(z) that lies on the positivereal axis
of the z - plane.
Select (z - b) so that thelocus of the compensated systemwill give
a set of complex roots
at a desired point within the unit circle on the z - plane.

45
Example: Design of a digital compensator
Let us design a compensator D(z) that will result in a stable system
when Gp (s) is as described in Example 13.8.
za
With D(z)  1, we have unstablesystem.Select D(z) 
z b
K (z 1)(z  a)
KG(z)D(z) 
(z 1)2 (z  b)
If we select a  1 and b  0.2,
k (z 1)
we have KG(z)D(z) 
(z 1)(z  0.2)
Using the equation for F ( ), we obtain the entry point as z  -2.56.
The root locus is on the unit circle at K  0.8.
Thus thesystemis stable for K0.8.

46
If thesystemperformance were inadequate, we would improve
the root locus by selecting a  1 and b  - 0.98 so that
K (z 1)  K
KG(z)D(z)  
(z 1)(z  0.98) (z 1)
Then theroot locus would lie on the real axis of the z - plane.
When K  1, the root of the characteristic equation is at theorigin.

47
Im{z}
K=0.8
K increasing Unit circle

Re{z}
-1 0.2 +1
Entry point at
z = -2.56

Root locus

48
P13.10 Dorf

1
G p (s)  ;T  0.1; D(z)  K
s(s 10)
(a) The transfer function G(z)D(z)  K 0.0037z  0.0026
z 2 1.368z  0.3679
(b) The closed - loop systemcharacteristic equation is 1 K 0.0037z  0.0026  0
z 2 1.368z  0.3679
(c) Using root locus method, maximum value of K is 239.
(d) Using Figure 13.19 for T/τ  1 and maximum overshoot of 0.3 , we find K  75.
(e) When K  75; T (z)  0.2759z  0.1982
z 2 1.092z  0.5661
(f) When K  119.5, the poles are z  0.4641 j0.6843. The overshoot is 0.55.

49
P13.11 Dorf
sa
(a) Gc (s)  K
sb
By using Bode Plot, we may select a  0.7, b  0.1, and K  150.
The compensated systemovershoot and safety- state tracking error
(for a ramp input)are PO  30% and ess  0.01.
(b) Use G (s) to D(z) method (T  0.1) : D(z)  C z  A  155.3 z  0.9324
c
zB z  0.99
1 A a
A  e ;B
aT  ebT
;C  K
1 B b
A  e0.007  0.9324; B  e0.01  0.99;C  155.3
(d) Use G (s) to D(z) method (T  0.01) : D(z)  C z  A  150 z  0.993
c
zB z  0.999
1 A a
A  e ;B
aT  ebT
;C  K
1 B b
A  e0.07  0.993; B  e0.01  0.999;C  150
50
51

You might also like