Вы находитесь на странице: 1из 21

Modern Control

Theory
(Digital Control)

Lecture 2
13 SEPT.2016
11/17/16

Course Overview

Analog and digital control systems

MM 1 introduction, discrete systems, sampling.


MM 2 discrete systems, specifications, frequency
response methods.
MM 3 discrete equivalents, design by emulation.
MM 4 root locus design.
MM 5 root locus design.

11/17/16

Outline

Introduction to digital control

Sampling

Digitilization
Effect of sampling
Spectrum of a sampled signals
Sampling theorem

Discrete Systems

Z-transform
Transfer function
Pulse response
Stability

11/17/16

Digitilization

Analog Control System


For example, PID control

continuous controller

r(t)

e(t)

ctrl. filter
D(s)

u(t)

plant
G(s)

y(t)

sensor
1

11/17/16

Digitization

Digital Control System

T is the sample time (s)


Sampled signal : x(kT) = x(k)
digital controller
bit voltage

r(t)

r(kT)
T

e(kT)

control:
u(kT)
difference
equations

D/A and
hold

u(t)

plant
G(s)

clock
y(kT)

A/D

sensor
1

voltage bit

11/17/16

y(t)

Digitization

Continuous control vs. digital control

Basically, we want to simulate the cont. filter D(s)


D(s) contains differential equations (time domain)
must be translated into difference equations.

Derivatives are approximated (Eulers method)


x ( k )

11/17/16

x ( k 1) x ( k )
T

Digitization
Example (3.1)
Using Eulers method, find the difference equations.
U ( s)
sa
D( s )
K0
E ( s)
sb
Differential equation
L1
( s b)U ( s ) K 0 ( s a ) E ( s ) u bu K 0 ( e ae)
Using Eulers method
u( k 1) u( k )
e(k 1) e( k )

bu K 0
ae
T
T

u( k 1) (1 bT )u(k ) K 0 ( aT 1)e( k ) K 0e( k 1)


11/17/16

Digitization
Significance of sampling time T
Example controller D(s) and plant G(s)
s2
1
1
D ( s ) 70
, G( s)
2
s 10
s( s 1) s s
Compare investigate using Matlab
1) Closed loop step response with continuous controller.
2) Closed loop step response with discrete controller.
Sample rate = 20 Hz
3) Closed loop step response with discrete controller.
Sample rate = 40 Hz
11/17/16

Digitization
Matlab - continuous controller
numD = 70*[1 2]; denD = [1 10];
numG = 1; denG = [1 1 0];
sysOL = tf(numD,denD) * tf(numG,denG);
sysCL = feedback(sysOL,1);
step(sysCL);

Matlab - discrete controller


numD = 70*[1 2]; denD = [1 10];
sysDd = c2d(tf(numD,denD),T);
numG = 1; denG = [1 1 0];
sysOL = sysDd * tf(numG,denG);
sysCL = feedback(sysOL,1);
step(sysCL);

11/17/16

Controller D(s)
and plant G(s)
s2
D( s ) 70
s 10
1
G( s) 2
s s

Digitization

Notice, high sample frequency (small sample time T )


gives a good approximation to the continuous controller

11/17/16

10

Effect of sampling
D/A in output from controller

The single most important impact of implementing a


control digitally is the delay associated with the hold.
11/17/16

11

Latihan soal-soal

Selesaikan dengan matlab

s 2s
1
1
D( s ) 70 3
, G (s)
2
s 10 s 20
s ( s 1) 5 s s 5

Buat Stef Respon analog dengan delay time


0.9second
Buat step respon diskrit nya dengan Ts = 0.01 s
dan 0.05 s
Feedback 80%

11/17/16

12

Effect of sampling

Analysis

Approximately 1/2 sample time delay

Can be approx. by Pad


(and cont. analysis as usual)

r(t)

e(t)

ctrl. filter
D(s)

u(t)

Pad
P(s)

T
Td
2
2/T
P( s)
s 2/T

y(t)

plant
G(s)

sensor
1

11/17/16

13

Effect of sampling
Example of
phase lag by
sampling
Example from
before with
sample rate = 10
Hz
Notice PM
reduction

11/17/16

14

Spectrum of a Sampled
Signal
Spectrum

Consider a cont. signal r(t)


with sampled signal r*(t)
Laplace transform R*(s) can
be calculated

r(t)
T

r (t ) r (t ) (t kT )

1
R ( s ) R ( s jns )
T k

11/17/16

r*(t)

15

Spectrum of a Sampled
Signal

11/17/16

16

Spectrum of a Sampled
High frequency signal and low frequency signal
Signal
same digital representation.

11/17/16

17

Spectrum of a Sampled
Signal
Removing (unnecessary) high frequencies
anti-aliasing filter
digital controller
r(t)

r(kT)
T

e(kT)

control:
u(kT)
difference
equations

D/A and
hold

u(t)

plant
G(s)

clock
y(kT)

A/D
T

11/17/16

antialiasing
filter

18

sensor
1

y(t)

Spectrum of a Sampled
Signal

11/17/16

19

Sampling Theorem

Nyquist sampling theorem

One can recover a signal from its samples if the


sampling frequency fs=1/T (s=2/T) is at least twice
the highest frequency in the signal, i.e.
s > 2 b (closed loop band-width)

In practice, we need

20 b < s < 40 b

11/17/16

20

Discrete Systems

Discrete Systems

11/17/16

Z-transform
Transfer function
Pulse response
Stability

21

Вам также может понравиться