Unlimited PSP Downloads


Google Search

Login & Blog Feeds

Blogroll

Recent Comments

Archives

Categories

20th November 2008

Monte Carlo Runs

For work I’ve been asked to run a Monte Carlo analysis.  The analysis is one where I vary a large set of parameters in a large Simulink simulation.  Any given simulation will take between 40 minutes and a few hours.  So obivously generating thousands of runs with a single computer would take months.

In the lead up to this analysis I asked a few questions.  First, I found a bank of parallel computing resources at work.  I asked them if it was possible and the answer was “Yes” with my take away being that it was doable and easy.  It may be doable, it is not easy.  Second, I went to Mathworks training (on modeling for aerospace system which had a session on parallel computing) and asked some questions about how to run parallel operations.  I also left this session thinking it would be easy.

The online help is worthless

When you are running a model of any complexity there are a lot of parameters to set.  If you are building models correctly you will be setting these parameters via variables not hard coding.  This means that the simulation workspace must have all those variables.

The Mathworks help with regard to the Parallel Toolbox and Simulink simulations is pretty meager.  One of the easiest means of distributing the simulation is through the use of the parfor keyword instead of the for keyword.  The meager help suggests that simulation must be run from within a function because parfor requires a static workspace and Simulink creates variables in whatever workspace it runs from.  So the help suggests using a dummy function as a wrapper for the sim command.

The help forgets to mention that running a simulation from a function’s workspace is simple - once you find that help but finding that help was a little buried.  (If you want to know how look up the simset function and the SrcWorkspace and DstWorkspace properties.)  I have run several simulations from within a function’s workspace on a single PC.  However, doing so from within a dummy function called from a parfor loop doesn’t work like it does from a single PC.  And the error messages are obtuse.

Obtuse Error Messages

I spent days attempting to get the simulations distributed to the various nodes.  The error messages provided at this stage were reasonably straight forward.  However, once the simulation was distributed to the nodes the error became far less useful.  The first couple of times there was no obvious error.  After digging through a long log file a cowroker found the errors and helped me fix them.  That said, I think they were listed as warnings in the log file not errors.

Next Post:  What finally appears to have worked

16th November 2008

No one cares about nuclear power once it’s in space.  Only on it’s way to space.

Radioactive Contamination

Nuclear power in space comes from an RTG (Radioisotope Thermoelectric Generator).  The RTG is powered by a radioactive isotope.  The isotope decays and produces heat in its decay.  That heat produces electricity through the use of thermocouples.

For space harware, the main threat from an RTG is that explosive destruction of the hardware containing the radioactive material would spread radioactive material.  The RTG containers are designed to survive this type of event so the odds of contamination are small.

What happens when the container is destroyed…

If the container were to break up the estimated odds of contamination are 1 in 10.  The alpha radiation that the most common RTG fuel cannot penetrate the skin but if it were inhaled it would do serious damage to internal organs.

There were protests when Cassini launched…

People were scared that if the Cassini launch failed then the radioactive fuel would find its way into the atmosphere and people would inhale it.  While this shouldn’t be taken lightly the launches are generally conducted over the ocean.  The winds in the atmosphere may disperse the radioactive material.

Obviously if the launch vehicle travels through all of the atmosphere it is unlikely that we can wait for a launch window where all of the prevailing winds are blowing out to sea.  This dispersion shouldn’t be taken lightly but understand that the fuel most US satellites use is only a problem when inhaled or ingested.  If the particles fall in the sea or on the land then it poses no threat - to people.

14th November 2008

Basics of an RTG

An RTG is a Radioisotope Thermoelectric Generator.  Essentially these radioactive isotopes decay to more stable atoms.  As the isotopes decay they give off heat and that heat is converted to electricity.  The conversion to electricity is done using thermocouples.

An RTG is used on space craft instead of solar panels when the mission is very long or to an outer planet where the light energy provided by the sun is too weak (low density).  The Voyager and Cassini missions used RTGs.

Benefits of an RTG

For space the benfits of an RTG are obvious.

  1. Long term power (in the range of hundreds of watts)
  2. No moving parts - like solar arrays that have open up after launch
  3. Degradation of output power happens but much slower than with solar panels

These advantages lead to a stable power source capable of operating for decades in extreme environments.

Fuel Source

From Wikipedia:

Plutonium-238curium-244 and strontium-90 are the most often cited candidate isotopes, but other isotopes such as polonium-210promethium-147caesium-137cerium-144ruthenium-106cobalt-60curium-242and thulium isotopes have also been studied. Of the above, 238Pu has the lowest shielding requirements and longest half-life. Only three candidate isotopes meet the last criterion (not all are listed above) and need less than 25 mm of lead shielding to control unwanted radiation. 238Pu (the best of these three) needs less than 2.5 mm, and in many cases no shielding is needed in a 238Pu RTG, as the casing itself is adequate.

238Pu has become the most widely used fuel for RTGs, in the form of plutonium(IV) oxide (PuO2). 238Pu has a half-life of 87.7 years, reasonable energy density and exceptionally low gamma and neutron radiation levels.

The criteria leading these choices of fuels are

  1. Must have a half-life short enough that its decay produces substantial heat
  2. Must ahve a half-life long enough that the heat generated is relatively stable for decades
  3. For space, the energy output per density must be high
  4. The radiation produced should be high energy with low penetration - preferably alpha-radiation - so that shielding can be minimal

Next post: Why people are scared.

    Post tags: ,

    11th November 2008

    This time Phoenix stays dead…

    Where the Phoenix lander is on Mars it’s winter.  Phoenix ran out of power recently.  The 2 rovers, Spirit and Opportunity, have to fight for their own survival every Martian winter.  Why?  Because they use solar arrays.  Solar arrays that degrade with time.  Solar arrays that degrade with the deposition of dust.  Solar arrays that don’t produce much power when the Sun isn’t very high in the sky.

    Power constraints have hampered interplanetary probes in the past.  The problem is that once a probe gets out near Jupiter there just isn’t enough sun light to do much.  Even large arrays can’t entirely overcome the problem of “not enough light”.

    We have $100 million missions that end because of power

    We have missions to Mars and Jupiter and beyond.  Some like Cassini use nuclear power.  Others use solar power.  Some missions, like Phoenix, have ended not because of mechanical failure, communications failure, or a lack of good science that still needs doing but because they have too little power.

    A lack of power has not stopped the Voyager missions decades after their launch.  A lack of power doesn’t need to kill or maim anymore Mars missions.  A Radioisotope Thermoelectric Generator (RTG) is the answer.

    Next post: What is an RTG?

    Next Next post: Why people are scared.

    05th November 2008

    I’m sorry for not posting this week.  I’ve been buried at work and I’ve picked up so many little web projects lately that I’ve spread myself too thin.

    With any luck I’ll get back to posting 2 or 3 times a week next week.

    I could use some help so I’d welcome any guest posters out there who know their stuff in controls or engineering in general.  I welcome any industry or academic experience.  I’d like the site to reflect more than just my own experiences.

    Thanks for your patience.

    Post tags:

    30th October 2008

    Brain Drain

    For decades now the US has been the place for the best and brightest from other countries to study.  I sizable chunk decide to stay especially in engineering.  As a result when various companies and the US gov decided they needed more engineers they simply imported them.

    God forbid we

    1. actually pay and treat engineers like they are professionals
    2. give them something to do other than shuffle paper work and dodge management

    And yet some people still lamented the lack of native born engineers graduating from our schools.  Some were so blind as to wonder why so few were graduating.

    Well it’s time to start paying the bill…

    India’s Space Program

    A large chunk of our imported engineers come from India.  Often they come here because opportunities are limited in India for people born to the wrong caste.  So the people that can get to the US come over, study engineering, and stay.  But it is harder and harder for them to get jobs in Aerospace since most of the Aerospace companies have chosen to pursue defense work.

    Now India has started its own space program while the US program slowly decays.  A number of those Indian engineers that stayed here are asking if there are jobs in their home country working on the space program.

    The economy in the US is tanking making jobs harder to come by.  The US space program and surrounding Aerospace industry is less welcoming than it used to be.  And many would like to go home if they can find good job opportunities.

    Reverse Brain Drain

    The emerging space programs of China and India are a serious threat to the US technological superiority.  It may be years before the programs show a string of years with real funding and enthusiasm at home.  However, once those programs are established a much larger percentage of those foreign born engineers that come here to study will go back home when they are finished.

    We will have fewer engineers in the coming years.  Without something inspirational to bring native US kids back into engineering it will only get worse.  I’ve complained about the pay and nature of the business where companies lay off large numbers of people every time their sales hiccup for a quarter but that’s not really the problem.

    We can’t keep expecting to drain the brains of India and China

    The problem is a lack of inspiration and vision.  As India and China demonstrate space programs that are a point of national pride they will become a more and more appealing career prospect.   As such it will become harder and harder to keep young foreign born engineers from going back to their country of origin.  However, the US lacks any serious goal for aspiring engineers to tackle.

    There are inspirations out there, just no one with vision AND money

    I’m a fan of space exploration and I think serious exploration - not just toy cars on Mars - would inspire.  But so would serious nano-tech, artificial intelligence, robotics (like Honda’s Asimo), alternative energy, and several other fields.

    Instead we have risk averse companies who have reduced their R&D to incremental improvement shops.  The gov is just as risk averse and every satellite/R&D program is just 1 baby step better than the last.  In Aerospace the holy grail is propulsion.  In propulsion we’ve barely invented the wheel let alone an automobile.  Until the X-Prize was won almost no company spent any money on even incrementally better propulsion.  Even today the total dollar amount is a pittance.

    If we want to continue to lead the world in technology (and by extension the world economy) then we need to get serious.  We need to choose 1 or 2 major project that can change everything - like alternative energy, Sci-Fi style propulsion, etc.  We need to get serious about real basic scientific research and serious engineering R&D.  You don’t make great leaps forward with risk averse baby steps.

    Thankfully there’s at least DARPA, if only we could get about 1000 more of those going…

    Here’s the article that inspired this rant:

    Source Article

    26th October 2008

    Design Projects

    The rest of this post will reference engineering school projects.  However, I believe that most of this is also valid to open ended real world projects.

    Many engineering schools require semester design projects.  The design project’s goal is to demonstrate to your professor that you learned the key opints of the class.  Typically, demonstrating these core competencies requires being more explicit and thorough in your analyses than you are naturally inclined to be.

    The biggest mistake most people make is to assume the “real” work comes late in the process.  It doesn’t the real work in any successful project is done up front.  Serious effort must be given to the choice of projects.  Even more thought and effort must be put into determining the essence and purpose of the project.  The rest of this post will explore this further.

    Design Project - the purpose…

    The purpose of any design project is the design of a product which can manufactuered.  But what is the real purpose of the end product?

    One common mistake is to assume that your end product must be everything to everyone.  For example, in my senior design project (years and years ago) we designed hardware to help movie studios move their sets around the studio more safely and with fewer people.  The first inclination for the group was to design the hardware be able to move any set the studio might build.

    Ultimately this turned out to be ridiculous.  We couldn’t levy requirements back on the studio so we couldn’t keep the studio from attaching delicate items to the set right where we needed our clamps to grab the set.  The end result being that we had to scale back our ambitions such that we were capable of picking up the majority of the sets.

    A more subtle mistake, related to this one, is that if 90% of the sets were less than 400 lbs but the remaining 10% could be as heavy as 1000 lbs do you let the 1000 lb sets drive the design?  The answer most of the time is no.

    This is why determining the essence of a project is so important.  In industry this is why is takes months to write requirements.  The cost of a design can be driven up and up by any single requirement.  Obviously you’d like to avoid having the cost of the design be driven by a requirement that doesn’t need to be as demanding as it is.  In other words, do you really design hardware to meet the 1000 lb sets if hardware to move 400 lb sets is half as expensive?  or requires half as much analysis?

    The lesson…

    The lesson in all of this is to boil down the project to its essence.  The previous examples essence was the ability to move most sets more safely with only a couple of people instead of the previous ten.

    Since the essence is most sets not all sets we were able to keep the design simple with C-clampes, square tube frame aluminum, and a manually operated jack for lifting the set.  Had our design required the ability to lift 1000 lb sets then we would have need to design the hardware with an electric jack instead of a manual jack.  We also would have had to add twice as many C-clamps meaning twice as many attachment points.

    If the design had been for all sets such that we had to avoid delicate parts of the set then we also would have needed to design the hardware with a telescopic arm for the C-clamps.  This would have required a wholesale change to the design for allowing the telescopic positioning and then fastening down those telescopic attachment points.

    Post tags: ,

    23rd October 2008

    Electro-Optical Sensors

    Electro-Optical (EO) sensors are used in a wide variety of satellite applications.  EO sensors take light energy and turn it into electrical energy.  There are a variety of sensors that do this.  Some image while other provide the centroid of a spot of light.

    Scientific imaging is largely done with CCDs.  FPAs can fill the same role as CCDs with many advantages (such as less noise and therefore sensitivity to lower signal levels).  However, fewer people have experience with FPAs the engineering community than CCDs.  Also (I believe) FPAs are more expensive.

    LECs and Quad Cells are typically used as position sensors.  LECs use a single photodiode with 4 electrical pickoffs to return the centroid of a spot.  Quad cells use 4 photodiodes each with 1 electical pickoff for centering applications and centroiding applications.  Each sensor returns 4 voltages/currents which are used to calculate the centroid.

    Note that for a Quad cell to provide fine resolution centroid information the light spot must be “large” compared to the sensor itself.  A tight light beam (like a laser) creates a small spot and the only information returned is the quadrant where the light is.  A broad light beam where the spot occupies 50% of the sensor face, for example, will create signals from all 4 quadrants for a centroid calculation.

    For more information see the Electro-Optical Sensors article on the wiki.

    19th October 2008

    The argument among space enthusiasts…

    Space exploration funds are very limited and have been for decades.  I haven’t worked onsite at NASA for years but the last number I remember is something like $15B for NASA’s annual budget.  This sounds like a lot but with the better part of $1B devoted to each Shuttle launch $15B doesn’t last long.

    So the classic argument among space enthusiasts is should we bother with human space flight?  It’s far more expensive than robotic space exploration.  Can humans bring enough extra to the mission that it is worth the extra expense and risk?

    The risks of human space flight

    The most obvious risk to manned space flight is a fiery and most spectacular death.  It is most likely to happen on launch or re-entry.  If we start landing on the surface of other planets then that landing will be risky as will any surface exploration.

    When we lose a space vehicle meant for manned space flight we lose people and an extremely expensive vehicle.  The people, at least to date, are very well trained, very intelligent people.  Often they have PhDs in engineering and years if not decades of training.  The vehicle is extraordinarily expensive because of its ability to support human life in space for any significant time duration.  Additionally, there are redundant systems and user interfaces.

    Robotics, the cheap and (largely) risk free way to explore space

    Robots are cheap.  Robots that are lost in exploration don’t have crying widows; there is no lost human potential.  And robots like Spirit and Opportunity offer glimpses into greatness.  Robots designed to survive months have run around the planet for years despite “injuries” and degraded solar panel performance.

    I don’t think proper space exploration can be done without robots.  They allow us to explore without risk to human life.  They provide us with information beyond our own senses.  We spend billions of dollars to send people without spending an extra couple of hundred million on support robots?

    Robots are essential but exploration with robots alone misses the point

    If I had my druthers I’d work on rovers like Spirit and Opportunity.  I’d work on adding lots and lots of artificial intelligence to them.  How much more area would Spirit and Opportunity cover with smart fault detection and robust automatic use of remaining resources?  How much more area if we could say go here and leave the obstacle avoidance to the rover rather than having to move it a little at a time and wait for the time lag of signals coming back from Mars?

    The purpose of exploration is the expansion of the human spirit.  Economically we make exploit the resources of the lands we explore.  From a survival standpoint the farther we spread the less likely we are to be wiped out by war, an asteroid or plague.  Exploring with robots alone doesn’t accomplish any of this.

    16th October 2008

    MEMS Gyro models

    MEMS gyroscopes are becoming common in Aerospace systems.  They are small, low power sensors accurate in frequency ranges good for Aerospace applications.  Often, MEMS gyros are the only sensors commerically available that provides the necessary frequency response, mass, power and environmental.

    I’ve found 2 types of MEMS gyro modeling.  Both of these modeling types are for the design of the MEMS gyro.  A MEMS gyro sensor requires design of some key parameters - resonant frequency, driving frequency, and quality factor.  These articles are not on the frequency response of the sensor.    The frequency response and noise are the primary items to model for control systems.  So these design articles are high fidelity models and information purposes.

    Traditional modeling of MEMS Gyros

    Traditional design modeling of MEMS gyros often starts with an FEM of the sensor.  However, the FEM is often too large for feasible modeling.  FEM modeling can be infeasible for memory reasons or simply the length of time it takes to produce results.

    The next step in traditional design modeling is to create an equivalent electrical circuit for detailed analysis in various software packages.  Again producing results from these equivalent circuit models is time consuming.

    Wiki article on Traditional MEMS Gyro modeling

    Simplified lumped parameter model for MEMS Gyros

    I found a journal article describing a lumped parameter model for MEMS gyroscope design suitable for running in Simulink.  The  benefit of the Simulink lumped parameter model technique allows for much faster MEMS gyro design results through simple gains and trnsfer function blocks.  The results present in the journal article looked encouraging.

    Wiki article on Simplified lumped parameter model for MEMS Gyros

    More articles coming…

    Accurate sensor models are necessary for any good control loop design.  So I have a couple more sensor model/design articles coming.  After that I will start adding details of MEMS gyros as I find them on the web.

    Newer Posts »