A.6.2.3 Optimization / 1

A.6.2.3 Optimization

Like much of the code developed during the course of this project, our optimization algorithm underwent multiple revisions and several complete rewrites. We begin with the assumption that the launch vehicle is a typical three-stage, ground-launched vehicle. A linear-tangent steering law prescribes the steering angle of the launch vehicle at any given moment:

/ (A.6.2.3.1)

where is the steering angle, t is the time elapsed since the last engine burnout in seconds, and a and b are constants for each stage.

The optimization problem is then: find a and b for each stage such that the V required to meet the mission specifications is minimized. To simplify the process, we define three burnout steering angles - , and - which we manipulate to obtain the best trajectory. The values of a and b can then be found by solving the equations:

/ (A.6.2.3.2)
/ (A.6.2.3.3)

where n denotes the stage number and is the burnout time in seconds. Note that for stage 1, would actually be the initial launch angle.

In our first attempt at creating an optimization routine, we specified a series of values of and constant best-guess values of and . We then simulated the trajectory that would result from each combination of steering angles. For each simulated trajectory, we calculated the speed of the vehicle at the third-stage burnout () as follows:

/ (A.6.2.3.1)

where ,, and are the radial speed of the vehicle, the radial displacement from the centre of the earth at third-stage burnout, the rate of change of longitude and the rate of change of latitude at third-stage burnout respectively.

From the third-stage burnout speed, we found the energy of the trajectory:

/ (A.6.2.3.2)

where is the standard gravitational parameter of Earth, equal to m3/s2.

We then compared this value of energy to the known amount of required energy () for a circular orbit around a spherical Earth:

/ (A.6.2.3.3)

where is the required orbit altitude as defined in the mission specifications, equal to 300 km and is the radius of the Earth, approximately 6376 km.

For each simulated trajectory, if the energy calculated with Eq. (A.6.2.3.2) was less than zero and was greater than or equal to, we classified the trajectory as orbital. If the energy calculated was greater than zero, we classified the trajectory as hyperbolic. Lastly, if neither of the above conditions were met, we classified the trajectory as sub-orbital.

Out of the set of orbital trajectories, we chose the best case as the one that gave the lowest V.

Unfortunately, this first attempt at optimization was mostly unsuccessful. At times, the simulation would plot out a perfectly viable trajectory but the optimization routine (implemented in MATLAB) would consider it hyperbolic. On other occasions, where the simulation clearly showed that the trajectory was hyperbolic, the optimization routine would pronounce the trajectory sub-orbital. We were unable to determine if this was a result of a logical or syntactical error in our code.

Furthermore, this version required the user to specify the range of values for, and to make single educated guesses at and .

Since the major problems with our first optimization routine were the classification of trajectories and the recognition of feasible trajectories, we returned to the mission specifications and decided on a ranked list of three conditions that a simulated trajectory must pass to be considered feasible. These three conditions now make up the core of our current optimization routine:

  1. At no time can the magnitude of the vehicle’s position vector (with the center of the Earth as the origin) fall below the radius of the Earth. We considered this the most important condition of a trajectory. Many of the early iterations using the first version of the optimization routine showed that our simulated rocket disappeared beneath the surface of the Earth shortly after liftoff.
  1. The perigee of the trajectory must be at least 300 km above the surface of the Earth. This condition is expressed in the mission specifications.
  1. The eccentricity of the orbit must not be greater than 0.5. This condition allows us to easily exclude hyperbolic or highly eccentric trajectories.

The next stage in developing the optimization routine was to allow and to be varied. In this version, the user specified upper and lower bounds for all three angles. Again, we simulated the trajectory for every possible combination of angles. We tested each resulting trajectory against the aforementioned conditions. We then chose the feasible orbit with the lowest V as the best case.

Using this approach, we immediately ran into another problem. We were effectively searching for the optimal solution by brute force. To run through every possible combination of angles at a precision of 1 degree would have taken us an excessive amount of time. Using the computers available to us in the ECN lab, each simulation took approximately 1 minute to run. Trying all possible combinations would have taken more than 11 years.

We impose 2 conditions on the angles that greatly reduce the amount of time that the entire optimization routine takes to run:

  1. The third stage is spin-stabilized. This means that and are always equal, which effectively limits the number of angles we have to manipulate to two. In fact, since we were still using a precision of 1 degree throughout the whole range of angles, this reduced the run time by up to a factor of 181. Our computation time thus fell from 11 years to about 3 weeks.
  1. is always less than or equal to . By limiting the chance that the launch vehicle pitches back up during the second stage burn, the computation time was further reduced to about 1.5 weeks.

At this point, we started making use of MATLAB’s parallel processing functionality. The computers available to us in the lab have dual-core processors, and some of the AAE department compute servers have quad-core processors. However, most of the functionality in MATLAB runs on a single core. Since we are trying to solve the problem by brute force using the results of many independent simulations, distributing the load to both cores can significantly reduce our computational time. By doing so, we nearly quartered the time to about 3 days.

To quickly obtain preliminary results for the other groups, we were using guessed ranges of angles and low tolerances followed by a process of iteratively homing-in on a rough result. The next logical step was therefore to implement a way to do this automatically and systematically, bringing us to our final optimization routine.

We start with the largest possible range of and - from negative 90 degrees to positive 90 degrees – at intervals of 30 degrees. We then simulate the trajectories that result from each combination of angles and choose the combination that gives the lowest eccentricity. We use eccentricity instead of V due to reports from the D&C group that the steering in our preliminary results was too aggressive to control. Next, we examine the range centered on the angles making up the best combination of the previous iteration. This time, we use intervals of 15 degrees. We repeat this process with intervals of 8 degrees, 4 degrees, 2 degrees and 1 degree. After the final iteration (using intervals of 1 degree), we either report the best-case angles (correct to 1 degree), or that all simulations failed the above criteria for feasible orbits.

If there are any feasible trajectories, we re-simulate the best cases and pass the details of the trajectory to D&C for control. The final optimization routine takes approximately 15 minutes to run. It should also be mentioned at this point that the exact same optimization routine is used for the balloon launch since the steering law remains unchanged.
The best-case angles we obtain using the above routine are tabulated below:

Table A.6.2.3.1Optimized Angles (0.2kg payload)
Variable / Value / Units
/ 42 / deg
/ -25 / deg
/ -25 / deg
Angles are the nose pointing based on the horizon
Table A.6.2.3.2Optimized Angles (1kg payload)
Variable / Value / Units
/ 30 / deg
/ -10 / deg
/ -10 / deg
Angles are the nose pointing based on the horizon
Table A.6.2.3.3Optimized Angles (5kg payload)
Variable / Value / Units
/ 24 / deg
/ -32 / deg
/ -32 / deg
Angles are the nose pointing based on the horizon

Author:Daniel Chua