Updated: Saturday, July 16, 2016

advertisement
EE 5327 Homeworks
Fall 2010
Updated: Saturday, July 16, 2016


For full credit, show all work.
Some problems require hand calculations. In those cases, do not use MATLAB except to
check your answers.
1
EE 5327 Homework 1
Fall 2010
State Variable Systems, Computer Simulation, Recursive Maximum Likelihood Estimation
1. Discrete-Time System.
A discrete time system is given by
xk 1  Axk  Bu k , x 0
Write a MATLAB m file to simulate the system, i.e. to compute x k for a given input u k , initial
condition x 0 , and range of the time index k= 1,2,…,N.
a. Simulate the system
1
 0
0
x k 1  
x k   u k

 0.89 1.8
1
for u k equal to the unit step and x 0 =0. Plot x k vs. k for 100 time samples.
Find the period and percent overshoot.
b. Simulate the same system but now add process noise so that
xk 1  Axk  Bu k  wk .
Take the noise wk as uniformly distributed between 0 and 0.2. Use MATLAB function rand.
Plot x k vs. k for 100 time samples.
2. Recursive Maximum Likelihood Estimation
a. Write a MATLAB program to recursively compute the ML estimate using eqs (1.4-7),
(1.4-9). You can use MATLAB function lqe if you like.
b. Use your program to solve the following problem.
A polynomial-fit measurement system is given by
z k  1 k k 2 X  vk


where the state X  a b c T contains the unknown coefficients. Use your program to
estimate the approximating coefficients for the NASDAQ stock data. Take the measurement
noise as vk ~ N (0,1) .
Plot the estimates aˆ , bˆ , cˆ versus k.
k
k
k
Plot the stock data and the polynomial estimate for it on the same graph.
2
EE 5327 Homework 2
Fall 2010
RLS
1. RLS System Identification
The input u k and output y k of a discrete time system are given in the data file. The
system is of second order with a delay of d=2.
a. Write a RLS program to identify the system transfer function.
b. Make time plots of the parameter estimates as RLS is running on the data.
c. Plot the output y k given in the file and the output of your identified system given the
input u k . They should be the same.
2. Minimum Variance Prediction
A system is given by
yk  0.75 yk 1  uk d  uk d 1  ek  0.9ek 1
a.
Find the minimum variance predictor when d=1. Find the prediction error variance.
b. Find the minimum variance predictor when d=2. Find the prediction error variance.
c. For d=2, simulate your predictor and the original system for an input u_k (sinusoidal?anything) and small noise e_k that you generate. Plot both outputs on the same graph.
Plot the output error, i.e. the difference between the two output signals. It should be
small.
3
EE 5327 Homework 3
Fall 2010
Observer and Kalman Filter
1. DT Observer
2.
Write a MATLAB m file to simulate a DT system plus a DT observer running at the
same time.
a. Design an observer for the system
1 
 0
0
x k 1  
x k   u k , x 0 =0

 0.9409 .6596
3
z k  [1 0]xk
In eqs (2.1-6), (2.1-7) in the book use Q  GGT  I , R  DDT  0.1 . Find the observer gain L
and write down the observer equation.
b. Simulate the system with observer for the system using u k equal to the unit step and x 0 =0.
Use initial estimates of xˆ(0)  [5 5]T . Plot the states and their estimates on the same graphs. i.e.
x1 (k ), xˆ1 (k ) on one graph, and x2 (k ), xˆ 2 (k ) on another graph. Use 300 samples.
2. DT Kalman Filter
Write a MATLAB m file to simulate a DT system
xk 1  Axk  Bu k  Gwk
z k  Hx k  vk
plus DT Kalman Filter.
Simulate the optimal time-varying DT Kalman Filter for the system
0
1 

0 
x k 1  
x k   u k  wk ,

 0.9409 .6596
3
z k  [1 0]xk  vk .
Take the process noise wk as a normal 2-vector (MATLAB function randn) with each
component having zero mean and variance 0.1. Take measurement noise vk as normal (0,0.1).
Use u k equal to the unit step and x 0 =0.
Plot the states and their estimates on the same graphs. i.e. x1 (k ), xˆ1 (k ) on one graph, and
x2 (k ), xˆ 2 (k ) on another graph.
4
Download