## Description

1. A linear time-varying dynamical system is known to be switching between the following two

models (depending on the operating conditions)

Model 1: y[k] = a

(1)

1

y[k − 1] + b1u[k − 1] + b2u[k − 2] + e[k], e[k] ∼ N (0, σ2

e

)

Model 2: y[k] = a

(2)

1

y[k − 1] + a2y[k − 2] + b2u[k − 2] + b3u[k − 3] + e[k], e[k] ∼ N (0, σ2

e

)

Kautuhalya performs an experiment that supposedly excites the process in both regimes.

The

data is provided in ltvdata1.mat

(a) Formulate the identification of switching times and the models as that of a recursive LS.

(b) Using the recursiveLS routine, estimate the switching times and model parameters for

each regime by optimizing the forgetting factor λ ∈ [0.95, 1].

(c) Solve the same problem using a sliding window method (the so-called finite history approach) using the recursiveLS routine. Optimize the window length (in number of

observations) for a reasonable trade-off between variance of parameter estimates and

identification of switching times.

(d) Which among the methods in (1b) and (1c) are better suited for the given data?

2. Given the SS description of a discrete-time LTI system

A =

0.9 0 0

1 1.2 −0.5916

0 0.5916 0

; B =

1

0

0

; C =

h

2 0.8 −0.6761 i

; D = 0

do the following:

(a) Determine if the given description is a minimal realization. If yes, proceed to the next

task. Else, construct a minimal realization of the maximum order.

(b) Design an observer for the given SS / minimal realization such that the eigenvalues are

placed in the interval [0.05, 0.3].

(c) Implement the designed observer on the given system and verify its performance. For

this purpose, you may use the estim routine while setting sensors and known to 1,

respectively.

(d) Repeat (2c) under noisy conditions, with variances of process and measurement noise

set to 0.1 and 1, respectively. What would be the effect (on your state estimation) of

choosing very small vs. high eigenvalues for the observer? Support your answer with

arguments and also preferably with simulation results.

3. Consider a two tank system as shown in the figure below.

Fi

Fo1

h1

Fo2

h2

Cv1

Cv2

Parameter Value

A1 1.2

A2 1.2

Cv1 0.8

Cv2 0.8

Fi,s 2

Ts 2

where it is assumed that the tanks are cylindrical with cross-section areas A1 and A2. Perform

/ answer the following.

(a) Develop a continuous-time state-space model with liquid levels as states and the input as

Fi

, the inlet flow rate. Assume that the outlet flow rates are linearly proportional to the

heads with proportionality constants as Cv1 and Cv2.

(b) Discretize the SS model in (3a) at a sampling interval Ts = 0.1 units. For this purpose,

first create a continuous-time SS object in MATLAB and use the c2d routine.

(c) Suppose that only the outlet flow rate Fo2 is sensed. Determine theoretically if the liquid

levels in both tanks can be uniquely determined under noise-free conditions.

(d) Generate the input-output data with process and measurement noise variances set to

Q = diag(0.2, 0.1) and R = 0.1, respectively. Use a PRBS input sequence of N = 1275

length with deviations between -1 and +1, and containing frequencies in the band [0 0.2].

(e) If your answer to (3c) is yes, design and implement a Kalman filter (in MATLAB) for

estimating h1 and h2 using the data generated in (3d), assuming that R is known. Tune

Q for optimal trade-off between goodness (variance) of state and output estimates. Does

this value agree with the value used in the simulation?

4. Suppose the outlet flow rates of each tank are proportional to the square root of respective

liquid levels. Develop a non-linear continuous-time state-space model and implement the extended Kalman filter. Use Ts = 0.1 and all other settings for input generation, process and

measurement noise variances as in Q.3. For implementation, make suitable modifications to

the SIMULINK model developed in the class.

5. Consider a scalar-valued RV X with mean µ and variance σ

2

X. Suppose we have (N + 1) noisy

observations of X,

y[k] = x[k] + v[k]

where v[k] ∼ WN(0, σ2

v

) and corr(v[k], x[k]) = 0, ∀k. Show that (using the Kalman filter

equations) the MMSE of x[N|N] is

xˆ[N|N] = α(N)

1

N + 1

X

N

k=1

y[k]

!

+ β(N)¯x

where x¯ is known before. Determine α(N) and β(N). What happens when N → ∞?