Presentation is loading. Please wait.

Presentation is loading. Please wait.

SYSTEMS Identification Ali Karimpour Assistant Professor Ferdowsi University of Mashhad Reference: “System Identification Theory For The User” Lennart.

Similar presentations


Presentation on theme: "SYSTEMS Identification Ali Karimpour Assistant Professor Ferdowsi University of Mashhad Reference: “System Identification Theory For The User” Lennart."— Presentation transcript:

1 SYSTEMS Identification Ali Karimpour Assistant Professor Ferdowsi University of Mashhad Reference: “System Identification Theory For The User” Lennart Ljung

2 lecture 16 Ali Karimpour Nov 2009 2 Lecture 17 System Identification in Practice Topics to be covered include: v The Tool: Interactive Software v Choice of Input signals v The Practical Side of System Identification v Some Applications v What Does System Identification Have to Offer

3 lecture 16 Ali Karimpour Nov 2009 3 Introduction Performing the identification task in practice enhances the “art side” of the topic. Experience, intuition, and insights will then play important roles. In this lecture we shall discuss the system identification techniques as a toolbox for: Investigating, understanding and mastering real-life systems

4 lecture 16 Ali Karimpour Nov 2009 4 Interactive Software Topics to be covered include: v The Tool: Interactive Software v Choice of Input signals v The Practical Side of System Identification v Some Applications v What Does System Identification Have to Offer

5 lecture 16 Ali Karimpour Nov 2009 5 Interactive Software The work to produce a model by identification is characterized by: 1- Specify a model structure. 2- The computer delivers the best model in this structure. 3- Evaluate the properties of this model. 4- Test a new structure, go to step 1.

6 lecture 16 Ali Karimpour Nov 2009 6 Yes No Can the model be accepted? Choice of model structure Model structure not OK Validate the Model Data not OK Should data be filtered? Construct the experiment and Collect data Data Interactive Software Polish data Data Fit the Model to data Model

7 lecture 16 Ali Karimpour Nov 2009 7 Interactive Software Commercially available program packages typically contains: A- Handling of data, plotting, and the like B- Nonparametric identification methods. C- Parametric estimation methods. Estimation of covariances, Fourier transforms, spectral analysis, …. D- Presentation of models. E- Model validation. Simulation of models, estimation and plotting of poles and zeros, ….. Math Work’s System identification Toolbox (SITB) (Ljung 1995) which is used together with Matlab.

8 lecture 16 Ali Karimpour Nov 2009 8 Choice of Input Signals Topics to be covered include: v The Tool: Interactive Software v Choice of Input Signals v The Practical Side of System Identification v Some Applications v What Does System Identification Have to Offer

9 lecture 16 Ali Karimpour Nov 2009 9 Choice of Input Signals The data should be informative, or it should be persistently exciting of a certain order; i.e. that it contains sufficiently many distinct frequency. There are three basic facts that governs the choices: 1.The asymptotic property of the estimate depend only on the input spectrum not the actual waveform of the input. 2. The input must have limited amplitude. u min < u < u max 3. Periodic inputs may have certain advantages.

10 lecture 16 Ali Karimpour Nov 2009 10 Choice of Input Signals Common Input Signals Filtered Gaussian White Noise. With this we can achieve virtually any signal spectrum by proper choice of filter Random Binary Noise. The problem is that taking the sign of the filtered Gaussian signal will change its spectrum Pseudo-Random Binary Noise. Multi-Sines. Chirp Signals or Swept Sinusoids.

11 lecture 16 Ali Karimpour Nov 2009 11 Choice of Input Signals Periodic Inputs What are the advantages and disadvantages with periodic inputs?

12 lecture 16 Ali Karimpour Nov 2009 12 The Practical Side of System Identification Topics to be covered include: v The Tool: Interactive Software v Choice of Input Signals v The Practical Side of System Identification v Some Applications v What Does System Identification Have to Offer

13 lecture 16 Ali Karimpour Nov 2009 13 The Practical Side of System Identification After the data have been recorded, the essential element in the process is: Try out various model structure Compute the best model in the structures Validate the model The difficulties of this process should not be underestimated, and it will require substantial experience to master it. Here follows a procedure that could prove useful to try out. Step1: Looking at the data. Step2: Getting a feel for difficulties. Step3: Examining the difficulties. Step4: Fine tuning orders and noise structure. Step5: Accepting the model.

14 lecture 16 Ali Karimpour Nov 2009 14 The Practical Side of System Identification Step1: Looking at the data. Plot the data Look at them carefully Try to see dynamics Can you see the effects in the outputs of the changes in the input? Can nonlinear effect be seen? like different responses at different levels, or different responses to a step up and down Do physical levels play a role in the model? If not, detrend the data by removing their mean values The default situation, with good data, is to detrend by removing means, and then select the first two thirds or so of the data record for estimation purposes, and use the remaining data for validation. All of this corresponds to the “Estimate Quickstart” in the Matlab identification toolbox

15 lecture 16 Ali Karimpour Nov 2009 15 The Practical Side of System Identification Step2: Getting a feel for difficulties. Compute a fourth order ARX model with a delay estimated from the correlation analysis. If these agreements are reasonable, the problem is not so difficult, and we can proceed to Step 4. Other wise go to step 3. Compute a state-space model computed by a subspace method. Look at the agreement between All of this corresponds to the “Estimate Quickstart” in the Matlab identification toolbox Spectral analysis estimate and the ARX and state-space’s frequency functions. Correlation analysis estimate and the ARX and state-space’s frequency functions. Measured validation data output and the ARX and state-space’s simulated outputs. (Model Output Plot)

16 lecture 16 Ali Karimpour Nov 2009 16 The Practical Side of System Identification Step3: Examining the difficulties. There may be several reasons why the comparison in Step 2 did not look good. Model unstable Feedback in data Noise model Model order Additional inputs Nonlinear effects General nonlinear mappings

17 lecture 16 Ali Karimpour Nov 2009 17 The Practical Side of System Identification Step3: Examining the difficulties. Model unstable Feedback in data The ARX or state-space model may turn out to be unstable, but could still be useful for control purposes. Then change to a 5- or 10-step ahead prediction instead of simulation when the agreement between measured and model output is considered. If there is feedback from the output to the input, duo to some regulator, then the spectral and correlation analysis estimates, as well as the state-space model, are not reliable. In residual analysis of the parametric models, feedback in data can also be visible as correlation between residuals and input for negative lag.

18 lecture 16 Ali Karimpour Nov 2009 18 The Practical Side of System Identification Step3: Examining the difficulties. Noise model Model order If the state space model is clearly better than the ARX model at reproducing the measured output, this is an indication that the disturbances have a substantial influence, and it will be necessary to carefully model them. If a fourth order model does not give a good Model output plot, try the eigth order. If the fit clearly improves, it follows that higher order models will be required, but that linear models could be sufficient.

19 lecture 16 Ali Karimpour Nov 2009 19 The Practical Side of System Identification Step3: Examining the difficulties. Additional inputs If the model output fit does not significantly improved by the tests so far, think over the physics of the application. Are there more signals that have been, or could be, measured that might influence the output? If so, include these among the inputs and try again a fourth order ARX model from all the inputs. Note that: the inputs need not at all be control signals, anything measureable, including disturbances, should be treated as inputs.

20 lecture 16 Ali Karimpour Nov 2009 20 The Practical Side of System Identification Step3: Examining the difficulties. Nonlinear effects If the fit between measured and model output is still bad, consider again the physics of the application. Are there nonlinear effects in the system? In that case form the nonlinearity from the measured data. This could be simple as forming the product of voltage and current measurements, if it is the electrical power that is driving stimulus in, say, a heating process, and temperature is the output. This is of course application dependent.

21 lecture 16 Ali Karimpour Nov 2009 21 The Practical Side of System Identification Step3: Examining the difficulties. Still problem? General nonlinear mappings In some applications physical insight may be lacking, so it is difficult to come up with structured non-linearities on physical grounds. In such cases, nonlinear, black box models could be a solution. If none of these tests leads to a model that is able to reproduce the validation data reasonably well, the conclusion might be that a sufficiently good model cannot be produced from the data. There may be many reasons for this. The most important one is that the data simply do not contain sufficient information, e.g. duo to bad signal to noise ratios, large and non-stationary disturbances, varying system properties, etc.

22 lecture 16 Ali Karimpour Nov 2009 22 The Practical Side of System Identification For real data different structures can give quite different model quality. Step4: Fine tuning orders and noise structure. The only way to find this out is to try out a number of different model structures and compare the properties of the obtained model. There are a few things to look for in these comparisons. Fit Between Simulated and Measured Output. Residual Analysis Test. Pole Zero Cancellations. If the pole-zero plot (including the confidence interval) indicates pole-zero cancellations in the dynamics, this suggest that lower order model can be used.

23 lecture 16 Ali Karimpour Nov 2009 23 The Practical Side of System Identification Step4: Fine tuning orders and noise structure. What model structure should be tested? Well, any amount of time can be spent on checking out a very large number of structures. It often takes just a few seconds to compute and evaluate a model in a certain structure, so one should have a generous attitude to the testing. However, experience shows that when the basic properties of the system’s behaviour have been picked up, it is not much use to fine tune orders just to improve the fit by fractions of percents.

24 lecture 16 Ali Karimpour Nov 2009 24 The Practical Side of System Identification Step4: Fine tuning orders and noise structure. Multivariable Systems Multivariable systems are often more challenging to model. A basic reason for the difficulties is that the coupling between several inputs and outputs leads to more complex models. Working with subset of the Input-Output Channels Working with state-space model

25 lecture 16 Ali Karimpour Nov 2009 25 The Practical Side of System Identification Step4: Fine tuning orders and noise structure. Working with subset of the Input-Output Channels In the process of identifying good models of a system it is often useful to select a subset of input and output channels. Partial models of the system’s behaviour will then be constructed. It might not, for example, be clear if all measured inputs have a significant influence on the outputs. That is most easily tested by removing an input channel from the data, building a model for how the output(s) depends on the remaining input channels and checking if there is a significant ………….. If there are difficulties to obtain good models for a multi-output system, it might thus be wise to model one output at a time. It is good for simulation. However, models for prediction and control will be able to produce better results if constructed for all output simultaneously. This follows from the fact that knowing the set of all previous output channels …..

26 lecture 16 Ali Karimpour Nov 2009 26 The Practical Side of System Identification Step5: Accepting the model. The final step is to accept the model to be used for its intended application. Note the following:

27 lecture 16 Ali Karimpour Nov 2009 27 Some Applications Topics to be covered include: v The Tool: Interactive Software v Choice of Input Signals v The Practical Side of System Identification v Some Applications v What Does System Identification Have to Offer

28 lecture 16 Ali Karimpour Nov 2009 28 Some Applications The Hairdryer; A Laboratory Application Air is fanned through a tube and heated at the inlet. Input: Power of the heating device. (resistor) Output: Outlet air temperature. It should be said that the process is well behaved. It also allows measurement with good SNR. Transient response (step response of process) Dynamics is simple. Dominant time constant ? A time delay about ? 0.63 0.14 Dominant time constant is around 0.4 sec. A time delay about 0.14 sec. 0.4 A sampling interval of 0.08 was chosen..

29 lecture 16 Ali Karimpour Nov 2009 29 Some Applications The Hairdryer; A Laboratory Application The input was chosen to be a binary random signal shifting between 35 and 65 W. Experimental Design. The probability of shifting the input was set to 0.2. A record of 1000 samples was collected, and the data set is shown in figure. As a first step, the sample means of the input and output sequences were removed. Then the data set was split into two halves, for estimation and for validation.

30 lecture 16 Ali Karimpour Nov 2009 30 Some Applications Preliminary Models. Following Step 2 in Section 17.2, we estimate the step response by correlation analysis, as described in Section 6.1, compute the spectral analysis estimate of the frequency function as well as a fourth order ARX model and a order 3 state-space model.

31 lecture 16 Ali Karimpour Nov 2009 31 Some Applications Preliminary Models. These plots show that we have good agreement between the models computed in different ways. All this indicates, according to Step 4 of Section 17.2, that a linear model will do fine, and some further work to fine-tune orders and delays is all that remain.

32 lecture 16 Ali Karimpour Nov 2009 32 Some Applications Further Models. To look into suitable orders and delays, we compute, 1000 ARX-models as The different ARX will be referred as The overall best fit is obtained for a model of 15 parameters A good fit also obtained for

33 lecture 16 Ali Karimpour Nov 2009 33 Some Applications Further Models. Following figure is a comparison between several different models, based on the fit between measured and simulated output.

34 lecture 16 Ali Karimpour Nov 2009 34 Some Applications Further Models. The residuals of the models (by validation data) are analysed. Residuals of the model It shows that the ARMAX(3,3,2,2) and ARX(6,9,2) model both give residuals that pass whiteness and independence tests. While the model ARX(2,2,3) shows statistically significant correlation between past inputs and the residuals.

35 lecture 16 Ali Karimpour Nov 2009 35 Some Applications Final Choice of Model. Based on this analysis we conclude that there are many linear models that give a good fit to the system. The ARX(6,9,2) model shows the best fit to validation data, but is at the same time only marginally better than the simpler, third order ARMAX(3,3,2,2) model. Both also pass the residual analysis tests. It seems reasonable to pick this simple model as the final choice. The numerical values is The estimated standard deviations of the 8 parameters are

36 lecture 16 Ali Karimpour Nov 2009 36 Some Applications A Fighter aircraft Consider the Swedish fighter aircraft JAS-Gripen

37 lecture 16 Ali Karimpour Nov 2009 37

38 lecture 16 Ali Karimpour Nov 2009 38 Some Applications This intrinsic frame of the vehicle, XYZ system, is oriented such that the X-axis points forward along some convenient reference line along the body, the Y-axis points to the right of the vehicle along the wing, and the Z-axis points downward to form an orthogonal right-handed system. Yaw angle Pitch angle Roll angle

39 lecture 16 Ali Karimpour Nov 2009 39 Some Applications A Fighter aircraft Consider the Swedish fighter aircraft JAS-Gripen The data of the aircraft are shown in the figure. Such data can be used to built a model of the pitch channel, i.e. how the pitch rate is affected by three control signal: elevator, canard, and leading edge flap. The aircraft is unstable in the pitch channel at this flight condition, so clearly the experiment was carry out under closed loop control.

40 lecture 16 Ali Karimpour Nov 2009 40 Some Applications

41 lecture 16 Ali Karimpour Nov 2009 41 Some Applications A Fighter aircraft First of all means of each signal is removed. Then the data is split into two sets. ( 90 samples for estimation and 90 for validation) The RMS fit between measured output and 10-step ahead prediction output according to different models was used to compare the models. In this calculation the whole data was used –in order to let transient die out- but the fit was computed for the validation part of the data. The reason for using ten step ahead prediction rather than simulation is that the pitch channel of the aircraft is unstable, and so most of the estimated model also be. A simulation comparison may therefore be misleading.

42 lecture 16 Ali Karimpour Nov 2009 42 Some Applications A Fighter aircraft A typical ARX model, using 4 past outputs and 4 past values of each of the 3 inputs, gave a fit according to figure. We get a good fit so, its seems reasonable that we can do a good modeling job with fairly simple models. we compute, 1000 ARX-models as The best 1-step ahead prediction fit to the validation data turned out to be for a model See the next figure to see the results.

43 lecture 16 Ali Karimpour Nov 2009 43 Some Applications A Fighter aircraft The best 1-step ahead prediction fit to the validation data turned out to be for a model Note in particular that models that use many parameters are considerably much worse for the validation data.

44 lecture 16 Ali Karimpour Nov 2009 44 Some Applications A Fighter aircraft Models of the kind with other values of n a were also estimated, as well as ARMAX models and state- space models using N4SID method.

45 lecture 16 Ali Karimpour Nov 2009 45 Some Applications A Fighter aircraft The best 10-step ahead prediction fit is obtained for the ARX model with n a =4. (Note that the best 1-step ahead prediction is obtained for n a =8)

46 lecture 16 Ali Karimpour Nov 2009 46 Some Applications A Fighter aircraft The best 10-step ahead prediction fit is obtained for the ARX model with n a =4. The result of residual analysis for this model on validation data is: We see that this simple model with 7 parameters is capable of reproducing new measurements quite well, at the same time it is ok by residual analysis.

47 lecture 16 Ali Karimpour Nov 2009 47 Some Applications Buffer Vessel Dynamics This example concerns a typical problem in process industry. (Pulp Factory) Wood chips are cooked in the digester and the resulting pulp travels through several vessels where it is washed, pleached, etc. The pulp spends about 48 hours total in the process, and knowing the residence time in the different vessels is important in order to associate various portions of the pulp with the different chemical actions that have taken place in the vessel at different times. We denote measurements as: The problem is to determine the residence time in the buffer vessel. The κ-number is a quality property.

48 lecture 16 Ali Karimpour Nov 2009 48 Some Applications Buffer Vessel Dynamics We denote measurements as: Following figure shows the data from one buffer vessel. κ-number of inflow inflow κ-number of outflow Vessel level The sampling interval is 4 minutes, and the time scale shown in hours.

49 lecture 16 Ali Karimpour Nov 2009 49 Some Applications Buffer Vessel Dynamics To estimate the residence time of the vessel it is natural to estimate the dynamics from u to y. We can visually inspect the input-output data and see that the delay seems to be at least an hour or two. We should then contemplate if there are more input signals that may affect the process. The sampling rate may therefore be too fast and we resample it by a factor 3, thus sampling interval is 12 minutes. We proceed as before, remove the mean from κ-number signals, split into estimation and validation data and estimate simple ARX-models. This turns out to give quite bad signals.

50 lecture 16 Ali Karimpour Nov 2009 50 Some Applications Buffer Vessel Dynamics Yes clearly the flow and the level of the vessel should have something to do with dynamics, so we include this two inputs. We should then contemplate if there are more input signals that may affect the process. The best model output comparison was achieved for an ARX model: 4 parameters associated with the output and each of input. A delay of 12 from u and a delay of 1 from f and h.

51 lecture 16 Ali Karimpour Nov 2009 51 Some Applications Buffer Vessel Dynamics The best model output comparison was achieved for an ARX model: 4 parameters associated with the output and each of input. A delay of 12 from u and a delay of 1 from f and h. The comparison is: This does not look good.

52 lecture 16 Ali Karimpour Nov 2009 52 Some Applications Buffer Vessel Dynamics

53 lecture 16 Ali Karimpour Nov 2009 53 Some Applications Buffer Vessel Dynamics The resampled data are in the figure:

54 lecture 16 Ali Karimpour Nov 2009 54 Some Applications Buffer Vessel Dynamics We now apply the same procedure to the resampled data u 1 to y 1. The best ARX model fit was obtained for The comparison is: This “looks good”. Slightly better fit was obtained for an output-error model with the order n b =1, n f =4 and n k =9.

55 lecture 16 Ali Karimpour Nov 2009 55 Some Applications Buffer Vessel Dynamics

56 lecture 16 Ali Karimpour Nov 2009 56 What Does System Identification Have to Offer Topics to be covered include: v The Tool: Interactive Software v Choice of Input Signals v The Practical Side of System Identification v Some Applications v What Does System Identification Have to Offer

57 lecture 16 Ali Karimpour Nov 2009 57 What Does System Identification Have to Offer System identification techniques form a versatile tool for many problem in science and engineering. The value of the tool has been evidenced by numerous application in diverse fields. Still there are some limitations with the techniques, and we shall in this final section give some comments on this. Adaptive and robust designs: Have they made modeling obsolete? Models of dynamical systems are instrumental for many purposes: prediction, control, simulation, filter design, reconstruction of measurements and so on. Sometimes the model can be circumvented by more elaborate solutions: Adaptive mechanisms where the decision parameters are directly adjusted, Robust design that are insensitive to the correctness of the underlying model. Try recursive identification algorithms. We need a nominal model.

58 lecture 16 Ali Karimpour Nov 2009 58 What Does System Identification Have to Offer Limitations: Models structures Data quality Without a reasonable data record not much can be done, and there are several reasons why such a record cannot be obtained in certain applications. Time scale of the process is so slow that any informative data records by necessity will be short. ( Ecological and economical systems) The input may not be open to manipulations, either by its nature or due to safety and production requirements. The SNR could then be bad, and identifiability (informative data sets) perhaps cannot be guaranteed. The bad SNR can in theory, be compensated for by longer data record. Even if the plant, as such, admits long experimentation time, it may not always be a feasible way out, duo to time variations in the process, drift, slow disturbances,….

59 lecture 16 Ali Karimpour Nov 2009 59 What Does System Identification Have to Offer Limitations: Models structures Data quality Finally, even when we are allowed to manipulate the inputs, can measure for long periods, and have good SNR, it may still be difficult to obtain a good data record. The prime reason for this is the presence of unmeasurable disturbances that do not fit well into the standard picture of “stationary stochastic processes”. We have discussed how to cope with such slow disturbances in Section 14.1 The SNR could then be bad, and identifiability (informative data sets) perhaps cannot be guaranteed. The bad SNR can in theory, be compensated for by longer data record. Even if the plant, as such, admits long experimentation time, it may not always be a feasible way out, duo to time variations in the process, drift, slow disturbances,….

60 lecture 16 Ali Karimpour Nov 2009 60 What Does System Identification Have to Offer Limitations: Model structures (Data quality, Model structures) It is trivial that a bad model structure cannot offer a good model, regardless of the amount and the quality of the available data. For example, duo to crucial nonlinear mechanisms that must be built in, and this requires physical insight. Whether the process admits a standard, linear, ready-made (“black box”) model description? In this case, our chances of success are good. So we must check: Or whether a tailor-made model set must be constructed. In this case, we have to resort to some physical insight. Clearly it is application dependent and therefore not so much discussed in identification leterature. In this case the key to success is: Thinking, intuition, insight.


Download ppt "SYSTEMS Identification Ali Karimpour Assistant Professor Ferdowsi University of Mashhad Reference: “System Identification Theory For The User” Lennart."

Similar presentations


Ads by Google