Digital Control of Dynamic Systems - SUPSI

58 downloads 301 Views 313KB Size Report
SUPSI DTI. Automazione. Digital Control of. Dynamic Systems. Silvano Balemi. University of Applied Sciences of Southern Switzerland. Manno, 2004 ...
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

DTI

Automazione

Step response of a sampled system

Step Response From: U(1)

0.35

0.3

To: Y(1)

0.25

Amplitude

SUPSI

0.2

0.15

0.1

0.05

0

0

0.1

0.2

0.3

0.4

0.5

Time (sec.)

0.6

0.7

0.8

0.9

1

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

1

0.5

0 -10

1.5

-8

-6

-4

-2

0

2

4

6

8

10

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

1

w1

0.5

0 -15

-10

-5

0

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

Linearity Delay Anticipation Damping Product Initial value End value

Automazione

Properties of the z transform

SUPSI

DTI

Automazione

z transform

1. From the Laplace transformation Factorization

Using „primitives“ k G(s) = s+a

g(t) = k á e àaát

G(z) = k á zàezàaáT

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

x x

x

SUPSI

DTI

Automazione

Step responses

x

x

x

x

x

x

x

x

x

x

x x x

SUPSI

DTI

Automazione

Digital controller

Digital part

Closed-loop sampled systems

Cont.-time process

Analog part

SUPSI

DTI

Automazione

model of program

Closed-loop Discrete-time system (2)

model of D/A conv

model of process

Gzoh(z)

model of A/D conv

SUPSI

DTI

Automazione

Example: system stability

≈ 0.09

SUPSI

DTI

Automazione

Example of a program for a controller

U(z)

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 kà1} + {u kà2} = {e kà1} + 3 á {e kà2} u k + u kà1 + u kà2 = e kà1 + 3 á e kà2 u k = à u kà1 à u kà2 + e kà1 + 3 á e kà2

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; }

Minimize control delay!

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; }