Sei sulla pagina 1di 25

Module 1 References Lecture 2

System Identification

Arun K. Tangirala

Department of Chemical Engineering


IIT Madras

July 27, 2013

Module 1

Lecture 2
Arun K. Tangirala System Identification July 27, 2013 22
Module 1 References Lecture 2

Contents of Lecture 2

The following are the topics of interest in this lecture:

Quick introduction to models


Step-wise procedure for identification
Guidelines for obtaining good models

Arun K. Tangirala System Identification July 27, 2013 23


Module 1 References Lecture 2

Two classes of models


Models can be broadly classified into two categories, namely, qualitative and quan-
titative models.

Qualitative models describe only on a qualitative basis, whereas


Quantitative models describe on a numerical (mathematical /statistical) basis

Examples
Qualitative Quantitative
Increase in coolant flow (i) y(t) = bu(t) + c
rate reduces
(ii) y[k] = a1 y[k1]+a2 y[k2]+bu[k2]
temperature
(iii) y(t) = Aebu(tD)
Strain is directly
dy(t)
proportional to stress (iv) + a1 y(t) = bu(t)
dt
Increase in fuel flow to
an engine increases the
speed

Arun K. Tangirala System Identification July 27, 2013 24


Module 1 References Lecture 2

Approaches to modelling

The focus of this course and the general identification literature is on the develop-
ment of quantitative models.
As we learnt in the previous lecture, there are basically two approaches to mod-
elling - (i) from fundamentals (first-principles models) and (ii) from experiments
(empirical models)

Which one is better? There is no correct answer.

The choice is governed by the availability of process knowledge,


end-use of model and a few other factors

Arun K. Tangirala System Identification July 27, 2013 25


Module 1 References Lecture 2

First-principles vs. Empirical Models


First-principles Empirical
Causal, continuous, non-linear Models are usually black-box and
differential-algebraic equations discrete-time
Model structures are quite rigid - the Model structures are extremely flex-
structure is decided by the equations ible - implies they have to be as-
describing fundamental laws. sumed/known a priori.
Can be quite challenging and time- Relatively much easier and are less
consuming to develop time-consuming to develop
Require good numerical ODE and al- Require good estimators (plenty of
gebraic solvers. them available)
Very effective and reliable models - Model quality is strongly dependent
can be used for wide range of operat- on data quality - usually have poor
ing conditions extrapolation capabilities
Transparent and can be easily re- Difficult to relate to physical param-
lated to physical parameters/charac- eters of the process (black-box) and
teristics of the process the underlying phenomena

Arun K. Tangirala System Identification July 27, 2013 26


Module 1 References Lecture 2

System Identification
For several applications in practice, empirical models are very useful due to lack of
sufficient process knowledge and the flexibility in model structure.

System Identification
The subject of system identification is concerned with
development of (black-box) models from experimental data, with
scope for incorporating any a priori process knowledge

Given the complexity of processes and that industries routinely collect large
amounts of data, it is sensible to build data-based models.
I Empirical approach is also favoured in disturbance modelling which involves
building time-series models
First-principles models are very useful for off-line applications (e.g.,
simulations).
I In fact, simplified / reduced-order versions are used in on-line applications.
I First principles models also contain some empirical correlations
Arun K. Tangirala System Identification July 27, 2013 27
Module 1 References Lecture 2

Measurement contains mixed effects

Recall

Disturbances

Measurable

Output Measured
Input
Actuators Process Sensors Responses &
Signal Disturbances

Sensor Noise

System identified by the user

Variations in output measurement consists of more than what variations in input


can explain. The additional effects are due to disturbances and sensor noise.

Arun K. Tangirala System Identification July 27, 2013 28


Module 1 References Lecture 2

Overall Model
The overall model developed through identification is a composite model. The determin-
istic model is driven by a physical input while the stochastic portion of the model is driven
by a shock wave (fictitious and unpredictable)

Shock wave
(ctitious, random) Time-series modelling concepts
are used to build these models

Contains eects of noise,


unmeasured disturbances, etc.
Stochastic

+
Physical inputs + Process response
(Exogenous)
Deterministic (Observed)

Contains the physics or


explicable part of the process

A good identification exercise separates the deterministic and stochastic parts with
reasonable accuracy. One should not be contained in the other.

Arun K. Tangirala System Identification July 27, 2013 29


Module 1 References Lecture 2

Systematic Procedure for Identification

The exercise of identification involves a systematic and iterative procedure starting from acquisition
of good data to a careful validation of the identified model.

One can find five basic steps in this exercise:

S1 Collect the data set


S2 Choose an appropriate model structure
S3 Employ a criterion fit and estimate the model parameters
S4 Assess the quality of model (compare with known responses, errors in
parameter estimates, etc.)
S5 If the model is unsatisfactory, go back to one or more of the previous steps

It is not possible, in general, to arrive at a satisfactory model in one iteration. A


formal study of the subject equips the user with the knowledge to diagnose the
shortcomings of the estimated model and to make appropriate refinements.

Arun K. Tangirala System Identification July 27, 2013 30


Module 1 References Lecture 2

Identification Workflow
Prior Process
Primarily one finds Knowledge
Data Generation and Acquisition
Disturbances
three stages, which Measurable

again contain sub-


Inputs Actuators Process Sensors
stages
All models should
be subjected to a Data

critical validation
Non-parametric
test Visualization
Pre-processing
Optimization
Criteria
Select Candidate
Models analysis

Final model quality Model


Estimation
Model Development
largely depends on
the quality of data Model Quality
Residual Analysis
Estimation Error Analysis
Assessment Cross-Validation
...
Generating rich (in-
Satisfactory?
formative) data is No
Yes
therefore essential
Accept it

Arun K. Tangirala System Identification July 27, 2013 31


Module 1 References Lecture 2

Points to remember

A minimal amount of process knowledge is incorporated at every stage of identi-


fication. When this knowledge directly governs the choice of model structure, we
obtain grey-box models.
Regardless of the modelling approach, certain facts may always be kept in mind:

No model is accurate and complete


Do not attempt to explain absolutely unpredictable uncertainties with
a mathematical model
Acceptance of models should be based on usefulness rather than
the truth of the model

Arun K. Tangirala System Identification July 27, 2013 32


Module 1 References Lecture 2

Data Acquisition

Data is food for identification. The quality of final model depends on quality of
data; hence great care must be taken to generate data. The nature of input,
sampling rate and sample size are the primary influencing factors.

A vast theory exists on the design of experiments, particularly the input design, i.e.,
what kind of excitation is best for a given process. The nature of input is tied to
the end-use of the model - whether it is eventually used for control, fault detection
or in simulation.
The theory of input design also allows us to obtain a preliminary idea of the model
complexity that can be built for a given data set. The basic tenet is that the
excitation in the input should be such that its effect in the measured output is
larger than those caused by sensor noise / unmeasured disturbances.

Arun K. Tangirala System Identification July 27, 2013 33


Module 1 References Lecture 2

Data pre-processing

Often the data has to be subjected to quality checks and a pre-processing step before
presenting it to the model estimation algorithm. Some of the common factors that
affect data quality include outliers, missing data and high-levels of noise.
Outliers are data which do not conform to other parts of the data largely due to
sensor malfunctions and/or abrupt and brief process excursions. Detecting and
handling outliers in data can be very complicated and challenging primarily due to
the fact that there are no strict mathematical definitions of outliers and they vary
from process to process. A few reasonably good statistical methods have emerged
over the last few decades in this context. The subject continues to emerge in search
of robust universal methods.
The issue of missing data is prevalent in several applications. Intermittent sensor
malfunctioning, power disruptions, non-uniform sampling, data transfer losses are
some of the common reasons for missing data. Several methods have been devised
to handle this issue in data analysis and identification.

Arun K. Tangirala System Identification July 27, 2013 34


Module 1 References Lecture 2

Data Preprocessing: Drifts and Trends

Pre-processing of data may also be motivated by the assumptions, limitations and


requirements of model development. Most of the methods assume stationarity of
data, a condition requiring the statistical properties of data to remain invariant with
time. When process responses exhibit drifts and trends, they have to be brought
into the framework of stationary signals.
Non-stationarities are usually handled by either first fitting a polynomial trend to
the output data and modelling the residuals or differencing the data by a suitable
degree and modelling the differenced data. The latter method is best suited for
processes that exhibit integrating-type (random walk) behaviour.

Arun K. Tangirala System Identification July 27, 2013 35


Module 1 References Lecture 2

Data Preprocessing: Pre-filtering

Pre-filtering data is an elegant way of encompassing methods of handling drifts and


trends.
The idea of pre-filtering has a broader application. Often it may be required that
the performance of the model is preferentially more accurate in select frequency
ranges (in control, for instance). On the other hand, theoretically, several model
structures can be shown to be equivalent by expressing one model structure as the
development of another model structure on pre-filtered data. The framework of
pre-filtering is therefore a powerful framework for data pre-processing.
In passing, it may be mentioned that data pre-processing can consume the majority
of the identification exercise both in terms of the time and effort.

Arun K. Tangirala System Identification July 27, 2013 36


Module 1 References Lecture 2

Visualization

Visualizing data is a key step in information extraction and signal analysis. The value
of information obtained from visual inspection of data at each stage of identification
is immense.

Prior to the pre-processing stage, visual examination assists in manually iden-


tifying presence of drifts, outliers and other peculiarities.
It also provides an opportunity for the user to qualitatively verify the quality
of data from an identification viewpoint (for e.g., sufficient excitation).
A careful examination can also provide preliminary information on the delay,
dynamics and gain of the process.
The information obtained at this stage can be used at the model quality as-
sessment stage.

Arun K. Tangirala System Identification July 27, 2013 37


Module 1 References Lecture 2

Data Visualization contd.

Powerful methods exist for visualizing multi-dimensional or multivariable data. The


user can exploit the effectiveness of these methods in selecting the right candidate
models. Post model development, a visual comparison of the predictions vs. the
observed values should be strongly preferred to a single index such as correlation or
similarity factor for assessing the quality of the model.
Finally, visualization of data in a transform domain (e.g., Fourier domain) can prove
very beneficial. Examination of the input and output in frequency domain can throw
light on the spectral content and presence of periodicities. Time-frequency analysis
tools such as wavelet transforms can further provide valuable information on the
non-stationarity behaviour of the process.

Arun K. Tangirala System Identification July 27, 2013 38


Module 1 References Lecture 2

Choice of candidate models

The development of a model from data involves two steps:

i. Choosing a model structure and order


ii. Estimating the parameters of that model by solving the associated
optimization problem.

For a given data set and estimation algorithm, the type, structure and the order of
the model completely determine its predictability. The challenge in identification is
usually experienced at this stage.
There is usually more than one model that can explain the data. However, a careful
adherence to certain guidelines enables the user to discover a good working model.

Arun K. Tangirala System Identification July 27, 2013 39


Module 1 References Lecture 2

Two important facts

In choosing a candidate model, specifically one should take cognizance of two facts:

A correct model is beyond the reach of any modelling exercise. So to


speak, no process can be accurately described by mathematics alone.
The flexibility in empirical modelling equips the user with tremendous free-
dom, but is also marked by risks of overfitting and unsuitability with respect
to its end-use.

Arun K. Tangirala System Identification July 27, 2013 40


Module 1 References Lecture 2

Guidelines for selecting candidate models


While there are no rules that can be framed to select a candidate model, practical
guidelines can be followed to arrive at a suitable model:

Careful scrutiny of the data to obtain preliminary insights into the input-
output delay, type of model (e.g., linear/non-linear), order (e.g., first/second-
order), etc.
Estimation of non-parametric models, i.e., models that do assume any
structure. Non-parametric models provide reliable estimates of (i) delays, (ii)
step, impulse and frequency response (process bandwidth) and (iii) disturbance
spectrum without any assumptions on process dynamics
Choosing an estimation algorithm that is commensurate with the type and
structure of the model (e.g., least squares algorithms provide unique solutions
when applied to linear predictive models)

The model selection step is iteratively improved by the feedback obtained from
the model validation stage. In addition, one can incorporate any available process
knowledge to impose a specific model structure.
Arun K. Tangirala System Identification July 27, 2013 41
Module 1 References Lecture 2

Estimation Criteria

The estimation criterion typically has a form of minimization of a function of the


prediction errors. The function is usually based on a distance metric. For example,
least squares methods minimize the Euclidean distance between the predicted and
observed values. Other factors such as quality of parameter estimates, number of
parameters, a priori knowledge of the model structure can also be factored into the
objective function.
On the other hand, the objective function can also be formulated from probabilis-
tic considerations. The popular maximum likelihood algorithm is based on this
approach.
Most of the existing algorithms can be considered as variants / extensions of the
least squares and maximum likelihood methods.

Arun K. Tangirala System Identification July 27, 2013 42


Module 1 References Lecture 2

Factors governing estimation criteria


In setting up the estimation problem, the following points should be given due
consideration:
Factors
End-use of the model: The general requirement is that the one-step ahead
prediction errors be minimum. In general, a large class of end-use require-
ments can be brought under the umbrella of minimization of a function of the
prediction-error.
Domain of estimation: The estimation problem can be greatly simplified
by setting it up in a transformed domain. For example, the delay estimation
problem is nicely formulated in the frequency-domain and known to produce
better estimates than the time-domain methods.
Accuracy and precision of estimators vs. complexity of estimation: De-
ploying a method that produces accurate and high-precision estimates may be
computationally demanding (e.g., likelihood methods).The user should keep in
view this trade-off when selecting an algorithm.

Arun K. Tangirala System Identification July 27, 2013 43


Module 1 References Lecture 2

Model Validation
Model validation is an integral part of any model development exercise, be it empiri-
cal or a first-principles approach. The model is tested for predictive ability, reliability
(variability in parameter estimates) and complexity (overfitting).

Quality assessment tests


Statistical analysis of prediction errors or residuals: Correlation is the
primary tool used here. A good model should produce residuals that are un-
correlated with the input as well as its own past.
Error analysis of parameter estimates: The errors should be small relative
to the estimated values. Overfitting is indicated by large errors in a subset of
parameter estimates when the model with fewer parameters can explain the
data equally well. This should not be confused with loss of identifiability.
Cross-validation: A model should have both good interpolation and extrap-
olation capabilities with stronger emphasis on the former. For this purpose, a
test data set consisting of a mix of features not contained in training set and
features similar to those in the training data set, is used.
Arun K. Tangirala System Identification July 27, 2013 44
Module 1 References Lecture 2

Model Refinement
The outcome of the diagnostic tests constitutes the feedback for the previous stages.
When a model does not meet any of the aforementioned requirements, it immedi-
ately calls for improvements at one or more of the previous steps.
The developed model can be unsatisfactory for several reasons:

Poor choice of criterion.


Numerical procedure was not able to find the best model despite a good choice
of criterion.
Model structure is not sufficient to explain the variations in the data set.
It may be necessary to choose from a different family of models.
Data supplied to the estimation procedure is not informative enough.
Conduct new experiments or use pre-processing techniques to alleviate noise.

The user should carefully interpret the results of the diagnostic tests and associate
the failure of the model to one or more of the above reasons.
Arun K. Tangirala System Identification July 27, 2013 45
Module 1 References Lecture 2

Guidelines for obtaining good models

The foregoing discussion can be summarized into a set of guidelines / requirements


for obtaining good models:

Good quality data (input and experimental designs)


Physical insight into the process and an appropriate understanding of a model
structure.
Simple models can be good approximations of complicated systems!
A proper choice of time-scale for modelling (resampling the data)
I Fast sampling of slow processes can result in unstable models
Right interpretation of model validation and model quality assessment
I The model diagnostic checks reveal considerable information on the model suf-
ficiency and can contain clues to directions for improvement
No substitute for thinking, insight and intuition!

Arun K. Tangirala System Identification July 27, 2013 46

Potrebbero piacerti anche