[time-nuts] matlab, python, etc.

Jim Lux jimlux at earthlink.net
Mon Jan 7 14:40:12 UTC 2013


On 1/7/13 4:30 AM, Bob Camp wrote:> HI
 >
 > Well if you are getting it done in seconds on Matlab, then you likely 
don't need Matlab very badly. Around here a typical Matlab setup is 
indeed CPU bound for a *lot* longer than that during a normal work day. 
Two or three hours a day is not at all unusual.

I do tons of stuff on Matlab that runs in seconds, because it's a easy 
and facile development environment. Here's a time-nutsy sort of example..

I've been working on systems for time and frequency distribution among 
orbiters and landers at a planet.  Say you're flying one of those 
newfangled Deep Space Atomic Clocks on an orbiter, and you want to 
propagate that to other orbiters or landers.  The questions that come up 
are things like "how much RF power do we need to radiate", "what 
performance is achievable at the lander, for an orbiter with orbit 
parameters X and Y"..

So you've got to run an orbit propagator, then take that data and run it 
through some sort of ad-hoc models for the time/frequency transfer 
performance, and then take that and come up with some meaningful plots 
to put on a slide or in a report.  And then, someone asks, ok, that was 
for a 400km circular orbit around Titan, but what if we make it 
elliptical with a 2000km apoapsis, oh, and by the way, what's the 
maximum time we can NOT run the transmitter during periapsis, and still 
get decent nav performance.


sure, I could load up the orbits in something like STK or SOAP, generate 
a file of positions or link analysis, then ingest that into something 
that does the time analysis, etc.

Or, I can just use an existing Matlab toolbox that does the orbit 
propagator, run it through the existing Matlab code that does the link 
and time modeling, and use Matlab to generate the pretty plots.  And 
when the weird question comes up, I can just change a few numbers, 
re-run it, see that it's going to be a disaster, performance wise, go 
back to them and say, "are you sure you want to do that, why not a 1200m 
apoapsis?" or something like that.



There's a whole lot of stuff that time-nuts do in terms of data analysis 
that is pretty quick and easy in Matlab (or Octave), especially for 
"fooling around".  I'm not wild about Matlab's data acquisition 
capabilities, but then, I'm less wild about LabView (because under it 
all, I'm a "edit the text file, compile and run" kind of guy).

And if you're doing something like filters and control loops, Matlab 
makes it pretty easy, and has a lot of library stuff.  Granted, all this 
also exists for most other languages, e.g. Python.

A couple years ago, I was trying to figure out a way to measure the gain 
and noise behavior of a GPS receiver with just the raw bits from the 
sampler.  Matlab makes it easy to generate data and do the analysis.


Ultimately, Matlab (and related products) saves developer time which is 
expensive.  It's faster (wall clock wise) to just call a toolbox routine 
to, say, do some curve fit or digital filter than it is to code it up in 
something else.  This is especially true when the developers are more 
domain knowledge specialists rather than software engineers: they like 
using Matlab, they're familiar with it.



More information about the time-nuts mailing list