Proj2 Control
Proj2 Control
Proj2 Control
Project 2
Setup
The goal of this project is to control and estimate the state of a DC motor with the following transfer function
2
P (s) =
s (0.8s + 1)
where the input to this system, u (t), is the voltage applied to the motor armature and the output, y (t), is the motor shaft
> >
angle. The initial conditions throughout the project are y (0) ẏ (0) = π 0 .
Part 1
? For all simulations in this part use the time vector t1 = [0 : 1e − 3 : 2].
1. Write a minimal state-space realization for this system. Prove that it is indeed minimal.
2. Assume that the the whole state vector can be measured. Find C z , S, and ρ such that the response (for initial
conditions) of corresponding LQR optimal controller guarantees:
(a) minimum settling time ts (ts is measured with respect to the settling level ±2 [%] of y (0));
(b) maxt {|u (t)|} ≤ 30;
(c) OS = 0.
The minimum ts should not exceed 1.25 [sec]. The overshoot (OS) is to be checked in the time interval t ∈ [0, 50].
Provide reasoning behind your choice of the cost function. Present the response of the system output y (t) for initial
conditions and the control signal u (t) with a tag for the settling time ts on the time axis.
Part 2
For the rest of the questions assume we can only measure the output y (t) and the control signal u (t).
>
ẏˆ (0) )
? For all simulations in this part use the time vector t2 = [0 : 1e − 3 : 10] and set the observer’s initial conditions ( ŷ (0)
to zero.
State observer
Consider the scheme described in Figure 1a with u (t) d (t) n (t) = 1 (t) 0 0 .
3. Design an observer that reconstructs the angular velocity of the motor’s shaft, v (t) = ẏ (t). Use the poles of an
appropriate order Bessel transfer function to place the observer’s poles such that:
(a) |ey (t)| ≤ 5 · 10−3 for all t ≥ 4.
(b) |ey (t)| ≤ 0.5 for all t ≥ 0.
where ey (t) , ẏˆ (t) − ẏ (t). What is the resulting gain vector L? Plot and compare ẏˆ (t) and ẏ (t) (on the same plot).
1
Technion - Israel Institute of Technology Faculty of Mechanical Engineering
What is the resulting gain vector L? Plot and compare ẏˆ (t) and ẏ (t) (on the same plot).
Part 3
For the following system
ẋ (t) = Ax (t) + √
B (u (t) + w (t)) , x (0)
y (t) = Cx (t) + σn (t)
where w (t) and n (t) are assumed to be white gaussian noises with unit intensities, our purpose is to design a Kalman
filter (Figure 1c) to reconstruct v (t) = ẏ (t). Consider the scheme described in (Figure 1d) with u (t) d (t) n (t) =
√
sin 2πt w (t) 4 sin (50t) .
? For all simulations in this part use the time vector t3 = [0 : 1e − 3 : 5] and set the observer’s initial conditions to zero.
Kalman Filter
8. Derive Ky (s) and draw it’s bode (only magnitude) for the following intensities σ = [0.001, 0.01, 0.1, 1, 10] (all in the
same figure).
9. Derive the corresponding SNR (ω) and draw it’s bode (only magnitude) for the following intensities σ = [0.001, 0.01, 0.1, 1, 10]
(all in the same figure).
10. For the intensities σ = [0.001, 10], explain the bode of Ky (s; σ) using the SNR (ω; σ) measure.
11. Find σ that satisfies the following:
(a) |Ky (jω)| ≤ 0 [dB] for all ω ∈ R,
2
Technion - Israel Institute of Technology Faculty of Mechanical Engineering
rad
(b) |E (jω)| , |s − Ky (jω)| ≤ −22 [dB] in the range ω ∈ [0, ω0 ] where ω0 ≥ 0.1 sec .
(c) |ey (t)| ≤ 5 · 10−2 for all t ≥ t0 where ey (t) , ẏˆ (t) − ẏ (t) and t0 ≤ 4 [sec].
Present (on the same figure) the plot of the real ẏ (t) and its estimate ẏˆ (t). Write the resulting gain vector L and
calculate |E (0.1j)|.
13. Write down the dynamical equations (symbolically not numerically) of the optimal observer for the augmented re-
alization of the plant and the filter. What is the corresponding Ricatti equation? specifically, what are the metrics
(symbolically) that should be substituted into the Ricatti equation?
14. Draw the bode (only magnitude) of Ky (s) for the following intensities σ = [0.001, 0.01, 0.1, 1, 10] (all in the same
figure). Does the filter comply with the expected behavior? Explain.
15. Find σ that satisfies the following (note the last two requirements are different from those in item 11):
(a) |Ky (jω)| ≤ 0 [dB] for all ω ∈ R,
rad
(b) |E (jω)| , |s − Ky (jω)| ≤ −25 [dB] in the range ω ∈ [0, ω0 ] where ω0 ≥ 0.1 sec .
(c) |ey (t)| ≤ 5 · 10−3 for all t ≥ t0 where ey (t) , ẏˆ (t) − ẏ (t) and t0 ≤ 3.5 [sec].
Present (on the same figure) the plot of the real ẏ (t) and its estimate ẏˆ (t). Write the resulting gain vector L and
calculate |E (0.1j)|.
16. Why is it important to try to achieve the largest ω0 ? (Hint: Think about the case where ω0 → ∞).
17. Plot (on the same figure) the error |e (t)| for both Kalman filters found in items 11 and 15. Briefly discuss their
differences.
(a) minimum settling time ts (ts is measured with respect to the settling level ±5 [%] of y (0) = 0);
(b) maxt {|u (t)|} ≤ 30;
(c) OS = 0.
The minimum ts should not exceed 5 [sec]. The overshoot (OS) is to be checked in the time interval t ∈ [0, 50]. Present
the response of the system output y (t) and the control signal u (t) with a tag for the settling time ts on the time axis.
3
Technion - Israel Institute of Technology Faculty of Mechanical Engineering
Appendix
Observer
(c) Kalman filter (d) Kalman filter based state feedback scheme
Figure 1
4
Technion - Israel Institute of Technology Faculty of Mechanical Engineering
Answers
• Follow Proj2_SC.m;
Report
• It should be written in a word processor, e.g., LATEX, LYX, Office Word, Google docs, etc. (Handwritten submission
will not be accepted);
Deadline
• Submit by: 5/2/2023 no later than 00 : 00;
• Late submissions will be accepted until 8/2/2023 and penalized 3pts per day (unless approved);
• Submission in pairs only via Moodle.
Submission file
A zip file named ID1_ID2.zip, containing:
• The report PDF with all of your answers, named ID1_ID2.pdf;