2012 12th International Conference on Control, Automation and Systems Oct. 17-21, 2012 in ICC, Jeju Island, Korea
Dynamic Optimization of Guided Missile Trajectory by Use of Matlab and Dynopt Toolbox Stepan Ozana1* , Martin Pies, Petr Wagner 1
Department of Cybernetics and Biomedical Engineering, Faculty of Electrical Engineering and Computer Science, VSB-Technical University of Ostrava, Ostrava, 708 33, Czech Republic (Tel : +420-597324221; E-mail:
[email protected]) * Corresponding author
Abstract: The paper deals with analysis of case study concerning dynamic optimization problem using Dynopt Toolbox. Particularly it focuses on problem with free time and free end point represented by example of guided missile control in two alternatives. The paper introduces Dynopt as powerful tool for most type of dynamic optimization problem, describing the way how the problem is formulated to be ready for Dynopt syntax. Keywords: Dynopt, Dynamic Optimization, Matlab.
1. INTRODUCTION The mathematical theory of dynamic programming as a means of solving dynamic optimization problems dates to the early contributions of Bellman [1] and Bertsekas [2]. For economists, the contributions of Sargent [3] and Stokey-Lucas [4] provide a valuable bridge to these problems. Dynamic programming was systematized by Richard E. Bellman. He began the systematic study of dynamic programming in 1955. The word "programming," both here and in linear programming, refers to the use of a tabular solution method and not to writing computer code, see Víteček (in Czech) [5]. Dynamic programming has strong similarities with optimal control, a competing approach to dynamic optimization. Dynamic programming has its roots in the work of Bellman, while optimal control techniques rest on the work of the Russian mathematician Pontryagin and his coworkers in the late 1950s, see Zietz [6]. Dynamic programming is typically applied to optimization problems. In such problems there can be many possible solutions. Each solution has a value, and we wish to find a solution with the optimal (minimum or maximum) value. We call such a solution an optimal solution, as opposed to the optimal solution, since there may be several solutions that achieve the optimal value, see Víteček [5]. As the analytical solutions are generally very difficult, chosen software tools are used widely. These software packages are often third-party products bound for standard simulation software tools on the market. As typical examples of such tools, TOMLAB and DYNOPT could be effectively applied for solution of problems of dynamic programming. DYNOPT has been used in this paper due to its licensing policy (free product under GPL) and simplicity of use. Before case studies, next chapter introduces the classification of the dynamic programming tasks.
2. CLASSIFICATION OF DYNAMIC PROGRAMMING TASKS Concerning the type of final time (free/fixed) and final point (free/fixed), we can distinguish 4 combinations, as described in chapters (2.1)-(2.4).
2.1 Problem with free time and free end point The objective function for this type of problem is given by formula (1)
* +
∫
(
)
(
)
(1)
with additional formulas (2),(3):
( )
( )
(2)
( ) ̇
( )
|
(3)
̇ 2.2 Problem with free time and fixed end point The objective function for this type of problem is given by formula (4)
* +
∫
(
)
(4)
with additional formulas (5),(6):
( ) ̇ ( )
( )
(5)
( ) ̇
(6)
with no requirements on ( )
2.3 Problem with fixed time and free end point The objective function for this type of problem is given by formula (7)
* +
∫
(
)
(
)
(7)
with additional formulas (8),(9):
( )
( )
(8) ( )
̇
( )
|
(9)
̇ 2.4 Problem with fixed time and fixed end point The objective function for this type of problem is given by formula (10)
* +
∫
(
)
( )
The target is modeled as system with constant velocity. Variables y1 and y2 determine its coordinates in x and y as functions of time, see (14):
(11) ( )
̇
(12) ̇
( ) with no requirements on
The goal of this task is to destroy the flying missile (target) by another guided missile in the shortest time possible. System of the guided missile is described by its acceleration a and its direction u (searched control). State variables x1 and x2 are current velocities of guided missile in coordinates x and y. State variables x3 and x4 represents position of guided missile, thus its coordinates x and y. The system is then modeled as the system with a constant acceleration, see (13). ̇1 𝑎 ∙ cos ̇2 𝑎 ∙ s ̇3 (13) 1 ̇4 2 ( ) ,
(10)
With additional formulas (11),(12):
( )
4. CASE STUDY-GUIDED MISSILE AS TIME OPTIMAL PROBLEM
( )
𝑦1 ( ) 𝑦2 ( )
4 1
(14)
It is the problem with free time and free end point, because we don’t know the time when the guided missile hits the target and with free end because we don’t the coordinates of the collision. The goal of the task is to minimize the time to shooting down the target. The objective function is defined as (15): 𝑓
∫
3. DYNOPT Dynopt is a set of MATLAB functions for determination of optimal control trajectory by given description of the process, the cost to be minimized, subject to equality and inequality constraints, using orthogonal collocation on finite elements method. The actual optimal control problem is solved by complete parameterization both the control and the state profile vector. That is, the original continuous control and state profiles are approximated by a sequence of linear combinations of some basis functions. It is assumed that the basis functions are known and optimized are the coefficients of their linear combinations. In addition, each segment of the control sequence is defined on a time interval whose length itself may also be subject to optimization. Finally, a set of time independent parameters may influence the process model and can also be optimized. It is assumed, that the optimized dynamic model may be described by a set of ordinary differential equations (ODE’s) or differential-algebraic equations (DAE’s). This collection of functions extends the capability of the MATLAB Optimization Toolbox, specifically of the constrained nonlinear minimization routine fmincon [http://www.mathworks.com/help/toolbox/optim/ug/fmi ncon.html].
15
(15)
and it has to be minimized. The system of guided missile and the target will be merged into one system. Moreover, it will be added by one more state variable whose value 7 ( 𝑓 ) represent the value of the integral in the objective function. This is required by Dynopt toolbox as the assignment has to be set up in so called Mayer form. Overall system is then described as (16): ̇1 𝑎 ∙ cos ̇2 𝑎 ∙ s ̇3 1 ̇4 2 (16) ̇5 1 5 ̇6 ̇7 1 ( ) , 4 1 It can be easily verified that such defined system corresponds to original system. For objective function we get (17): 𝑓
7( 𝑓)
∫1
𝑓
∫
(17)
For the target we get (18): 5(
)
5(
∫15
)
1 5t
4
𝑦1 ( )
𝑒𝑞(𝐱 𝐱
(18) 6(
)
6(
∫
)
t
1
1
1
(20)
2
15 [
1
(25) 1
[
The coordinates of the missile and target must be the same. For most cases Dynopt requires setting up the system, including their first derivatives by state variables and manipulated variables, and possibly by parameters (if used). Let us compute particular matrices to be entered to Dynopt. Definition of the system (20): 𝑎 ∙ cos 𝑎∙s )
1
1
𝑦2 ( )
Because the goal is to shoot down the target, we have to add constraints applied for coordinates of the guided missile and the target in final time 𝑓 (19): 3( 𝑓) 5( 𝑓) (19) 4( 𝑓) 6( 𝑓)
(
1
𝑓)
]
Because it is optimization task with free time and free end, we don’t enter the final state of optimized system; the only issue of interest is the minimization of the criteria. To simulate the process, we choose the missile acceleration𝑎 9.
5. MODIFICATION OF CASE STUDY-MINIMIZATION TRAJECTORY PROBLEM Instead of requirement on minimization of the time needed to reach the target, we may want to minimize the distance between guided missile and the target during the mission. The guided missile then does not follow a line trajectory but it keeps minimizing its current distance to target. This would match the situation when the description of target trajectory is not satisfactory. Optimization criteria in this case would be described as (26): 𝑓
∫(
]
Derivatives by particular variables (21): 1 1 (𝐱 ) 𝐱
5)
3
2
(
2 6)
4
(26)
The system and the derivatives to be entered into Dynopt are in the following form: Definition of the system (27): 𝑎 ∙ cos 𝑎∙s 1
[ (𝐱
]
(21)
(
)
2
)
, a∙s
[( -
𝑎 ∙ cos
(22)
(𝐱
𝐱
,
1
Constraints for final time of optimization 𝑒𝑞(
𝑓)
[
3
5
4
6
𝑇
]
(23) 𝑓
2 5)
(
4
6)
2
]
(24):
(24)
Derivatives of constraints by state variables (25):
) 𝐱
Derivative of objective function by state variables: -𝑇
3
Derivatives by particular variables (28):
The objective function (Mayer form) (22): 7
(27)
15
[
1
1
2 3 2 5 2 4 2 6 2 3 2 5 2 4 2 6
(28)
]
The rest of parameters are the same as in previous time optimal problem.
6. SIMULATION RESULTS 6.1 Guided missile-time optimal problem Fig. 1 shows the main simulation result, control signal u(t). Fig. 2 represents the trajectories of the missile and target over the time, and Fig. 3 then displays 2D trajectories for time optimal problem.
Fig. 1. Control signal over the time
Fig. 2. Trajectories over the time
Fig. 3. 2D trajectories
6.2 Guided missile-minimization trajectory problem Fig. 4 shows the main simulation result, control signal u(t). Fig. 5 represents the trajectories of the missile and target over the time, and Fig. 6 then displays 2D trajectories for modified case study, particularly for minimization of distance between missile and the target.
Fig. 4. Control signal over the time
Fig. 5. Trajectories over the time
Fig. 6. 2D trajectories
5. CONCLUSION The paper presents Dynopt Toolbox as third-party product compatible with Matlab&Simulink environment determined for solving problems of dynamic optimization which is a very challenging topic that belongs to Control systems which is basic automation subject tought at the Department of cybernetics and bioengineering.
REFERENCES [1] [2]
[3] [4]
ACKNOWLEDGMENT This work is supported by project SP2012/111, “Data acquisition and processing from large distributed systems II” of Student Grant System, VSB-TU Ostrava.
[5] [6]
R. Bellman, Dynamic Programming. Princeton University Press, Princeton, N.J., 1998 D. Bertsekas, Dynamic Programming and Stochastic Control. Academic Press, New York, 1976 T. J. Sargent, Macroeconomic Theory. New York: Academic Press, 1979, 1987. N. L. Stokey and R. E. Lucas and E. C. Prescott, Recursive Methods in Economic Dynamics. Harvard University Press, 1989 A. Víteček, Optimalizace systémů – dynamická optimalizace. VŠB, Ostrava, 1992 J. Zietz, Dynamic Programming: An Introduction by Example. Journal of Economic Education, Vol. 38, No. 2, pp. 165-186, 2007