You are on page 1of 9

Surname: Name: ID Number: Exam version: A

Problem #1: the input-output measurements of a SISO dynamic system S1 to be modeled for
simulation through a transfer function G(z) of degree n ≤ 10 have been collected in the MATLAB
data1a.mat file.

1.1) Identify ARX, ARMAX and OE models of different orders and delays (assume na=nb=nc=nf ≤10,
nk ≤ 3), using the first 6500 samples of the experimental data and looking for models guaranteeing
satisfactory characteristics of whiteness of the residuals associated to this first dataset.

1.1.a) Candidate models with satisfactory residual characteristics (specify class, orders, delay,
residual characteristics, test threshold):
Candidate models with satisfactory residual characteristics
(specify class, orders, delay, residual characteristics,
test threshold):

ARX with threshold 20

nk/na 1 2 3 4 5 6 7 8 9 10
1 X X X X X 20 19 15 X x
2 X X X X X X X 19 16 20
3 X X X X X 20 X X 19 19
ARMAX
nk/na 1 2 3 4 5 6 7 8 9 10
1 X 18 X x X X X 17 13 14
2 X X X X X 14 20 19 18 7
3 X X X X 19 15 20 17 X 6

OE
nk/na 1 2 3 4 5 6 7 8 9 10
1 X X X X X X X X X X
2 X X X X X X X X X X
3 X X X X X X X X X X

1.1.b) Clear report including the reasoning behind the computations and the possible critical
analysis of the main numerical results:

Write a report
For simplicity, the coefficients were chosen the equal, for example , for
arx model, na=nb. This reduces the number of possible models and can lead
us to choose a model with bigger complexity than needed if these
coefficients were differents.

The confidence interval of 95% was very restrictive for these very noisy
data, so a small number of points outside of the confidence area is not
adequate.

1.2) Compare only the models that guarantee satisfactory residual characteristics in the previous
step, by considering the following two criteria, both applied to the remaining dataset not used for
identification and assuming N0 =25: RMSE and AIC.

1.2.a) Candidate models with satisfactory residual characteristics (specify class, orders, delay,
values of RMSE and AIC):

Candidate models with satisfactory residual characteristics


(specify class, orders, delay, values of RMSE and AIC):
ARX
RMSE
Nk/na 1 2 3 4 5 6 7 8 9 10
1 X X X X X X X X X x
2 X X X X X X X 0.3170 0.3069 0.3011
3 X X X X X 0.3022 X X 0.2982 0.3048

AIC
Nk/na 1 2 3 4 5 6 7 8 9 10
1 X X X X X x x - X x
2.19
2 X X X X X X X - - -
2.36 2.39 2.48
3 X X X X X - X X - -
2.39 2.41 2.37

ARMAX

RMSE
nk/na 1 2 3 4 5 6 7 8 9 10
1 X 18 X x X X X 0.1128 0.1317 0.142
2 X X X X X x x x 0.0944 0.1004
3 X X X X X x 0.2317 0.1021 X 0.1039

AIC

nk/na 1 2 3 4 5 6 7 8 9 10
1 X 18 X x X X X - -4.05 -4.33
4.36
2 X X X X X x x x - -
4.7169 4.5931
3 X X X X x x - - X -4.52
2.92 4.56

1.2.b) Best trade-off between RMSE and transfer function degree n, with: n = na (ARX and ARMAX
models) or n = nf (OE models). Report the corresponding model in simulation mode, specifying the
transfer functions F1(z) and F2(z) and the effective signals s1(t), s2(t) and s3(t) of the following block
diagram representation:

Best trade-off between RMSE and transfer function degree n


(write the corresponding model in simulation mode,
specifying the block diagram transfer functions and signals):
ARMAX(Na=8 Nb=8 Nk=3)
S2= e(t)
S2= u(t)
F2=C/A
F1=B/A
A(z) = 1z10 - 4.102z^9 + 6.913 z^8

- 5.445 z^7 - 0.1032z^6 + 5.405

z^5 - 6.528 z^4 + 3.753z3- 0.8914 z^2

B(z) = -0.0666 z^7 + 0.17 z^6

- 0.1262z^5 - 0.041 z^6

+ 0.1176z^3 - 0.0976z^2

-8 + 0.05037 z^1 - 0.01094

C(z) = 1 - 2.91 z^9 + 3.266) z^8

- 1.059 z^7 - 1.783) z^6 + 3.148

z^5 - 2.334 z^4 + 0.7552

z^3 - 0.02453 z^2

1.2.c) Best trade-off between AIC and transfer function degree n, with: n = na (ARX and ARMAX
models) or n = nf (OE models). Report the corresponding model in simulation mode, specifying the
transfer functions F1(z) and F2(z) and the effective signals s1(t), s2(t) and s3(t) of the following block
diagram representation:

Best trade-off between AIC and transfer function degree n


(write the corresponding model in simulation mode,
specifying the block diagram transfer functions and signals):

From the AIC point of view the best tradeoff is the same model with
na=nb=nc=8, nk=3
1.2.d) Clear report including the reasoning behind the computations and the possible critical
analysis of the main numerical results:

The models were chosen taking into account that the smaller the values of
AIC and RMSE, the ‘better’ the model fits the data. It is to notice also,
that a significantly better model according to AIC parameters is one that
is -2 units smaller than the other
1.3.a) Using all the experimental data, estimate the parameters of an ARX(3,2,2) model by means
of the Recursive Least-Squares algorithm named RLS–3, showing by plots their asymptotic
dynamic convergence to the Standard Least-Squares estimates as the number of considered data
increases.

Write the numerical values of the RLS–3 estimates (final value) and the standard LS estimates:

Numerical value of the RLS-3 estimates (final value):


In the order: b1, b2 , a1, a2, a3:

-0.0037
0.0032
0.1253
-0.2631
-0.8561

Numerical value of the standard LS estimates:


0.0047
-0.0082
-2.0777
1.2697
-0.1561

1.3.b) Compute the Estimate Uncertainty Intervals EUI 2 and, if possible, the Parameter Uncertainty
Intervals PUI2, assuming that the output measurements are corrupted by an energy-bounded noise
whose 2-norm is less than 1.

Write the numerical values of the EUI2 and, if possible, the PUI2:

Numerical value of the EUI2:


-0.1219 0.1145
-0.1147 0.1212
-0.4400 0.6906
-1.3602 0.8340
-1.4200 -0.2922

Numerical value of the PUI2:


-0.1173 0.1098
-0.1101 0.1166
-0.4179 0.6685
-1.3174 0.7912
-1.3980 -0.3142

1.3.c) Compute the Estimate Uncertainty Intervals EUI ∞, assuming that the output measurements
are corrupted by an amplitude-bounded noise whose ∞-norm is less than 0.05.
Write the numerical value of the EUI∞ :

Numerical value of the EUI∞:


-0.0007 -0.0068
-0.0007 0.0072
-0.0160 0.2666
-0.0602 -0.4660
-1.0159 -0.6963

1.3.d) Clear report including the reasoning behind the computations and the possible critical
analysis of the main numerical results (in particular, write the difference equation corresponding to
the identified ARX(3,2,2) model):

Write a report
Y(t) = b1*u(t-2)+b2*u(t-3)-a1*y(t-1)-a2*y(t-2)-a3*y(t-3)

The recursive algorithm shown a convergence in some of the coefficients,


however, since the data is very noisy, the estimate is not as good as
possible, and for this reason the recursive and the standard algorithm
gave different results
Problem #2: the model of a LTI dynamic system S 2 is given, fed by a suitable input signal u(t)
whose values have been saved in the MATLAB data2a.mat file. In all the simulations, assume
x(1) = [30, 35, 40, 45]T as realization.

HINT: put the command rng('default') at the beginning of the m-file es2.m to always
generate the same random realizations.

2.1) Design the steady-state Kalman predictor K∞ and the dynamic Kalman filter Fpc in predictor-
corrector form (i.e., not in standard form).
Write the numerical values of:
 the steady-state predictor gain matrix
 the dynamic filter gain matrix (final value)

Numerical value of the steady-state predictor gain matrix:

0.0404
0.0638
0.0762
0.0692

Numerical value of the dynamic filter gain matrix (final value):


0.0271
0.0404
0.0638
0.0762

2.2) Compare the state and output estimates provided by K∞ and Fpc by means of plots and
evaluate the RMSEXk for k = 1,…,4 and the RMSEy, explaining the different results obtained for N′0
= 0, 20, 100.

2.2.a) Write the numerical values of RMSEXk and RMSEy for N′0 = 0, 20, 100:

Numerical values of RMSEx and RMSEy for N′0 = 0:

Numerical values of RMSEx and RMSEy for N′0 = 20:

Numerical values of RMSEx and RMSEy for N′0 = 100:

2.2.b) Clear report including the reasoning behind the computations and the possible critical
analysis of the main numerical results:
Write a report
The

2.3) Among the schemes in the second page of the file Exam_A.pdf, select the block diagrams of
the steady-state predictor K∞ and the dynamic filter Fpc , specifying all the effective blocks and
signals therein numbered.

Scheme number of the block diagram of the steady-state predictor K∞


(specify all the effective blocks and signals therein numbered):

Scheme 2
1: real output y
2: Kbar
3: innovation
4: input u
5: B
6: x_h(t+\|t)
7: I/z
8: x_h(t|t-1)
9: C
10: estimated output y

Scheme number of the block diagram of the dynamic filter Fpc


(specify all the effective blocks and signals therein numbered):

Scheme 1
1: u(t)
2: B
3: x(t+1|t)
4: I/z
5: x(t|t-1)
6: C
7: y_h(t|t-1)
8: A
9: x_f(t|t)
10: K0
11: e innovation
12: output y

You might also like