FRT 041 System Identification
FRT 041 System Identification
Laboratory Exercise 2
Lennart Andersson
Ulf Jönsson
Revised: Johan Bengtsson
Brad Schofield
1.1 Preparation
Read "Manual for Practical System Identification" in the appendix. This
manual can also be useful during the projects. Section 6–10 are most impor-
tant for the exercises in this lab. We assume that you have some experience
from using Matlab. Work through the exercise below.
1
2. Process specification
The process in this laboratory exercise is a simulation model of a real
process with artificial measurement noise and a load disturbance. For the
real process the input signal and output signal must be between ±10V . To
get realistic results you should make sure that this is satisfied during your
simulations !
3. Identification
The purpose of this section is that you should go through the steps of system
identification for an unknown process. The result will be a mathematical
model of the process.
Download the file simu.m from the course webpage, and put it in your
working directory. This file will be used to simulate the unkown process.
Use the Matlab command help frequently during the whole excercise !
Most of the time should be spent on obtaining parametric models and
validation. Suggested timeplan:
• Experiments 60min
• Spectrum analysis 45min
• Parametric models and Validation 105min
3.1 Exercise 1
n
u y
Process
Figure 1 shows the available process as a black box. The influence from
disturbances is illustrated by the signal n. The process can be simulated
using a special matlab command simu.
[y,u,t]=simu(u,h);
u process input
h sampling period
y process output
t time vector
2
Simulate the process with zero input. A zero input vector can be created
using
u=zeros(N,1);
Use the matlab command plot to display the simulation result. Explain
the result.
3.2 Exercise 2
Do some simple experiments such as step responses to gain some basic
information about the process.
A step input vector can be created using
u=[zeros(N1,1);A*ones(N2,1)];
Check that the input signal and output signal are between ±10 ! Determine
dominant time constants and the stationary gain. Does the process have
continuous time minimum phase character?
3.3 Exercise 3
The choice of input signal is crucial in system identification. Here we will
use a Psuedo-Random Binary Sequence (PRBS) input signal. A PRBS sig-
nal can be obtained as
prbs=A*kron(rand(N,1)>0.5,ones(n,1));
A Amplitude
N sequence length
n samples during each state
prbs column vector with n*N elements
3
where you have to choose A,N and n.
Generate identification data by simulating the system with a PRBS
input.
Examine the data and prepare them for identification. How should the
data be divided? It may be useful to use iddata objects to store your iden-
tification data.
3.4 Exercise 4
Use spectral analysis–e.g., spa or spectrum on the gathered data. What
is the effect of experiment duration on the spectral estimates? Investigate
the use of ‘windowing’ to improve the results. If desired, the Identification
toolbox GUI may be used in this exercise. It is started by typing ident in
Matlab.
3.5 Exercise 5
Estimate some parametric models. This step contains both model structure
selection, model order selection and validation. This exercise is the most
difficult and time consuming! Therefore, spend most of the time here. It
may be useful to use the Identification toolbox GUI in this exercise as well.
4. Controller design
Based on the parametric model obtained by identification you should now
design a controller.
4
n
r u y
T 1/ R process
−S
4.1 Exercise 6
Design a controller and simulate the closed-loop system. Write help ppbox
and in particular help rstd to see how the design can be performed (you
may need to type oldboxes to access these functions). The design should
satisfy the signal specification stated earlier, i.e., the input and output
should be between ±10V . The total structure can be seen in Figure 2. The
closed loop can be simulated using the command
[y,uc,t]=simu(yr,h,R,S,T);
yr reference value
h sampling period
R,S,T controller polynomials
y process output
uc process input
t time vector