System Identification Basics System Identification Is
System Identification Basics System Identification Is
System Identification Basics System Identification Is
BASICS
• White box
One could build a so-called white-box model based on first principles, e.g. a model for a
physical process from the Newton equations, but in many cases such models will be overly
complex and possibly even impossible to obtain in reasonable time due to the complex nature
of many systems and processes.
• Grey box model: although the peculiarities of what is going on inside the system are not
entirely known, a certain model based on both insight into the system and experimental
data is constructed.
• black box model: No prior model is available. Most system identification algorithms are
of this type.
• Linear/Non-linear ™
• Parametric/Non-parametric
• Experiment design: its purpose is to obtain good experimental data, and it includes the
choice of the measured variables and of the character of the input Signals
• Selection of model structure: A suitable model structure is chosen using prior
knowledge and trial and error.
• Choice of the criterion to fit: A suitable cost function is chosen, which reflects how well
the model fits the experimental data.
1
• Parameter estimation: An optimization problem is solved to obtain the numerical
values of the model parameters.
Preliminary experiments
2
Data collection for model estimation
• Static gain
• Resonance frequency
TRANSIENT ANALYSIS
The input is taken as a step or an impulse and the recorded output constitutes the model.
3
• Time domain equation
y( t ) K 1 e t /
t , y() K Yss
y() 0.632 * K
y( t ) Ke t /
t 0, y(0) K
y() 0.368 * K
4
FREQUENCY ANALYSIS
The input is a sinusoid. For a linear system in steady state the output will also be
sinusoidal. The change in amplitude and phase will give the frequency response for the
used frequency.
Y( j) K
T( j)
R ( j) 1 2 2
• Spectral analysis. The frequency response can be estimated for arbitrary inputs by
dividing the cross-spectrum between output and input to the input spectrum.
5
LEAST SQUARES METHOD
f x ax b
N N
Error y i f x i y i ax i b
2 2
i 1 i 1
• The ‘best’ line has minimum error between line and data points
• This is called the least squares approach, since square of the error is minimized.
N
2
Minimize Error y i ax i b
i 1
Take the derivative of the error with respect to a and b, set each to zero
N 2
y i ax i b
Error
i 1 0
a a
N 2
y i ax i b
Error
i 1 0
b b
Error N
2 x i y i ax i b 0
a i 1
Error N
2 y i ax i b 0
b i 1
Solve for the a and b so that the previous two equations both = 0
N N N
a x b x x y
2
i i i i
i 1 i 1 i 1
N N
a x i bN y i
i 1 i 1
Put these into matrix form
6
N
N
N xi
b i 1
y i
i 1
N N
2 a N
x i x i i i
x y
i 1 i 1 i 1
N N N
N x i yi x i yi
a i 1 i 1 i 1
2
N
N
N x i x i
2
i 1 i 1
N N N N
y x x x y
i
2
i i i i
b i 1 i 1 i 1 i 1
2
N
N
N x i2 x i
i 1 i 1