linear system project

assassinood
project2_rev1.pdf

ECE509 – Analysis of Linear Systems Computer Project #2 (100 pts.) Due: Sunday, May 12, 2018 at 11:55 PM

1. The following three state feedback problems from the textbook are to be used for practice, and not to be turned in. While you can of course use MATLAB to verify your results, be sure to work out all the control design details by hand. Solutions to these problems are available on Isidore for your reference.

(a) Problem 8.4

(b) Problem 8.5

(c) Problem 8.6

2. Consider the SISO system from the (future) lecture notes:

~̇x(t) =

 −1 −2 −20 −1 1

1 0 −1

 ~x(t) +

 20 1

 u(t)

y(t) = [ 1 1 0

] ~x(t)

Verify that this system is controllable and observable. In Simulink, design a state feedback controller such that the system meets or exceeds the following specifications when tracking a train of steps alternating between -1 and 1 at 1Hz for 5 seconds:

(a) Maximum settling time for 98% criterion: 0.18s

(b) |y(t)| < 1.01 for 1s ≤ t ≤ 5s

Plot the reference signal r(t) along with the output y(t) for 5 seconds. In a separate figure, plot the control signal u(t). Also state what your final poles and k vector are.

A diagram of a Simulink model capable of state feedback is given below:

“Gain1” (the feedforward gain) will need to be an element-wise multiplication. “Gain” (feedback gain) and “Gain2” (C matrix/vector) will both need to be matrix multiplications. Carefully consider what C needs to be in the state-space model block for this to function as intended.

3. Now consider the system from (2) and implement feedback via a state observer:

Here you no longer have access to the state vector ~x(t), only the output y(t). Design a system using a state observer that is able to track a train of steps alternating between −1 and 1 with a frequency of your choice – but make sure the frequency is chosen so that steady-state tracking can take place. Do the following:

(a) Describe your overall control design solution.

(b) State the frequency of the reference signal.

(c) Simulate the system with your control solution. Demonstrate your design by plotting, in one figure, the real state and its estimate, and in another, the real and estimated output together with the reference to be tracked. Show two full periods of your reference.

Make sure the plant and observer have different initial conditions (of your choice), so that the effect of the observer can be clearly seen.

Bonus (5 pts.): Why does the output always first go in the opposite direction before tracking the alternating step signal?

4. A More Realistic Example: Mechanical Press

A simple mechanical press can be modeled as two rotating masses joined by a torsional spring, as depicted in Figure 1. θ1 and ω1 = θ̇1 are, respectively, the angle and angular speed of the press motor spindle.

θ1, ω1 θ2, ω2k1, c1

J1 J2

Figure 1: Schematic diagram of a mechanical press.

Similarly, ω2 = θ̇2. In a typical press application, it is of interest to control the motor angle, θ1. The parameters of the system are as follows:

• J1 = 0.1722kg ·m2: inertia of rotating mass 1; • J2 = 0.1392kg ·m2: inertia of rotating mass 2; • k1 = 20491N ·m/rad: torsional spring constant; and • c1 = 4.7521N ·s/m: damping coefficient.

By choosing the states ~x(t) = [θ1,ω1,θ2,ω2] T , the press can be modeled by the state equation

~̇x(t) =

 

0 1 0 0 −k1/J1 −c1/J1 k1/J1 c1/J1

0 0 0 1 k1/J2 c1/J2 −k1/J2 −c1/J2

 ~x(t) +

 

0 1/J1 0 0

 u(t)

y(t) = [ 1 0 0 0

] ~x(t),

and the output y(t) is in radians. It is desired to track a reference r(t) that can be produced by using the following code:

% Set time vector

t = [0:0.001:3];

% Set reference signal

2

r = (t<=0.6).*t*12/0.6 + (t>0.6 & t<=1)*12 +...

(t>1 & t<=2).*(18-6*t) +...

(t>2 & t<=2.5)*6 + (t>2.5 & t<=3)*12;

figure(1)

plot(t, r , 'LineWidth', 2)

grid

xlabel('Time (s)')

ylabel('Reference (rad)')

title('Desired reference position')

Set the initial conditions as follows: ~x(0) = [10,0,0,0]>, and ~̂x(0) = 0. Let the tracking error be defined as e(t) = r(t)−y(t). Design a state feedback controller together with a state observer that can track the reference given in the MATLAB code above while satisfying the following design specifications:

(a) |e(t)| ≤ 10 rad for 0 ≤ t ≤ 3s. (b) |e(t)| ≤ 0.4 rad for t = 0.6s. (c) The settling time (98% criterion) for the step at t = 2.5s should be less than 0.05s.

A good way to solve such a problem is to first design the state feedback, temporarily assuming that the state vector ~x(t) is available, and meet the requirements. Then, use ~̂x(t) from the observer instead of ~x(t) and design the observer to still meet the requirements.

Provide enough support via plots to show that your design meets all the given specifications.

General notes and hints:

• Your report should be well written and presented. If you need assistance with writing, contact The Write Place. Be clear and concise. A report not satisfying these requirements will lose 10% credit.

• Only include your result plots and any pertinent analysis in the main portion of your report. Attach MATLAB code and Simulink files separately, NOT in the report.

• All figures must be carefully labeled. The x and y axes should be labeled, a title used, and a legend should be included when more than one signal is plotted in the same figure.

• Submit your report and MATLAB code in electronic form via Isidore. No hard copies will be accepted.

• Last, but not least, ensure the work you turn in is your own, from the code to the report.

3