1 The System Identification Problem The need and use of the noise model can be summarized as follows: It is, in most cases, required to obtain a better estimate for the dynamics, G. It indicates how reliable noise- free simulations are It is required for reliable predictions and stochastic control design Terms to Characterize the Model properties The properties of an input-output relationship like the arX model follow from the numerical values of the coefficients, and the number of delays used. This is however a fairly implicit way of talking about the model properties. Instead a number of different terms are used in practice Impulse Response The impulse response of a dynamical model is the output signal that results when the input is an impulse, i.e., u(t)is zero for all values of t except t=0, where u(o)=1. It can be computed as in the equation following (ARX), by letting t be equal to O, 1, 2,.and taking yl-T=y(-2T)=0 and u(0)=1 Step Response The step response is the output signal that results from a step input, i.e., u(t) is zero for negative values of t and equal to one for positive values of t. The impulse and step responses together are called the model's transient Frequency Response The frequency response of a linear dynamic model describes how the model reacts to sinusoidal inputs. If we let the input u(t)be a sinusoid of a certain frequency, then the output y(t will also be a sinusoid of this frequency. The amplitude and the phase (relative to the input) will however be different. This frequency response is most often depicted by two plots; one that shows the amplitude change as a function of the sinusoid's frequency and one that shows the phase shift as function of frequency. This is known as a Bode plot. 1-10
1 The System Identification Problem 1-10 The need and use of the noise model can be summarized as follows: • It is, in most cases, required to obtain a better estimate for the dynamics, G. • It indicates how reliable noise-free simulations are. • It is required for reliable predictions and stochastic control design. Terms to Characterize the Model Properties The properties of an input-output relationship like the ARX model follow from the numerical values of the coefficients, and the number of delays used. This is however a fairly implicit way of talking about the model properties. Instead a number of different terms are used in practice: Impulse Response The impulse response of a dynamical model is the output signal that results when the input is an impulse, i.e., u(t) is zero for all values of t except t=0, where u(0)=1. It can be computed as in the equation following (ARX), by letting t be equal to 0, 1, 2, ... and taking y(-T)=y(-2T)=0 and u(0)=1. Step Response The step response is the output signal that results from a step input, i.e., u(t) is zero for negative values of t and equal to one for positive values of t. The impulse and step responses together are called the model’s transient response. Frequency Response The frequency response of a linear dynamic model describes how the model reacts to sinusoidal inputs. If we let the input u(t) be a sinusoid of a certain frequency, then the output y(t) will also be a sinusoid of this frequency. The amplitude and the phase (relative to the input) will however be different. This frequency response is most often depicted by two plots; one that shows the amplitude change as a function of the sinusoid’s frequency and one that shows the phase shift as function of frequency. This is known as a Bode plot
Basic Information About Dynamic Models Zeros and poles The zeros and the poles are equivalent ways of describing the coefficients of a linear difference equation like the ArX model. The poles relate to the output-side"and the zeros relate to the"input-side"of this equation. The number of poles(zeros)is equal to the number of sampling intervals between the most and least delayed output (input). In the ArX example in the beginning of this section, there are consequently two poles and one zero 1-11
Basic Information About Dynamic Models 1-11 Zeros and Poles The zeros and the poles are equivalent ways of describing the coefficients of a linear difference equation like the ARX model. The poles relate to the “output-side” and the zeros relate to the “input-side” of this equation. The number of poles (zeros) is equal to the number of sampling intervals between the most and least delayed output (input). In the ARX example in the beginning of this section, there are consequently two poles and one zero
1 The System Identification Problem The Basic Steps of System Identification The System Identification problem is to estimate a model of a system based on observed input-output data. Several ways to describe a system and to estimate such descriptions exist. This section gives a brief account of the most important approaches The procedure to determine a model of a dynamical system from observed input-output data involves three basic ingredients: The input-output data A set of candidate models (the model structure A criterion to select a particular model in the set, based on the information in the data(the identification method) The identification process amounts to repeatedly selecting a model structure computing the best model in the structure, and evaluating this model's properties to see if they are satisfactory. The cycle can be itemized as follows 1 Design an experiment and collect input-output data from the process to be 2 Examine the data. Polish it so as to remove trends and outliers and select useful portions of the original data. Possibly apply filtering to enhance ant fi 3 Select and define a model structure(a set of candidate system descriptions within which a model is to be found 4 Compute the best model in the model structure according to the input-output data and a given criterion of fit. 5 Examine the obtained model's properties 6 If the model is good enough, then stop; otherwise go back to Step 3 to try another model set. Possibly also try other estimation methods(Step 4)or work further on the input-output data(Steps 1 and 2) The System Identification Toolbox offers several functions for each of these 1-12
1 The System Identification Problem 1-12 The Basic Steps of System Identification The System Identification problem is to estimate a model of a system based on observed input-output data. Several ways to describe a system and to estimate such descriptions exist. This section gives a brief account of the most important approaches. The procedure to determine a model of a dynamical system from observed input-output data involves three basic ingredients: • The input-output data • A set of candidate models (the model structure) • A criterion to select a particular model in the set, based on the information in the data (the identification method) The identification process amounts to repeatedly selecting a model structure, computing the best model in the structure, and evaluating this model’s properties to see if they are satisfactory. The cycle can be itemized as follows: 1 Design an experiment and collect input-output data from the process to be identified. 2 Examine the data. Polish it so as to remove trends and outliers, and select useful portions of the original data. Possibly apply filtering to enhance important frequency ranges. 3 Select and define a model structure (a set of candidate system descriptions) within which a model is to be found. 4 Compute the best model in the model structure according to the input-output data and a given criterion of fit. 5 Examine the obtained model’s properties 6 If the model is good enough, then stop; otherwise go back to Step 3 to try another model set. Possibly also try other estimation methods (Step 4) or work further on the input-output data (Steps 1 and 2). The System Identification Toolbox offers several functions for each of these steps
The Basic Steps of System Identification For Step 2 there are routines to plot data, filter data, and remove trends in data, as well as to resample and reconstruct missing data. For Step 3 the System Identification Toolbox offers a variety of nonparametric models, as well as all the most common black-box input-output and state-space structures, and also general tailor-made linear state-space models in discrete and continuous time For Step 4 general prediction error (maximum likelihood)methods, as well instrumental variable methods and sub-space methods are offered for parametric models, while basic correlation and spectral analysis methods are used for nonparametric model structures. To examine models in Step 5, many functions allow the computation and presentation of frequency functions and poles and zeros, as well as simulation and prediction using the model Functions are also included for transformations between continuous-time and discrete-time model descriptions and to formats that are used in other MATlAB toolboxes, like the Control System Toolbox and the Signal Processing Toolbox. 1-13
The Basic Steps of System Identification 1-13 For Step 2 there are routines to plot data, filter data, and remove trends in data, as well as to resample and reconstruct missing data. For Step 3 the System Identification Toolbox offers a variety of nonparametric models, as well as all the most common black-box input-output and state-space structures, and also general tailor-made linear state-space models in discrete and continuous time. For Step 4 general prediction error (maximum likelihood) methods, as well as instrumental variable methods and sub-space methods are offered for parametric models, while basic correlation and spectral analysis methods are used for nonparametric model structures. To examine models in Step 5, many functions allow the computation and presentation of frequency functions and poles and zeros, as well as simulation and prediction using the model. Functions are also included for transformations between continuous-time and discrete-time model descriptions and to formats that are used in other MATLAB toolboxes, like the Control System Toolbox and the Signal Processing Toolbox
1 The System Identification Problem A Startup Identification Procedure There are no standard and secure routes to good models in System Identification. Given the number of possibilities, it is easy to get confused about what to do, what model structures to test, and so on This section describes one oute that often works well, but there are no guarantees. The steps refer to functions within the GUI, but you can also go through them in command mode. For the basic commands, see Chapter 4, "Command Reference Step 1: Looking at the data Plot the data. Look at them carefully. Try to see the dynamics with your own eyes. Can you see the effects in the outputs of the changes in the input? Can you see nonlinear effects, like different responses at different levels,or different responses to a step up and a step down? Are there portions of the data that appear to be"messy"or carry no information. Use this insight to select portions of the data for estimation and validation purposes Do physical levels play a role in your model? If not, detrend the data by removing their mean values. The models will then describe how changes in the input give changes in output, but not explain the actual levels of the signals This is the normal situation The default situation, with good data, is that you detrend by removing means, and use the remaining data for validation. This is what happens when yo, es, and then select the first half or so of the data record for estimation purpose apply Quickstart under the pop-up menu Preprocess in the main ident Step 2: Getting a Feel for the Difficulties Apply Quickstart under pop-up menu Estimate in the main ident window. This will compute and display the spectral analysis estimate and the correlation analysis estimate, as well as a fourth order ArX model with a delay estimated from the correlation analysis and a default order state-space model computed by n4sid. This gives three plots. Look at the agreement between the Spectral Analysis estimate and the arx and state-space models' frequency Correlation Analysis estimate and the arX and state-space models transient responses 1-14
1 The System Identification Problem 1-14 A Startup Identification Procedure There are no standard and secure routes to good models in System Identification. Given the number of possibilities, it is easy to get confused about what to do, what model structures to test, and so on. This section describes one route that often works well, but there are no guarantees. The steps refer to functions within the GUI, but you can also go through them in command mode. For the basic commands, see Chapter 4, “Command Reference.” Step 1: Looking at the Data Plot the data. Look at them carefully. Try to see the dynamics with your own eyes. Can you see the effects in the outputs of the changes in the input? Can you see nonlinear effects, like different responses at different levels, or different responses to a step up and a step down? Are there portions of the data that appear to be “messy” or carry no information. Use this insight to select portions of the data for estimation and validation purposes. Do physical levels play a role in your model? If not, detrend the data by removing their mean values. The models will then describe how changes in the input give changes in output, but not explain the actual levels of the signals. This is the normal situation. The default situation, with good data, is that you detrend by removing means, and then select the first half or so of the data record for estimation purposes, and use the remaining data for validation. This is what happens when you apply Quickstart under the pop-up menu Preprocess in the main ident window. Step 2: Getting a Feel for the Difficulties Apply Quickstart under pop-up menu Estimate in the main ident window. This will compute and display the spectral analysis estimate and the correlation analysis estimate, as well as a fourth order ARX model with a delay estimated from the correlation analysis and a default order state-space model computed by n4sid. This gives three plots. Look at the agreement between the: • Spectral Analysis estimate and the ARX and state-space models’ frequency functions • Correlation Analysis estimate and the ARX and state-space models’ transient responses