Numerical Approximation of a Rocket's motion

In summary, Filip is trying to add orientation to his model of the flight dynamics of a rocket but is running into problems. He doesn't bother doing the math for the moments of inertia and gravity because he says it doesn't have a big effect on the general behavior of the rocket, but rather specific details. The problem is that the rocket fails to stabilize properly and starts rotating uncontrollably after a certain amount of time.
  • #1
Mardlamock
2
0
So, I ve been trying to add orientation to my model of the flight dynamics of a rocket but I ve been running into a lot of problems. I didn't bother actually doing the math for the moments of inertia and everything because I guess it really doesn't have that much of an effect on the general behaviour of the rocket,but rather simple specifics of its movement.

The problem is the following, when the rocket is offset from a perfect 90 degree angle at launch, it gains horizontal velocity faster than vertical (due to gravity) and therefore acquires another offset from the launch angle (say it was 89 degrees). The fins of the rocket should stabilize it by using the lift gained from the small angle of attack and point it back towards the velocity vector, this is what produces the gravity turn we all know and love (I think, I might be wrong though). In my model though, the rocket fails to stabilize properly and starts rotating uncontrollably after a certain amount of time.

At first it oscillates as a pendulum would,but deviating just a bit more with each period and gaining more and more angular velocity. Is this something that naturally arises when using euler's method to analyse this type of motion or would it also happen if I were to use Runge-Kutta's? I was thinking it may be something that naturally happens when using discrete time to analyse something that would be continous. By reducing the time step I was able to increase the time it would take for the deadly rotation to take place, but I am running out of memory on excel (Its waay easier than using MATLAB or anything else, at least for me). I am going to be trying to use 2nd order RK and see if it works.

Anyways, please tell me what you think, I am attaching the excel spreadsheet and a picture with the equations I am trying to approximate
https://www.mediafire.com/?led0x2ubszo7avv
http://imgur.com/4I3cFUB

Thanks a lot!
 

Attachments

  • 10740687_10203439585645884_287536767_n.xlsx
    2.3 MB · Views: 404
  • Physics.png
    Physics.png
    48.6 KB · Views: 634
Physics news on Phys.org
  • #2
Without looking at your code, I would say that it is very likely you experience numerical instability. The forward Euler method has a very small region of stability [1] and for suitably stiff problems [2] it can be impossible to find a step size small enough for the solution to be stable, yet large enough that truncation and rounding error do not swamp out the solution. Stiff problems are characterized by having dynamics on different timescales, i.e. orders of magnitude appart. In your problem, the rocket pitch controller would need to "operate" at a much fast timescale than the simple kinematic trajectory of the rocket. In general, vehicle simulations (of all kinds) that includes orientation very often result in stiff problems.

So, what can you do. You can try see if you can to find a sweet-spot for the step size, but you have already tried that you say. You can try switch to a more stable method (that is still doable in Excel) with a larger region of stability, but for a stiff problem the underlying difficulty is still there.

If you are not trying to simulate the pitch controller (that is, you are not doing controller research with an interested in whether on not your rocket is stable in pitch) a better approach would be to remove your pitch controller and simply clamp your pitch to your velocity vector. This means that the trajectory of the rocket is determined from the initial pitch angle (everything else being equal), and it will be very sensitive to the changes in that value, but the numerical integration itself would only operate on a single time scale.

There are of course more advance options you can take, but you would probably first need some clear goals of what you want to achieve with your simulation and you will probably also have code your problem directly as opposed to using a spread-sheet for the numerical integration. Depending on your background you may actually find it easy to add functions to Excel if you like that platform, or you can choose to go for an environment like Matlab [3] or similar [4].[1] http://en.wikipedia.org/wiki/Euler_method#Numerical_stability
[2] http://en.wikipedia.org/wiki/Stiff_equation
[3] http://en.wikipedia.org/wiki/MATLAB
[4] http://en.wikipedia.org/wiki/List_of_numerical_analysis_software
 
  • #3
Filip, I am aware of the limitations of Euler's method, I first chose it because it was the easiest to apply and for something such as the motion of a rocket, it isn't that inaccurate. I managed to get it to be somewhat stable by changing the time scale to 1/100 of a second, when doing that the problem becomes only apparent when the rocket reaches velocities lower than 40m-s, which is bad, but not as bad as it was before. I will try by switching to a high order Runge Kutta method and see how if it gets rid of the problem, I am pretty sure it will help a lot.

The purpose of the model is to determine how stable the rocket is with different fin configurations and to then feed the numbers (along with some random variations) to a program in order to test dead reckoning methods, it would make for a fun experiment and if I can get it to work I could port it into an arduino and try launching it ontop of a rocket. Before adding orientation into the picture I did exactly what you described and got some good results, around 10% accuracy compared to actual data from rocket launches, which is still what I am getting right now because the orientation problems only become apparent at apogee.

Im not really good with MATLAB, but I guess there is a time for everything, what resources would you recommend to a complete newbie with it? Excel on the other hand is a lot more intuitive, I understand exactly what I am doing, and having it in spreadsheet form, only caring about ifs and elses, also makes it a lot easier to spot my mistakes and correct them easily. I will look into numerical methods for stiff equations, I had no idea that was even a thing, I am sure I'll find something relevant to my model.

Anyways, thanks a lot man!
 
  • #4
I think you've got a stiff equation, but the other issue is that you're using Euler. You're using a first-order integration method and you've got double derivatives so I think you're compounding your error. Using RK4 might help some, but with stiff equations you might have to use an implicit method with an adaptive step size. Some simple systems I've tried to model for control system design became very unstable in simulation because the equation was stiff, but the values were fine for the system in reality (the simulation worked, but the step sizes were way too small to make the simulation useful for me). Using Simulink and Matlab's ode15 solver might help you out more than Excel. An upshot for using Matlab over Excel is that you don't have to worry that you've implemented your integration scheme wrong. :-)

Hope that helps!
 
  • #5


I appreciate your efforts to model the flight dynamics of a rocket and your willingness to share your work with others. It is important to note that numerical approximation is a useful tool in scientific research, but it is not a substitute for rigorous mathematical analysis and experimental validation.

In regards to the specific issue you are facing, it is possible that the oscillations and uncontrollable rotation you are observing in your model could be a result of using Euler's method. This method is known to introduce errors and may not accurately capture the complex dynamics of a rocket's motion. It is worth exploring the use of more advanced numerical methods, such as Runge-Kutta, to see if it can provide more accurate results.

Additionally, it is important to consider the physical principles that govern the flight dynamics of a rocket. As you mentioned, the fins play a crucial role in stabilizing the rocket and correcting its orientation. It may be beneficial to incorporate a more detailed analysis of the aerodynamics and forces acting on the rocket in your model.

I would also recommend comparing your numerical results with experimental data, if available, to validate your model. This can help identify any discrepancies and guide further improvements to your model.

Overall, your work is a valuable contribution to the understanding of rocket motion, but it is important to continue refining and validating your model to ensure accuracy and reliability. Keep up the good work and I wish you success in your research.
 

1. What is numerical approximation of a rocket's motion?

Numerical approximation of a rocket's motion is a mathematical method used to estimate the trajectory and movement of a rocket during flight. It involves breaking down complex equations into smaller, simpler calculations in order to simulate the rocket's motion over time.

2. Why is numerical approximation used for rocket motion?

Numerical approximation is used for rocket motion because the equations involved in calculating a rocket's trajectory and movement are often too complex to solve exactly. Numerical methods allow for more accurate and efficient calculations, making it a valuable tool for predicting a rocket's behavior during flight.

3. What factors are considered in numerical approximation of a rocket's motion?

In numerical approximation of a rocket's motion, factors such as the rocket's mass, thrust, air resistance, and gravity are taken into account. These factors are used to calculate the rocket's acceleration, velocity, and position over time.

4. How accurate is numerical approximation of a rocket's motion?

The accuracy of numerical approximation of a rocket's motion depends on the complexity of the equations used and the precision of the input data. In general, it can provide a good estimate of a rocket's trajectory and movement, but it may not account for all external factors that can affect the rocket's flight.

5. What are the limitations of numerical approximation for rocket motion?

One of the limitations of numerical approximation for rocket motion is that it assumes a constant acceleration, which may not be the case in real-life situations. It also does not account for external factors such as wind, turbulence, and changing atmospheric conditions. Additionally, the accuracy of the approximation may decrease over longer periods of time or for more complex rocket designs.

Similar threads

  • Differential Equations
Replies
1
Views
983
Replies
165
Views
4K
Replies
7
Views
127
  • Introductory Physics Homework Help
Replies
2
Views
222
  • Classical Physics
Replies
17
Views
2K
  • Special and General Relativity
Replies
4
Views
602
Replies
21
Views
1K
  • Introductory Physics Homework Help
Replies
1
Views
864
Replies
9
Views
2K
  • Classical Physics
Replies
3
Views
702
Back
Top