SlideShare a Scribd company logo
2
Most read
6
Most read
8
Most read
2
Continuous Dynamics
— Exercises
1. A tuning fork, shown in Figure 2.1, consists of a metal finger (called a tine) that is displaced by striking
it with a hammer. After being displaced, it vibrates. If the tine has no friction, it will vibrate forever. We
can denote the displacement of the tine after being struck at time zero as a function y: R+ → R. If we
assume that the initial displacement introduced by the hammer is one unit, then using our knowledge of
physics we can determine that for all t ∈ R+, the displacement satisfies the differential equation
ÿ(t) = −ω2
0y(t)
where ω2
0 is a constant that depends on the mass and stiffness of the tine, and where ÿ(t) denotes the
second derivative with respect to time of y. It is easy to verify that y given by
∀ t ∈ R+, y(t) = cos(ω0t)
is a solution to the differential equation (just take its second derivative). Thus, the displacement of the
tuning fork is sinusoidal. If we choose materials for the tuning fork so that ω0 = 2π×440 radians/second,
then the tuning fork will produce the tone of A-440 on the musical scale.
(a) Is y(t) = cos(ω0t) the only solution? If not, give some others.
Solution: The following is a solution for any constant α:
y(t) = αcos(ω0t) .
(b) Assuming the solution is y(t) = cos(ω0t), what is the initial displacement?
Solution: y(0) = cos(ω0 ×0) = 1.
(c) Construct a model of the tuning fork that produces y as an output using generic actors like Integrator,
adder, scaler, or similarly simple actors. Treat the initial displacement as a parameter. Carefully label
your diagram.
5
Contact me in order to access the whole complete document.
WhatsApp: https://wa.me/message/2H3BV2L5TTSUF1
Email: smtb98@gmail.com
Telegram: https://t.me/solutionmanual
SOLUTIONS
Solution: The following model will do the job:
Here, i is the initial displacement.
displacement restorative force
tine
Figure 2.1: A tuning fork.
6 Lee & Seshia, Introduction to Embedded Systems, Solutions
2. CONTINUOUS DYNAMICS
2. Show that if a system S: AR → BR is strictly causal and memoryless then its output is constant. Constant
means that the output (S(x))(t) at time t does not depend on t.
Solution: Since the system is memoryless, there exists a function f : A → B such that for all x ∈ X,
(S(x))(t) = f(x(t))
We need to show that for all a1,a2 ∈ A, f(a1) = f(a2).
Since the system is strictly causal, for all x1,x2 ∈ X and τ ∈ R,
x1|t<τ = x2|t<τ ⇒ S(x1)|t≤τ = S(x2)|t≤τ
Using the function f, this becomes
x1|t<τ = x2|t<τ ⇒ f(x1(t)) = f(x2(t))
for all t ≤ τ. The left side of this expression imposes no constraint at all on the values of x1(τ) and
x2(τ), so these can be arbitrary values a1,a2 ∈ A. Hence, the right hand side asserts that f(a1) = f(a2)
for all a1,a2 ∈ A.
Lee & Seshia, Introduction to Embedded Systems, Solutions 7
SOLUTIONS
3. This exercise studies linearity.
(a) Show that the helicopter model defined in Example 2.1 is linear if and only if the initial angular
velocity θ̇y(0) = 0.
Solution: The input Ty and output θ̇y are related by
θ̇y(t) = θ̇y(0)+
1
Iyy
t
Z
0
Ty(τ)dτ.
First, we need to show that if θ̇y(0) = 0, then superposition applies. Then we need to show if
θ̇y(0) 6= 0, superposition does not apply. For the first problem, if θ̇y(0) = 0 then we have
θ̇y(t) =
1
Iyy
t
Z
0
Ty(τ)dτ.
Suppose the input is given by
Ty = aT1 +bT2
where a and b are real numbers and T1 and T2 are signals. Then the output is
θ̇y(t) =
1
Iyy
t
Z
0
(aT1(τ)+bT2(τ))dτ
=
a
Iyy
t
Z
0
T1(τ)dτ+
b
Iyy
t
Z
0
T1(τ)dτ.
It is easy to see that the first term is a times what the output would be if the input were only T1,
and the second term is b times what the output would be if the input were only T2. That is, if the
system function is S, the output is
θ̇y(t) = a(S(T1))(t)+b(S(T2))(t).
Next, assume that θ̇y(0) 6= 0. With the same input as above, we get the output
θ̇y(t) = θ̇y(0)+
1
Iyy
t
Z
0
(aT1(τ)+bT2(τ))dτ
= θ̇y(0)+
a
Iyy
t
Z
0
T1(τ)dτ+
b
Iyy
t
Z
0
T1(τ)dτ.
We can now see that the output is
θ̇y(t) = a(S(T1))(t)+b(S(T2))(t)−θ̇y(0),
so superposition does not apply.
(b) Show that the cascade of any two linear actors is linear.
8 Lee & Seshia, Introduction to Embedded Systems, Solutions
2. CONTINUOUS DYNAMICS
Solution: Given an actor with function S1 and another with function S2, the cascade composition
is an actor with function S1 ◦ S2, the composition of the two functions. If S1 and S2 both satisfy
the superposition property, then
S2(S1(ax1 +bx2)) = S2(aS1(x1)+bS1(x2))
= aS2(S1(x1))+bS2(S1(x2)).
Hence, the composition also satisfies superposition.
(c) Augment the definition of linearity so that it applies to actors with two input signals and one output
signal. Show that the adder actor is linear.
Solution: A system model S: X1 ×X2 → Y, where X1, X2, and Y are sets of signals, is linear if
it satisfies the superposition property:
∀ x1,x0
1 ∈ X1 and ∀ x2,x0
2 ∈ X2 and ∀ a,b ∈ R,
S(ax1 +bx0
1,ax2 +bx0
2) = aS(x1,x2)+bS(x0
1,x0
2).
The adder component is given by
S(x1,x2) = x1 +x2.
Hence
S(ax1 +bx0
1,ax2 +bx0
2) = ax1 +bx0
1 +ax2 +bx0
2
= a(x1 +x2)+b(x0
1 +x0
2)
= aS(x1,x2)+bS(x0
1,x0
2).
Lee & Seshia, Introduction to Embedded Systems, Solutions 9
SOLUTIONS
4. Consider the helicopter of Example 2.1, but with a slightly different definition of the input and output.
Suppose that, as in the example, the input is Ty : R → R, as in the example, but the output is the position
of the tail relative to the main rotor shaft. Specifically, let the x-y plane be the plane orthogonal to the
rotor shaft, and let the position of the tail at time t be given by a tuple ((x(t),y(t)). Is this model LTI? Is
it BIBO stable?
Solution: In this case, the system can be modeled as a function with two output signals,
S: (R → R) → (R → R)2
,
where
(S(Ty))(t) = (x(t),y(t)),
where (x(t),y(t)) is the position of the tail in the x-y plane. This model is clearly not linear. If the
input torque doubles, for example, the output values will not double. In fact, the output values are
constrained to lie on a circle centered at the origin, regardless of the input. For this reason, the model is
BIBO stable. The output is always bounded. Thus, while our previous model was linear and unstable,
this one is nonlinear and stable. Which model is more useful?
10 Lee & Seshia, Introduction to Embedded Systems, Solutions
2. CONTINUOUS DYNAMICS
5. Consider a rotating robot where you can control the angular velocity around a fixed axis.
(a) Model this as a system where the input is angular velocity θ̇ and the output is angle θ. Give your
model as an equation relating the input and output as functions of time.
Solution:
∀ t ∈ R, θ(t) = θ(0)+
t
Z
0
θ̇(τ)dτ,
where θ(0) is the initial position.
(b) Is this model BIBO stable?
Solution: The model is not BIBO stable. For example, the input
θ̇(t) = u(t)
is bounded but yields an unbounded output.
(c) Design a proportional controller to set the robot onto a desired angle. That is, assume that the initial
angle is θ(0) = 0, and let the desired angle be ψ(t) = au(t), where u is the unit step function. Find
the actual angle as a function of time and the proportional controller feedback gain K. What is your
output at t = 0? What does it approach as t gets large?
Solution: A proportional controller has the same structure as the helicopter controller:
Just as with the helicopter controller, we can solve the integral equation to get
θ(t) = au(t)(1−e−Kt
).
The output at zero is θ(0) = 0, as expected. As t gets large, the output approaches a.
Lee & Seshia, Introduction to Embedded Systems, Solutions 11
SOLUTIONS
6. A DC motor produces a torque that is proportional to the current through the windings of the motor.
Neglecting friction, the net torque on the motor, therefore, is this torque minus the torque applied by
whatever load is connected to the motor. Newton’s second law (the rotational version) gives
kT i(t)−x(t) = I
d
dt
ω(t), (2.1)
where kT is the motor torque constant, i(t) is the current at time t, x(t) is the torque applied by the load at
time t, I is the moment of inertia of the motor, and ω(t) is the angular velocity of the motor.
(a) Assuming the motor is initially at rest, rewrite (2.1) as an integral equation.
Solution: Integrating both sides, we get
Z t
0
(kT i(τ)−x(τ))dτ = Iω(t).
Solving for ω(t) we get
ω(t) =
1
I
Z t
0
(kT i(τ)−x(τ))dτ.
(b) Assuming that both x and i are inputs and ω is an output, construct an actor model (a block diagram)
that models this motor. You should use only primitive actors such as integrators and basic arithmetic
actors such as scale and adder.
Solution: A solution is shown below:
(c) In reality, the input to a DC motor is not a current, but is rather a voltage. If we assume that the
inductance of the motor windings is negligible, then the relationship between voltage and current is
given by
v(t) = Ri(t)+kbω(t),
where R is the resistance of the motor windings and kb is a constant called the motor back electro-
magnetic force constant. The second term appears because a rotating motor also functions as an
electrical generator, where the voltage generated is proportional to the angular velocity.
Modify your actor model so that the inputs are v and x rather than i and x.
Solution: A solution is shown below:
12 Lee & Seshia, Introduction to Embedded Systems, Solutions
2. CONTINUOUS DYNAMICS
Lee & Seshia, Introduction to Embedded Systems, Solutions 13
SOLUTIONS
K1
K2
K
K
Figure 2.2: A PI controller for the helicopter.
7. (a) Using your favorite continuous-time modeling software (such as LabVIEW, Simulink, or Ptolemy
II), construct a model of the helicopter control system shown in Figure 2.4. Choose some reasonable
parameters and plot the actual angular velocity as a function of time, assuming that the desired
angular velocity is zero, ψ(t) = 0, and that the top-rotor torque is non-zero, Tt(t) = bu(t). Give your
plot for several values of K and discuss how the behavior varies with K.
Solution: A Ptolemy model for the P controller is shown below:
With the controller gain set to K = 10 and the top-rotor torque at Tt(t) = 0.5u(t), we see that
the angular velocity settles quickly to a constant 0.05 = 0.5/K. Increasing K to 100 reduces this
steady-state error to 0.005. Since the steady state error is in the angular velocity, the angle of
the helicopter slowly increases (i.e., the helicopter rotates despite a desired angular velocity of
zero).
(b) Modify the model of part (a) to replace the Controller of Figure 2.4 (the simple scale-by-K ac-
tor) with the alternative controller shown in Figure 2.2. This alternative controller is called a
14 Lee & Seshia, Introduction to Embedded Systems, Solutions
2. CONTINUOUS DYNAMICS
proportional-integrator (PI) controller. It has two parameter K1 and K2. Experiment with the
values of these parameters, give some plots of the behavior with the same inputs as in part (a), and
discuss the behavior of this controller in contrast to the one of part (a).
Solution: A Ptolemy model for the PI controller is shown below:
With the controller gains set to K1 = 10 and K2 = 10 and the top-rotor torque at Tt(t) = 0.5u(t),
we see that the angular velocity settles eventually to zero. Increasing K1 results in a smaller peak
error. Increasing K2 results in fast settling, but also some overshoot.
Lee & Seshia, Introduction to Embedded Systems, Solutions 15

More Related Content

PPTX
Online Signals and Systems Assignment Help
DOCX
MATLAB sessions Laboratory 6MAT 275 Laboratory 6Forced .docx
PDF
SlidesPartII_digital_control_power_electronics.pdf
PPTX
Signals and Systems Assignment Help
DOCX
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
PDF
transient-analysis.pdf
DOCX
From the Front LinesOur robotic equipment and its maintenanc.docx
PPT
Ch3-1stOrderDivgfdddffcffffEqs w. Notes.ppt
Online Signals and Systems Assignment Help
MATLAB sessions Laboratory 6MAT 275 Laboratory 6Forced .docx
SlidesPartII_digital_control_power_electronics.pdf
Signals and Systems Assignment Help
SAMPLE QUESTIONExercise 1 Consider the functionf (x,C).docx
transient-analysis.pdf
From the Front LinesOur robotic equipment and its maintenanc.docx
Ch3-1stOrderDivgfdddffcffffEqs w. Notes.ppt

Similar to Solutions for Problems: Introduction to Embedded Systems 2nd Edition by Lee & Seshia (20)

PPTX
Signals and Systems Homework Help
PDF
Wide sense stationary process in digital communication
PPTX
Matlab Assignment Help
DOCX
LAB05ex1.mfunction LAB05ex1m = 1; .docx
PPTX
Signal Processing Assignment Help
PPTX
APPLICATION OF HIGHER ORDER DIFFERENTIAL EQUATIONS
PPTX
Computer Network Homework Help
PPTX
Digital Signal Processing Assignment Help
PDF
Dynamic_Linear_Systems_Lecture2-Linear.pdf
PDF
Julio Bravo's Master Graduation Project
PDF
03 Cap 2 - fourier-analysis-2015.pdf
PDF
damping_constant_spring
PPTX
Controllability of Linear Dynamical System
PDF
D021018022
PDF
lecture3_2.pdf
PDF
Bazzucchi-Campolmi-Zatti
PPT
Convolution representation impulse response
PDF
Computer Controlled Systems (solutions manual). Astrom. 3rd edition 1997
PPT
Maths Topic on spline interpolation methods
PPTX
STATE_SPACE_ANALYSIS.final.pptx FOR ENGINEERING STUDENTS
Signals and Systems Homework Help
Wide sense stationary process in digital communication
Matlab Assignment Help
LAB05ex1.mfunction LAB05ex1m = 1; .docx
Signal Processing Assignment Help
APPLICATION OF HIGHER ORDER DIFFERENTIAL EQUATIONS
Computer Network Homework Help
Digital Signal Processing Assignment Help
Dynamic_Linear_Systems_Lecture2-Linear.pdf
Julio Bravo's Master Graduation Project
03 Cap 2 - fourier-analysis-2015.pdf
damping_constant_spring
Controllability of Linear Dynamical System
D021018022
lecture3_2.pdf
Bazzucchi-Campolmi-Zatti
Convolution representation impulse response
Computer Controlled Systems (solutions manual). Astrom. 3rd edition 1997
Maths Topic on spline interpolation methods
STATE_SPACE_ANALYSIS.final.pptx FOR ENGINEERING STUDENTS
Ad

Recently uploaded (20)

PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Lesson notes of climatology university.
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Institutional Correction lecture only . . .
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Insiders guide to clinical Medicine.pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
Classroom Observation Tools for Teachers
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Cell Types and Its function , kingdom of life
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Final Presentation General Medicine 03-08-2024.pptx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
VCE English Exam - Section C Student Revision Booklet
Lesson notes of climatology university.
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Institutional Correction lecture only . . .
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Insiders guide to clinical Medicine.pdf
RMMM.pdf make it easy to upload and study
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
01-Introduction-to-Information-Management.pdf
Classroom Observation Tools for Teachers
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Cell Types and Its function , kingdom of life
Supply Chain Operations Speaking Notes -ICLT Program
2.FourierTransform-ShortQuestionswithAnswers.pdf
Complications of Minimal Access Surgery at WLH
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
GDM (1) (1).pptx small presentation for students
Final Presentation General Medicine 03-08-2024.pptx
Ad

Solutions for Problems: Introduction to Embedded Systems 2nd Edition by Lee & Seshia

  • 1. 2 Continuous Dynamics — Exercises 1. A tuning fork, shown in Figure 2.1, consists of a metal finger (called a tine) that is displaced by striking it with a hammer. After being displaced, it vibrates. If the tine has no friction, it will vibrate forever. We can denote the displacement of the tine after being struck at time zero as a function y: R+ → R. If we assume that the initial displacement introduced by the hammer is one unit, then using our knowledge of physics we can determine that for all t ∈ R+, the displacement satisfies the differential equation ÿ(t) = −ω2 0y(t) where ω2 0 is a constant that depends on the mass and stiffness of the tine, and where ÿ(t) denotes the second derivative with respect to time of y. It is easy to verify that y given by ∀ t ∈ R+, y(t) = cos(ω0t) is a solution to the differential equation (just take its second derivative). Thus, the displacement of the tuning fork is sinusoidal. If we choose materials for the tuning fork so that ω0 = 2π×440 radians/second, then the tuning fork will produce the tone of A-440 on the musical scale. (a) Is y(t) = cos(ω0t) the only solution? If not, give some others. Solution: The following is a solution for any constant α: y(t) = αcos(ω0t) . (b) Assuming the solution is y(t) = cos(ω0t), what is the initial displacement? Solution: y(0) = cos(ω0 ×0) = 1. (c) Construct a model of the tuning fork that produces y as an output using generic actors like Integrator, adder, scaler, or similarly simple actors. Treat the initial displacement as a parameter. Carefully label your diagram. 5 Contact me in order to access the whole complete document. WhatsApp: https://wa.me/message/2H3BV2L5TTSUF1 Email: smtb98@gmail.com Telegram: https://t.me/solutionmanual
  • 2. SOLUTIONS Solution: The following model will do the job: Here, i is the initial displacement. displacement restorative force tine Figure 2.1: A tuning fork. 6 Lee & Seshia, Introduction to Embedded Systems, Solutions
  • 3. 2. CONTINUOUS DYNAMICS 2. Show that if a system S: AR → BR is strictly causal and memoryless then its output is constant. Constant means that the output (S(x))(t) at time t does not depend on t. Solution: Since the system is memoryless, there exists a function f : A → B such that for all x ∈ X, (S(x))(t) = f(x(t)) We need to show that for all a1,a2 ∈ A, f(a1) = f(a2). Since the system is strictly causal, for all x1,x2 ∈ X and τ ∈ R, x1|t<τ = x2|t<τ ⇒ S(x1)|t≤τ = S(x2)|t≤τ Using the function f, this becomes x1|t<τ = x2|t<τ ⇒ f(x1(t)) = f(x2(t)) for all t ≤ τ. The left side of this expression imposes no constraint at all on the values of x1(τ) and x2(τ), so these can be arbitrary values a1,a2 ∈ A. Hence, the right hand side asserts that f(a1) = f(a2) for all a1,a2 ∈ A. Lee & Seshia, Introduction to Embedded Systems, Solutions 7
  • 4. SOLUTIONS 3. This exercise studies linearity. (a) Show that the helicopter model defined in Example 2.1 is linear if and only if the initial angular velocity θ̇y(0) = 0. Solution: The input Ty and output θ̇y are related by θ̇y(t) = θ̇y(0)+ 1 Iyy t Z 0 Ty(τ)dτ. First, we need to show that if θ̇y(0) = 0, then superposition applies. Then we need to show if θ̇y(0) 6= 0, superposition does not apply. For the first problem, if θ̇y(0) = 0 then we have θ̇y(t) = 1 Iyy t Z 0 Ty(τ)dτ. Suppose the input is given by Ty = aT1 +bT2 where a and b are real numbers and T1 and T2 are signals. Then the output is θ̇y(t) = 1 Iyy t Z 0 (aT1(τ)+bT2(τ))dτ = a Iyy t Z 0 T1(τ)dτ+ b Iyy t Z 0 T1(τ)dτ. It is easy to see that the first term is a times what the output would be if the input were only T1, and the second term is b times what the output would be if the input were only T2. That is, if the system function is S, the output is θ̇y(t) = a(S(T1))(t)+b(S(T2))(t). Next, assume that θ̇y(0) 6= 0. With the same input as above, we get the output θ̇y(t) = θ̇y(0)+ 1 Iyy t Z 0 (aT1(τ)+bT2(τ))dτ = θ̇y(0)+ a Iyy t Z 0 T1(τ)dτ+ b Iyy t Z 0 T1(τ)dτ. We can now see that the output is θ̇y(t) = a(S(T1))(t)+b(S(T2))(t)−θ̇y(0), so superposition does not apply. (b) Show that the cascade of any two linear actors is linear. 8 Lee & Seshia, Introduction to Embedded Systems, Solutions
  • 5. 2. CONTINUOUS DYNAMICS Solution: Given an actor with function S1 and another with function S2, the cascade composition is an actor with function S1 ◦ S2, the composition of the two functions. If S1 and S2 both satisfy the superposition property, then S2(S1(ax1 +bx2)) = S2(aS1(x1)+bS1(x2)) = aS2(S1(x1))+bS2(S1(x2)). Hence, the composition also satisfies superposition. (c) Augment the definition of linearity so that it applies to actors with two input signals and one output signal. Show that the adder actor is linear. Solution: A system model S: X1 ×X2 → Y, where X1, X2, and Y are sets of signals, is linear if it satisfies the superposition property: ∀ x1,x0 1 ∈ X1 and ∀ x2,x0 2 ∈ X2 and ∀ a,b ∈ R, S(ax1 +bx0 1,ax2 +bx0 2) = aS(x1,x2)+bS(x0 1,x0 2). The adder component is given by S(x1,x2) = x1 +x2. Hence S(ax1 +bx0 1,ax2 +bx0 2) = ax1 +bx0 1 +ax2 +bx0 2 = a(x1 +x2)+b(x0 1 +x0 2) = aS(x1,x2)+bS(x0 1,x0 2). Lee & Seshia, Introduction to Embedded Systems, Solutions 9
  • 6. SOLUTIONS 4. Consider the helicopter of Example 2.1, but with a slightly different definition of the input and output. Suppose that, as in the example, the input is Ty : R → R, as in the example, but the output is the position of the tail relative to the main rotor shaft. Specifically, let the x-y plane be the plane orthogonal to the rotor shaft, and let the position of the tail at time t be given by a tuple ((x(t),y(t)). Is this model LTI? Is it BIBO stable? Solution: In this case, the system can be modeled as a function with two output signals, S: (R → R) → (R → R)2 , where (S(Ty))(t) = (x(t),y(t)), where (x(t),y(t)) is the position of the tail in the x-y plane. This model is clearly not linear. If the input torque doubles, for example, the output values will not double. In fact, the output values are constrained to lie on a circle centered at the origin, regardless of the input. For this reason, the model is BIBO stable. The output is always bounded. Thus, while our previous model was linear and unstable, this one is nonlinear and stable. Which model is more useful? 10 Lee & Seshia, Introduction to Embedded Systems, Solutions
  • 7. 2. CONTINUOUS DYNAMICS 5. Consider a rotating robot where you can control the angular velocity around a fixed axis. (a) Model this as a system where the input is angular velocity θ̇ and the output is angle θ. Give your model as an equation relating the input and output as functions of time. Solution: ∀ t ∈ R, θ(t) = θ(0)+ t Z 0 θ̇(τ)dτ, where θ(0) is the initial position. (b) Is this model BIBO stable? Solution: The model is not BIBO stable. For example, the input θ̇(t) = u(t) is bounded but yields an unbounded output. (c) Design a proportional controller to set the robot onto a desired angle. That is, assume that the initial angle is θ(0) = 0, and let the desired angle be ψ(t) = au(t), where u is the unit step function. Find the actual angle as a function of time and the proportional controller feedback gain K. What is your output at t = 0? What does it approach as t gets large? Solution: A proportional controller has the same structure as the helicopter controller: Just as with the helicopter controller, we can solve the integral equation to get θ(t) = au(t)(1−e−Kt ). The output at zero is θ(0) = 0, as expected. As t gets large, the output approaches a. Lee & Seshia, Introduction to Embedded Systems, Solutions 11
  • 8. SOLUTIONS 6. A DC motor produces a torque that is proportional to the current through the windings of the motor. Neglecting friction, the net torque on the motor, therefore, is this torque minus the torque applied by whatever load is connected to the motor. Newton’s second law (the rotational version) gives kT i(t)−x(t) = I d dt ω(t), (2.1) where kT is the motor torque constant, i(t) is the current at time t, x(t) is the torque applied by the load at time t, I is the moment of inertia of the motor, and ω(t) is the angular velocity of the motor. (a) Assuming the motor is initially at rest, rewrite (2.1) as an integral equation. Solution: Integrating both sides, we get Z t 0 (kT i(τ)−x(τ))dτ = Iω(t). Solving for ω(t) we get ω(t) = 1 I Z t 0 (kT i(τ)−x(τ))dτ. (b) Assuming that both x and i are inputs and ω is an output, construct an actor model (a block diagram) that models this motor. You should use only primitive actors such as integrators and basic arithmetic actors such as scale and adder. Solution: A solution is shown below: (c) In reality, the input to a DC motor is not a current, but is rather a voltage. If we assume that the inductance of the motor windings is negligible, then the relationship between voltage and current is given by v(t) = Ri(t)+kbω(t), where R is the resistance of the motor windings and kb is a constant called the motor back electro- magnetic force constant. The second term appears because a rotating motor also functions as an electrical generator, where the voltage generated is proportional to the angular velocity. Modify your actor model so that the inputs are v and x rather than i and x. Solution: A solution is shown below: 12 Lee & Seshia, Introduction to Embedded Systems, Solutions
  • 9. 2. CONTINUOUS DYNAMICS Lee & Seshia, Introduction to Embedded Systems, Solutions 13
  • 10. SOLUTIONS K1 K2 K K Figure 2.2: A PI controller for the helicopter. 7. (a) Using your favorite continuous-time modeling software (such as LabVIEW, Simulink, or Ptolemy II), construct a model of the helicopter control system shown in Figure 2.4. Choose some reasonable parameters and plot the actual angular velocity as a function of time, assuming that the desired angular velocity is zero, ψ(t) = 0, and that the top-rotor torque is non-zero, Tt(t) = bu(t). Give your plot for several values of K and discuss how the behavior varies with K. Solution: A Ptolemy model for the P controller is shown below: With the controller gain set to K = 10 and the top-rotor torque at Tt(t) = 0.5u(t), we see that the angular velocity settles quickly to a constant 0.05 = 0.5/K. Increasing K to 100 reduces this steady-state error to 0.005. Since the steady state error is in the angular velocity, the angle of the helicopter slowly increases (i.e., the helicopter rotates despite a desired angular velocity of zero). (b) Modify the model of part (a) to replace the Controller of Figure 2.4 (the simple scale-by-K ac- tor) with the alternative controller shown in Figure 2.2. This alternative controller is called a 14 Lee & Seshia, Introduction to Embedded Systems, Solutions
  • 11. 2. CONTINUOUS DYNAMICS proportional-integrator (PI) controller. It has two parameter K1 and K2. Experiment with the values of these parameters, give some plots of the behavior with the same inputs as in part (a), and discuss the behavior of this controller in contrast to the one of part (a). Solution: A Ptolemy model for the PI controller is shown below: With the controller gains set to K1 = 10 and K2 = 10 and the top-rotor torque at Tt(t) = 0.5u(t), we see that the angular velocity settles eventually to zero. Increasing K1 results in a smaller peak error. Increasing K2 results in fast settling, but also some overshoot. Lee & Seshia, Introduction to Embedded Systems, Solutions 15