You are on page 1of 6

Middle East Technical University

Mechanical Engineering Department


1956

ME 507 APPLIED OPTIMAL CO#TROL


Spring 2016
Course Instructor: Dr. Blent E. Platin
TAKE HOME EXAMI#ATIO# 2
Date Assigned: March 29, 2016
Date Due: April 05, 2016 (by 14:30 hours sharp at G-202)
(Please use the cover page when submitting your solution set)
Reassignment of Problem 1 of Take Home Examination 1:
Re-solve the parts a-ii and b of the following problem by using e(t) e instead of e(t) in related
integral indices, where e = lim e(t) .
t

Warnings:
1. Use sufficiently small increments in Kp in order to get at least 3 digit accuracy. The use of
increments in Kp smaller than the size needed is fine but unnecessary! Specify the increments
in Kp used in your solution.
2. Presents your optimum Kp results as a part of your text answering.
3. Specify and justify the integration method, integration time step, and final time of integration
used in your Simulink solutions.
4. Provide all input (command line and/or code) and output (command line and/or plot)
evidences of matlab use in full detail as an integral part of the associated problem. Try to use
explanatory comment lines in your codes so that any novice reader could understand your
computational operations. ,OTE THAT THIS REQUIREME,T IS ,OT SPECIFIC TO THIS
PROBLEM BUT APPLIES TO SOLUTIO,S OF ALL PROBLEMS I,VOLVI,G MATLAB
USE I, ALL TAKE HOME EXAMI,ATIO,S.
PROBLEM 1: A plant represented by the following transfer function
4
G (s) =
2
(s + 1) (s + 2) 2
is to be controlled by a P-controller with unity feedback.
a) Determine the optimum settings for the parameter Kp of the P-controller by using
i) the ultimate sensitivity method of Ziegler-Nichols tuning and also
ii) Matlab-Simulink simulations for various Kp values for a step input employing ISE,
IAE, ITSE, ITAE criteria, separately.
Warning: You are expected to produce an individual performance index versus Kp plot for
each criterion in order to determine the corresponding location of the minimum with at
least 3 digit accuracy.
b) Using Matlab, plot the unit step responses (on the same graph) of the resulting optimum
closed loop systems whose parameters are tuned according to each method given in part (a).
PROBLEM 1: Determine vector in

J=

[(

x ) 2 + pu 2 dt

ME507/Platin/16S-TH2

Page 1 / 6

corresponding to a system model, whose impulse response is expressed as

y( t ) = 10e t + 5te t
for the canonical controllable representations of the systems defined by
K
K(s+ 2)
i) G1 (s) = 2
; ii) G 2 (s) = 2
s (s+ 1) (s+ 3)
s (s+ 1) (s+ 3)
Hint: ,ote that one needs a minor modification in defining the output expression in terms of
controllable canonical states as
y = c1 x1 + c2 x2 + L + cm xm

if the open-loop (uncontrolled) transfer function possesses some finite zeros (i.e., has some
numerator dynamics) as
G(s) =

K(s m + cm s m-1 + L + c2 s + c1 )
s n + an s n-1 + L + a2 s + a1

requiring a new and a slightly more complex set of relationships between the elements of
vector and coefficients is of the differential equation representing the dynamics of the system
model
1 y(t) + 2

dy(t)
d 2 y(t)
d n-1 y(t)
+ 3
+
L
+

=0
n
dt
dt 2
dt n-1

and also requiring the following set of coefficients to vanish


n- m +1 = n- m + 2 = L = n-1 = n = 0

implying that the order of the model must be limited to (nm1) thereby leading to a conclusion
that the existence of zeros in the open loop transfer function represents a performance limitation.
PROBLEM 2: [Adapted from Problem 1.2-3 of
y
Lewis & Syrmos] A meteor is in a hyperbolic orbit
Satellite
described with respect to the earth at the origin by
(x1,y1)
2
2
x
y

=1
a 2 b2
Meteor
a) Using the method of Lagrange multiplier,
(x,y)
determine a set of 3 algebraic equations when
x
solved give its closest point of approach to a
Earth
satellite that is in such an orbit that it has a
fixed position of (x1,y1). Manipulate your
equations and reduce them into a single
polynomial equation in terms of Lagrange
multiplier.
b) Using the concept of Hamiltonian, determine a
set of 3 algebraic equations when solved give its closest point of approach to a satellite that is
in such an orbit that it has a fixed position of (x1,y1).
c) Demonstrate that your solution satisfies the sufficiency conditions for a minimum under
certain cases. Find these cases.
Sufficiency Conditions for a Minimum with Equality Constraints:
Considering the minimization of
L(x , u)
with respect to u subject to n many constraint equations
f(x , u)=0
where u Rr, x Rn, f Rn; to the second order, the increments dL and df away from a
nominal point (x , u) are written as

ME507/Platin/16S-TH2

Page 2 / 6

df = f

d x 1
LTu + d xT
d u 2

dL = LTx

d x 1
f u + d xT
d u 2

L xu d x
L
d uT xx

L ux L uu d u
f xu d x
f
d u T xx
f
f uu d u
ux

where
T

L
L
L xu =
, L ux =


u x
x u
and df expression must be interpreted as applying each component of f.
If the expression of df is premultiplied by T and added to the expression for dL, one gets
H xu d x
H
d x 1
dL + T d f = H Tx H Tu + d xT d u T xx

d u 2
H ux H uu d u
For a stationary point on the constraint, it is required that
df=0 to all orders (since f=0)
and
dL=0 to the first order
for all arbitrary increments dx and du, which requires
Hx=0 and Hu=0
At such a point, the expression for dL to the second order becomes
H xu d x
H
1
dL = d xT d uT xx

2
H ux H uu d u
But, df=0 to the first order requires

d x = f x 1 f u d u
which gives when used in dL

H xx H xu f 1 f
1 T
T T
x
u d u
dL = d u f u f x
I

H
H
2
I

ux
uu
14444444424444
4444
3
2L
2
u

L uu

f =0

= L uu

f =0

f =0

= H uu f Tu f xT H xu H ux f x1 f u + f Tu f xT H xx f x1 f u

Therefore, to ensure a minimum, dL>0 to the second order for all increments du, L uu

f =0

should

be PD. ,ote that


Huu need not to be PD, and
L uu f = 0 Luu when f0 for all x and u.
PROBLEM 3: Consider the quadratic programming problem that is defined as the
minimization of a quadratic cost function
L(x,u) = xT Q x + uT P u
subject to the following linear equality constraints:
f(x,u) = x + B u + c = 0
where xn, ur, fn.
a) Using the concept of Hamiltonian, find the expressions for
i) the general optimal solution uo first,
ii) the corresponding xo then,
iii) the corresponding Lagrange multipliers o. then, and finally
ME507/Platin/16S-TH2

Page 3 / 6

iv) the corresponding Lmin.


b) Determine the conditions on Q, P, B, and c for such a solution to exist.
Hint: You may employ the matrix inversion lemma to simplify the final expression for o.
PROBLEM 4: Consider the nonlinear programming problem that requires the minimization of
the following function
L(x1,x2) = 16x14+x24
subject to following constraints:
f1 ( x1 , x 2 ) = 16(3x1 + x 2 1) 4 + ( x1 3x 2 1) 4 16 0
f 2 ( x1 , x 2 ) = (3x1 + x 2 1) 4 + 16( x1 3x 2 1) 4 16 0
a) Give a graphical based solution to this problem by plotting several L=constant curves as well
as f1=0 and f2=0 curves in a scaled manner using identical scales on both x1- and x2-axes.
(You may use analytical/numerical techniques to determine certain special points).
b) Rework part (a) if
i) the first inequality constraint is changed to an equality constraint, only.
ii) the second inequality constraint is changed to an equality constraint, only.
iii)Both inequality constraints are changed to equality constraints.
c) Solve parts (a) and (b) by using appropriate constraint minimization built-in functions of
MATLAB; also compute the values of cost function, Lagrange multipliers and Hessian
matrix at the optimum points.
PROBLEM 5: Using the calculus of variations, determine the corresponding extremal(s) as real
functions of t that extremize the following functionals.
i)

V( x, x& ) =

tf

(1 + x& 3 ) dt

ti

ii) V( x, x& ) =

tf

( x 2 + x& 2 + 2xe t ) dt

ti

iii) V( x , x& ) =

tf

x& 2

ti

t3

dt

iv) V(x, x& ) = [x 2 + (2 t 2 + 2 t + 1) x& ] dt subject to each of the following boundary conditions
0

1) x(0) = 1 & x(1) = 3


2) x(0) = 0 & x(1) = 3
3) x(0) = 1 & x(1) = 2

ME507/Platin/16S-TH2

Page 4 / 6

IMPORTAT REMIDERS & WARIGS ABOUT TAKE HOME SOLUTIOS:


Your take home solutions must be concise but self explanatory, containing all the details
of your computations/derivations at each step without needing any interpretation of the
reader, otherwise will be considered as "incomplete".
All sources used should be properly referenced.
Basic matlab commands may be used in the solution of any problem. However, the use of
special commands given in matlab toolboxes is allowed only if it is indicated in a problem
statement. Otherwise, you are expected to work that problem by using hand calculations
and/or basic matlab commands. Results obtained from calculators or from any other
software are not acceptable.
Provide all input (command line and/or code) and output (command line and/or plot)
evidences of matlab use in full detail as an integral part of the associated problem. Your
answers based on these results should also be presented in a conventional format
especially when symbolic expressions are involved. Try to use explanatory comment lines
in your codes so that any novice reader could understand your computational operations.
Solutions must be submitted in a written form prepared professionally, by hand writing
using pen (not pencil) if your hand writing is legible enough or by using a word processor
on only one side of clean, white papers of A4 size, numbered as [page #]/[total page #]
and properly bound or stapled or secured in a plastic holder (not all!); no disks or e-mail
attachments are acceptable as a full or partial content of your take home solutions. Do
not forget to sign and use the special cover page supplied at the end this assignment.
Definitely, no extensions will be given for the date/time of take-home submissions, in full
or partial.
Even though team-work type efforts are encouraged, they must not go beyond discussions
on the solution methods used and/or cross-checking the results of your number-crunching.
Therefore, every take home paper that you will be handing in should be personalized by
fully and correctly reflecting your own approaches and efforts in it.
Hence, all duplicate or lookalike solutions will be disregarded with some serious
consequences. In such a case, I will stop grading your solutions right away, you will be
considered absent in the course for the rest of the semester, and your thesis supervisor (or
your department chair in case if you do not have an official supervisor yet) will be notified
all about the situation.

ME507/Platin/16S-TH2

Page 5 / 6

Middle East Technical University


Mechanical Engineering Department
1956

ME 507 APPLIED OPTIMAL CO#TROL


Spring 2016
Course Instructor: Dr. Blent E. Platin
TAKE HOME EXAMI#ATIO# 2
Date Assigned: March 29, 2016
Date Due: April 05, 2016 (by 14:30 hours sharp at G-202)
(Please use this cover page when submitting your solution set)

Student's #umber: ___________________________


Student's #ame and SUR#AME: ___________________________

I hereby declare that the solutions submitted under this cover are products of my own personal
efforts, wholly. Hence, they truly reflect my personal approaches and knowledge in the subject
areas of questions. If I used sources other than the textbook of this course, they have been
properly referenced. Neither my peer consultations nor any help which I got from others in any
form went beyond discussions on the solution methods used and/or cross-checking my findings.
I am fully aware of serious consequences of any deviations from the statements above as
evidenced by my solutions submitted.

Student's Signature: _____________________