Digital

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

SUPSI

DTI

Automazione

Digital Control of Dynamic Systems


Silvano Balemi University of Applied Sciences of Southern Switzerland Manno, 2004

SUPSI

DTI

Automazione

Discrete-time signals

SUPSI

DTI

Automazione

Step response of a sampled system

Step Response
0.35 From: U(1)

0.3

0.25

Amplitude

To: Y(1)

0.2

0.15

0.1

0.05

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Time (sec.)

SUPSI

DTI

Automazione

Sample and hold

SUPSI

DTI

Automazione

Sampling

Multiplication with a train of unit impulses (operation is linear but time-variant)

SUPSI

DTI

Automazione

Train of impulses and its Fourier expansion

SUPSI

DTI

Automazione

Sampled signal

with

SUPSI

DTI

Automazione

Spectrum of Sampled signal

SPECTRUM OF A SIGNAL 2 |R|

1.5

0.5

0 -10

-8

-6

-4

-2

10

1.5

SPECTRUM OF THE SAMPLED SIGNAL AND ITS COMPONENTS |R*|

w1

0.5

0 -15

-10

-5

10

15

SUPSI

DTI

Automazione

Hold

Linear operation
1(t)

1(t T)

Impulse response of a ZOH

SUPSI

DTI

Automazione

Z transform

Laplace transformation with

where The z transform corresponds to the sequence with the function

SUPSI

DTI

Automazione

Relation between different transforms

SUPSI

DTI

Automazione

Z transform: Examples and properties

SUPSI

DTI

Automazione

Examples of z transforms

SUPSI

DTI

Automazione

Some transformations

SUPSI

DTI

Automazione

Properties of the z transform

Linearity Delay Anticipation Damping Product Initial value End value

SUPSI

DTI

Automazione

z transform

1. From the Laplace transformation Factorization

Using primitives
k G(s) = s+a

g(t) = k e at

z G(z) = k ze aT

SUPSI

DTI

Automazione

Inverse z transform

1. Inverse trasform via factorization

2. Inverse transform via recursion

SUPSI

DTI

Automazione

Sampled Systems

SUPSI

DTI

Automazione

Discrete-time Transfer function from time domain

No transfer function between u and y but between u* and y*

and with variable substitution l=k-m

SUPSI

DTI

Automazione

Discrete-time Transfer function from frequency domain

with variable substitution m=k+n

SUPSI

DTI

Automazione

Transfer function with ZOH

Gzoh(z)

SUPSI

DTI

Automazione

Example Transfer function with ZOH

SUPSI

DTI

Automazione

State space representation

u constant from 0 to T from

Transfer function

SUPSI

DTI

Automazione

Description of Linear Time-invariant Discrete-time Systems

SUPSI

DTI

Automazione

Stability of sampled systems

x x x x x x x x x

SUPSI

DTI

Automazione

Step responses

x x x x x x

x x x x x x

SUPSI

DTI

Automazione

Closed-loop sampled systems

Digital controller

Cont.-time process

Digital part

Analog part

SUPSI

DTI

Automazione

Closed-loop Discrete-time system (2)

model of program

model of D/A conv

model of process

model of A/D conv

Gzoh(z)

SUPSI

DTI

Automazione

Example: system stability

0.09

SUPSI

DTI

Automazione

Example of a program for a controller

G c(z) = E(z) = z 2z+3 +z+1


(z 2 + z + 1) U(z) = (z + 3) E(z) (1 + z 1 + z 2) U(z) = (z 1 + 3 z 2) E(z) U(z) + z 1 U(z) + z 2 U(z) = z 1 E(z) + 3 z 2 E(z)
{u k} + {u k1} + {u k2} = {e k1} + 3 {e k2} u k + u k1 + u k2 = e k1 + 3 e k2 u k = u k1 u k2 + e k1 + 3 e k2

U(z)

SUPSI

DTI

Automazione

Example of a program for a controller: C-code

C-code
ek_1=0; ek_2=0; uk_1=0; uk_2=0; while TRUE { yk=read_yk(); ek=yrefk-yk; uk=-uk_1-uk_2+ek_1-3*ek_2; write(uk); uk_2=uk_1; uk_1=uk; ek_2=ek_1; ek_1=ek; } ek_1=0; ek_2=0; uk_1=0; uk_2=0; while TRUE { uk=-uk_1-uk_2+ek_1-3*ek_2; yk=read_yk(); write(uk); ek=yrefk-yk; uk_2=uk_1; uk_1=uk; ek_2=ek_1; ek_1=ek; }

Minimize control delay!

You might also like