discrete-time models and control -...

29
1 Discrete-time models and control Silvano Balemi University of Applied Sciences of Southern Switzerland Zürich, 2009-2010 Discrete-time signals

Upload: hoangmien

Post on 20-Aug-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

1

Discrete-time models and control

Silvano Balemi University of Applied Sciences of Southern Switzerland

Zürich, 2009-2010

Discrete-time signals

Page 2: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

2

Step response of a sampled system

Sample and hold

Page 3: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

3

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

Sampling

Train of impulses and its Fourier expansion

Page 4: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

4

Sampled signal

with

Spectrum of Sampled signal

Page 5: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

5

Hold

Linear operation

Impulse response of a ZOH

1(t)

1(t - T)

Z transform

where

Laplace transformation with

The z transform corresponds to the sequence

with the function

Page 6: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

6

Relation between different transforms

Z transform: Examples and properties

Page 7: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

7

Examples of z transforms

Some transformations

Page 8: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

8

Properties of the z transform

Linearity

Delay

Anticipation

Damping

Product

Initial value

End value

z transform

1. From the Laplace transformation

Factorization

Using „primitives“

Page 9: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

9

Inverse z transform

1. Inverse trasform via factorization

2. Inverse transform via recursion

Sampled Systems

Page 10: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

10

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

Discrete-time Transfer function from frequency domain

with variable substitution m=k+n

Page 11: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

11

Transfer function with ZOH

Gzoh(z)

Example Transfer function with ZOH

Page 12: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

12

State space representation

u constant from 0 to T

Transfer function

from

Description of Linear Time-invariant Discrete-time Systems

Page 13: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

13

Stability of sampled systems

x x

x

x

x

x

x x

x

x

x

x

Step responses

x

x

x

x

x x

x x

x x

x

x

x

Page 14: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

14

Closed-loop Control

Closed-loop sampled systems

Digital part Analog part

Digital controller

Cont.-time process

Page 15: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

15

Closed-loop Discrete-time system (2)

model of A/D conv

model of program

model of D/A conv

model of process

Gzoh(z)

Example: system stability

≈ 0.09

Page 16: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

16

Example of a program for a controller

Example of a program for a controller: 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; }

C-code

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

Page 17: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

17

Control design

•  Controller designed in discrete-time domain

•  Controller designed in continuous-time domain and then transformed into discrete-time domain

Page 18: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

18

Discrete-time controllers: design of GTOT(z)

•  Same order of GTOT(z) as of GZOH(z)

•  Numerator of GTOT(z) with order n-1

•  all zeroes at –1

•  Possible amplification for static error reduction

•  Controller obtained from process GZOH(z) and from GTOT(z)

Choice of GTOT(z) and calculation of Gc (z)

Discrete-time controllers: design of GTOT(z) Example

Desired closed-loop discrete-time poles

Plant

Closed-loop tr. function

Controller

Page 19: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

19

Discrete-time controllers: deadbeat control

•  Choice of

starting from

•  Controller obtained with

All poles at the origin

The fastest controller of the west

Discrete-time controllers: deadbeat control Example

Page 20: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

20

Discrete-time controllers: Transformation of poles

Transformation

with

Example:

Discrete-time controllers: Discrete PID equivalent

Page 21: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

21

Discrete-time controllers: bilinear transformation

Transformation

Stretching of the band –π/π onto the s-plane

Π

1 2 3 4 5

Discrete-time controllers: bilinear transformation

, pole at -b

1.

2.

3.

4.

5.

Page 22: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

22

Pole assignement: Polynomial approach

Characteristic polynomial

compared with desired characteristic polynomial gives 2nC+1 variables for nC+nG unknowns

Example: first (second) order controller is sufficient for control of second (third) order system

Controllability

Property of a system to reach any given state from the origin in a finite time through an appropriate input signal

Controllability matrix indicates controllability if full rank

Controllable subspace

Page 23: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

23

Pole assignment: State-feedback controller

If system satisfies a property called controllability

state feedback yields

Any chosen set of closed-loop poles can be obtained through an appropriate matrix K

Observability

Property of a system to estimate the value of the states looking at the inputs and at the outputs

Observability matrix indicates observability if full rank

unobservable subspace

Page 24: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

24

Observer/estimator

If system satisfies a property called observability

feedback with L yields state error system satisfying

Any chosen set of poles for the error system can be obtained through an appropriate matrix L

State estimate

State-feedback controller with static error compensation

Controller for plant with extended matrices

Page 25: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

25

discrete-time controllers: continuous or discrete-time design?

Gc(s)

G(s)

Gc(z)

GZOH(z)

continuous-time design

discrete-time design

discrete-time approximation

discrete-time modeling

Gc(w)

G(w)

Saturations and Wind-up

Page 26: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

26

Control Wind-up

Actuation signal Output signal

PID controller with Anti-Wind-up

Or limitation of output

Page 27: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

27

Anti-Wind-up through saturated feedback and FIR filter implementation

All signals bounded!

Anti-Wind-up through saturated feedback and IIR filter implementation

F(z) is polynomial in z-1 with well stable poles (inside unit circle) Case F(z)=1 corresponds to previous case.

If Anti-windup measure is too fast (actuation signal may jump from bound to bound) slow-down with low-pass filter F(z)

Page 28: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

28

Anti-Wind-up in state-feedback controllers

Anti-Wind-up through saturated feedback for state-feedback controllers

All signals bounded!

Page 29: Discrete-time models and control - SUPSIpeople.dti.supsi.ch/~smt/courses/DiscreteModelsControl_slides.pdf · Discrete-time models and control Silvano Balemi University of Applied

29

Anti-Wind-up through saturated feedback for state-feedback controllers

F(z) is polynomial in z-1 with stable poles (inside unit circle)