Saturday, December 03, 2011

The Tasks for a good simulator.

The LLC hovering vehicles were fairly simple to model. Fixed local frame of reference, constant air pressure, fixed magnetic dip and declination all in all slow enough that one could basically ignore air drag. One could model the vehicle dynamics using a simple unchanging world in Cartesian coordinates.

I've spent the last 2 years thinking about what it takes to build an orbital vehicle. A very rough first pass can be done with a simple how much delta V do you need. A more refined tradeoff needs a more refined model. Ultimately I'd like a full up hardware in the loop simulator that I can run full missions on. Writing such a simulator is a bit of a daunting task.

Just modeling the complexity of the "World" as you fly around it is non trivial. Starting with what reference frame do you use: Lat Lon altitude? , North East Down? Earth centered fixed. Earth centered Inertial? (Probably ECI what epoch J2000?)

A whole bunch of things that used to be fixed for the LLC simulator now change...
  • Gravity,
  • Atmospheric pressure.
  • Magnetic field strength, direction.
  • GPS constellation geometry.
  • Earth is not round.

One could refine the vehicle model with a simple 2D model of a spherical earth and launched from the equator, Yet there are questions that can't be answered without these details. Just one simple example, I plan to use a MEMS IMU, GPS and Magnetic sensor to keep track of the vehicle position and orientation. MEMS IMU's drift really bad (0.1deg per sec is typical for a mems gyro) A better Laser gyro is much much heavier.

This is correctable if you have a couple of outside references to keep things aligned. In aircraft its common to use gravity and magnetic field to "erect" the gyros keeping then aligned. On a spacecraft under thrust you can do it with GPS velocity an accelerometer and a 3D magnetic filed sensor. The accelerometer measureing thrust direction in a body frame is compared against the GPS measured acceleration in an absolute frame (Say ECF), In reality these two vectors measure the smae thing so these two vectors gives you one absolute orientation vector. The magnetic field gives you another. This will fully define the corrections you need to apply. If some where during your launch the magnetic field vector and the desired thrust vector align too closely then you really only have one reference vector and your orientation is ambiguous in roll around that one vector. You might say that orientation on that axis does not matter, and that would almost be true, but if the orientation changes from the desired trajectory and you want to correct back or close the loop, you must have a full orientation solution to steer the rocket.

So do they ever align? I have absolutely no idea. Does this mean I'm limited to picking only certain orbits? Maybe? When the rocket stops thrusting and coasts I loose my orientation again, can I start thrusting for a circulization burn and learn my orientation quickly or is it more efficent to steer into a direct injection orbit with no circularzation burn.

Doing a direct injection burn has a delta V penalty, is this penalty larger or smaller than the hardware weight cost to have the 3rd stage motor restart? Is the find my orientaion with quick thrusting penalty in delta V greater or less than the mass penalty for a simple sun sensor, or tine CMOS start tracker? Inquiring minds want to know. The whole conceptual rocket has way too many knobs.

Beyond modeling the world you have to model the vehicle and its systems. Tanks, valves, actuators, pressurization systems, rocket motors, thrust vector control, atmosphere drag, aerodynamic moments, areo and solar heating etc.. etc...

Trying to organize this monster project into a modular individually testable coding campaign is quite daunting.


Jon Berndt said...

Sounds like fun!

Ed LeBouthillier said...

There are two interesting open source simulators that might be worth checking out.

The first is OpenRocket []. It provides pretty good in-atmosphere flight simulation.

The other is Moon2.0 []. It looks like it could be useful with some modification.

Ed LeBouthillier said...

Also, there's "Modeling and Simulation of Aerospace Vehicle Dynamics" [] which also includes source code for simulators. Again, there would need to be modification for the kind of simulator you want/need.

Patrick M said...

There is a realistic spaceflight simulator call Orbiter that might work.

It supposedly has a pretty good atmosphere model and non spherical gravity.

Ian said...


Using GPS with a filter should give you a decent estimate of the roll angle. This is the case because an error in the roll angle will propagate to errors in lateral motion which can be observed by the GPS. It's not huge and it certainly doesn't work while you are in the pad not moving, but it works well as soon as you start moving.

BTW the book Ed recommends is excellent. One of my top 5 engineering books (right there with Sidi, Vallado, Wie...)


Glacial Wanderer said...

I don't understand why you can use acceleration as a reference to recalibrate your gyros, maybe you could explain this a little?

Maybe you could use less traditional methods of recalibration like image recognition with the ground or micro probes with their own accelerometers and gyros that can be detached from the main module with know acceleration.

Paul Breed said...

GPS measures Doppler velocity to each satellite as part of the solution.

The difference between successive readings is acceleration, given as a full 3D vector, to this you add the gravity acceleration from the earth.

The Accelerometers also measure acceleration as a full 3d vector.
once you add the earth gravity to the GPS measured acceleration they actually measure the same acceleration.

Now if your gyros that give you orientation have drifted these two acceleration vectors will no longer point in the same direction, since they are actually the same quantity you can use this difference to correct your orientation.

The artificial horizon on aircraft do this with uncorrected gravity as the time constant of correction is longer than the longest expected banked turn. If you set up to do a continuous banked turn for a long enough period of time the artificial horizon in most aircraft will level out, even though you are still in a bank.

Charles Pooley said...

Really need a simulator?

I do not think you need a simulator at all. A launcher can be designed so the first stage takes the upper stage(s) to vacuum at 60 km or so, and use a separate calculation for the ascent of the vacuum operating portion.

For Microlaunchers, whether the N Prize entry outlined April 2009:

(see slide 6): ,

or an entry for the Nano-Satellite Challenge can be very simple, "crash proof", with no GPS or real time computation involvement.

Note that much of the problems experienced by John Carmack, Paul, Masten required much work, tests related to complex "flying computer" approach.

The first stage is to ascend nearly vertically and be followed by a TV camera near the launch pad and be manually kept in the center of the image. Math for the ascent would be in Cartesian coordinates, and to take the stage to pre-planned velocity, altitude.

Then upper stages to use the simple 2 accelerometer, optical sensor and polar coordinates to complete the ascent. For orbit, the horizontal (tangental) component is to reach orbital velocity a few seconds after the radial component has been stabilized at zero at the intended orbit altitude (direct ascent to 200 km).

For escape, the 3rd stage would accelerate at a small pitch angle so that if escape is not reached, the stage would reenter.

No gyros are needed in principal, though MEMS types might be used for the steering servo loops. The drift characteristics of these are ok for that.

The 2 accelerometers can be calibrated MEMS type--calibration done with a centrifuge over the acceleration range to be encountered. A look-up table or content addressed memory would contain the corrections and the temperature dependence.

The ascent profile can be in flash RAM.

The azimuth for the intended orbit or ascent plane is not very critical, so a sun sensor (sun will never be directly overhead), or magnetic sensor should be accurate to a few degrees.

dave w said...

I've seen some pretty compact/lightweight fiber optic gyros from KVH - prices seem down to the "not absolutely impossible" range in the context of an orbital system (~$4000 for a single channel unit, quoted about a year ago, IIRC: not -quite- in the "go ahead and buy one to play with" range for me at the moment, but not more than an order of magnitude out of it!)
I don't remember the specific drift figures, but I believe they're noticeably better than the usual MEMS performance.

Anonymous said...

For 3 axis gyro ( , taken for example) the quoted price is $12,400 plus S/H. Not cheap, but, as was said, for an orbital launcher it may be considered.

Paul Breed said...

That fiber gyro has bias stability of 0.002 deg per sec.
for a 15 minute ride to orbit that's:
2 degrees.

Then a burn half way around
Could be off 8 degrees...
Combined with GPS that is close

The best MEMS gyro I've seen is:

Bias stability 6.2 degrees and
hour wityh G effect of 0.009 deg/sec/g So a Six 6 steady acceleration would give you an error 27 times the Fiber unit.

Yet you are aqlso trading 3Watts and 300gm for the fiber unit, the mems unit is <1W and <100gm.

Charles Pooley said...

"...fiber gyro has bias stability of 0.002 deg per sec.
for a 15 minute ride to orbit that's: 2 degrees."

An optical horizon sensor will not drift at all. It will give an absolute indication to 1/10 degree or so.

If a 2 burn ascent is needed, they could be 90 degrees apart so both burns could be over the daytime Earth.

For the Nano Satellite Challenge a 200 km altitude can be a direct ascent and will last long enough.

There is a sharp deep blue transition to black at the top of the atmosphere that is only a few km thick, and that will be 1200 km distant at 200 km altitude.

dave w said...

Check out the KVH DSP-1750: .05 degree/hour for the digital version, 2 deg/hour for the analog-output type:

heroineworshipper said...

Orbiter represents everything as XYZ coordinates & only defines an orbit was whatever stays outside the Earth's radius in meters. All orbiting simulations do is solve Newton's equations with 1 point being the center of the Earth. A number of points are the mass, thrust, & aerodynamic drag of the rocket. The laws of motion automatically produce all the normal trajectories in the XYZ coordinate system.

Thought it was fascinating that a vehicle with a thrust, mass, aerodynamic drag, & gravity acting on it would always enter an orbit when the basic laws of motion were stepped through time.

All the talk of gyros reminded me that Sparkfun is no longer producing single axis gyro boards.

Paul Breed said...

How do you test and develop the horizon sensor on the ground?

Charles Pooley said...

How do you test and develop the horizon sensor on the ground?
6:04 AM
At first, testing in office/lab with a blue LED source to see it track the position while observing the servo drive signal (analog) with a scope. With a step in position done by switching between 2 LEDs at a small distance apart, to see that servo tracking is stable.

Then, with 2 or 3 LEDs on the walls to simulate sensing the horizon in 2 opposite directions and the third 90 degrees away, simulate the "look down" angle by raising the unit above the plane defined by the 3 LEDs. (by odd coincidence, the look down angle is about the square root of altitude in km).

In flight, 2 sensors see to right and left of the trajectory and the 3rd either ahead or aft, depending on front or rear position mounting of the sensor. The tilt range needs to be about + 25 to about
- 0.5 degrees to accommodate the range of pitch up angle during upper stages ascent to orbit/escape. The function of look down angle with time would be calculated, loaded into flash RAM for a flight, using minimal or no in-flight computation.

The sensors are not yet decided right now, but are to be either discrete PIN silicon diodes, or a prism or mirror arrangement to have a monochrome video camera sample the 3 directions. Use of a camera makes possible the omission of a fine-pointing leveling servo by sensing the horizon positions in the camera image. A blue or near UV filter would be used to emphasize the upper atmosphere/ground contrast,

A course pointing servo could be done by a model plane servo, which weigh as little as 2.5 grams.

The balance, insensitivity to acceleration would be tested by tilting, accelerating horizontally in the lab.

The sensor will carry 2 accelerometers which would be calibrated by use of tilting for <1 g and a centrifuge for >1 g. The raw reading would be fed to a look-up table or CAM in a flash RAM.

sworkeld said...

"The Apollo Guidance Computer: Architecture and Operation" by Frank O'Brien appears to contain information that may be useful for designing your guidance system - the other side of the (simulator) coin.


sworkeld said...

NASA has multiple open source simulation tool kits that could save you much time in building your own simulator. Check out ..

GSFC Open Source Software
NASA Open Source Projects

For spacecraft simulation there is:
Java Astrodynamics Toolkit (JAT)

For space trajectories there is:
General Mission Analysis Tool (GMAT)

For autonomous rovers there is:
Mission Simulation Facility (MSF)


Anonymous said...

@Charles Pooley, If you want to crash a significant number of rockets and waste money then by all means, feel free to ignore simulators. They are boring and require that you know something about software. Gee. We don't want that.

@Paul, for that matter. I remember you openly dismissing sims before. What changed?

~joe bomdiggity

Ed LeBouthillier said...

I just remembered another good overall source of information on simulators. The POST (Program to Optimize Simulated Trajectory) manuals have a good, detailed breakdown of the math related to simulation. You may want to check them out:

Program to Optimize Simulated Trajectories (POST). Volume 1: Formulation manual [4.7M PDF]

Six-degree-of-freedom program to optimize simulated trajectories (6D POST). Volume 1: Formulation manual [3.8M PDF]

These all use standardized vector and matrix representations....

gravityloss said...

I know the guy who started the whole openrocket thing. It's open source and in Java so should be quite portable and extendable.

It was used to simulate the flight of Haisunäätä and develop control software for it. (Only roll control with one fin aileron at the moment.)
I don't think they had hardware in the loop yet. It's part of SATS (Finnish astronautical society) activity.

They were going to launch it again today, don't know the news yet!

sports handicapping software said...

Hi, nice post. I have been wondering about this topic,so thanks for sharing. I will certainly be subscribing to your blog.

Fishing Costa Rica said...


best wallet tool online said...

You’ve got some interesting points in this article. I would have never considered any of these if I didn’t come across this. Thanks!best wallet tool online

awareness life corporation said...

I am currently teaching a class and part of the curriculum involves this subject matter. Do you have any other posts I can look at regarding thisawareness life corporation

Earn Online High School Diploma said...

I am happy to seek out this post terribly helpful on behalf of me, because it contains lot of data. I forever rather to read the excellent quality content and this thing I found in your website. Thanks a lot for sharing.

Visit: Earn Online High School Diploma

GED Online Test said...

Great Post! It’s a watch gap to all and I’m a great deal appreciative that she wrote her expertise for us to let recognize them severally.

Pusat Les Privat said...

This is really wonderful website. If you need this guru Les privat di Surabaya and guru les privat ke rumah di Surabaya and also Les privat guru ke rumah siswa di Jogja and also you can find this sewa mobil di Pare and ojek dan rental motor di Pare kampung inggris and
rental motor dan ojek di Pare Kediri and
Kursus Bahasa Inggris di Pare Kediri

High School Diploma Online said...

Very informative post I should be adopt your instructions.

Shubham said...

memorial day quotes
happy memorial day quotes wishes poems songs
happy memorial day quotes wishes poems songs
Happy Fathers Day quotes poems songs images wallpapers
Happy Fathers Day quotes poems songs images wallpapers
Happy Fathers Day Poems For Dad
Anti fathers day saying
memorial day speeche by barak obama
celebrate happy memorial day 2015 in usa

shubham sapkal said...

Bigg Boss season 9 live feeds
Bigg Boss 9 Contestants name list
bigg boss 9 season starting date 2015
bigg boss 9 starting date 2015

Lili Wang said...

michael kors handbags
michael kors outlet
oakley sunglasses
coach outlet
hollister clothing store
abercrombie store
coach outlet
louis vuitton handbags
timberland boots
soccer jerseys
coach factory outlet
cheap ray bans
louis vuitton outlet
cheap oakley sunglasses
kate spade handbags
burberry outlet
louis vuitton
oakley sunglasses
michael kors outlet
retro jordans
coach factory outlet
christian louboutin
caoch outlet
cheap jerseys
gucci outlet online
gucci outlet
mulberry uk

Unknown said...

coach bags
coach factorty outlet online
true religion outlet
coach outlet
fitflop outlet
louis vuitton outlet
michael kors outlet online
timberland outlet
ray ban aviators
pandora jewelry
abercrombie and fitch
air max shoes
coach factory online
prada bags
ray ban glasses
coach outlet store online
cheap toms shoes
ray ban sunglasses
timberland boots
michael kors outlet
jordan 11
jordan 3 retro
michael kors
abercrombie fitch
coach outlet
christian louboutin outlet
michael kors
coach outlet online
jordan retro 11
burberry bags
timberland canada
michael kors outlet
coach outlet online
cheap ray bans
louis vuitton

paper writing service essayjedii said...

Your content is extremely educational! Looking at your work has enlightened me. Discovered a lot from it. I will bookmark your website and will consistently read your future posts. Thanks!

Amit Kumar said...

Prem Ratan Dhan Payo Box Office Collection
Prem Ratan Dhan Payo First Day Box Office Collection
First Day Box Office Collection of Prem Ratan Dhan Payo
Total Box Office Collection of Prem Ratan Dhan Payo
Prem Ratan Dhan Payo Box Office Collection Reports
Prem Ratan Dhan Payo 1st day Box Office Collection
1st Day Box Office Collection of Prem Ratan Dhan Payo
Prem Ratan Dhan Payo Opening Day Box Office Collection
Opening Day Box Office Collection of Prem Ratan Dhan Payo
2nd Day Box Office Collection Prem Ratan Dhan Payo
Expected Prem Ratan Dhan Payo 2nd Day Box Office Collection
Prem Ratan Dhan Payo 2nd Day Box Office Collection
Prem Ratan Dhan Payo Weekend Box Office Collection
Prem Ratan Dhan Payo Box Office Collection
Prem Ratan Dhan Payo 1st day Box Office Collection Preditcion
Prem Ratan Dhan Payo 1st Day Box Office Collection
Prem Ratan Dhan Payo 1st Day Collection
Prem Ratan Dhan Payo Box Office Collection Prediction
Predicted box office collection of prem ratan dhan payo
Prem Ratan Dhan Payo HD Trailer in 720p
Watch Online Prem Ratan Dhan Payo HD Trailer
HD Trailer of Prem Ratan Dhan Payo movie

Amit Kumar said...

Happy Diwali 2015 Quotes
Happy Diwali 2015 Wishes for Friends
Happy Diwali Best Whatsapp Status
Happy Diwali SMS Messages for Relatives
Happy Diwali 2015
Happy Diwali Profile Pictures Whatsapp DP

Happy Diwali Profile Pictures Whatsapp DP
Happy Diwali Images 2015
Happy Diwali Greetings 2015
Happy Diwali Greeting cards
Happy Diwali 2015 best greeting cards
Happy Diwali funny images & Pictures
Happy Diwali Profile Pictures for Facebook DP
Happy Thanksgiving day 2015

Amit Kumar said...

Happy thanksgiving quotes
thanksgiving quotes for family
thanksgiving day quotes
funny thanksgiving quotes
thanksgiving inspirational quotes
short thanksgiving quotes
famous thanksgiving quotes
thanksgiving quotes funny
thanksgiving wishes quotes
religious thanksgiving quotes
cute thanksgiving quotes
thanksgiving quotes inspirational
thanksgiving quotes for kids
thanksgiving sayings quotes
thanksgiving quotes for friends
thanksgiving funny quotes
charlie brown thanksgiving quotes
thanksgiving thoughts quotes
good thanksgiving quotes
humorous thanksgiving quotes
thanksgiving quotes business
funny happy thanksgiving quotes
christian thanksgiving quotes
inspirational thanksgiving quotes
thanksgiving quotes for clients
thanksgiving quotes and sayings

Amit Kumar said...

happy halloween images
happy halloween images 2015
scary halloween images
free halloween images
funny halloween images
halloween image 2015
halloween images for kids
halloween images to print
halloween images free
halloween pictures images
halloween images free download
halloween birthday images
halloween cat images
vintage halloween images
halloween clipart
halloween background images
halloween pumpkin images
halloween costume ideas
sexy halloween costume ideas
funny halloween costume ideas
homemade halloween costume ideas
good halloween costume ideas
couples halloween costume ideas
cheap halloween costume ideas
unique halloween costume ideas
adult halloween costume ideas
mens halloween costume ideas

Amit Kumar said...

halloween costumes images
animated halloween images
happy halloween images free
happy halloween pictures
happy halloween photos
halloween wallpaper free
happy halloween backgrounds
happy halloween desktop wallpaper
cute happy halloween wallpaper
funny happy halloween pictures
happy halloween hd wallpaper
halloween pictures wallpaper
halloween wallpaper
free halloween wallpaper
cute halloween wallpapers
scary halloween wallpapers
halloween desktop wallpaper
halloween wallpapers free
animated halloween wallpapers
halloween wallpaper images
halloween wallpapers for desktop
halloween wallpaper backgrounds
spooky halloween wallpapers
halloween costume ideas for kids
halloween costume ideas kids
halloween costume ideas
kids halloween costume ideas
scary halloween costume ideas for kids

Amit Kumar said...

Merry Christmas Wishes, Quotes, Messages 2015
Happy New year 2016 best sms, wishes, quotes
Merry Christmas and Happy New year 2016 sms, wishes, sms,
Happy Merry Christmas Wishes 2015
Unique Merry Christmas Wishes SMS 2016
Best Merry X mas wishes quotes with images 2015
Happy Merry Christmas Images 2015
Merry Christmas Images with Saying in HD
Merry Christmas HD Celebration Images
Happy New Year 2016 Wishes
Best happy New year wishe with images
wishes for happy new year 2016
Happy New Year 2016 HD Wallpapers
Happy New year wallpapers for free download
Happy New year 2016 hd wallpapers with saying

Amit Yadav said...

valentine day wishes
valentines message for wife
valentines poems for boyfriend
valenines poems for girlfriend
valentines message for girlfriend

distributor jaket Kulit said...

sharing a new experience for us all by providing articles of interest thanks admin distributor jaket kulit

BiggBoss8 Winner said...

Short Fathers Day Poems
Father Son Quotes
Sultan Worldwide Collection
Raees Worldwide Collection
Independence Day 2016
AIPMT Result
SSC Result 2016
Raksha Bandhan Brother Sister Images
Eid Mubarak Shayari
Bigg Boss Season 10 Starting Date
best friendship day quotes
Bigg Boss 10 Winner leaked

Ramadan Mubarak said...

rent luxury car dubai
Luxury Car Rental Dubai at best price
Hire or rent Luxury Cars like Lamborghini
rent luxury cars in dubai