FRTN65
Exercise12
Skip To Content
Dashboard
  • Login
  • Dashboard
  • Calendar
  • Inbox
  • History
  • Help
Close
  • My dashboard
  • FRTN65
  • Assignments
  • Exercise12
2024 HT/Autumn
  • Home
  • Modules
  • Quizzes
  • Assignments
  • Syllabus

Exercise12

  • Due No Due Date
  • Points None

12.1 The Yule-Walker equations

Consider an AR process

LaTeX: y(t) + a_1y(t-1) + \cdots + a_n y(t-n) = e(t),\qquad E e^2(t) = \lambday(t)+a1y(t−1)+⋯+any(t−n)=e(t),Ee2(t)=λ

a) Multiply the equation by LaTeX: y(t-\tau), \tau \geq 0y(t−τ),τ≥0, and take expectations and show that this gives the equations LaTeX: R_y(\tau) + a_1 R_y(\tau -1) +\cdots + a_nR_y(\tau-n) = 
\begin{cases}
\lambda, &\tau =0 \\
0, & \tau > 0
\end{cases}Ry(τ)+a1Ry(τ−1)+⋯+anRy(τ−n)={λ,τ=00,τ>0

These equations can be used two ways: We know the coefficients LaTeX: a_kak and want to find LaTeX: R_y(\tau)Ry(τ) for all LaTeX: \tauτ, or the other way around. In both cases you get a linear equation system. You should use the symmetry  LaTeX: R_y(-\tau) = R_y(\tau)Ry(−τ)=Ry(τ) when forming the equation system.

b) Show that for the 2nd order system LaTeX: y(t) + a_1y(t-1) + a_2 y(t-2) = e(t)y(t)+a1y(t−1)+a2y(t−2)=e(t) we get the equation system

LaTeX: \begin{bmatrix}
1 & a_1 & a_2\\
a_1 & 1+a_2 & 0 \\
a_2 & a_1 & 1
\end{bmatrix}
\begin{bmatrix}
R_y(0) \\ R_y(1)  \\R_y(2)
\end{bmatrix} = 
\begin{bmatrix}
\lambda \\ 0 \\ 0
\end{bmatrix}[1a1a2a11+a20a2a11][Ry(0)Ry(1)Ry(2)]=[λ00]

c) You are using least squares to identify the LaTeX: a_1a1 and LaTeX: a_2a2 coefficients and you have LaTeX: N=100N=100 data points available. Assume your identification experiments results in the model  LaTeX: y(t)-1.61y(t-1)+0.71y(t-2) = e(t)y(t)−1.61y(t−1)+0.71y(t−2)=e(t),  LaTeX: \lambda=1λ=1 Calculate the expected variance of the parameter errors LaTeX: E(\widehat{a}_1-a_1)^2E(ˆa1−a1)2and LaTeX: E(\widehat{a}_2-a_2)^2E(ˆa2−a2)2.

Hint: Use the formula LaTeX: \mathrm{Cov} ( \widehat{\theta}_N - \theta_0) \sim \lambda \bar R^{-1} /NCov(ˆθN−θ0)∼λˉR−1/N. Here (explain why) LaTeX: \bar R =
\begin{bmatrix}
R_y(0) & R_y(1) \\
R_y(1) &R_y(0)
\end{bmatrix}ˉ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 LaTeX: Y(s) = \frac{b}{s^3+a_2s^2+a_1s+a_0}U(s)Y(s)=bs3+a2s2+a1s+a0U(s). The true system is given by .LaTeX: Y(s) = \frac{1}{s^3+ 3s^2+3s+1}U(s)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 LaTeX: Y_k:= s^k \left(\frac{\omega_b}{s+\omega_b} \right)^3Y, \quad k=0,1,2,3Yk:=sk(ωbs+ωb)3Y,k=0,1,2,3to find the continuous time parameters LaTeX: a_2,a_1,a_0,ba2,a1,a0,b from standard least regression using the model

LaTeX: y_3(t) = -a_2y_2(t)-a_1y_1(t)-a_0y_0(t) + bu_f(t)y3(t)=−a2y2(t)−a1y1(t)−a0y0(t)+buf(t)

You will find that a suitable value of LaTeX: \omega_bωb is around 1 rad/s.

 

12.4 Residual Analysis

Assume that the prediction errors LaTeX: \varepsilon(t)ε(t) are independent of the input LaTeX: u(s)u(s) for all t,s and that both have zero mean and covariance functions LaTeX: R_\varepsilon(k) \textrm{ and } R_u(k)Rε(k) and Ru(k).

Show that the estimate

LaTeX: \widehat{R}_{\varepsilon u}(\tau) = 
\frac{1}{N} \sum_{t=1}^N \varepsilon(t+\tau) u(t)
ˆRεu(τ)=1N∑Nt=1ε(t+τ)u(t)

for large LaTeX: NN has variance close to

LaTeX: \frac{1}{N}\sum_{k=-\infty}^{\infty}R_\varepsilon(k)R_u(k)1N∑∞k=−∞Rε(k)Ru(k)

Remark: As mentioned on the lecture, this gives a test level for finding significant correlation between LaTeX: uu and LaTeX: \varepsilonε. This result is used in the resid command.

Solutions:

exercise-12.pdf Download exercise-12.pdf 

0
Please include a description
Additional Comments:
Rating max score to > pts
Please include a rating title

Rubric

Find Rubric
Please include a title
Find a Rubric
Title
You've already rated students with this rubric. Any major changes could affect their assessment results.
 
 
 
 
 
 
 
     
Can't change a rubric once you've started using it.  
Title
Criteria Ratings Pts
This criterion is linked to a Learning Outcome Description of criterion
threshold: 5 pts
Edit criterion description Delete criterion row
5 to >0 pts Full Marks blank
0 to >0 pts No Marks blank_2
This area will be used by the assessor to leave comments related to this criterion.
pts
  / 5 pts
--
Additional Comments
This criterion is linked to a Learning Outcome Description of criterion
threshold: 5 pts
Edit criterion description Delete criterion row
5 to >0 pts Full Marks blank
0 to >0 pts No Marks blank_2
This area will be used by the assessor to leave comments related to this criterion.
pts
  / 5 pts
--
Additional Comments
Total Points: 5 out of 5
Previous
Next
Lecture 12. Identification of Dynamical Systems - part 4Next Module:
Week 13