Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Proj2 Control

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Technion - Israel Institute of Technology Faculty of Mechanical Engineering

Control Theory 03518886


Winter 2022/23

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.

ẋ (t) = Ax (t) + Bu (t) , x (0)


y (t) = Cx (t)

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

State observer and disturbances


   √ 2π π
 
Consider the scheme described in Figure 1a with u (t) d (t) n (t) = 1 (t) 2 sin 3 t + 4 0 , where the dynamic
properties of d (t) are known yet unmeasurable.
4. Using the observer found in item 3, plot and compare ẏˆ (t) and ẏ (t) (on the same plot). Is there a gain vector L such
that limt→∞ ey (t) = 0 ? Explain.
5. Write down the state space realization of the appropriate disturbance generator.

ẋd (t) = Ad xd (t) , xd (0)


d (t) = C d xd (t)
 
x (t)
6. Design an observer for the augmented system (with the augmented state η (t) , ), use the poles of an
xd (t)
appropriate order Bessel transfer function to place the observer’s poles, such that:
(a) |ey (t)| ≤ 5 · 10−3 for all t ≥ 6.
n o
(b) maxt ẏˆ (t) − maxt {|ẏ (t)|} ≤ √1
2
for all t ≥ 0.

What is the resulting gain vector L? Plot and compare ẏˆ (t) and ẏ (t) (on the same plot).

Observer based state feedback control



2 sin 2π π
    
Consider the scheme described in Figure 1b with the same r (t) d (t) n (t) = 1 (t) 3 t+ 4 0 as in the
previous section.
 
x̂ (t)
7. Design a state feedback that operates on η̂ (t) = , use the poles of an appropriate order Bessel transfer function
x̂d (t)
to place the observer’s and the state feedback’s poles, such that:
(a) |y (t)| ≤ 2π for all t ≥ 0.
(b) |u (t)| ≤ π for all t ≥ 0.
(c) |e (t)| , |r (t) − y (t)| ≤ 0.05 for all t ≥ 6 [sec].
What are the resulting gain vectors L and F and fr ? Plot the output y (t) and control signal u (t).

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)|.

Kalman Filter and Colored Measurement Noise


Now we assume that the measurement noise frequency is known a-priori.
12. Write down the power spectral density Φn (ω), the corresponding shaping filter Wn (s) and the minimal state space
realization of n (t) as a filter with a white noise input w̃ (t), i.e.,

ẋn (t) = An xn (t) + B n w̃ (t)


n (t) = C n xn (t) + w̃ (t)

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.

Bonus: Kalman and LQR (7.5 Pt)


? For all simulations in this part use the time vector t4 = [0 : 1e − 3 : 2] and set the observer’s initial conditions to zero.
18. Given ẏˆ (t) and y (t), where ẏˆ (t) is the estimation of ẏ (t) given by the Kalman filter found in the previous section and
y (t) is the actual plant’s output, find C z , S, and ρ such that the corresponding LQR optimal controller guarantees:

(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

Observer State Feedback


(a) State observer scheme (b) Observer based state feedback scheme

(c) Kalman filter (d) Kalman filter based state feedback scheme

Figure 1

Order Transfer function


s
1 ω0 + 1
s
2 ω0 + 0.866 ± 0.5j
3 ( ωs0 + 0.942)( ωs0 + 0.7455 ± 0.7112j)
4 ( ωs0 + 0.6573 ± 0.8302j)( ωs0 + 0.9047 ± 0.2711j)
5 ( ωs0 + 0.9264)( ωs0 + 0.5906 ± 0.9072j)( ωs0 + 0.8516 ± 0.4427j)

Table 1: Bessel transfer functions (ω0 is a tuning parameter)

4
Technion - Israel Institute of Technology Faculty of Mechanical Engineering

Remarks and Submission Instructions


Figures
• All plots should be presented on separate figures (unless explicitly stated otherwise). Moreover, each figure must
include a caption below; a figure with multiple plots must include a legend; all figures must be included in the report
in an svg format.

Answers
• Follow Proj2_SC.m;

• Use the specified variable names (don’t change them!);


 
• Validate the data-types (sym, double, tf...) and sizes, e.g., 1 × 2 double → a1 a2 ∈ R1×2 .

Report
• It should be written in a word processor, e.g., LATEX, LYX, Office Word, Google docs, etc. (Handwritten submission
will not be accepted);

• Answer the questions in this instruction file according to their numbering;


• You are evaluated for your answers but also for clarity, readability, and aesthetics.

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;

• Your code, named Proj2_ID1_ID2.m;


• All Simulink models (if there are any);
• A MAT-File, containing your answers (generated via Proj2_SC.m).

You might also like