Exercise12
- Due No Due Date
- Points None
12.1 The Yule-Walker equations
Consider an AR process
y(t)+a1y(t−1)+⋯+any(t−n)=e(t),Ee2(t)=λ
a) Multiply the equation by y(t−τ),τ≥0, and take expectations and show that this gives the equations
Ry(τ)+a1Ry(τ−1)+⋯+anRy(τ−n)={λ,τ=00,τ>0
These equations can be used two ways: We know the coefficients ak and want to find
Ry(τ) for all
τ, or the other way around. In both cases you get a linear equation system. You should use the symmetry
Ry(−τ)=Ry(τ) when forming the equation system.
b) Show that for the 2nd order system y(t)+a1y(t−1)+a2y(t−2)=e(t) we get the equation system
[1a1a2a11+a20a2a11][Ry(0)Ry(1)Ry(2)]=[λ00]
c) You are using least squares to identify the a1 and
a2 coefficients and you have
N=100 data points available. Assume your identification experiments results in the model
y(t)−1.61y(t−1)+0.71y(t−2)=e(t),
λ=1 Calculate the expected variance of the parameter errors
E(ˆa1−a1)2and
E(ˆa2−a2)2.
Hint: Use the formula Cov(ˆθN−θ0)∼λˉR−1/N. Here (explain why)
ˉR=[Ry(0)Ry(1)Ry(1)Ry(0)].
d) Use the file exyulewalker.m Download exyulewalker.m to compare your results in c) with the results from simulations. Make sure you understand what the commands idpoly, sim, getcov, present do.
12.2 Model structure choice (ARX vs OE)
The file arx_vs_oe.m Download arx_vs_oe.m is a variant of the arxorder.m used on Lecture 11 showing that ARX model order often is overestimated and that an OE model of lower order is often easier to find.
a) Run arx_vs_oe.m and try to understand the code. You will find that the first numerical optimization of a low order OE model (oe3) has for this data set failed to converge to a good solution. This sometimes happens for OE, when the optimization procedure get stuck in a local optimum. Use the produced figures and perhaps also present(oe3), zpk(oe3) and present(oe3) to try to understand the performance of oe3. Would it be a good model to use for control purposes ? (The conclusion is not obvious.)
b) With some help from us, the OE optimization converges to a better solution, oe3w. Explain what was done to produce the better solution.
c) What are the advantages of the oe3w model compared to the oe3 model? Compare Bode diagrams, and the FIT from a 50-timestep prediction of the two models; see also figure(6) and produce a similar plot for oe3w to see the improvement.
12.3 "Continuous Time" Identification
We want to identify coefficients in a system of the form Y(s)=bs3+a2s2+a1s+a0U(s). The true system is given by .
Y(s)=1s3+3s2+3s+1U(s).
a) The file cont_ident.m Download cont_ident.m illustrates the problems when identifying a discrete time 3rd order system, using fast sampling at 1kHz. Try different input signals and ARX orders and see if you can get the identification to work (but don't change the sampling rate). You will probably find this hard.
b) Study how the code uses the filtering Yk:=sk(ωbs+ωb)3Y,k=0,1,2,3to find the continuous time parameters
a2,a1,a0,b from standard least regression using the model
y3(t)=−a2y2(t)−a1y1(t)−a0y0(t)+buf(t)
You will find that a suitable value of ωb is around 1 rad/s.
12.4 Residual Analysis
Assume that the prediction errors ε(t) are independent of the input
u(s) for all t,s and that both have zero mean and covariance functions
Rε(k) and Ru(k).
Show that the estimate
ˆRεu(τ)=1N∑Nt=1ε(t+τ)u(t)
for large N has variance close to
1N∑∞k=−∞Rε(k)Ru(k)
Remark: As mentioned on the lecture, this gives a test level for finding significant correlation between u and
ε. This result is used in the resid command.
Solutions: