Post on 19-Mar-2021
Lecture Lecture Lecture Lecture –––– 22222222
Transcription Method to Solve Optimal Control Transcription Method to Solve Optimal Control Transcription Method to Solve Optimal Control Transcription Method to Solve Optimal Control
ProblemsProblemsProblemsProblems
Prof. Radhakant PadhiProf. Radhakant PadhiProf. Radhakant PadhiProf. Radhakant Padhi
Dept. of Aerospace Engineering
Indian Institute of Science - Bangalore
Optimal Control, Guidance and Estimation
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore2
Topics
� Motivation
� Philosophy of Transcription Method
� Pseudospectral Transcription
� A Toy Problem
� An Application Problem
MotivationMotivationMotivationMotivation
Prof. Radhakant PadhiProf. Radhakant PadhiProf. Radhakant PadhiProf. Radhakant Padhi
Dept. of Aerospace Engineering
Indian Institute of Science - Bangalore
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore4
Optimal Control Formulation
Indirect Approach:-Variational Calculus
Direct Approach:-Dynamic Programming
-Transcription Method
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore5
Necessary Conditions of Optimality
through Variational Calculus
(Dualization)
� State Equation
� Costate Equation
� Optimal Control Equation
� Boundary Condition
( ), ,H
X f t X Uλ
∂= =
∂ɺ
( ), ,H
g t X UX
λ∂
= − = ∂
ɺ
f
fX
ϕλ
∂=
∂( )0 0
:FixedX t X=
( )0 ,H
U XU
ψ λ∂
= ⇒ = ∂
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore6
Shooting Method Philosophy
� Guess the initial condition for costate
� Compute the control at each grid point
� Propagate the state and costate
� Calculate the final boundary condition and error in the costate at the final time
� Correct the costate vector at the initial time based on this error at the final time
� Repeat the procedure
( )10λ
( )0 2λ
fλ∆
t
( )tλ
ft0t
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore7
Problems in Shooting Method
� Sensitivity of the procedure to the initial guess value of costate
� Costates do not have ‘physical meaning’: complicates the issue of selecting ‘good’initial values (it is usually done through guessing a control history)
� Costate equation is normally unstable for stable state dynamics: Long-duration prediction is not good!
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore8
Multiple Shooting Approach
� Strategy: “Divide-and-Rule”; i.e. divide the control application duration to multiple segments and solve the individual segments independently (possibly in a parallel setting to speed up the solution).
� This approach is called “Multiple Shooting”
� It brings in additional constraints of continuity and smoothness at the ‘joining points’.
� Extension of this philosophy leads to “Transcription Method”: A Direct Approach!
t
( )x t
ft0
ti
t
Transcription MethodTranscription MethodTranscription MethodTranscription Method
Prof. Radhakant PadhiProf. Radhakant PadhiProf. Radhakant PadhiProf. Radhakant Padhi
Dept. of Aerospace Engineering
Indian Institute of Science - Bangalore
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore10
Philosophy of Transcription Method
� Convert the dynamic system variables into a finite set of static variables (or parameters)
� Pose an equivalent “static optimization” problem
� Solve this static optimization problem using static (paramter) optimization methods [e.g. using Nonlinear Programming (NLP)]
� Assess the accuracy
� Repeat the steps if necessary
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore11
Problem Objective & Philosophy
Philosophy: Select grid points, Discretize the states and control
variables, Convert the problem to a nonlinear programming (NLP) problem
and solve that problem, preferably in a computationally efficient manner.
0
0
0
( (.), (.)) ( ( ), ( )) ( ( ), ( ))
(
in t
) ( ( ), ( ))
( ( ), ( )) 0
( ( ), ( )) 0
in t
ft
f
t
f
J E t t L t t d t
t f t t
M in im ize
S u b je c t to
w i
e t t
h
th e n d p o c o n d itio n s
a n d p a th c o n stra s
t t
= +
=
=
≤
∫x u x x x u
x x u
x x
x u
ɺ
Objective:
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore12
( ) ( ) ( )0 0 1 1, , ,N Nx u x u x u
Free variables :
⋯
Ref: I. M. Ross, Lecture notes, Short course in AIAA GNC-2010, Toronto
Key Components of
Direct Transcription
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore13
( ) ( ) ( ) ( ){ }0 0 1 1 1 1, 2 , 2 , ,2
N N N N
hF x u F x u F x u F x u− −≈ + + + +⋯
Key Components of
Direct TranscriptionReference: I. M. Ross, Lecture notes, Short course in AIAA GNC-2010, Toronto
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore14
Direct Transcription
ϕ ϕ
= ⇒ =
= ⇒ =
≤ ≤ ≤ ⇒
≤
⋯
* *
0 0 0
N
0 0
1 1
N N
x x x x
x x
x u
x ux u
x u
0( )
( ( )) 0 ( ) 0
( , ) 0
( , ) 0( ( ), ( )
int
i
) 0
( , )
t
0
n
f
End po conditions
Path const
t
t
h
hh
h
ra s
t t
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore15
Direct Transcription:
Other Ideas
� Better Approximation of State Dynamics
• Higher-order Finite difference
• RK Methods
• Polynomial Approximations in Segments
� Better Approximation of Cost Function
• Higher-order Approximations
• Quadrature Approximations
� Finite Element Approach ……..etc.
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore16
Transcription Method
� Accuracy
• Higher number of grid points
• Indirect Transcription
� Computational Efficiency
• Sparse Algebra
• Mesh Refinement
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore17
References
� C. R. Margraves and S. W. Paris, “Direct Trajectory Optimization Using Nonlinear Programming and Collocation”, J. of Guidance, Vol.10, No.4, 1987, pp. 338-342.
� P. J. Enright and B. A. Conway, “Discrete Approximations to Optimal Trajectories Using Direct Transcription and Nonlinear Programming”, J. of Guidance, Control, and Dynamics, Vol. 15, No. 4, 1992, pp.994-1002.
� H. J. Pesch, “A Practical Guide to the Solution of Real-Life Optimal Control Problems”, Control and Cybernetics, Vol.23, No.1/2, 1994, pp.7-60.
� D. G. Hull, “Conversion of Optimal Control Problems into Parameter Optimization Problems”, Vol.20, No.1, 1997, pp.57-60
� J. T. Betts, “Survey of Numerical Methods for Trajectory Optimization”, J. of Guidance, Control, and Dynamics, Vol. 21, No. 2, 1998, pp. 193-207. (The author has written a Book as well)
Pseudospectral TranscriptionPseudospectral TranscriptionPseudospectral TranscriptionPseudospectral Transcription
Prof. Radhakant PadhiProf. Radhakant PadhiProf. Radhakant PadhiProf. Radhakant Padhi
Dept. of Aerospace Engineering
Indian Institute of Science - Bangalore
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore19
Problem Objective
Philosophy: Discretize the states (and the control) using
Pseudospectral (PS) method, Convert the problem to a “lower-dimensional” nonlinear programming (NLP) problem and solve that problem in a computationally efficient manner.
0
0
0
( ( ), ( )) ( ( ), ( ))
( ) ( ( ), ( ))
( ( ), ( )) 0
( ( )
in
, ( ))
t
0
int
ft
f
t
f
Minimize
Subject to
wit
J E t t L t t d
h end po conditions
and path constra
t
t f t t
e
s
t t
h t t
= +
=
=
≤
∫x x x u
x x u
x x
x u
ɺ
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore20
Steps involved…
� 1. Approximate x(t) and/or u(t)?
� 2. Selection of grid points� How are these points selected?
� Uniform grid is not a very good choice!
� 3. Discretize the differential equation using PS method� Finite-difference Vs Spectral
� Sparse Vs Dense differentiation matrix
� 4. Approximate the integral equation� Quadrature rules
� 5. Apply an efficient finite optimization technique and
solve the lower dimensional NLP problem.
0
ˆ( ) ( )N
n n
n
x t a tφ=
= ∑ φ=
= ∑0
ˆ( ) ( )N
n n
n
u t b t
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore21
1. Approximation
ˆ: ?R f SMALL= −xɺ
It can be thought of as a function which satisfies the
boundary condition and makes the residualx̂
φ φ φ= …0 1: ( , , , )NNP- Define Trial functions:
Approximate φ φ= =
= =∑ ∑0 0
( ),ˆ ˆ( ) ( ) ( )N N
n nn n
n n
x t a u t bt t
- Define Test functions: χ χ χ…0 2( , , , )N
, 0 {0,1,..., }n
R n Nχ = ∀ ∈
( ) ( ( ), ( ))t f t t=x x u ɺ
( )n n
t tχ δ= −
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore22
2. Selection of grids
Ref: I. M. Ross, Lecture notes, Short course in AIAA GNC-2010, Toronto
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore23
2. Selection of grids
Grid of collocation points (or grid points) tn, n=0,…,N are points
such that it satisfies the state equation exactly at these points.
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore24
3. Approximating the
differential equation
( )
� � �
φ φ φ
δ
φ φ φ
= = =
= = =
=
=
=
−
= =
∑ ∑ ∑
∑ ∑ ∑
ɺ
ɺ
ɺ
ɺ …
A number A number A number
x x u
x x u
a
Multiply with on both sides:
a
0 0 0
0 0 0
( ( ), ( ))
ˆ ˆ ˆ( ( ), ( ))
( ) ( ), ( )
( ) ( ) , ( ) , 0,1, ,
N N N
n n n n n n
n n n
n
N N N
n n n n n n n
n n n
n n
tf
f
f a t b t
t t
f
t
t t
t
t a t b t n N
φ φ= =
= =∑ ∑0 0
ˆ ˆ( ) ( ), ( ) ( )N N
n n n n
n n
x t a t u t b t
State Equation Constraint:
Approximations:
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore25
� The Chebyshev polynomials
� Polynomial Approximation
� The differential yields
0
1
2
2
3 2
3
4 3 2
4
( ) 1
( ) 2 1
( ) 8 8 1
( ) 32 48 18 1
( ) 128 256 160 32 1
T t
T t t
T t t t
T t t t t
T t t t t t
=
= −
= − +
= − + −
= − + − +
0 0 1 1 2 2 3 3 4 4
0
0 1
0 1 1 2 2 3
2 3 4
3 4 4
ˆ( ) ( ) ( ) ( ) ( ) ( )
ˆ( ) ( ) ( ) ( ) ( ) ( )
Select Grid Points & Evalua ,te , ,: ,
x t a T t a T t a T t a T t a T t
x t a T t a T t a
t t t t t
T t a T t a T t
= + + + +
= + + + +ɺ ɺ ɺ ɺ ɺ ɺ
=
ɺɺ ɺ ɺ ɺ ɺ
ɺ ɺ ɺ ɺ ɺ ɺ
ɺ ɺ ɺ ɺ ɺ ɺ
ɺ ɺ ɺ ɺ ɺɺ
ɺɺ
00 0 1 0 2 0 3 0 4 0
1 0 1 1 1 2 1 3 1 4 1
0 2 1 2 2 2 3 2 4 22
0 3 1 3 2 3 3 3 4 33
0 44
ˆ( ) ( ) ( ) ( ) ( ) ( )
ˆ( ) ( ) ( ) ( ) ( ) ( )
ˆ ( ) ( ) ( ) ( ) ( )( )
( ) ( ) ( ) ( ) ( )ˆ( )
(ˆ( )
x t T t T t T t T t T t
x t T t T t T t T t T t
T t T t T t T t T tx t
T t T t T t T t T tx t
T tx t
= ɺ ɺ ɺ ɺ
0 0 0
1 1 1
2 2 2
3 3 3
4 4 41 4 2 4 3 4 4 4
,
) ( ) ( ) ( ) ( )
a a b
a a b
a a bf
a a b
a a bT t T t T t T t
Differentiation matrix
3. Approximating the differential equation
(Example)
: An algebraic constraint
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore26
4. Discretizing the integral equation - Gauss Quadratures
1
1
ˆ ˆ( ( ), ( )) ( ( ), ( ))i i i
L x t u t dt w L x t u t
−
≈∑∫
A quadrature rule is an approximation of the definite integral
of a function, usually stated as a weighted sum of function
values at specified points within the domain of integration.
=
−≅ = + ∑x u x u
0
0
ˆ ˆ ˆ ˆ( ( ), ( )) ( ( ), ( ))2
NfN
N N n n n
n
t tJ J E t t w L t t
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore27
Finally,
The optimal control problem has been simplified to a lower dimensional nonlinear programming problem.
�φ
=
=
−= +
= ≤ ≤
=
∑
∑ ɺ
A number
x x x u
a x u
x x
x u
0
0
0
0
0
ˆ ˆ ˆ ˆ( ( ), ( )) ( ( ), ( ))2
ˆ ˆ( ) ( ( ), ( )) 0
ˆ ˆ( ( ), ( )) 0
ˆ ˆ( ( )
,
,
int ,
int , , (
NfN
N n n n
n
N
n n
n
n
n
n
n
n
N
Minimize
Subject to
with end po conditions
t tJ E t t w L t t
f n N
e t t
and path cons
t t t
htra t ts ≤ ≤ ≤)) 0 0 n N
φ=
= ∑0
( ( )ˆ )N
n
n
nu t tbφ
=
= ∑0
( ( )ˆ )N
n
n
nx t ta
A Toy ProblemA Toy ProblemA Toy ProblemA Toy Problem
Dr. Radhakant PadhiDr. Radhakant PadhiDr. Radhakant PadhiDr. Radhakant PadhiAssociate Professor
Dept. of Aerospace Engineering
Indian Institute of Science - Bangalore
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore29
Toy Problem
� Step 1. Decide on which polynomial we are planning as the trail
function
�(i) Chebyshev Polynomials of the first kind. Say take N=4
(First 5 polynomials)
1
2
0
( )
( ) ( ) ( )
( (0), (1)) (1, )
( ) 1
J u t dt
x t x t u t
Minimize
Subject to
Boundary conditio
u
n x x e
t
=
= +
=
≤
∫ɺ
T t T t t T t t T t t t T t t t2 3 4 2
0 1 2 3 4( ) 1, ( ) , ( ) 2 1 ( ) 4 3 , ( ) 8 8 1= = = − = − = − +
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore30
�(ii) Shifted Chebyshev polynomials for the interval [0,1]T t
T t t
T t t t
T t t t t
T t t t t t
0
1
2
2
3 2
3
4 3 2
4
( ) 1
( ) 2 1
( ) 8 8 1
( ) 32 48 18 1
( ) 128 256 160 32 1
=
= −
= − +
= − + −
= − + − +
Step 2. Define the collocation (grid) points
i
it a b a b i N
N
1 1( ) ( )(cos( )); 0,1,..., 1
2 2 1
π= + + − = −
−
0 0 .1 4 6 5 0 .5 0 .8 5 3 5 1T im e ( s e c s )
Toy Problem (Contd.)
�Shifted
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore31
Step 3. Approximate x(t) and u(t) using trial function
n n
n
n n
n
x t a T t
u t b T t
4
0
4
0
ˆ ( ) ( )
ˆ ( ) ( )
=
=
=
=
∑
∑
d
dt
0 2 0 6 0
0 0 8 0 16
0 0 0 12 0
0 0 0 0 16
0 0 0 0 0
=
Step 4. Find the differentiation matrix and equate the
state equation at the grid points
k k k
dx t x t u t
dtˆ ˆ ˆ( ( )) ( ) ( )= +
Toy Problem (Contd.)
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore32
Step 5. Compute Tn(t) matrix for ti and equate thestate equation, i = 0,1,2,3,4
T
1 1 1 1 1
1 1/ 2 0 1/ 2 1
1 0 1 0 1
1 1/ 2 0 1/ 2 1
1 1 1 1 1
− −
− − −=
− −
x t a
x t a
aT Dx t
ax t
ax t
00
1 1
22
33
44
ˆ( )
ˆ( )
( )ˆ( )
ˆ( )
ˆ( )
= ×
ɺ
ɺ
ɺ
ɺ
ɺ
Finally, we have a b
a b
a bT T D I
a b
a b
1
0 0
1 1
2 2
3 3
4 4
( )−
× − =
Toy Problem (Contd.)
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore33
Step 6. Apply boundary conditions
This gives,
x x e( (0), (1)) (1, )=
a a a a a
a a a a a
0 1 2 3 4
0 1 2 3 4
1
2.7182
− + − + =
+ + + + =
a
x t a
x t a
x t a
e a
0
1 1
2 2
3 3
4
1 1 1 1 11
( ) 1 1/ 2 0 1/ 2 1
( ) 1 0 1 0 1
( ) 1 1/ 2 0 1/ 2 1
1 1 1 1 1
− − − − −=
− −
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 11
1.2
1.4
1.6
1.8
2
2.2
2.4
2.6
2.8
Time(secs)
State, x(t)
Fix x(0) = 1
Fix x(1) = e
Toy Problem (Contd.)
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore34
Step 7. Approximate the integral equation
{ }iw b a
n( ) 1.57 0.7854 0.5236 0.3927 0.3142
1
π= − =
+
N
k k
k
J w u t4
2
0
1ˆ ( )
2 =
≅ = ∑J u t dt
1
2
0
( )= ∫
where
Toy Problem (Contd.)
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore35
Finally, we have
Apply any KKT (or any other static optimization technique) for solving the optimal control problem
42
0
4 42
0 0
4
1 2
0
1ˆ ( )
2
ˆ ˆ ˆ( ) ( ) ( ) 0
ˆ ( ) 1 0 0 ,1 , 2 , 3 , 4
1ˆ ˆ ˆ ˆ( ) ( ( ) ( ) ( ) )
2
ˆ ˆ ˆ( ( ) 1 ) ( (0 ) 1 ) ( ( ) 1 )
N
k k
k
k k k
k
N T
k k k k k k
k k
T
k k
k
J w u t
x t u t x t
u t f o r k
J w u t x t u t x t
u t x x e
=
= =
=
=
+ − =
− ≤ =
= + + − +
− + − + −
∑
∑ ∑
∑
ɺ
ɺλ
µ ν ν
D e f in e th e a u g m e n te d c o s t fu n c t io n ,
Toy Problem (Contd.)
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore36
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 11
1.2
1.4
1.6
1.8
2
2.2
2.4
2.6
2.8
State, x(t)
Time (secs)
Interpolated
Collocation point
Exact
x(1) =2.7182
x(0) =1
a a a a a0 1 2 3 41.7534 0.8503 0.1052 0.0088 0.0005= = = = =
Toy Problem: Results
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore37
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-3
-2
-1
0
1
2
3
4x 10
-3
Time (secs)
Control, u(t)<=1
b b b b b0 1 2 3 40.0014 0.0004 -0.0009 0.0006 -0.0016= = = = =
Toy Problem: Results
MinimumMinimumMinimumMinimum----time Fronttime Fronttime Fronttime Front----totototo----back Turning of an Airback Turning of an Airback Turning of an Airback Turning of an Air----
Launched Missile using PseudoLaunched Missile using PseudoLaunched Missile using PseudoLaunched Missile using Pseudo----Spectral MethodSpectral MethodSpectral MethodSpectral Method
Prof. Radhakant PadhiProf. Radhakant PadhiProf. Radhakant PadhiProf. Radhakant Padhi
Dept. of Aerospace Engineering
Indian Institute of Science - Bangalore
Full Paper: Proceedings of 2012 IFAC EGNCA Workshop, Bangalore
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore39
Reference
Vinita Chellappan and Radhakant Padhi,
Flight Path Angle Reversal of an Air-to-
Air Missile in Minimum Time Using
Pseudo-spectral Method, IFAC
Workshop on Embedded Guidance,
Navigation and Control (EGNCA), 2012,
Bangalore, INDIA.
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore40
The problem
� Launch a missile from a aircraft in the forward direction and attack a target in the rear hemisphere.
� Missile has to reverse the flight path angle as quicklyas possible so as to intercept the target.
� The problem is to reverse the flight path angle from an initial value (around 00) to -1800 in minimum time.
� After turning it should also have the required velocity (a constraint on the final Mach number) to intercept the target.
Aircraft
Missile
Target
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore41
The problem –
Cost function and boundary conditions
0
ft
J dt= ∫Minimize
subject to the constraint
γ γ= = −
= =
0 0
0
0
( ) known (around 0 ), ( ) 180
( ) known, ( ) 0.8
f
f
t t
M t M t
The problem is to reverse the flight path angle from 00 to -1800
maintaining a final Mach number of 0.8 in minimum time.
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore42
System Dynamics
The point mass equations of motion:
( ) sin cos( )
1( ) ( cos sin( ))
( ) sin
( ) cos
b
b
D W TV t
m m m
t L W TmV
h t V
x t V
γ α δ
γ γ α δ
γ
γ
= − − + +
= − + +
=
=
ɺ
ɺ
ɺ
ɺ
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore43
System DynamicsRef: Han et al., “State constrained Agile Missile Control with
Adaptive Critic Based Neural Networks”, JGCD, 2002
The non-dimensional parameters were considered as:
2
2
2
2
'( ) sin cos( )
1'( ) ( cos sin( ))
sin'( )
cos'( )
w D w b
w L w b
M S M C T
S M C TM
a Mh
g
a Mx
g
τ γ α δ
γ τ γ α δ
γτ
γτ
= − − + +
= − + +
=
=
2
= ; = ; = ; =2
w w
g T a S VT S M
at mg mg a
ρτ
Non-dimensional point mass equations of motion:
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore44
Minimum time problem
� Free final time problem - state constrained problem, with bounds on control.
� Equations of motion are reformulated using flight path angle as the independent variable.
� Leads to a fixed final condition.
� Assumption: Flight path angle is a monotonic continuous function with respect to time.
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore45
as independent variable
Modified state equations with respect to flight path angle
0 0 0
2( cos sin( ))
f f ft
w L w at
dt aMJ dt d d
d g S M C T
γ γ
γ γ
γ γγ γ α δ
= = =− − + +∫ ∫ ∫
' 1 ' '= ; = ; = ; =
' ' ' '
dM M dt dh h dh x
d d d dγ γ γ γ γ γ γ γ
Modified cost function
γ
The minimum time problem Hard constraint problem( ) 0.8
fM γ =
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore46
Nonlinear programming problem
γ
γ α γ δ γ γ
γ α γ δ γ γγ
γ α γ δ γ γ
=
=
−=
+ + −
− + + − = + + −
∑
∑ ɺ
0
2
0
2
2
0
ˆ ( )
ˆ2 ˆ ˆ( ( ) sin( ( ) ( )) cos )
ˆˆ ˆ( ) cos( ( ) ( )) sin )( )
ˆˆ ˆ(
Minimize
Sub( )
ject to
Subjec
sin( ( ) ( )
t
co
t
) s )
NfN k
k
kw k L w k a k k
Nw k D w k a k k
k k k
kw k L w k a k k
t t aMJ w
g S M C T
S M C Ta T
g S M C T
α γ δ γ
γ
γ
≤ ≤
= = ∈
= =
0 0
0 0 0 0 0
o path constraints
and
with end point con
ˆˆ( ) 20 ( ) 72
ˆ( ) ( ) where [0.3,0.8]
ˆ(
diti
) ( ) 8
on
.
s
0
k k
f f N
e x M M M
e x M
γ γ α γ γ δ γ γ
γ γ γ γ
γ
= = =
= =
= = =
= =
=
∑ ∑ ∑
∑ ∑
0 0 0
0 0
0 0
ˆˆ ˆ( ) ( ); ( ) ( ); ( ) ( )
ˆ ˆ( ) ( ); ( ) ( )
Grid points, , 0,...,
N N N
k k k k k k k k k k k k
k k k
N N
k k N k k N
k k
k
M a T b T c T
M a T M a T
k N
0 1 2 3 4 50.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Time, sec.
Mach n
um
ber,
M
-400 -300 -200 -100 0 100 200 300 4004200
4300
4400
4500
4600
4700
4800
4900
5000
Range, m
He
igh
t, m
0.8
0.7
0.6
0.5
0.4
0.3
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-21
-20
-19
-18
-17
-16
-15
-14
-13
-12
-11
Time(sec)
AO
A,
α,
deg
0.8 0.7 0.6 0.5 0.4 0.3
0 1 2 3 4 5-74
-72
-70
-68
-66
-64
-62
-60
-58
-56
Time, sec
δb,
deg
M=0.8
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore48
Mach and AOA Vs Flight path angle
-180 -160 -140 -120 -100 -80 -60 -40 -20 00.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Flight path angle, γ, deg
Mach n
um
ber,
M
0.8
0.7
0.6
0.5
0.4
0.3
-180 -160 -140 -120 -100 -80 -60 -40 -20 0-21
-20
-19
-18
-17
-16
-15
-14
-13
-12
-11
Flight path angle, γ (deg)
AO
A,
α,
deg
0.8
0.7
0.6
0.5
0.4
0.3
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore49
Flight path angle history
0 1 2 3 4 5-180
-160
-140
-120
-100
-80
-60
-40
-20
0
Time, sec
Flig
ht
path
angle
, γ,
deg
0.8
0.7
0.6
0.5
0.4
0.3
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore50
Effect of reducing the AOA
0 1 2 3 4 5 6-88
-86
-84
-82
-80
-78
-76
-74
-72
-70
Time, sec
Sh
ear
angle
, δ
v,
de
g
α=-30
α=-25
α=-20
α=-15
α=-10
0 1 2 3 4 5 6-40
-30
-20
-10
0
Time(sec)
AO
A,
α,
deg
0 1 2 3 4 5 6-80
-70
-60
-50
-40
Time, sec
δb,
deg
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore51
Effect of reducing the AOA on Mach number
along with the flight path angle
0 1 2 3 4 5 60.5
0.55
0.6
0.65
0.7
0.75
0.8
0.85
Time, sec.
Mach n
um
ber,
M
α=-30
α=-25
α=-20
α=-15
α=-10
0 1 2 3 4 5 6-180
-160
-140
-120
-100
-80
-60
-40
-20
0
Time, sec
Flig
ht
pa
th a
ngle
, γ,
deg
α=-30
α=-25
α=-20
α=-15
α=-10
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore52
Effect of the number of grids
-180 -160 -140 -120 -100 -80 -60 -40 -20 00.5
0.55
0.6
0.65
0.7
0.75
0.8
0.85
Flight path angle, γ, deg
Mach n
um
ber,
M
30
20
12
10
5
-180 -160 -140 -120 -100 -80 -60 -40 -20 0-21
-20
-19
-18
-17
-16
-15
-14Angle of attack Vs γ
Flight path angle, γ (deg)
AO
A,
α,
deg
30
20
12
10
5
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore53
Selection of number of grids
No.ofgrids
Computational time
5 0.899679
10 1.022969
12 1.102450
20 1.652399
30 3.314869
Intel® Core™ 2 Quad CPU
Q6600 @2.40 GHz, 1.98GB RAM
Software: MATLAB 7.4
• The number of grids for analysis: 20
• 20 grids are comparable with 30
Note: Real-time implementation in “C” or “Assembly language” isexpected to be much (at least 50 times) faster than the MATLAB Code
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore54
Comparison of Chebyshev and Legendre
approximation
0 0.5 1 1.5 2 2.5 3 3.5 4 4.50.5
0.55
0.6
0.65
0.7
0.75
0.8
0.85
Time, sec.
Mach n
um
ber,
M
Legendre
Chebyshev
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5-22
-20
-18
-16
-14
Time(sec)
AO
A,
α,
deg
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5-66
-64
-62
-60
Time, sec
δb,
deg
Legendre
Chebyshev
Both lead to identical results!
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore55
Conclusions: Missile-turning Problem
� Real-hemisphere engagement is feasible (no need of “dog fight”!)
� Minimum-time flight path angle reversal is feasible with “realistic control force”
� Promising numerical results
• Computationally very efficient & is a viable tool for optimal guidance
• Chebyshev and Legendre approximations lead to identical results (serves as a verification)
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore56
References on Pseudo-spectral
Methods for Optimal Control
� I. M. Ross and M. Karpenko, A Review of Pseudospectral Optimal Control: From Theory to Flight, Annual Reviews in Control, Vol. 36, 2012, pp.182–197.
� Gong, Q., Fahroo, F., and Ross, I.M., Spectral Algorithm for Pseudospectral Methods in Optimal Control, Journal of Guidance, Control, and Dynamics, Vol. 31, No. 3, 2008.
� F. Fahroo and I. M. Ross, Direct Trajectory Optimization via a Chebyshev Pseudospectral Method, Journal of Guidance, Control, and Dynamics, Vol. 25, 2002, pp. 160–166.
� F. Fahroo and I. M. Ross, Costate Estimation by a Legendre Pseudospectral Method, Journal of Guidance, Control and Dynamics, Vol.24, No.2, March–April 2001, pp.270–277.
OPTIMAL CONTROL, GUIDANCE AND ESTIMATION
Prof. Radhakant Padhi, AE Dept., IISc-Bangalore57
Thanks for the Attention….!!