Professional Documents
Culture Documents
Identification of Linear and Nonlinear Dynamical Systems
Identification of Linear and Nonlinear Dynamical Systems
Berkeley, 2005
General aspects Black-box models Grey-box models Special issues for non-linear models
Berkeley, 2005
General Aspects
Let Z t denote all available (input-output) data up to time t. A mathematical model for the system is a function from these data to the space where the output at time t, y(t) lives, in general y (t|t 1) = g(Z t1 , t) The function can be thought of as a predictor of the next output. A parametric model structure is a parameterized family of such models: g(Z t1 , ) All aspects on curve tting applies pretty much also to this case. The difculty is the enormous richness in possibilities of parameterizations. There are two main cases s Black-box models: General models of great exibility
s
Grey-box models: Models that incorporate some knowledge of the character of the actual system.
Berkeley, 2005
AUTOMATIC CONTROL COMMUNICATION SYSTEMS LINKPINGS UNIVERSITET
General aspects Black-box models Choice of regressors and nonlinear function Functions for a scalar regressor Expansion into multiple regressors Examples of named structures Grey-box Models Special issues for non-linear models
s s
Berkeley, 2005
Berkeley, 2005
g(, ) =
k=1
k (k ( k ))
s s
(x) = cos(x): Fourier transform (x) = U (x): Unit pulse, gives piecewise constant functions g. (x) = H(x): Step at x = 0, gives also piecewise constant functions Soft version: (x) =
1 1+ex
/2
Berkeley, 2005
Several Regressors
Consider now to be a d-dimensional vector, but let still (x) be a function of one variable. How to interpret (( ))?
Radial
( ) = || = ( )T ( ) a d-dimensional vector, a d|d-matrix (positive denite) or scaled version of the identity matrix with a scalar. Describes an ellipsoid in Rd .
Ridge
Tensor
is a product of factors corresponding to the components of the d vector: (( )) = k=1 (k (k k )) and are d-dimensional vectors and subscript denotes component.
Berkeley, 2005
ANN: articial Neural Networks One hidden layer sigmoidal: (x) = Radial Basis Networks: (x) = e
1 1+ex ,
ridge extension
x2 /2
, radial extension
Wavelets: is the mother wavelet and j = 2j , k = 2j k (double indexing) as xed choices (Neuro)-Fuzzy models: are the membership functions, tensor expansion
Berkeley, 2005
Choice of Regressors
10
Four players:
s s s
Simulated model outputs ys (t k, ) Predicted model outputs yp (t k|) NFIR-models use past inputs NARX-models use past inputs and outputs NOE-models use past inputs and past simulated outputs NARMAX-models use inputs, outputs predicted outputs NBJ-models use all four regressor types
Berkeley, 2005
Recurrent Networks
11
For NOE, NARMAX and NBJ, previous outputs from the model have to be fed back into the model computations on-line:
1
q-1
q-1
These are called recurrent networks and require considerable more computational work to t to data.
Berkeley, 2005
12
The model structures are really basis function expansions. However, since the basis functions are variants of the same function , a graphical description looks like a network. One can also let the regressors be outputs from a previous layer of the network:
Input layer Hidden layers Output layer
} } }
1
. . . .
. . . .
. . .
. .
Berkeley, 2005
13
100
200
300 INPUT #1
400
500
600
100
200
300
400
500
600
Berkeley, 2005
Linear Model
Black: Measured Output Blue: Model Simulated Output
Linear model: Fit 41.71 %
4 3 2 1 0 1 2 3 4 0
14
200
400
600
800
1000
1200
Berkeley, 2005
15
200
400
600
800
1000
Berkeley, 2005
1200
AUTOMATIC CONTROL COMMUNICATION SYSTEMS LINKPINGS UNIVERSITET
16
200
400
600
800
1000
Berkeley, 2005
1200
AUTOMATIC CONTROL COMMUNICATION SYSTEMS LINKPINGS UNIVERSITET
17
General aspects Black-box models Grey-box Models Physical Modeling Semi-physical Modeling Block-models Local Linear Models Special issues for non-linear models
Berkeley, 2005
Physical Modeling
Perform physical modeling (e.g. in M ODELICA) and denote unknown physical parameters by . Collect the model equations as x(t) = f (x(t), u(t), ) y(t) = h(x(t), u(t), ) (or in DAE, Differential Algebraic Equations, form.) For each parameter this denes a simulated (predicted) output y (t|) which is the parameterized function y (t|) = g(Z t1 , ) in somewhat implicit form. To be a correct predictor this really assumes white measurement noise. Some more sophistical noise modeling is possible, usually involving ad hoc non-linear observers. The approach is conceptually simple, but could be very demanding in practice.
System Identication: Nonlinear Models Lennart Ljung
18
Berkeley, 2005
Example: Missile
19
The Equations
20
function [dx, y] = missile(t, x, p, u); MISSILE A non-linear missile system. Output equation. y = [x(1); x(2); x(3); -p(18)*u(4)*(p(1)*x(5)+p(2)*u(3))/p(22); -p(18)*u(4)*(p(3)*x(4)+p(4)*u(2))/p(22) ];
% % % % %
Angular velocity around x Angular velocity around y Angular velocity around z Acceleration in y-directi Acceleration in z-directi
% State equations. dx = [1/p(19)*(p(17)*p(18)*(p(5)*x(5)+0.5*p(6)*p(17)*x(1)/u(5)+ ... % Angular p(7)*u(1))*u(4)-(p(21)-p(20))*x(2)*x(3))+ ... p(23)*(u(6)-x(1)); ... 1/p(20)*(p(17)*p(18)*(p(8)*x(4)+0.5*p(9)*p(17)*x(2)/u(5)+ ... % Angular velocity around y-axis.
System Identication: Nonlinear Models Lennart Ljung Berkeley, 2005
AUTOMATIC CONTROL COMMUNICATION SYSTEMS LINKPINGS UNIVERSITET
Equations ...
21
... ... ... % Angular ... ... ... ... % Attack ... ... % Slide a ...
Berkeley, 2005
22
0 20 1
10
y2
0 1 5
10
y3
0 5
10
100
4
0 100 500
10
0 500
5 [s]
10
Berkeley, 2005
23
10
0 0.5 0.5
10
0 0.5 100
10
0 100 200
10
0 200
5 [s]
10
Berkeley, 2005
Semi-physical Models
24
Apply non-linear transformations to the measured data, so that the transformed data stand a better chance to describe the system in a linear relationship. Rules: Only high-school physics and max 10 minutes Simple examples: . . .. Another example:...
Berkeley, 2005
25
el an rP la So
Pump
Pump
Storage
Data
Storage Temperature (degree C) 45 Fan OFF and ON 1.5 40
26
1 35
30
0.5
25 0
20
10
15
20
25 hours 12
30
35
40
45
50 -0.5 0 5 10 15 20 25 30 35 40 45 50
Solar Intensity
10
10
15
20
25
30
35
40
45
50
Berkeley, 2005
Linear Model
45
27
40
35
30
25
20
15
10
10
15
20
25 tid (timmar)
30
35
40
45
50
Berkeley, 2005
Think ...
28
Suppose we had measured the temperature x(t) in the solar panel: x(t + 1) x(t) = d2 I(t) d3 x(t) d0 x(t) u(t) y(t + 1) y(t) = d0 x(t) u(t) d1 y(t) Eliminate x(t): y(t) =(1 + d1 )y(t 1) + (1 d3 ) + (d3 1)(1 + d1 ) y(t 1)u(t 1) u(t 2)
Reparameterize with being the coefciente above, ignoring links between them.
Berkeley, 2005
Semi-physical Model
45
29
40
35
30
25
20
15
10
10
15
20
25 tid (timmar)
30
35
40
45
50
Berkeley, 2005
30
40
35
30
25
20
15
10
10
15
20
25 tid (timmar)
30
35
40
45
50
Berkeley, 2005
31
General aspects Black-box models Grey-box Models Physical Modeling Semi-physical Modeling Block-oriented models Local Linear Models Special issues for non-linear models
Berkeley, 2005
Block-oriented Models
Building Blocks:
32
Berkeley, 2005
Common Models
33
Wiener
Hammerstein
HammersteinWiener
Berkeley, 2005
Other Combinations
34
With the linear blocks parameterized as a linear dynamic system and the static blocks parameterized as a function (curve), this gives a parameterization of the output as y (t|) = g(Z t1 , ) and the general approach of model tting can be applied. However, in this contexts many algorithmic variants have been suggested.
System Identication: Nonlinear Models Lennart Ljung Berkeley, 2005
AUTOMATIC CONTROL COMMUNICATION SYSTEMS LINKPINGS UNIVERSITET
35
200
400
600
800
1000
Berkeley, 2005
1200
AUTOMATIC CONTROL COMMUNICATION SYSTEMS LINKPINGS UNIVERSITET
36
h :
1 = (h h ) + (u u ) h 2 h 1 y = y + (h h ) 2 h
Berkeley, 2005
37
(t) = 1 h =
y(t Ts ) h h
u(t Ts )
Ts = sampling time
Total model: select or average over these local predictions, computed at a grid of values of h
d
y (t) =
k=1
Choices of weights wk : . . ..
System Identication: Nonlinear Models Lennart Ljung Berkeley, 2005
AUTOMATIC CONTROL COMMUNICATION SYSTEMS LINKPINGS UNIVERSITET
38
Measured data:
Inflde u 1.4 1.2 1 0.8 0.6 0.4 0.2 0 0 10 20 30 40 50 60 70 80 0.8 1
0.4
0.5
0.2
10
20
30
40
50
60
70
80
10
20
30
40
50
60
70
80
Berkeley, 2005
39
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
10
20
30
40
50
60
70
80
10
20
30
40
50
60
70
80
Berkeley, 2005
40
Let the measured working point variable (tank level in example) be denoted by (t) (sometimes called regime variable). If the regime variable is partitioned into d values k , the predicted output will be
d
y (t) =
k=1
If the prediction y (k) (t) corresponding to k is linear in the parameters, y (k) (t) = T (t)(k) the whole model will be a linear regression. .
Berkeley, 2005
41
Select the regime variable Decide the partition of the regime variable wk ((t), ). Here is a parameter that describes the partition Find the local models in each partition.
If the local models are linear regressions, the total model will be
d
y (t, , ) =
k=1
wk ((t), )T (t)(k)
Berkeley, 2005
42
y (t, , ) =
k=1
wk ((t), )T (t)(k)
is also an example of a hybrid model (piecewise linear). If the partition is to be estimated too, the problem is considerably more difcult. So called Linear Parameter Varying (LPV) are also closely related: x = A((t))x + B((t))u y = C((t))x + D((t))u
Berkeley, 2005
43
General aspects Black-box models Grey-box Models Special issues for non-linear models Input design Sparsity Local minima
Berkeley, 2005
Experiment Design
44
The design of inputs for non-linear models is considerable more difcult than for linear models. For example, it is clear that a binary input will not work. (Think of a Hammerstein model!) In addition to exciting all frequencies, an input for a general nonlinear model must also excite all amplitudes. Gaussian noise (white or colored) would be an example of a signal that is generically exciting for nonlinear models.
Berkeley, 2005
Sparsity
45
Non-linear surfaces in high dimensions can be very complicated and need support of many observed data points. How to nd parameterizations of such surfaces that both give a good chance of being close to the true system, and also use a moderate amount of parameters? The data cloud of observations is by necessity sparse in the surface space.
Berkeley, 2005
46
Using physical insight in grey-box models is one way to allow extrapolation and interpolation in the data space on physical grounds. Hoping that most of the non-linear action takes place across hyperplanes or hyperspaces is another idea that will radically reduce the exibility of the model. In statistics the problem to nd such subspaces is known as the index problem. Finding projections S of dimension r|m, r << m such that f () = g(S) captures most of nonlinearity consequently is an important problem. The Ridge-based neural networks can be seen as one way to nd several such hyperplanes that dene the structure of the non-linear effects.
Berkeley, 2005
Local Minima
Adjusting a parameterized model structure to data typically is a non-convex problem and several local minima of the criterion function may exist. This is one of the most pressing problem in non-linear identication, and calls for sophisticated initialization procedures.
s
47
s s s
In Neural Networks, some normalization is rst applied to the data, and then a randomized initialization is made. Typically one will have to try several initializations Wavenets use an initialization based on xed location and dilation parameters, which gives a linear regression For physical models, algebraic methods may produce linear regressions for initial estimates Block oriented models often employ several steps, xing linear and/or nonlinear block to create smaller problems.
Berkeley, 2005
48
A nonlinear model can be seen as nonlinear mapping from past data to the space where the output lives: y (t|t 1) = g(Z t1 , t). Observations are then y(t) = y (t|t 1) + e(t). Useful split of mapping: g(Z t1 ) = g((Z t1 )) Non-parametric and Parametric methods Black-box and Grey-box parameterizations g(, ) Black-box parameterizations usually employ one basic basis-function, that is scaled and located at different points Grey-boxes can be based on (serious) physical modeling and on more leisurely semi-physical modeling. Non-convexity of the optimization remains one of the more serious problems for most parametric methods.
s s s s
Berkeley, 2005