l5port.pptx

41
1 SYSTEM IDENTIFICATION The System Identification Problem is to estimate a model of a system based on input-output data. Basic Configuration continuous System disturbance (not observed) v(t) y(t) u(t) output (observed) input (observed) discrete System {v(k)} {y(k)} {u(k)}

Upload: saifizi-aneeza

Post on 13-Sep-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

No Slide Title

280SYSTEM IDENTIFICATIONThe System Identification Problem is to estimate a model of a system based on input-output data.Basic ConfigurationcontinuousSystemdisturbance (not observed)v(t)y(t)u(t)output (observed)input (observed)discreteSystem{v(k)}{y(k)}{u(k)}281We observe an input number sequence (a sampled signal){u(k)} = {u(0), u(1), ..., u(k), ..., u(N)}and an output sequence{y(k)} = {y(0), y(1), ..., y(k), ..., y(N)}using standard z-transform notationIf we assume the system is linear we can write:-

282G(z)U(z)Y(z)V(z)+The disturbance v(k) is often considered as generated by filtered white noise :-G(z)U(z)Y(z)V(z)+H(z)(z)white noisefilterdisturbanceoutputinputprocessgiving the description:

283Parametric ModelsARX model (autoregressive with exogenous variables)where

G(z)U(z)Y(z)V(z)+H(z)(z)

284giving the difference equation:

and represents an extra delay of n sampling instants.

identification problemdetermine n, na, nb (structure)estimate

(parameters)285ARMAX model (autoregressive moving average with exogenous variables)where

G(z)U(z)Y(z)V(z)+H(z)(z)

286giving the difference equation:

identification problemdetermine n, na, nb, nc (structure)estimate

(parameters)287General Prediction Error ApproachProcessPredictor withadjustableparameters +-Algorithm forminimising some function of e(t,)u(t)y(t)e(t,)Predictor based on a parametric modelAlgorithm often based on a least squares method.

288ConsistencyA desirable property of an estimate is that it converges to the true parameter value as the number of observations N increases towards infinity.This property is called consistencyConsistency is exhibited by ARMAX model identification methods but not by ARX approaches (the parameter values exhibit bias).289Example of MATLAB Identification Toolbox SessionInput and Output Data of Dryer Model

290

MATLAB statements and results:(ARX n, na = 2, nb = 2) 291

ARX model:

292MATLAB Demo

293ADAPTIVE CONTROLPERFORMANCEASSESSMENT &UPDATINGMECHANISMREGULATORPROCESSparametersslowlyvaryingref+_outputs (fast varying)disturbancesfastvaryingregulatorparameters

K J Astrom294Adaptive control is a special type of nonlinear control in which the states of the process can be separated into two categories:-(i) slowly varying states (viewed as parameters(ii) fast varying states (compensated by standard feedback)In adaptive control it is assumed that there is feedback from the system performance which adjusts the regulator parameters to compensate for the slowly varying process parameters.295Adaptive Control ProblemAn adaptive controller will contain :-characterization of desired closed-loop performance (reference model or design specifications)control law with adjustable parametersdesign procedureparameters updating based on measurementsimplementation of the control law (discrete or continuous)296Overview of Some Adaptive Control SchemesGain SchedulingregulatorprocessoutputycontrolsignalucommandsignalgainscheduleregulatorparametersoperatingconditionsThe regulator parameters are adjusted to suit different operating conditions. Gain scheduling is an open-loop compensation.

297Auto-tuningPIDcontrollerProcess

+_parameters K, Ti, TdPID controllers are traditionally tuned using simple experiments and empirical rules. Automatic methods can be applied to tune these controllers.(i) experimental phase using test signals; then:-(ii) use of standard rules to compute PID parameters.298Model Reference Adaptive SystemsMRASregulatorprocessactualoutputyuucmodelidealoutputymadjustmentmechanismregulatorparameters299The parameters of the regulator are adjusted such that the error e = y - ym becomes small. The key problem is to determine an appropriate adjustment mechanism and a suitable control law.

where determines the adaptation rate. This rule changes the parameters in the direction of the negative gradient of e2MIT rule adjustment mechanism

300Combining the MIT rule with the control law:

and computing the sensitivity derivatives

produces the scheme:processumultiplierucy_+efilter

integrator

model+_ymmultiplierNote: steady-state will be achieved when the input to the integrator becomes zero. That is when y = ym301Self Tuning RegulatorsSTRregulatorprocessactualoutputyuucregulatorparametersdesignprocess parametersestimation302The process parameters are updated and the regulator parameters are obtained from the solution of a design problem. The adaptive regulator consists of two loops:-(i) inner loop consisting of the process and a linear feedback regulator(ii) outer loop composed of a parameter estimator (recursive) and a design calculation. (To obtain good estimates it is usually necessary to introduce perturbation signals)Two problems:-(i) underlying design problem(ii) real time parameter estimation problem303

Example - SIMULINK Simulation of MRAS304

305MATLAB Demo

306INTRODUCTION TO THE KALMAN FILTERState Estimation ProblemVectors w(t) and v(t) are noise terms, representing unmeasured system disturbances and measurement errors respectively. They are assumed to be independent, white, Gaussian, and to have zero mean. In mathematical terms:-

w(t)v(t)u(t)x(t)y(t)SYSTEM307

where Q and R are symmetric and non negative definite covariance matrices. (E is the expectation operator)Only u(t) and y(t) are assessable.The state estimation problem is to estimate the states x(t) from a knowledge of u(t) and y(t). (and assuming we know A, B, G, C, D, Q, and R).308Construction of the Kalman-Bucy FilterSYSTEMu(t)y(t)x(t)

Filter equation :-

CBADL(t)u(t)y(t)

+_+FILTER+309The estimation problem is now to find L(t) such that the error between the real states x(t) and the estimated states is minimized. This can be formulated as:

Filter equation :-L(t) is a time dependent matrix gain.

R E Kalman310Duality Between the Optimum State Estimation Problem and the Optimum Regulator ProblemIt can be shown that the optimum state estimation problem:

subject to:

is the dual of the optimum regulator problem:

subject to:

311Thus L(t) can be obtained by solving the matrix Ricatti equation:

Furthermore for large measurement times L(t) converges to:

a constant matrix gain.312Linear Quadratic Estimator Design Using MATLAB

313Example:produces:

314giving the filter equations:

where l1 = 0.5562, l2 = 0.1547315

-1+u(t) = 0w(t)v(t)+y(t)x1x2SYSTEM

++-1_+l1l2FILTER

316SIMULINK SIMULATION

317

Comparison of actual (solid) and measured (dash) statesx1318Comparison of actual (solid) and measured (dash) states

x2319

Measurement signal y(t)320MATLAB Demo

input and output data

INPUT #1

1

0

-1

25

20

15

10

5

0

OUTPUT #1

2

1

0

-1

-2

25

20

15

10

5

0

th = arx(z2,[2 2 3]); % z2 contains data

th = sett(th,0.08); % Set the correct sampling interval.

present(th)

Results:

Loss fcn: 0.001685

Akaike`s FPE: 0.001731 Sampling interval 0.08

The polynomial coefficients are

B = 0 0 0 0.0666 0.0445

A = 1.0000 -1.2737 0.3935

Time

ARX Simulated (solid) and measured (dashed) outputs - error = 6.56

1.5

1

0.5

0

-0.5

-1

-1.5

72

71

70

69

68

67

66

65

64

Input

feedback

error

-

+

to

*

so

*

reference

model

s+2

2

g1

-K-

mult

*

e

+

-

filter

-K-

g2

-K-

mult_

*

process

s+1

0.5

filter_

s+2

1

Integrator

1/s

Integrator1

1/s

Mux

Mux

reference,

output,

command

reference

error

Mux1

Mux

parameters

MODEL REFERENCE ADAPTIVE CONTROL

Input, Reference and Actual Outputs

Time (second)

1

0.8

0.6

0.4

0.2

0

-0.2

150

100

50

0

LQELinear quadratic estimator design. For the continuous-time system:.

x = Ax + Bu + Gw {State equation}

z = Cx + Du + v {Measurements}

with process noise and measurement noise covariances:

E{w} = E{v} = 0, E{ww'} = Q, E{vv'} = R, E{wv'} = 0

L = LQE(A,G,C,Q,R) returns the gain matrix L such that the

stationary Kalman filter:

.

x = Ax + Bu + L(z - Cx - Du)

produces an LQG optimal estimate of x.

A=[0 1;-1 0];

G=[0;1];

C=[1 0];

Q=1;

R=3;

L=lqe(A,G,C,Q,R)

L =

0.5562

0.1547

x1hat

1/s

sqrt(Q)

1

WS4

e2t

WS3

e1t

e2

-

+

e1

-

+

WS2

wt

WS1

vt

meas(y)

KALMAN FILTER

PLANT

Mux

Mux

Mux1

Mux

x2/x2hat

x1/x1hat

l2

0.155

_

+

-

l1

0.556

x2hat

1/s

__

+

+

y-Cx

-

+

sqrt(R)

1.7

v(t)

y

+

+

x1

1/s

w(t)

-

-

+

x2

1/s

Time (second)

6

4

2

0

-2

-4

-6

280

275

270

265

Time (second)

6

4

2

0

-2

-4

-6

280

275

270

265

5

0

-5

-10

280

275

270

265