digital controls & digital filters lectures 25 & 26 25-26... · 2017-04-24 · digital...

18
Digital Controller Design Modern Control Design Digital Controls & Digital Filters Lectures 25 & 26 M.R. Azimi, Professor Department of Electrical and Computer Engineering Colorado State University Spring 2017 M.R. Azimi Digital Control & Digital Filters

Upload: others

Post on 29-Mar-2020

17 views

Category:

Documents


1 download

TRANSCRIPT

Digital Controller Design Modern Control Design

Digital Controls & Digital FiltersLectures 25 & 26

M.R. Azimi, Professor

Department of Electrical and Computer EngineeringColorado State University

Spring 2017

M.R. Azimi Digital Control & Digital Filters

Digital Controller Design Modern Control Design

Deadbeat Control Design

In previous example, we were amazed by what digital PID can do. Can we do betterthan PID? Recall that for the uncompensated

G(z) = 0.0453(z+0.904)(z−0.905)(z−0.819)

Suppose we choose: D(z) = (z−0.905)(z−0.819)0.0453(z−1)(z+0.904)

Then the loop transfer function is:

G(z)D(z) = 1(z−1)

and closed-loop transfer function

T (z) = C(z)R(z)

= G(z)D(z)1+G(z)D(z)

= 1z

That is, for r(n) = us(n) =⇒ c(n) = us(n− 1) i.e. (one-step deadbeat)

which reaches ess = 0 in one sample with no overshoot and very fast rise time.Issues

1 Relies on perfect pole-zero cancellation,

2 If G(z) has zeroes outside the unit circle, D(z) will be unstable,

3 If G(z) has more than one more pole than zeros, D(z) is improper andunrealizable (not causal).

M.R. Azimi Digital Control & Digital Filters

Digital Controller Design Modern Control Design

Deadbeat Control Design-Cont.

Thus, deadbeat design requirements:

1 ess = 0

2 D(z) must be physically realizable and stable.

T (z) = C(z)R(z)

= G(z)D(z)1+G(z)D(z)

Solve for D(z) in terms of G(z) and T (z):

D(z) = 1G(z)

T (z)1−T (z)

For one step deadbeat: T (z) = 1/z

D(z) = 1G(z)

1(z−1)

For 2-step deadbeat: T (z) = 1/z2

D(z) = 1G(z)

1z2−1

Error signal: E(z) = R(z)− C(z) = R(z)(1− T (z)) = R(z)1+D(z)G(z)

M.R. Azimi Digital Control & Digital Filters

Digital Controller Design Modern Control Design

Deadbeat Control Design-Cont.

If R(z) = 1(1−z−1)

= z(z−1)

: unit step

Then,ess = lim

n→∞e(n) = lim

z→1(1− z−1)E(z) = lim

z→1(1− T (z))

For T (z) = 1z

or T (z) = 1z2

, ess = 0 i.e. condition 1 is satisfied.

Remark:

In general for ess = 0, (1− T (z)) = (1− z−1)P (z) for step input or(1− T (z)) = (1− z−1)2P (z) for ramp input where P (z) is a polynomial in z−1 withP (1) = 0.

Example 1:Consider G(z) = 1

z2−z−1. Design a one-step deadbeat for a unit step input.

D(z) = 1G(z)

1(z−1)

= z2−z−1(z−1)

: unrealizable (improper)

Two-step deadbeat is possible:

D(z) = z2−z−1(z2−1)

: Proper

M.R. Azimi Digital Control & Digital Filters

Digital Controller Design Modern Control Design

Deadbeat Control Design

Example 2: For the system shown below, given the plant transfer functionGp(s) =

1s+0.5

. (a) Design a deadbeat controller; and (b) Find the control signal u(n).

G(z) = (1− z−1)Z[

1s(s+0.5)

]= 2(1−e−0.5T )

(z−e−0.5T )

For one-step deadbeat: D(z) = 1G(z)

1z−1

= z−e−0.5T

2(1−e−0.5T )(z−1)

Also, U(z) = D(z)E(z)

where for a unit step input R(z) = zz−1

=⇒ E(z) = R(z)1+G(z)D(z)

=zz−1

1+ 1z−1

= 1

HenceU(z) = D(z) = z−e−0.5T

z(1−e−0.5T )(z−1)

Expand using power series,

U(z) = u(0) + u(1)z−1 + u(2)z−2 + · · · = 12(1−e−0.5T )

+ 12z−1 + 1

2z−2 + . . .

When T is chosen to be very small u(0) will be very large =⇒ Saturation in the plant.

M.R. Azimi Digital Control & Digital Filters

Digital Controller Design Modern Control Design

Dahlin’s Method for Deadbeat Design

To remedy the saturation problems as in Example 2, we sacrifice perfect deadbeatresponse for a gradual deadbeat. That is, we choose,

c(t) = us(t)− 1λe−t/λus(t) : λ controls speed of response

instead of c(t) = us(t− T ).Or in the s-domain,C(s) = 1

s(λs+1)(instead of C(s) = e−Ts

s)

Then,

C(z) = Z [C(s)] = z(1−e−T/λ)(z−1)(z−e−T/λ)

Thus for unit step input R(z) = zz−1

T (z) = C(z)R(z)

= 1−e−T/λz−e−T/λ (instead of T (z) = 1/z)

Using this T (z) in expression for D(z):

D(z) = 1G(z)

T (z)1−T (z)

= 1G(z)

1−e−T/λz−1

and control signal

U(z) = D(z)E(z) = D(z)R(z)1+D(z)G(z)

= (1−e−T/λ)z(z−e−T/λ)(z−1)G(z)

Note that here, E(z) 6= 1 since c(t) is not a delayed step.M.R. Azimi Digital Control & Digital Filters

Digital Controller Design Modern Control Design

Dahlin’s Method for Deadbeat Design

Here, we repeat Example 2 with Dahlin’s method using λ = 0.5.

G(z) = 2(1−e−0.5T )

z−e−0.5T

D(z) = (1−e−2)(z−e−0.5)

2(z−1)(1−e−0.5)

andU(z) = (1−e−2T )z(z−e−0.5T )

2(1−e−0.5T )(z−e−2T )(z−1)

Using long-division:

u(0) = 1−e−2T

2(1−e−0.5T )

Thus,

when limT→0

u(0) = 2 = 1/λ

i.e. no saturation problem.

The system response is shown.Note: Dahlin’s method for deadbeat design is also based upon pole-zero cancellation.

M.R. Azimi Digital Control & Digital Filters

Digital Controller Design Modern Control Design

Pole Placement Using State Feedback

The design methods discussed so far utilize only one feedback signal. However,complete description about system’s behavior is measured by the State Vector.

Idea: Use entire state vector of the plant to design a state feedback control law.

This idea is depicted in the figure.x(n+ 1) = Ax(n) +Bu(n)y(n) = Cx(n) : Plant State Equations

u(n) = r(n)− f(n) = r(n)−Kx(n): State Feedback Law

Difficulties

All state variables may not be directly measurable.

Output could be noisy - one cannot measure state from output.

M.R. Azimi Digital Control & Digital Filters

Digital Controller Design Modern Control Design

Pole Placement Using State Feedback-Cont.

Design involves two phases.

Phase I: Assume precise knowledge of state vector x(n) i.e. (x(n) = x(n)) and designGain vector K to place poles at locations to meet desired specs.

Phase II: Design an observer (full-order or reduced-order) to generate x(n) fromknowledge of y(n) and u(n).

Phase I: Design of State Feedback

Assumption: Entire x(n) is available for measurement (see Fig.)

Definition: Complete State ControllabilityA plant described by state equations given on previous slide is completely statecontrollable (reachable) if for any IC x(0), ∃ a set of control signalsu(0), . . . , u(N − 1) which transfer x(0) to any arbitrary final state x(N).

M.R. Azimi Digital Control & Digital Filters

Digital Controller Design Modern Control Design

Pole Placement Using State Feedback-Phase I

Theorem 1:

A plant with state equations (above) is completely state controllable iff thecontrollability matrix,

CN = [B AB A2B . . . AN−1B]

is of rank N or detCN 6= 0.

For example, system shown by the following state diagram is not state controllable.

Example: Determine controllability of system:

x(n+ 1) =

[1 1

−0.25 0

]x(n) +

[1−0.5

]u(n)

y(n) =[1 0

]x(n)

Controllability matrix is

C2 = [B AB] =

[1 0.5−0.5 −0.25

]detC2 = 0: Not controllableNotice that transfer function:

G(z) = C(zI −A)−1B =[1 0

] [ z − 1 −10.25 z

]−1 [1−0.5

]= z−0.5

(z−0.5)2

Pole-zero cancellation occurs.M.R. Azimi Digital Control & Digital Filters

Digital Controller Design Modern Control Design

Pole Placement Using State Feedback-Phase I

Remarks:

1 Necessary and sufficient condition for complete state controllability is thatpole-zero cancellation does NOT occur in G(z)

2 In digital systems controllability is also dependant on T (sampling period) since

A = eAcT = φc(T )B = A−1

c (A− I)Bc

and it is possible that for some T ,

AiB = AjB for i, j ∈ [1, N − 1], i 6= j

i.e. CN will be rank deficient.Example: Consider a plant with transfer function, G(s) = ω

s2+ω2 . Determinecontrollability.

From differential equation, d2y(t)

dt2+ ω2y(t) = ωu(t), we arrive at continuous-time state

equation,

x(t) =

[0 1−ω2 0

]x(t) +

[01

]u(t)

y(t) =[1 0

]x(t)

M.R. Azimi Digital Control & Digital Filters

Digital Controller Design Modern Control Design

Pole Placement Using State Feedback-Phase I

The state transition matrix for the continuous-time system is,

φc(t) = eAct = L−1(sI −Ac)−1 = L−1{

s 1−ω2 s

−1

(s2+ω2)}

Thus, we get,

A = eAcT =

[cosωT 1

ωsinωT

−ω sinωT cosωT

]Now, since for ωT = kπ =⇒ cosωT = ±1and sinωT = 0 =⇒ Ai = ±Aj , i 6= j,the system is uncontrollable.

M.R. Azimi Digital Control & Digital Filters

Digital Controller Design Modern Control Design

Pole Placement Design

Goal: Find K so that the poles are placed at arbitrary locations p1, . . . , pN (basedupon design specs).

Open loop plant state space equations,

x(n+ 1) = Ax(n) +Bu(n)y(n) = Cx(n)

State feedback law

u(n) = r(n)−Kx(n)

Apply control law to the open loop system

x(n+ 1) = Ax(n) +B(r(n)−Kx(n)) = (A−BK)x(n) +Br(n)y(n) = Cx(n)

i.e. the closed loop state space equations.Thus, the CE of the closed loop system,

ρcl(z) = |zI −A+BK| = 0while that of the open loop system,

ρol(z) = |zI −A| = 0

M.R. Azimi Digital Control & Digital Filters

Digital Controller Design Modern Control Design

Algorithms for Finding Gain K

Algorithm 1: Direct Approach

1 Check controllability. If yes, proceed.

2 Choose desired locations for poles p1, . . . , pN .

3 ρcl(z) = |zI −A+BK| = (z − p1)(z − p2) . . . (z − pN ) =zN + α1z

N−1 + . . .+ αN = 0.Equate and find elements of K = [k1 k2 . . . kN ].

Algorithm 2: Mapping to PVCF

1 Check controllability. If yes, proceed.

2 Find the mapping matrix T that maps the state equations to PVCF (or CCF), i.e.

T = CNWwhere CN is the controllability matrix, W is defined as,

W =

aN−1 aN−2 · · · a1 1aN−2 aN−3 · · · 1 0. . .a1 0 · · · 0 01 0 · · · 0 0

and ais are the coefficients of the open loop CEρol(z) = |zI −A| = zN + a1z

N−1 + . . .+ aN = 0M.R. Azimi Digital Control & Digital Filters

Digital Controller Design Modern Control Design

Algorithms for Finding Gain K-Cont.

3 Choose desired locations for poles p1, . . . , pN , and form the closed loop CE

ρcl(z) = (z − p1)(z − p2) . . . (z − pN ) = zN + α1zN−1 + . . .+ αN = 0

4 Then the gain vector K can be found using,

K = [(αN − aN ) · · · (α1 − a1)]T−1

where T−1 is the inverse of the transformation matrix T .

Algorithm 3: Ackermann’s FormulaSteps:

1 Check controllability. If yes, proceed.

2 Choose desired locations for poles p1, . . . , pN , and form the closed loop CE

ρcl(z) = (z − p1)(z − p2) . . . (z − pN ) = zN + α1zN−1 + . . .+ αN = 0.

3 Use Ackermann’s formula to find K

K = [0 0 . . . 0 1]C−1N ρcl(A)

where

ρcl(A) = AN + α1AN−1 + . . .+ αNI

M.R. Azimi Digital Control & Digital Filters

Digital Controller Design Modern Control Design

Algorithms for Finding Gain K-Cont.

Important Remarks:

1 In algorithm 2, if the system is already in PVCF, there is no need to computematrix T (i.e. T = I) and in this case K is simplyK = [(αN − aN ) · · · (α1 − a1)].Thus, in this case, Algorithm 2 is the simplest method to use.

2 for deadbeat design ρcl(z) = zN = 0 and hence all αi = 0, ∀i.3 The selection of the closed loop poles is a compromise between speed of

response, relative stability, and noise immunity.

4 For digital control system the sampling period, must also be considered in orderto avoid large control signals which may cause plant saturation problems.

Example 1: Consider a plant described by:

x(n+ 1) =

[0 1

−0.16 −1

]x(n) +

[01

]u(n)

y(n) = [1 0]x(n)

Design a state feedback law to place poles at p1,2 = 0.5± j0.5.The open loop CE is ρol(z) = |zI −A| = z2 + z1 + 0.16 = 0. Hence a1 = 1 anda2 = 0.16.

M.R. Azimi Digital Control & Digital Filters

Digital Controller Design Modern Control Design

Algorithms for Finding Gain K-Cont.

Algorithm 1: Direct method

1 Check C2 = [B AB] =

[0 11 −1

]detC2 = −1 6= 0 i.e. controllable

2 ρcl(z) = (z − p1)(z − p2) = z2 − z + 0.5 = 0

ρcl = |zI −A+BK| =∣∣∣∣ z −10.16 + k1 z + 1 + k2

∣∣∣∣ =z2 + (1 + k2)z + (0.16 + k1) = 0

Equate{1 + k2 = −1

0.16 + k1 = 0.5=⇒ k2 = −2

k1 = 0.34

Thus, the control law isu(n) = −Kx(n) = −0.341x1(n) + 2x2(n)

Algorithm 2:

1 Step 1 is the same.

2 In this case, system is already in PVCF and hence,

K = [(α2 − a2) (α1 − a1)] = [0.5− .16 − 1− 1] = [0.34 − 2].

M.R. Azimi Digital Control & Digital Filters

Digital Controller Design Modern Control Design

Algorithms for Finding Gain K-Cont.

Algorithm 3: Ackermann’s Formula

1 Same as the others.

2 ρcl(A) = A2 −A+ 0.5I =

[0.34 −20.32 2.34

]Then use Ackermann’s formula

K =[0 1

]C−1

2 ρcl(A)

or

K = [0 1]

[0 11 −1

]−1 [0.34 −20.32 2.34

]= [.34 − 2]

M.R. Azimi Digital Control & Digital Filters