Control Optimo
Control Optimo
Control Optimo
is the area under the curve x(t). If v(t) is the velocity of a vehicle, then
• Here d x(t) is called the variation of the function x(t). Since the
increment of a functional is dependent upon the function x(t) and its
variation d x(t), strictly speaking, we need to write the increment as D
J(x(t), d x(t)).
Example
• If
find the increment of the function f(t) .
where,
are called the first variation (or simply the variation) and the second
variation of the functional J, respectively.
• The variation dJ of a functional J is the linear (or first order
approximate) part (in d x(t)) of the increment DJ.
Optimum of a Function and a Functional
• In other words, if
D f = f(t) - f(t*) >= 0,
then, f(t*) is a relative local minimum.
• 1. for minimum is that the second differential is positive, i.e., d2f > 0, and
• 2. for maximum is that the second differential is negative, i.e., d2f < 0.
• In other words, if
• D J = J(x) - J(x*) >= 0,
then J(x*) is a relative minimum.
• If the above relations are satisfied for arbitrarily large e, then, J(x*) is a global absolute
optimum.
Optimum of a Function and a Functional
• THEOREM
• As a sufficient condition for minimum, the second variation d 2J> 0, and for
maximum d 2J < 0.
The Basic Variational Problem
• Fixed-End Time and Fixed-End State System
• We address a fixed-end time and fixed-end state problem, where
both the initial time and state and the final time and state are fixed
or given a priori.
• Let x(t) be a scalar function with continuous first derivatives and the
vector case can be similarly dealt with. The problem is to find the
optimal function x* (t) for which the functional
where,
Step 2: Variations and Increment
• Expanding V in the increment in a Taylor series about
the point x*(t) and , the increment DJ becomes (note the cancelation
of 𝑉(𝑥 𝑡 , 𝑥̇ 𝑡 , 𝑡)
Step 3: First Variation
• Now, we obtain the variation by retaining the terms that are linear in d x(t)
and
as
• To express the relation for the first variation entirely in terms containing d x(t)
(since d x(t) is dependent on d x(t)), we integrate by parts the term involving d
x(t) as (omitting the arguments in V for simplicity)
Step 3: First Variation
• Fundamental Theorem:
• We now apply the fundamental theorem of the calculus of
variations: the first variation of J must vanish for an
optimum.
for all t [to, tf]. This equation is called Euler equation, first published in
1741.
Extrema of Functions with Conditions
• • Step 1: Lagrangian
• Now, we notice that the functional absorbed the condition within itself, and
we need to consider it as a straight forward extremization of a functional as
given earlier. Thus, applying the Euler-Lagrange equation
where
We get
2 Lagrange Multiplier Method
• 2 Lagrange Multiplier Method: Here, we use the ideas developed in the
previous section on the extremization of functions with conditions.
Consider the optimization of the functional with the boundary
conditions under the condition describing the plant. First we rewrite the
condition as
is the Lagrangian.
• Now, we apply the Euler-Lagrange equation to the previous Lagrangian
to get
• The solution for the set of differential equations with the boundary
conditions for the previous example using the Symbolic Toolbox of
MATLAB, is shown below.
Variational Approach to Optimal Control Systems
• Step 4: Lagrangian
• Step 7 : Hamiltonian
Step 1: Assumptions of Optimal Conditions
Step 2: Variations of Controls and States
Step 2: Variations of Controls and States
Step 3: Lagrange Multiplier
• Introducing the Lagrange multiplier vector l(t) (also called costate
vector) and using
(1)
Step 6: Condition for Extrema
• Step 6: Condition for Extrema: For extrema of the functional J, the first
variation dJ should vanish according to the fundamental theorem of the
CoV.
• Also, in a typical control system, we note that du(t) is the independent
control variation and dx(t) is the dependent state variation.
• First, we choose l(t) = l *(t) which is at our disposal and hence !* such
that the coefficient of the dependent variation dx(t) in dJ be zero. Then,
we have the Euler-Lagrange equation
• Let us note that the condition (or plant) equation can be written in
terms of the Lagrangian as
Step 6: Condition for Extrema
• In order to convert the expression containing dx(t) in the first
variation expression into an expression containing d xf (see Figure),
we note that the slope of x*(t) + d x(t) at tf is approximated as
• which is rewritten as
• and retaining only the linear (in d) terms in the relation, we have
leading to
• Finally, using the relation (1), the boundary condition at the optimal
condition reduces to
Different Types of Systems
Different Types of Systems
• Type (a): Fixed-Final Time and Fixed-Final State System: Here, since
tf and x(tf) are fixed or specified (In the next Figure(a), both dtf and
dxf are zero in the general boundary condition, and there is no extra
boundary condition to be used other than those given in the problem
formulation.
• Using this equation, the boundary condition for the optimal condition
becomes
• Since tf is free, dtf is arbitrary and hence the coefficient of dtf is zero.
That is
Different Types of Systems
This leads to the linear quadratic regulator (LQR) system dealing with state
regulation, output regulation, and tracking.
Broadly speaking, we are interested in the design of optimal linear systems with
quadratic performance indices.
Problem Formulation
• Consider a linear, time-varying (LTV) system
• where, x(t) is nth state vector, y(t) is mth output vector, z(t) is mth reference or desired output
vector (or nth desired state vector, if the state x(t) is available), u(t) is rth control vector, and
e(t) = z(t) - y(t) (or e(t) = z(t) - x(t), if the state x(t) is directly available) is the mth error vector.
• A(t) is n×n state matrix, B(t) is n×r control matrix, and C(t) is m×n output matrix.
• We assume that the control u(t) is unconstrained, 0 < m £ r £ n, and all the states and/or
outputs are completely measurable. The preceding cost functional contains quadratic terms in
error e(t) and control u(t) and hence called the quadratic cost functional.
Problem Formulation
• 1. If our objective is to keep the state x(t) near zero (i.e., z(t) o and C
= I), then we call it state regulator system.
• We see that in both state and output regulator systems, the desired
or reference state is zero and in tracking system the error is to be
made zero.
• 2. The Control Weighted Matrix R(t): The quadratic nature of the control cost
expression (½) u’(t)R(t)u(t) indicates that one has to pay higher cost for larger control
effort.
Since the cost of the control has to be a positive quantity, the matrix R(t) should be
positive definite.
• 3. The Control Signal u(t): The assumption that there are no constraints on the control
u(t) is very important in obtaining the closed loop optimal configuration.
Combining all the previous assumptions, we would like on one hand, to keep the error
small, but on the other hand, we must not pay higher cost to large controls.
• 4. The Terminal Cost Weighted Matrix F(tf): The main purpose of this term is to
ensure that the error e(t) at the final time tf is as small as possible. To guarantee this,
the corresponding matrix F(tf) should be positive semidefinite.
Problem Formulation
• Further, without loss of generality, we assume that the weighted matrices Q(t),
R(t), and F(t) are symmetric.
• The quadratic cost functional described previously has some attractive features:
• (b) It results in the optimal feedback control that is linear in state function.
That is why we often say that the "quadratic performance index fits like a glove“
• 5. Infinite Final Time: When the final time tf is infinity, the terminal cost term
involving F(tf) does not provide any realistic sense since we are always
interested in the solutions over finite time.
• Hence, F(tf) must be zero.
Finite-Time Linear Quadratic Regulator (LQR)
• Now we proceed with the linear quadratic regulator (LQR) system, that
is, to keep the state near zero during the interval of interest.
• 2. The initial condition x(t =to)=xo is given. The terminal time tf is specified,
and the final state x(tf) is not specified.
• 3. The terminal cost matrix F(tf) and the error weighted matrix Q(t) are n×n
positive semidefinite matrices, respectively; and the control weighted matrix
R(t) is an r×r positive definite matrix.
• First, let us list the various steps under which we present the method.
• Step 1: Hamiltonian
• Step 2: Optimal Control
• Step 3: State and Costate System
• Step 4: Closed-Loop Optimal Control
• Step 5: Matrix Differential Riccati Equation
Step 1: Hamiltonian
• leading to
• where, we used
Step 3: State and Costate System
• Step 3: State and Costate System: Obtain the state and costate equations
as
• Substitute the control relation in the state equation to obtain the (state
and costate) canonical system (also called Hamiltonian system) of
equations
• where
Step 3: State and Costate System
• The general boundary condition is reproduced here as
• where, S equals the entire terminal cost term in the cost functional.
• Here, for our present system tf is specified which makes dtf equal to zero,
and x(tf) is not specified which makes dxf arbitrary.
• Hence, the coefficient of dxf in becomes zero, that is,
• This final condition on the costate, l*(t f ) together with the initial condition
on the state xo and the canonical system of equations form a two-point,
boundary value problem (TPBVP).
Step 3: State and Costate System
• Now to formulate a closed-loop optimal control, that is, to obtain the optimal
control u*(t) which is a function of the costate , l*(t) , as a function of the state
x*(t), let us examine the final condition on , x*(t) given by
• This in fact relates the costate in terms of the state at the final time tf. Similarly,
we may like to connect the costate with the state for the complete interval of
time [to, t f]. Thus, let us assume a transformation
• This is the matrix differential equation of the Riccati type, and often
called the matrix differential Riccati equation (DRE).
• The matrix DRE can also be written in a compact form as
Step 5: Matrix Differential Riccati Equation
• Comparing the present plant and the PI of the problem with the
corresponding general formulations of the plant and the PI,
respectively, let us first identify the various quantities as
• It is easy to check that the system is unstable. Let P(t) be the 2x2
symmetric matrix