# Optimization of dynamical systems

## Incorporating dynamics in large-scale optimization

*Reference: [Hwang and Munster, AIAA 2018-1646]*

Traditionally in design optimization, the objective and constraint functions are computed from static performance metrics, e.g., the vehicle efficiency computed from a steady-state simulation. However, in some problems, we might wish to design or simply model a vehicle whose performance metric requires a dynamic simulation. We can solve such a problem with large-scale optimization techniques by including the system dynamics in our model and treating the control variables as design variables. Therefore, the optimization problem seeks to simultaneously determine the optimal design and the optimal operational or control profile of the vehicle or system. This means that we must include the time integration of an ordinary differential equation (ODE) in our model, and thus, compute the derivatives of the time-integrated solution, as part of computing the model derivatives that are needed for large-scale optimization.

The Ozone software package is an ODE solver library for OpenMDAO (O3: open-source ODE and optimal control solver). The source code and documentation are both hosted online. Ozone uses the general linear methods (GLM) formulation, which is a set of equations that generalizes all Runge--Kutta and linear multi-step methods, as well as hybrid methods. The GLM equations are implemented with derivatives so that an ODE can be incorporated in an OpenMDAO model for large-scale optimization. The user need only to define the right-hand side of their ODE function along with the derivatives of the right-hand side. Due to the use of GLMs, Ozone has a large library of multi-stage and multi-step integrators, all with derivatives implemented. The Ozone package provides three algorithms for numerically solving ODEs: time-marching, optimizer-based (this treats the ODE states as design variables and dynamics as optimization constraints), and solver-based, which is an iterative parallel-in-time algorithm *[Hwang and Munster, AIAA 2018-1646]**.*

Solution of an ODE with two time steps using an implicit integrator and time-marching. *[Hwang and Munster, AIAA 2018-1646]*

## Large-scale MDO of a CubeSat

*Reference: [Hwang et al., JSR, 2014]*

This problem involves the optimization of the design and operation of a CubeSat. The satellite is power-constrained and is limited by how much data it can transmit to ground stations on Earth, so the objective function is the data downloaded. Its period is 90 minutes and a ground station pass takes a few minutes, limiting time steps to be no larger than tens of seconds, but the solar power generation varies heavily throughout the year because of the relative position of the Sun. Therefore, we perform six 12-hour simulations spaced uniformly throughout the year. The design variables include the solar panel angle with respect to the satellite's body, the choice to use radiators or solar cells at each position on the solar panels, the communication profile over the 12-hour simulation, the roll-angle profile over the 12-hour simulation, and the antenna angle. In total, there are 25,000 design variables, and design optimization was predicted to produce an 80% improvement in the objective function over the baseline.

The MDO problem maximizes total data transmitted with respect to solar panel and antenna angles, and the profiles shown in blue. Constraints are shown in red. *[Hwang et al., JSR, 2014]*

## Simultaneous aircraft design and airline allocation optimization

*Reference: [Hwang and Martins, AIAA 2016-1662]*

For commercial aircraft, high-fidelity design optimization using computational fluid dynamics (CFD) is formulated as a minimization of drag or fuel burn at a small number of operating conditions that are selected to represent the design mission. This approach does not consider the fact that many long-range aircraft spend a significant portion of their service life on short-haul routes, and it cannot model new technologies, such as morphing wings or continuous descent profiles, that require modeling the full mission profile.

Here, we perform high-fidelity aircraft design optimization, but do so while modeling the entire mission profile for the full set of routes in a hypothetical airline network. Instead of minimizing drag or fuel burn, we maximize airline profit, letting the optimizer choose the optimal mission profile for each route, and the optimal set of routes on which to fly the new aircraft, given a fleet of existing aircraft owned by the airline. This results in a problem with thousands of design variables and tens of thousands of constraints, and we solve it using parallel computing.

The MDO problem maximizes total airline profit with respect to wing shape, airline allocation, and mission profile variables. *[Hwang and Martins, AIAA 2016-1662]*