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

EECS 560 - HW #1

Due January 21, 2019


9:30am (upload on Canvas)

Remarks: I suggest that you read Chapter 1 of the textbook Bay (link for the online free copy is available
in the syllabus).

This HW set is a bit long. The purpose of Problems 1 through 6 is to recall some basic material that we
need, but will NOT cover in class. Problem 7 aims to introduce a fun example from real life and to motivate
important systems theory questions.

Problem 2 is quite mathematical and rather challenging (assuming you do it on your own without the pro-
vided hints). The other problems are straightforward.

1. Consider the linear input-output system:

Σ: ÿ(t) + a1 ẏ(t) + a0 y(t) = bu(t)

where y(0) = 0, ẏ(0) = 0 and a1 , a0 and b are real constants. For i = 1, 2, let φi (t) be the solution
of Σ corresponding to u(t) = ui (t), for t ∈ [0, T ]. Show that for every pair of real constants α1 and
α2 , φ3 (t) := α1 φ1 (t) + α2 φ2 (t) is a solution corresponding to u3 (t) := α1 u1 (t) + α2 u2 (t). Remark:
Just plug into the model and verify that the left and right hand sides are indeed equal. The property
your are showing establishes that, when the initial conditions are zero, the set of solutions to a linear
input-output model forms a vector space over the reals. We will define this term shortly in class.
2. Based on Chen, 3rd Edition, Page 39, Prob. 2.7:
If H(u1 + u2 ) = H(u1 ) + H(u2 ) for all u1 and u2 , then H(αu) = αH(u) for all rational α and any u.

To be concrete, let’s consider a mapping H : IR → IR from the reals to the reals. The hypothesis of
the problem is that for every u1 and u2 in IR, H(u1 + u2 ) = H(u1 ) + H(u2 ). Prove that for every
rational number α and every u in IR, H(αu) = αH(u).

Remarks: (a) Yes, this does require a proof, that is, a set of mathematical steps that start with
the hypotheses and end with the conclusion. We will not do very many proofs in EECS 560 HW.
At the end of the HW set you will find hints, if you need them. (b) It is enough for you to show
the result for positive rational numbers. Claim 1 H(0) = 0. Proof: Let u1 = u2 = 0. Then
H(0) = H(0 + 0) = H(0) + H(0) = 2H(0), which implies that H(0) = 0. Once we know that H(0) = 0,
we have Claim 2 H(−u) = −H(u). Proof: 0 = H(0) = H(u + (−u)) = H(u) + H(−u), from which
we get that H(−u) = −H(u). and which allows us to treat negative rational numbers. So, in your
proof, it is enough to treat the positive rationals. (c) To extend the result to real numbers, we would
need “continuity”, a property discussed in detail in MATH 451.

1
3. Based on Chen, 3rd Edition, Page 39, Prob. 2.10. For the input-output model, ÿ + 2ẏ − 3y = u̇ − u,
compute the transfer function and the impulse response. It is assumed that you will use the Laplace
transform and tables to solve the problem.
4. From any source you wish, look up and copy down (even Xerox it if you wish, or print it from the
web) a statement of Taylor’s Theorem. A version that works for a function of several variables is
preferred, but a version that works for a scalar variable is also fine. [Taylor’s Theorem is important
because it justifies linear approximations to nonlinear functions, and thus it justifies the approximation
of nonlinear models by linear models. In other words, if Taylor’s Theorem were not true, this course
would not be in the engineering curriculum.]
5. Compute the first ‘two terms’ (i.e., constant plus linear terms) of the Taylor expansion of the following
functions, whenever they exist:
(a) sin(x1 ) about the origin.
(b) cos(x1 ) about the origin.
(c) cos(x1 + x2 ) about the point (x1 , x2 ) = (0, π/4).
(d) x2 cos(x1 + x2 ) about the point (x1 , x2 ) = (0, π/4).

(e) x1 about the origin.
6. Use
 MATLAB (or any numerical
 simulation package you wish) to compare
  thesolutions of 
ẋ1 x2 ẋ x2
= and it’s linearization about the origin 1 = for initial
ẋ2 −x1 − sin x2 + u ẋ2 −x1 − x2 + u
conditions near the origin and u(t) = a sin(t), for a = 0.1 and a = 0.5. Do the solutions remain ‘close’
 all t > 0,
for  orjust for t > 0 small? To make it easy for the grader, only turn in the simulations for
x1 (0) 0.1
= , but you should explore other possibilities as well.
x2 (0) 0.1
Note: The easiest way to compare them is to make one plot with x1 (t) from both the linear and
nonlinear models and a second plot with x2 (t). Please label your traces clearly. See end of HW set for
hints.
7. Consider the planar Segway system shown in Figure 1, along with the indicated coordinates, q1 = φ
and q2 = θ, where φ is the (absolute) angle of the pendulum with respect to the vertical, and θ is
the relative angle of the wheel with respect to the pendulum. In both cases, we take clockwise to be
positive. The system has one actuator u that acts at the axis connecting the inverted pendulum to the
wheel; consequently, θ is the actuated variable and the angle of the pendulum is indirectly regulated
through the angle of the wheel with respect to the pendulum.
By letting the state of the system be x = [q1 , q2 , q̇1 , q̇2 ]0 (where the 0 denotes transpose), one can
construct a nonlinear model of the Segway of the form ẋ = f (x, u). We will use the Segway example
for illustrating many of the ideas covered in this course. There will be questions related to the Segway
example in some of the later problem sets. However you do not need to know how to model mechanical
systems in this course.
Below, I give a linearized model for some specific choices of the masses involved:
   
0 0 1.0 0 0
 0 0 0 1.0   0 
ẋ = 
 2.568 0
x + 
 −0.7172
 u. (1)
0 0  
−5.020 0 0 0 1.6744

Use MATLAB to compute the transfer function from u to y for each of the following choices of output
(see below for hints, or see Williams and Lawrence, Page 26). We will understand how the computations
are done shortly. For now, just use MATLAB.

2
Figure 1: Crude drawing of a planar Segway.

(a) φ is measured:  
y= 1 0 0 0 x. (2)
(b) θ is measured:  
y= 0 1 0 0 x. (3)
(c) The sum φ + θ is measured  
y= 1 1 0 0 x. (4)
Note: The radius of the wheel multiplied by φ + θ gives the horizontal position of the cart with
respect to the origin. Hence, the output in this case is proportional to horizontal cart position.

3
Questions to ponder but **not to answer** as part of your HW

At the end of this term, you will have no trouble answering these questions. They will seem so easy.
The GSI and I will **not** answer them now, so don’t come to office hours for these questions! And
once again, please note that these questions are not part of your HW set. They are given to set the
stage for the course.

• The model of the Segway has four states. For some choices of outputs, the transfer function has
degree four while for other choices, it has degree two. Why? Do outputs exist such that the
transfer function has any degree from zero to four?
• Starting from a transfer function, can we derive a corresponding state variable model? Or is this
only a one-way computation? If such a state model does exist, is there only one of them?
• Are the poles of the transfer function and the e-values of the “A”-matrix related? How to make
sense of this when there are more e-values than poles? What about the e-vectors? Do they play
a role in anything?
• So, if a relation between e-values and poles turns out to exist, does this mean that BIBO stability
of a transfer function can be related to some kind of stability notion of the state variable model?
What could that be, especially if the number of e-values and poles is not always the same?
• In many cases, one would be able to measure both φ and θ, which would correspond to
 
1 0 0 0
y= x. (5)
0 1 0 0

Do transfer functions still make sense in such a case? Is there a natural extension to multiple
inputs and outputs?
• Even if one measures both φ and θ, that leaves two other states unmeasured. Is it possible to
estimate the unmeasured states on the basis of the measurements? Can this be done when there
is only one measurement, such as φ or θ, leaving three unmeasured states? If so, that would seem
to be pretty useful!
• In undergraduate control, one learns to design controllers that move the poles around. Is it
possible to do a similar thing to e-values?

Abstract linear algebra is key to answering these questions and many others. The first third of the
course is devoted to giving you adequate background. The middle and last thirds of the course are
still theoretical, but at least they are devoted to answering questions that have clear relevance to
engineering (both control and signal processing).

4
Hints for Problem 2:

1. Use induction to prove the result for α a positive integer. That


Pn−1is, prove that for all integers n > 1,
Pn−1
and all u, H(nu) = nH(u). Note, this is the same as H(u + k=1 u) = H(u) + k=1 H(u).
Pn
2. Apply the above result to H(u) = H( nn u) = H( k=1 nu ) to deduce the result for α = n1 , where n ≥ 1
is an integer.
3. From these two hints you should be able to get the general result.

Hints for Problem 6: Download the Segway simulation from the Canvas site (MATLAB Folder). This
gives an example of using the ode45 command in MATLAB. You can then search on the web for more
examples and hints on using this method of simulation. Of course, you may use any method you wish. You
are not obliged to use MATLAB.

Hints for Problem 7:


For a system of the form ẋ = Ax + Bu, y = Cx + Du, do the following in MATLAB:
1. Segway = ss(A,B,C,D) Note: if D = 0 as in our model, then enter a 0 for D.

2. [num, den] = tfdata(Segway,’v’)


3. [z, p, k] = zpkdata(Segway)
Recall that in MATLAB, if you know a command but do not understand how to use it, you type help
followed by the command name at the MATLAB prompt, as in
> > help ss

You might also like