attitude-control-surface-simulation

A simulation of how a four finned rocket would correct it's trajectory using a PID loop, including control surface deflection calculations.

Our goal was to generate parametrized code to determine the angle of defelction of control surfaces on a four finned rocket given a few basic parameters. Of course, there are many ways to fully define a rocket, but we took a few specific variables as inputs. These variables were

  • rocket diameter
  • desired cal/stability ratio
  • rocket mass
  • rocket velocity
  • sensor data on pitch and yaw degrees of freedom
  • length of the rocket
  • the density of air a the desired altitude
  • coefficient of drag for the vehicle in question
  • desired time step for simulation, for fidelity level in simulation
  • benchmarked proportional, integrative, and derivative gains experienced by the rocket--for both pitch and yaw degrees of freedom

From these values, we calculated the desired change in angle between the rocket's pointing vector and the tangent to the desired trajectory at that point.

Needless to say, this is hard, and we weren't able to progress past the "P" part of a "PID controller" for our simulation, and the number of assumptions we had to make to be able to make any headway on this project may have thrown off our numbers by a lot. The list of assumptions is under the "Assumptions" tab.

Assumptions:

First of all, to calculate the moment of inertia of the rocket about a central disk, we estimated the rocket to be a blunt, long cylinder of uniform density with no nose cone. This was mainly because the actual number of components of a rocket and their individual geometries and densities is much too complex to calculate, even if we knew all these numbers. Second, it made dealing with aerodynamic forces and tipping forces from an angle of attack very easy to deal with, as this assumption allows us to place the Center of Gravity (CG) at the geometric center of the rocket, because a regular cylinder has a cross section of a rectangle.

We also chose to disregard the effect of roll on a rocket, for several reasons. First of all, the physics of wind flow at supersonic speeds on surfaces that aren't computationally modeled is very hard to predict, and this comes into play when the rocket is rotating about its axis and the fins themselves are plowing through the air. Also, when thinking about how to determine which fins needed to be activated, we realized that, unless we could produce an immense amount of linear algebra code on the rotation of two coordinate systems relative to each other, we wouldn't know the orientation of the control surfaces to the trajectory plane, therefore we also assumed that the mid-plane of the fins is always coincident with the plane of the trajectory.

Challenges:

The first challenge we faced was deriving the fin deflection for our simulation since those do not exist. There was a lot of debate throughout the night and a lot of second guessing what we had as well. Part of the difficulty arose from not having an actual rocket to be able to manually tune the gain values in the PID loop. Without an actual rocket to tune these values, it is very difficult to generate any meaningful values, which is part of the reason our biggest challenge (moving past the P in PID) was not achieved.

Share this project:

Updates