1 © 2012 The MathWorks, Inc. Introduction to System Identification Lennart Ljung April 4, 2012 t y(t) Data to Model.

Slides:



Advertisements
Similar presentations
Lectures 12&13: Persistent Excitation for Off-line and On-line Parameter Estimation Dr Martin Brown Room: E1k Telephone:
Advertisements

Design of Experiments Lecture I
ECEN/MAE 3723 – Systems I MATLAB Lecture 3.
Computational Statistics. Basic ideas  Predict values that are hard to measure irl, by using co-variables (other properties from the same measurement.
Process Control: Designing Process and Control Systems for Dynamic Performance Chapter 6. Empirical Model Identification Copyright © Thomas Marlin 2013.
Use of Kalman filters in time and frequency analysis John Davis 1st May 2011.
Professor Walter W. Olson Department of Mechanical, Industrial and Manufacturing Engineering University of Toledo Laplace Transforms.
Robust control Saba Rezvanian Fall-Winter 88.
CHE 185 – PROCESS CONTROL AND DYNAMICS
AMI 4622 Digital Signal Processing
Review of Frequency Domain
280 SYSTEM IDENTIFICATION The System Identification Problem is to estimate a model of a system based on input-output data. Basic Configuration continuous.
AC modeling of quasi-resonant converters Extension of State-Space Averaging to model non-PWM switches Use averaged switch modeling technique: apply averaged.
SYSTEMS Identification Ali Karimpour Assistant Professor Ferdowsi University of Mashhad Reference: “System Identification Theory For The User” Lennart.
SYSTEMS Identification Ali Karimpour Assistant Professor Ferdowsi University of Mashhad Reference: “System Identification Theory For The User” Lennart.
SYSTEMS Identification
Lect15EEE 2021 Systems Concepts Dr. Holbert March 19, 2008.
SYSTEMS Identification Ali Karimpour Assistant Professor Ferdowsi University of Mashhad Reference: “System Identification Theory For The User” Lennart.
Development of Empirical Models From Process Data
SYSTEMS Identification Ali Karimpour Assistant Professor Ferdowsi University of Mashhad Reference: “System Identification Theory For The User” Lennart.
SYSTEMS Identification
1 Midterm statistics – On campus students only ECEN 5817 Midterm Exam, Spring 2008 On-campus students Average = 86.3 % Averages by problem: / 35.
Feedback Control Systems (FCS)
Principles of the Global Positioning System Lecture 10 Prof. Thomas Herring Room A;
Industrial Process Modelling and Control Ton Backx Emeritaatsviering Joos Vandewalle.
Module 2: Representing Process and Disturbance Dynamics Using Discrete Time Transfer Functions.
Autumn 2008 EEE8013 Revision lecture 1 Ordinary Differential Equations.
Linear System Theory Instructor: Zhenhua Li Associate Professor Mobile : School of Control Science and Engineering, Shandong.
Book Adaptive control -astrom and witten mark
Analytical vs. Numerical Minimization Each experimental data point, l, has an error, ε l, associated with it ‣ Difference between the experimentally measured.
Chapter 3 mathematical Modeling of Dynamic Systems
Neuro-Fyzzy Methods for Modeling and Identification Part 2 : Examples Presented by: Ali Maleki.
1 Chapter 5 Sinusoidal Input. 2 Chapter 5 Examples: 1.24 hour variations in cooling water temperature Hz electrical noise (in USA!) Processes are.
Fundamentals of Electric Circuits Chapter 16 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
CHEE825 Fall 2005J. McLellan1 Spectral Analysis and Input Signal Design.
SYSTEMS Identification Ali Karimpour Assistant Professor Ferdowsi University of Mashhad Reference: “System Identification Theory For The User” Lennart.
PROCESS MODELLING AND MODEL ANALYSIS © CAPE Centre, The University of Queensland Hungarian Academy of Sciences Statistical Model Calibration and Validation.
Mechanical Engineering Department Automatic Control Dr. Talal Mandourah 1 Lecture 1 Automatic Control Applications: Missile control Behavior control Aircraft.
Ch2 Mathematical models of systems
Chapter 6: Frequency Domain Anaysis
Feedback Control Systems (FCS) Dr. Imtiaz Hussain URL :
THE LAPLACE TRANSFORM LEARNING GOALS Definition
SYSTEMS Identification Ali Karimpour Assistant Professor Ferdowsi University of Mashhad Reference: “System Identification Theory For The User” Lennart.
Principles of the Global Positioning System Lecture 12 Prof. Thomas Herring Room ;
Lecture 7: State-Space Modeling 1.Introduction to state-space modeling Definitions How it relates to other modeling formalisms 2.State-space examples 3.Transforming.
Frequency Response Analysis and Stability
Matlab Tutorial for State Space Analysis and System Identification
System Time Response Characteristics
Topics 1 Specific topics to be covered are: Discrete-time signals Z-transforms Sampling and reconstruction Aliasing and anti-aliasing filters Sampled-data.
SYSTEMS Identification Ali Karimpour Assistant Professor Ferdowsi University of Mashhad Reference: “System Identification Theory.
1 Development of Empirical Models From Process Data In some situations it is not feasible to develop a theoretical (physically-based model) due to: 1.
State-Space Recursive Least Squares with Adaptive Memory College of Electrical & Mechanical Engineering National University of Sciences & Technology (NUST)
Computacion Inteligente Least-Square Methods for System Identification.
Óbudai Egyetem Dr. Neszveda József Open and Closed loop Control II. Block diagram model.
Modelling & Simulation of Semiconductor Devices Lecture 1 & 2 Introduction to Modelling & Simulation.
System Identification of the SPDM Ground Test Facility Shawn Greene Dr. Raymond Kwong, Academic Supervisor Raja Mukherji Industrial Supervisor, MDA Space.
Automatic control systems V. Discrete control
Fuzzy Logic Workshop   Design of Fuzzy Controller for Temperature Chamber  
Automatic Control Theory
Laplace Transforms Chapter 3 Standard notation in dynamics and control
Time Domain and Frequency Domain Analysis
Department of Civil and Environmental Engineering
PSG College of Technology
Autonomous Cyber-Physical Systems: Dynamical Systems
Automatic Control System
Digital Control Systems (DCS)
Identification of Wiener models using support vector regression
Linear Prediction.
Chapter 4. Time Response I may not have gone where I intended to go, but I think I have ended up where I needed to be. Pusan National University Intelligent.
Signals and Systems Revision Lecture 1
Presentation transcript:

1 © 2012 The MathWorks, Inc. Introduction to System Identification Lennart Ljung April 4, 2012 t y(t) Data to Model

2 Modeling Dynamic Systems Data-Driven ModelingFirst-Principles Modeling Simscape SimMechanics SimHydraulics SimPowerSystems SimDriveline SimElectronics Aerospace Blockset Simulink Tools for Modeling Dynamic Systems Modeling Approaches Neural Network Toolbox Simulink Design Optimization System Identification Toolbox

3 The System rudders aileron thrust velocity pitch angle Input Output

4 The Model rudders aileron thrust velocity pitch angle Input Output u y u, y: measured time or frequency domain signals

5 The System and the Model System Model + - Minimize errorMeasured input

6 Fitting and Comparing Models  Core feature: Estimating models by tuning its parameters such that model outputs is close to measured output COMPARE function: Plots measured and model output curves together Shows a numerical measure of fit: the percent of the output variation reproduced by the model DEMO: Model for data collected from a hair dryer Input signal: heating power Output signal: air temperature

7 Estimation and Validation Go Together  A large enough model can reproduce a measured output arbitrarily well. We must verify that model is relevant for other data – data that was not used for estimation, but was collected for the same system. Error Number of parameters Estimation data Validation data DEMO: “Validate” the hair-dryer models on new data set

8 Process of Building Models from Data  Gather experimental data  Estimate model from data –Select a structure –Find a model in it  Validate model with independent data

9  Various forms of data –Sampled inputs and outputs in discrete time IDDATA –Frequency Domain data –Frequency function measurements IDFRD  Requires thought about how to “excite” the process –Sampling interval should fit the process dynamics –The input should have a suitable spectrum –The toolbox may generate suitable inputs IDINPUT  Necessary to look at and “polish” data –Handle trends and offsets DETREND –Look for bad measurements (“outliers”) MISDATA –Is filtering required to reduce disturbances? IDFILT Collect the input-output data Select a model structure Find best model in a structure Evaluate the resulting model

10  The most difficult problem –There are a confusing multitude of possibilities. –The quality of the resulting model depends crucially on the chosen model structure  Many structures to choose from –Transfer functions, state-space, ARX, nonlinear networks,… IDTF, IDSS, IDROC, IDNLARX, IDNLHW, IDPOLY, IDGREY,…  How to know what to test? –May have prior insights. –May have preferences for the intended application. –Test many! Select a model structure Collect the input- output data Select a model structure Find best model in a structure Evaluate the resulting model

11 Collect the input- output data Select a model structure Find best model in a structure Evaluate the resulting model  Find the model parameter values in the chosen model structure –Main feature of the toolbox! TFEST, SSEST, ARX, ARMAX, OE, PEM, NLARX, … –Conceptually easy but can be computationally intensive Find best model in a structure

12 Collect the input- output data Select a model structure Find best model in a structure Evaluate the resulting model  Make a final choice of model structure –Includes choice model size (model orders and delays)  Twist and turn it to see if it is good enough for the intended application –Simulate and look at model output for validation data SIM, COMPARE –Residual analysis, Uncertainty evaluation, … RESID, SIMSD, BODE, STEP, PZMAP, … Evaluate the resulting model

13 The Identification Process Collect the input- output data Select a model structure Find best model in a structure Evaluate the resulting model

14 Model Structures  Do we know anything about the system apriori? –Black-Box models: Flexible structures with considerable approximation power –Grey-Box models: Taylor-made structures, made to incorporate prior knowledge: Structured differential equations with (some) parameters unknown.  Is the output a linear or nonlinear function of the input?  Do we want to describe also how disturbances affect the output? system uy inputoutput e: disturbance source

15 Model Structures in System Identification Tool (GUI) IDENT Linear Parametric Models  Input-Output models (transfer functions)  State-space models Linear Nonparametric models Impulse response model IMPULSE, STEP Frequency Response SPA, SPAFDR, ETFE Process Models PEM Nonlinear Models NLARX, NLHW

16 Transfer Functions and State Space Models  Linear models are typically described by state-space models IDSS (SSST) or transfer functions IDTF (TFEST) State-space Number of states: n  Both are just ways of writing a linear differential equation for relationship between input (u) and output (y) (take n=1) Transfer function B-order: n b (zeros) F-order: n f (poles)

17 Delays in TF and SS models  There could also be a delay (dead time) in the system: It takes n k samples before a change in u is visible in y. y u nknk time state space transfer function Linear parametric model structures are characterized by a few integers: n, or (n p n z ) and n k. Commands such as n4sid, ssest, tfest use these integers to “create” models from data.

18 Handling Disturbance  Knowledge of nature of disturbance is useful: –Essential for predicting future system outputs, by understanding correlations between disturbances  Handling technique for identification: treat a disturbance source e as an extra unmeasured input.  e is not measured; its properties (white noise) are characterized statistically – mean, covariance system uy inputoutput e: disturbance source state space transfer function DEMO: Models with disturbance component for hair-dryer data.

19 Non-Parametric Methods  Linear systems can also be described by non- parametric models that is curves that capture the system properties: –Transient responses –Frequency response  They can be estimated directly from data  Often useful to take a first look at these before parametric model estimation to get a feel for system’s basic properties.

20 Transient Response  A system’s transient response is its output to a transient like an impulse or step in its input.  Can be found by special experimentation with such inputs  For an existing model, its transient response is obtained by simulation with such inputs. IMPULSE, SIM, STEP  Estimation: From experimental input/output data, transient response is typically estimated via a flexible (high order) linear model. system uy

21 Frequency Response  A system’s frequency response H(ω) is its response to a sinusoidal input sin(ωt). The output has same frequency ω but a different amplitude and a phase shift y(t) = A(ω) sin(ωt+ ϕ (ω))  Plotting A(ω) and ϕ (ω) vs. ω gives Bode plot.  Can be found experimentally by subjecting the system to sinusoidal inputs of various frequencies.  For an existing model, it is obtained from the z- or Laplace transform of the transfer function using z = exp(jωT s ) or s = jω.  Estimation: From experimental input-output data, it may be estimated directly by using various Fourier-transform inspired techniques. SPA, SPAFDR, ETFE system uy DEMO: Direct frequency and transient response estimation for dryer data

22 Process Models  Use a combination of gain (K), delay (Td) and one or more time constants (T) to describe the model.  Such forms are popular in process industry, hence called “process models”. IDPROC  Can be expanded to contain more poles, zeros and integrators.  Structure choices: –number/nature of poles –whether a delay element, a zero and/or an integrator should be included.

23 Use of Disturbance Model for Simulation and Prediction  Measured outputs contain disturbances. If there is a correlation between disturbances it is possible to better predict the future outputs from observing the past ones. DEMO: Models with disturbance component for hair-dryer data.

24 Residual Analysis DEMO: Residual analysis on hair-dryer models System Model + - error input e(t) t acceptable Whiteness Test Independence Test Residuals = ”Leftovers” = 1-step-ahead prediction errors Check correlation functions! Should be uncorr- elated with known things

25 Model Uncertainty  Estimated model is influenced by the disturbances –If we repeat identification on another data set with the same input u, we will get a different model since e is not the same. This is true even if no disturbance model is built.  The model is an uncertain quantity. The amount of disturbance induced variations in model can be estimated. –We can create models with its uncertainty region; we can determine the uncertainty information on a model’s parameters. –We can visualize the uncertainty on model’s response in time and frequency domains (“confidence bounds”) DEMO: Studying model uncertainty

26 Putting the Model to Work  Use them for understanding a system’s behavior, and predicting future response of a system  Import estimated models into Simulink using dedicated blocks for simulation and code generation  Controller design: Import into SISOTOOL and MPC design task

27 Simplifying Complex Systems DataModel u y Simplify complex Simulink model using simulation data. Use Identified model to describe a component of a larger system

28 Using Models for Control System Design Dynamic Model P + ∆P Current Position Noise ModelN Position Error Control  Estimate plant with parameter uncertainties  Estimate noise model Controller  Control System Toolbox  Simulink Control Design  Robust Control Toolbox  Model Predictive Control Toolbox System Identification Toolbox

29 More Information  Product page on mathworks.com: –Reach demos, webinars and documentation from here  Tech Support:  Textbooks –System Identification – Theory for the User, Lennart Ljung –System Identification – A frequency domain approach, Rik Pintelon, Johan Schoukens –Others…

30 Residual Analysis  Technique for validating a model’s quality.  Works by analyzing the residues which are differences between model’s response and measured values: where is the model’s best prediction of y(t) made at time t-1.  ε(t) should ideally be uncorrelated with information known at time t-1. Hence we test correlation between ε(t 1 ) and u(t 2 ) and also between ε(t 1 ) and ε(t 2 ), t 1 ≠ t 2