EL1820 Modeling of Dynamical Systems

Similar documents
EL1820 Modeling of Dynamical Systems

Control Systems Lab - SC4070 System Identification and Linearization

Advanced Process Control Tutorial Problem Set 2 Development of Control Relevant Models through System Identification

Nonlinear System Identification Using MLP Dr.-Ing. Sudchai Boonto

Lecture 7: Discrete-time Models. Modeling of Physical Systems. Preprocessing Experimental Data.

Identification, Model Validation and Control. Lennart Ljung, Linköping

Identification of Linear Systems

Chapter 6: Nonparametric Time- and Frequency-Domain Methods. Problems presented by Uwe

Identification of ARX, OE, FIR models with the least squares method

EECE Adaptive Control

6.435, System Identification

On Input Design for System Identification

EECE Adaptive Control

Modeling and Identification of Dynamic Systems (vimmd312, 2018)

f-domain expression for the limit model Combine: 5.12 Approximate Modelling What can be said about H(q, θ) G(q, θ ) H(q, θ ) with

IDENTIFICATION FOR CONTROL

Non-parametric identification

Further Results on Model Structure Validation for Closed Loop System Identification

CONTROL SYSTEMS, ROBOTICS, AND AUTOMATION - Vol. V - Prediction Error Methods - Torsten Söderström

System Modeling and Identification CHBE 702 Korea University Prof. Dae Ryook Yang

Today (10/23/01) Today. Reading Assignment: 6.3. Gain/phase margin lead/lag compensator Ref. 6.4, 6.7, 6.10

System Identification & Parameter Estimation

ECE 636: Systems identification

An Algorithm for Finding Process Identification Intervals from Normal Operating Data

12. Prediction Error Methods (PEM)

Identification in closed-loop, MISO identification, practical issues of identification

Control Systems I. Lecture 6: Poles and Zeros. Readings: Emilio Frazzoli. Institute for Dynamic Systems and Control D-MAVT ETH Zürich

Data mining for system identi cation

Matlab software tools for model identification and data analysis 11/12/2015 Prof. Marcello Farina

Exam in Automatic Control II Reglerteknik II 5hp (1RT495)

System Identification & Parameter Estimation

Lecture 7 Open-loop & closedloop experiments. The Bias Formula goes closed-loop and the returns

Computer Exercise 1 Estimation and Model Validation

Process Control & Instrumentation (CH 3040)

Final Exam January 31, Solutions

I. D. Landau, A. Karimi: A Course on Adaptive Control Adaptive Control. Part 9: Adaptive Control with Multiple Models and Switching

Lecture 1: Introduction to System Modeling and Control. Introduction Basic Definitions Different Model Types System Identification

Systems Analysis and Control

Contents lecture 5. Automatic Control III. Summary of lecture 4 (II/II) Summary of lecture 4 (I/II) u y F r. Lecture 5 H 2 and H loop shaping

ECE 636: Systems identification

Solutions for examination in TSRT78 Digital Signal Processing,

Stochastic Processes. M. Sami Fadali Professor of Electrical Engineering University of Nevada, Reno

CHBE507 LECTURE II MPC Revisited. Professor Dae Ryook Yang

EL2520 Control Theory and Practice

y k = ( ) x k + v k. w q wk i 0 0 wk

TAKEHOME FINAL EXAM e iω e 2iω e iω e 2iω

ECE317 : Feedback and Control

Integral action in state feedback control

Single-Input-Single-Output Systems

LTI Approximations of Slightly Nonlinear Systems: Some Intriguing Examples

Outline 2(42) Sysid Course VT An Overview. Data from Gripen 4(42) An Introductory Example 2,530 3(42)

On Identification of Cascade Systems 1

A Mathematica Toolbox for Signals, Models and Identification

Closed Loop Identification (L26)

TIME DELAY TEMPERATURE CONTROL WITH IMC AND CLOSED-LOOP IDENTIFICATION

IDENTIFICATION OF A TWO-INPUT SYSTEM: VARIANCE ANALYSIS

Control Systems I. Lecture 7: Feedback and the Root Locus method. Readings: Jacopo Tani. Institute for Dynamic Systems and Control D-MAVT ETH Zürich

Closed-loop Identification of Hammerstein Systems Using Iterative Instrumental Variables

CBE495 LECTURE IV MODEL PREDICTIVE CONTROL

Introduction to system identification

GATE EE Topic wise Questions SIGNALS & SYSTEMS

Outline. Classical Control. Lecture 1

5 Transfer function modelling

Matlab software tools for model identification and data analysis 10/11/2017 Prof. Marcello Farina

Cautious Data Driven Fault Detection and Isolation applied to the Wind Turbine Benchmark

Errors-in-variables identification through covariance matching: Analysis of a colored measurement noise case

EAS 305 Random Processes Viewgraph 1 of 10. Random Processes

Stability of CL System

UCSD ECE153 Handout #40 Prof. Young-Han Kim Thursday, May 29, Homework Set #8 Due: Thursday, June 5, 2011

Time Series. Anthony Davison. c

Systems Analysis and Control

Introduction to Feedback Control

Systems Analysis and Control

FRTN 15 Predictive Control

Lecture 1: Pragmatic Introduction to Stochastic Differential Equations

IV. Covariance Analysis

ik () uk () Today s menu Last lecture Some definitions Repeatability of sensing elements

Lecture 12. Upcoming labs: Final Exam on 12/21/2015 (Monday)10:30-12:30

Systems Analysis and Control

D(s) G(s) A control system design definition

ω (rad/s)

Iterative Learning Control (ILC)

CDS 101/110a: Lecture 10-1 Robust Performance

Iterative Feedback Tuning

Chapter 13 Digital Control

Time domain identification, frequency domain identification. Equivalencies! Differences?

Model Identification and Validation for a Heating System using MATLAB System Identification Toolbox

Kalman-Filter-Based Time-Varying Parameter Estimation via Retrospective Optimization of the Process Noise Covariance

Übersetzungshilfe / Translation aid (English) To be returned at the end of the exam!

Robustness in Experiment Design

Topic # Feedback Control Systems

Lecture 6 Describing function analysis

Methods for analysis and control of. Lecture 6: Introduction to digital control

Time series models in the Frequency domain. The power spectrum, Spectral analysis

Studio Exercise Time Response & Frequency Response 1 st -Order Dynamic System RC Low-Pass Filter

Frequency methods for the analysis of feedback systems. Lecture 6. Loop analysis of feedback systems. Nyquist approach to study stability

Aspects of Continuous- and Discrete-Time Signals and Systems

MAE143a: Signals & Systems (& Control) Final Exam (2011) solutions

Nonlinear Identification of Backlash in Robot Transmissions

Properties of Open-Loop Controllers

Transcription:

EL1820 Modeling of Dynamical Systems Lecture 10 - System identification as a model building tool Experiment design Examination and prefiltering of data Model structure selection Model validation Lecture 10 1

You should be able to Today s goal use system identification as a systematic model-building tool do a careful experiment design/data collection to enable good model estimation select the appropriate model structure and model order validate that the estimated model is able to reproduce the observed data Lecture 10 2

System identification procedure User choices Experimental condition input, sampling freq, open/closed loop,... Model structure linear/nonlinear, nonparametric,... Identification method least squares, PEM,... parametric/ No Experiment design Data collection Data prefiltering Model structure selection Parameter estimation Model validation Model OK? Yes Lecture 10 3

Experiments and data collection Often good to use a two-stage approach 1. Preliminary experiments step/impulse response tests to get basic understanding of system dynamics linearity, stationary gains, time delays, time constants, sampling interval 2. Data collection for model estimation carefully designed experiment to enable good model fit operating point, input signal type, number of data points to collect, etc. Lecture 10 4

Preliminary experiments The input signal in an identification experiment can have a significant influence on the resulting model Typical choices: (Approximate) impulse functions Step functions Pseudorandom binary sequences (PRBS) Sinusoids Lecture 10 5

Preliminary experiments: step response Resonance frequency Static gain 1 0 0 5 10 15 20 Dead-time Rise time Easy to apply and useful for obtaining basic information about system dead-times, static gain, time constants, resonances and aids sampling time selection (rule-of-thumb: 4-10 samples / rise time) More power at low freq s than at high freq s Very sensitive to noise (needs large amplitude to get good results) User choices: Amplitude A, duration T Lecture 10 6

Preliminary experiments: sinusoids 2 1 u(t) = α sin(ωt + φ) u 0 1 Easy to apply 2 0 2 4 6 8 10 t Useful for directly obtaining freq. domain information Focuses on freq s of interest Amplitude can be traded off for the duration of the experiment, i.e. for α larger the experiment can be shortened Only provides information at one freq, hence many experiments needed to obtain an adequate model Lecture 10 7

Preliminary experiments: multi-sines u(t) = m α k sin(ω k t + φ k ) k=1 If φ k s are chosen equal to 0, the amplitude can be large Schroeder method: Choose φ k = k2 π m (if α k s are equal) ω k s should be in the freq. region of interest, and multiples of h u 8 6 4 2 0 2 4 6 8 0 2 4 6 8 10 t u 8 6 4 2 0 2 4 6 8 0 2 4 6 8 10 t Lecture 10 8

Tests for verifying linearity For linear systems, response is independent of operating point test linearity by a sequence of step response tests for different operating points 80 Input u 60 40 20 0 0 50 100 150 200 250 120 Output y 100 80 60 40 20 0 0 50 100 150 200 250 Time (s) Lecture 10 9

Tests for detecting friction Friction can be detected by using small step increases in input 4 3 2 y 1 0 1 0 10 20 30 40 50 60 70 80 90 100 10 8 6 u 4 2 0 0 10 20 30 40 50 60 70 80 90 100 t (s) Input moves every two or three steps Lecture 10 10

Designing experiment for model estimation Input signal should excite all relevant frequencies estimated model accurate in freq s where input has much energy good choice: binary signal with random hold times (e.g., PRBS) 1 0.5 0 0.5 1 0 5 10 15 20 25 30 35 Trade-off in selection of signal amplitude constraints on the input (economic, safety, actuator limits,...) large amplitude gives high signal-to-noise ratio, low variance most systems are nonlinear for large input amplitudes Sampling freq? Typically 5 10 time constant of the process Many pitfalls if estimating a model of a system under closed-loop! Lecture 10 11

Identifiability Definition Model parametrization is identifiable if ŷ[k θ ] = ŷ[k θ] θ = θ Many reasons for loss of identifiability 1. Over-parametrization of model (e.g., y[k] = αβu[k]) 2. Input signal not persistently exciting 3. Closed-loop control Example Is the model y[k + 1] = b 0 u[k] + b 1 u[k 1] identifiable? what if u[k] is white noise? or if u[k] is constant? Lecture 10 12

Identifiability: persistent excitation Recall from Lecture 9: If the underlying system is given by y[k] = θ 1 u[k 1] + + θ n u[k n] + v[k] = θ T ϕ[k] + v[k] then the parameter ˆθ that makes the model y[k] = ˆθ T ϕ[k] best fit given measured data sequences {u[k]} and {y[k]} is ˆθ = (ϕ T N ϕ N ) 1 ϕ T Ny N An input signal is persistently exciting (p.e.) of order n if R = lim N 1 N ϕt N ϕ N R n n is invertible when u[k] and v[k] are independent (compare exercises!) Lecture 10 13

Identifiability: persistent excitation cont d Fact: Characterization of p.e. in freq. domain u[k] is p.e. of order n θ if Φ u (ω) 0 for at least n θ distinct freq s in [ π, π] Examples u[k] = const (or a step) is p.e. of order 1 u[k] = sin[ωk] is p.e. of order 2 u[k] with continuous Φ u (ω) is p.e. of every order Fact For rational structures, a necessary condition for identifiability is that u[k] is p.e. of sufficiently high order: ARX / ARMAX: p.e. of order n b OE / BJ: p.e. of order n a + n b Lecture 10 14

Identification in closed-loop Many pitfalls when trying to identify dynamics of system in closed-loop Feedback control reduces signal variations potential problems with p.e. makes input dependent of noise estimates can be biased Example Identifying linear system under P-control { y[k] + ay[k 1] = bu[k 1] + e[k] u[k] = f y[k] y[k] + (a + αf)y[k 1] = (b α)u[k 1] + e[k] }{{}}{{} â ˆb Cannot identify a and b separately (even if we know feedback gain f!) Lecture 10 15

Identification in closed-loop cont d Closed-loop system with a reference term (i.e., u[k] = f(r[k] y[k])): y[k] = (a + bf)y[k 1] + bfr[k] + e[k] Can identify a, b if we know f! 10 1 AMPLITUDE 10 0 10-1 10-2 10-1 10 0 10 1 frequency (rad/sec) 0 PHASE -50-100 -150-200 10-2 10-1 10 0 10 1 frequency (rad/sec) ARX (with ref, dotted) works fine, while spectral analysis (without ref, dashed) fails completely Lecture 10 16

Data collection w(t) - disturbance u(t) G(p) y(t) e(t) - measurement noise L L u(kh) y(kh) Sampling time selection and anti-alias filtering central! Lecture 10 17

System identification an iterative procedure Experiment design Data collection Data prefiltering Model structure selection Parameter estimation Model validation No Model OK? Yes Lecture 10 18

Prefiltering of data Remove transient needed to reach desired operating point mean values of input and output signals, i.e., work with u[k] = u[k] 1 T T u[i] y[k] = y[k] 1 T T y[i] i=1 i=1 trends (use detrend in Matlab) outliers ( obviously erroneous data points ) Lecture 10 19

Prefiltering of data cont d Prefiltering: useful tool for emphasizing freq. ranges in estimation If input and output are filtered through the same filter y F [k] = L(q)y[k] u F [k] = L(q)u[k] then the frequency domain interpretation of PEM becomes lim N ˆθ N = arg min θ π π G 0 (e iω ) G(e iω ; θ) 2 Φ u(ω) L(e iω ) 2 H (e iω ) 2 dω Good fit where Φ u and L(e iω ) are large, H (e iω ) small Example ARX: H (q) = A 1 (q), focus on high freq s unless we prefilter! Lecture 10 20

Choice of model structure 1. Start with non-parametric estimates (correlation/spectral analysis) give information about model order and important freq. regions 2. Prefilter input/output data to emphasize important freq. ranges 3. Begin with ARX models 4. Select model orders via cross-validation (simulate model and compare with new data) Akaike s Information Criterion, i.e., pick the model that minimizes ( 1 + 2 d ) N ε 2 [k; θ] N k=1 (where d is the number of estimated parameters in the model) Lecture 10 21

System identification an iterative procedure Experiment design Data collection Data prefiltering Model structure selection Parameter estimation Model validation No Model OK? Yes Lecture 10 22

Model validation A critical evaluation: is model good enough? typically depends on the purpose of the model Example G(s) = 1 (s + 1)(s + a) Open- and closed-loop responses for a = 0.01, 0, 0.01: 200 1.4 180 160 140 120 100 80 60 40 20 0 0 20 40 60 80 100 120 140 160 180 200 1.2 1 0.8 0.6 0.4 0.2 0 0 2 4 6 8 10 12 Insufficient for open-loop prediction, good enough for closed-loop control Lecture 10 23

Model validation cont d Bode diagrams reveal why model is good enough for closed-loop control 10 5 10 0 10 5 10 4 10 3 10 2 10 1 10 0 10 1 10 2 0 50 100 150 200 10 4 10 3 10 2 10 1 10 0 10 1 10 2 Different low-freq. behavior, similar responses around cross-over freq. Lecture 10 24

Principles of model validation Try to verify that observations behave according to modelling assumptions 1. Compare model simulation/prediction with real data 2. Compare estimated model s frequency response and spectral analysis estimate 3. Perform statistical tests on prediction errors Lecture 10 25

Validation: simulation and prediction Split data into two parts: one for estimation and one for validation Apply input signal in validation data set to estimated model Compare simulated output with output stored in validation data set 6.5 Measured and simulated output 6 5.5 5 4.5 4 3.5 3 0 5 10 15 20 25 30 35 40 Time [s] Lecture 10 26

Statistical model validation If we fit the parameters of the model to data, the residuals y[k] = G(q; θ)u[k] + H(q; θ)e[k] ε[k] = H(q; θ) 1 {y[k] G(q; θ)u[k]} represent a disturbance that explains mismatch between model and observed data If the model is correct, the residuals should be white, and uncorrelated with u Lecture 10 27

Statistical model validation To test if the residuals ε[k] are white, we estimate their autocovariance ˆR ε (τ) = 1 N N ε[k]ε[k τ] k=1 and verify that its components lie in a 95% confidence region around zero large components indicate unmodelled dynamics Example Since N k ˆR τ=1 ε(τ)/ 2 ˆR ε(0) 2 d χ 2 (k) N (k, 2k) for large k, a test of significance level 0.05 is: The residuals ε[k] are not white if k τ=1 ˆR ε(τ) 2 ˆR ε(0) > k + 1.65 2k 2 N Lecture 10 28

Statistical model validation cont d Independence tested by verifying that cross-covariance function ˆR εu (τ) = 1 N N ε[k]u[k τ] k=1 lies within a 95% confidence region around zero large components indicate unmodeled dynamics ˆR εu (τ) 0 for τ < 0 (non-causality) presence of feedback Example A test of significance level 0.05 is: ε[k] and u[k] are not uncorrelated if k τ=1 ˆR εu(τ) 2 ˆR ε (0) ˆR u (0) > k + 1.65 2k N Lecture 10 29

0.2 Statistical model validation cont d Autocorrelation of residuals 0.1 0-0.1-0.2 0.2 Crosscorrelation between input and output 0.1 0-0.1-0.2-20 -15-10 -5 0 5 10 15 20 Samples Lecture 10 30

Summary System identification an iterative procedure in several steps Experiment design preliminary experiments detect basic system behavior carefully designed experiment enables good model estimation (choice of sampling interval, anti-alias filters, input signal) Examination and prefiltering of data remove outliers and trends Model structure selection Model validation cross-validation and residual tests Lecture 10 31

Next lecture Identification of nonlinear models Lecture 10 32