Sol6 PDF
Sol6 PDF
Sol6 PDF
1 + evt
1.4843
1
0.7654
1 − evt
Time (min)
5 10 15 20
(a) Find the real part v and the imaginary part ω from the altitude plot.
Solution: Solving 1 + e5v = 1.4843 gives us v = −0.1450 min−1 . Then, comparing the maxima that
are separated by an interval of 10 minutes gives ω = 2π
10 = 0.62832 rad/min.
If you solved in units of s and rad/s, then v = −0.0024 s−1 and ω = 0.0105 rad/s.
−1
where y(t) is the deviation of the altitude from the steady state value, ẏ(t) is the time derivative of y(t),
and a1 and a2 are constants. Using your answer to part (a), find out what a1 and a2 are.
0 1
Solution: The eigenvalues of A = are given by 0 = λ 2 − a2 λ − a1 , or equivalently
a1 a2
q
a2 ∓ a22 + 4a1
λ= = v ∓ jω.
2
(c) Otto can change a2 by turning a knob. Tell him what value he should pick so that he has a “critically
damped" ascent with two negative, real eigenvalues at the same location.
Solution: To get two real identical eigenvalues Otto should choose a2 to make a22 + 4a1 = 0. This
√
means a2 = ±2 −a1 . Since a2 must be negative for the system to be stable, we only look at the
negative root.
Solving with the a1 derived from the min−1 and rad/min values of v and ω, he should tune his knob to
√ √
a2 = −2 −a1 = −2 0.4158 = −1.2897.
If you solved using a1 derived from the s−1 and rad/s values of v and ω, then you get
√ √
a2 = −2 −a1 = −2 1.16 ∗ 10−4 = −0.0215.
2. LED Strip
I have an LED strip with 5 red LEDs whose brightnesses I want to set. These LEDs are addressed as a
queue: at each time step, I can push a new brightness command between 0 and 255 to the left-most LED.
Each of the following LEDs will then take on the brightness previously displayed by the LED immediately
to its left.
(a) What should we use for our state vector? What does it mean that this is a state vector? What is our
input?
Solution: We can use the brightnesses of each LED as our state vector. We can use these values as
our state vector since together with the input, they describe everything about our system that we need
to know in order to predict what our system will do in the future. Our input is the command to the
left-most LED.
(b) Is our system linear? If it is linear, write out the state equations in matrix form. Please choose a
reasonable order for the state variables in the state vector.
Solution: The system is linear because it can be written in the form ~x(t + 1) = A~x(t) + Bu. Ordering
the LED brightnesses in the state vector from left to right, we get:
0 0 0 0 0 1
1 0 0 0 0 0
~x(t + 1) =
0 1 0 0 0~x(t) + 0 u(t)
0 0 1 0 0 0
0 0 0 1 0 0
If you chose to put the left-most LED’s brightness last in the state vector (so that the LEDs are ordered
right to left and the state vector gets flipped upside down), the A matrix gets transposed and the B
matrix is flipped upside down.
which has full rank. This means that the system is controllable. A system is called controllable if from
any initial state, we can reach any final state that we desire at some time in the future.
For our LED strip, controllability means that we can display any set of brighnesses that we desire, but
it may take a few time steps to get there.
(d) Is this system stable?
Solution: The eigenvalues of this discrete-time system are all 0, which is inside the unit circle.
Therefore, the system is stable.
(e) Starting from the pattern of brightnesses (from left to right) [0, 127, 0, 255, 0], can we maintain this
pattern for all future time steps? Can we display any fixed pattern of brightnesses for all time?
Solution: We cannot display [0, 127, 0, 255, 0] for all time. Immediately after we display this set of
brightnesses, we will display [u(1), 0, 127, 0, 255].
If we want to display a fixed and unchanging set of brightnesses, every element in our state vector must
be the same.
Controllability tells us only that we can reach any desired state (sometimes only temporarily). It does
not mean we can keep our system at any desired state for all time.
d
p(t) = v(t)
dt
d
v(t) = u(t)
dt
that was discussed in class.
(a) Assuming that the input u(t) can be varied continuously, is this system controllable?
Solution: Introducing states x1 = p and x2 = v, we rewrite this system in state space form
0 1 0
ẋ(t) = Ax(t) + Bu(t) = x(t) + u(t).
0 0 1
Now integrating the first equation and using the fact that v(t + τ) = v(t) + τu(t) we get
Z T
1
p(t + T ) − p(t) = (v(t) + τu(t))dτ = T v(t) + T 2 u(t).
0 2
Introducing states x1 (k) = p(kT ) and x2 (k) = v(kT ) we get the state space model
1 2
1 T T
x(k + 1) = Ax(k) + Bu(k) = x(k) + 2 u(k).
0 1 T
4. Controllability in circuits
Consider the circuit in Figure 1, where Vs is an input we can control:
C1 C2
+ − + −
V1 V2
+ V
− s R
+ −
V3
+ V
− s R
5. Controllability in 2D
Consider the control of some two-dimensional linear discrete-time system
In this problem, we will assume that the motor conforms perfectly to this model to get an intuition of how
the model works.
(a) If we wanted to make the motor drive at a certain target velocity v∗ , with what PWM u(t) should we
feed the motor?
Solution:
v∗ = θ u(t) − β
v∗ + β = θ u(t)
v∗ + β
u(t) =
θ
(b) What signs should θ and β have? Should they be positive or negative? Note that applying PWM to the
motor driver circuit can only ever deliver power in a way so as to cause the motor to move forwards
and never backwards, and there are no braking mechanisms on the motor.
Solution: θ > 0 since applying PWM should only ever increase the velocity. If friction is a large
factor in the linear fit for our motor model, we expect that β should be greater than zero since fric-
tion should decrease the speed of the car in the absence of PWM input. However, nonlinearities and
imperfections in our motors may outweight the effect of friction so that β may experimentally end up
positive.
(c) Even if the motor conforms perfectly to the model, our inputs still limit the range of velocities of the
motor. Given that 0 ≤ u(t) ≤ 2551 , determine the maximum and minimum velocities possible with the
motor. What does this tell us about the braking of the car?
Solution: The maximum is θ 255 − β and the minimum is 0 − β = −β .
Since there are no brakes on the motor, we slow down by reducing the PWM.
(d) Our intuition tells us that a motor on a car should eventually stop turning if we stop applying any power
to it. Find v(t) as t → ∞, assuming v(0) = v0 (say v0 > 0) and u(t) = 0. Does our model obey our
intutition? What does that tell us about our model?
1 See https://www.arduino.cc/en/uploads/Tutorial/pwm1.gif for an example of how PWM works and why
this is the case.
However our intuition says that the motor should have stopped: v(∞) = 0. In lab we empirically find
the value of β over a range of PWM values, but our fit does not work very well everywhere and our
model does not match the real behavior near u = 0.
Contributors:
• Murat Arcak.
• Justin Yim.
• John Maidens.
• Brian Kilberg.
• Yuxun Zhou.
• Edward Wang.