Simulink:Aerospace 6 DoF Model Singularity with High Altitudes

16 views (last 30 days)
I am using the "Simple Variable Mass 6DoF ECEF (Quaternion)" for a rocket model and everything is working great and as expected, except when the altitude (h) exceeds a certain value (around 180,000 meters). I end up getting an error:
"Derivative input 1 of 'LV01/Simple Variable Mass 6DoF ECEF (Quaternion)/Calculate Velocity in Body Axes/ub,vb,wb' at time 0 is Inf or NaN. Stopping simulation. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)."
Any ideas? I'm kind of stuck since I need to get up to around 500 km. I couldn't find anything that discussed limitations on with the model. Maybe there is another more appropriate model to use?

Answers (3)

Guy Rouleau
Guy Rouleau on 28 Aug 2013
I do not think it is because of high altitude. Based on the subsystem where the error happens shown in the screenshot, it looks like your body starts spinning infinitely fast.
Try logging data and analyzing how the states in your model evolve. Maybe Simulink debugger can help analyzing in finer details what happen just before the end.
For this kind of situation, there is typically no other solution than looking at all the details in your model to get better understanding of the system you are trying to model.

JSL
JSL on 28 Aug 2013
I've logged the data and everything looks good up until that point. At first I didn't think it had to do with the altitude since it occurred in the "Calculate Velocity in Body Axes" block, but the altitude was the only consistent thing.
I also applied zero inputs (body forces = body moments = [0 0 0]) with zero initial conditions EXCEPT for the altitude which I varied. Simulation ran fine up until I got above that certain altitude then it would fail right away. Now in this case, I know the body isn't spinning.
I'll keep messing with it. Hopefully zero in on exactly what is causing it.

JSL
JSL on 28 Aug 2013
Well, I discovered the root of my problem. So I am using the COESA Atmosphere Model for my air density which is used in my aerodynamic force and moment calculations. The atmosphere model is good up to 84852 meters; after that the data is extrapolated. I think what is happening is that as the density goes to zero, the extrapolation is causing problems.
If I eliminate the atmosphere model and just input a constant air density (e.g. 0.2 kg/m^3), all is well.
Now what is really weird is that if I saturate the density coming out of the atmosphere model to a value above zero (e.g. 0.2 kg/m^3), you would think that would solve my problem since I am keeping it away from zero, right? Wrong. It still fails at the same altitude even though my data shows my density stays at a constant 0.2 kg/m^3. Weird.
I switched to the ISA Atmosphere Model and my simulation runs without problems, however, the model saturates at around 0.1 kg/m^3 instead of going to zero like it should.
I'm just going to make my own air density block and that should solve my issues.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!