03-Controlling Laser Ranging With RTAI-based Real-Time Linux Final
03-Controlling Laser Ranging With RTAI-based Real-Time Linux Final
Linux
Evan Hoffman (Honeywell), Randall Ricklefs (University of Texas)
ABSTRACT
Currently, many laser ranging systems, such as NASA's MOBLAS systems and the McDonald Laser
Ranging Station (MLRS), use rorietary !ni"#li$e real#time oerating systems %or time#sensiti&e
ranging control so%t'are( Such OS's are e"ensi&e to maintain and o%ten carry a ris$ o% &endor loc$#in( )e
outline a method o% controlling an SLR system using the Linu" oerating system 'ith the Real*ime
Alication +nter%ace (R*A+) hard real time e"tension( Linu" ro&ides a 'ide &ariety o% so%t'are ac$ages
that ha&e lo' oerating cost, are under acti&e de&eloment, and are oen source( *'o %la&ors o% Linu" are
discussed, Arch Linu" and CentOS( Both o% these %la&ors ha&e strengths and 'ea$nesses 'hen -eing used
in a real time en&ironment( Choosing 'hich real time scheduler to use is imortant %or rogramming
considerations( Our aroach uses the L.R* scheduler 'hich allo's real time control in user mode( )e
sho' e%%ecti&e control o% an LR system using modest hard'are( *he current status o% con&ersions o% the
/oddard /eohysical and Astronomical O-ser&atory (//AO) 012 telescoe and MLRS is resented(
1 Introduction
Accurate satellite laser ranging re3uires a relia-le and redicta-le method o% controlling hard'are( *his is usually achie&ed
through the use o% so%t'are running on real time oerating systems (R*OS), that is, oerating systems 'hose resonse time
to user#ro&ided interruts can -e guaranteed to -e in a gi&en threshold regardless o% other so%t'are running on the system(
Currently, many SLR stations around the 'orld use rorietary, !ni"#li$e R*OS's %or hard'are control( At the time o%
imlementation, these 'ere the most e%%icient choices a&aila-le( 4o'e&er, they are o%ten times &ery e"ensi&e, and so%t'are
de&eloed %or them is not al'ays orta-le to other R*OS's, creating a ris$ o% &endor loc$#in( NASA's MOBLAS systems,
and the McDonald Laser Ranging Station at the !ni&ersity o% *e"as, are e"amles o% systems using rorietary R*OS's(
)e roose relacing these rorietary R*OS's 'ith an oen source alternati&e, seci%ically, Linu"( *he 5(6 $ernel, released
in late 5778, ro&ided a signi%icant reduction o% o&erhead thread rocessing o&er its 5(0 redecessor( +n addition, it allo'ed
rocesses running $ernel mode to -e artially reemta-le 9:;( An additional atch to the stoc$ $ernel, the Real*ime
Alication +nter%ace (R*A+), allo's comlete remtion o% $ernel running rocesses 95;(
)e intend to use the 01< telescoe %acility at the /oddard /eohysical and Astronomical O-ser&atory (//AO) and the
McDonald Laser Ranging Station (MLRS) as test stations using this ne' so%t'are(
2 Available Linux and Real Time Linux options
Linu" has a large array o% distri-utions suited %or a &ariety o% uroses( )hen selecting a distri-ution %or our systems, 'e
considered sta-ility, 3uality o% so%t'are reositories, and ease o% maintaina-ility( Arch Linu"98; 'as chosen %or the 012
%acility, 'hile CentOS90; 'as chosen %or MLRS( Both ha&e %eature rich ac$age managers %or easy installation o% so%t'are(
A -rie% discussion o% each %ollo's( As de&eloment continues, these are su-=ect to change(
1
2.1 Arch Linux
Arch Linu" is a general urose Linu" distri-ution that %ocuses on simlicity and minimalism(
2.1.1 Advantages
Arch is a rolling release distri-ution, that is, each so%t'are ac$age is $et at the latest &ersion a&aila-le( *his
ro&ides the system 'ith the latest %eature udates and -ug %i"es(
Arch has an easy to use so%t'are ac$age manager 'ith a large li-rary o% %ree so%t'are(
Arch is minimalist( +ts -ase install has little so%t'are and lo' o&erhead( *his allo's the system to -e lean and -loat
%ree(
Arch is designed %or simle and centrali>ed con%iguration (BSD style)(
2.1.2 Disadvantages
Being a rolling release, udates to the system should -e done care%ully as to not =eoardi>e the sta-ility o% the
system( Latest so%t'are can introduce ne' -ugs(
Arch re3uires some $no'ledge a-out Linu"?OenBSD system management( +t is not the most user %riendly
distri-ution on the mar$et(
2.2 CentO
CentOS is a distri-ution -ased on the oular Red 4at @nterrise Linu"(
2.2.1 Advantages
Similar to Arch Linu", CentOS has an easy to use so%t'are ac$age manager 'ith a large li-rary o% so%t'are(
CentOS has a long term release -ased on Red 4at @nterrise Linu"( +t 'ill -e suorted 'ith security udates %or
years(
2.2.2 Disadvantages
CentOS is not as lean as other distri-utions(
*he current CentOS $ernel is 5(6(55(:, a coule &ersions -ehind the latest (as o% this 'riting, 5(6(8A(8)(
Latest so%t'are is not al'ays a&aila-le in the so%t'are reositories, as there is an emhasis on sta-ility(
Clean shutdo'n and re-oot times are slo'er 'hen comared to current rorietary R*OS's in use, such as Lyn"OS
as 'ell as other distri-utions such as !-untu(
2.! Other Linux Options
A %ull discussion o% a&aila-le Linu" otions is -eyond the scoe o% this aer( Se&eral other oular distri-utions 'ere
considered( !-untu is &ery oular and user %riendly, -ut su%%ers %rom signi%icant -loat( De-ian has a reutation %or roc$
solid sta-ility and a &ery long release time, though its so%t'are is usually held se&eral &ersions -ac$(
! RTAI" #hat is it and ho$ does it $or%&
*here are se&eral di%%erent real time Linu" otions( R*Linu"Bree, .enomai, R*A+ are %ree e"amles, 'hile commercial
otions such as R*Linu"Cro and BlueCat Linu" are also a&aila-le( A comlete discussion o% them is -eyond the scoe o% this
aer( R*A+ 'as selected as it has a &ery acti&e user -ase and is %ree(
2
R*A+ is an real time e"tension o% the &anilla Linu" $ernel, allo'ing hard real time( A%ter the atch is alied, it runs as a
second $ernel alongside the regular Linu" $ernel( +n addition, a nano$ernel a-straction layer called Adeos 9D; runs as an
inter%ace -et'een the Linu" $ernel and the R*A+ $ernel( *his allo's R*A+ to ta$e o&er real time interruts, 'hile assing
regular ones to the regular Linu" $ernel( *he R*A+ AC+ is COS+. comliant, 'hich means that much code that has already
-een 'ritten %or the rorietary R*OS's can -e reused(
R*A+ has t'o rocess schedulers a&aila-le to it( *he one 'e ha&e selected, L.R*, ro&ides hard real time in user sace,
allo'ing non#root users the a-ility to run hard real time deendent rograms( *he ad&antage is that it allo's rograms to run
'ithout touching the $ernel code, 'hich allo's %or easier rogramming( +t also more closely models ho' current rorietary
R*OS's are used at the NASA stations(
' Advantages and Disadvantages o( Real Time Linux
4ere 'e -rie%ly discuss redicted ad&antages and disad&antages to using R*A+ -ased real time Linu", in an SLR conte"t,
o&er current rorietary R*OS's(
'.1 Advantages
R*A+ is comletely %ree and oen#source( *his 'ill allo' SLR stations greater control o&er so%t'are and gi&e them
the a-ility to modi%y it to suit seci%ic needs that may -e uni3ue to SLR 'or$( +t also reduces ossi-le licensing
costs associated 'ith rorietary so%t'are(
Many distri-utions o% Linu" ha&e a ro&en record o% sta-ility and security(
*here is a large (and o%ten %ree) so%t'are li-rary a&aila-le %or Linu"( Since R*A+ runs alongside the regular Linu"
$ernel, a system using it can run any so%t'are that 'as designed %or Linu"(
R*A+ has an acti&e community %or colla-oration and suort(
'.2 Disadvantages
Commercial suort is una&aila-le(
! to date documentation can sometimes -e di%%icult to %ind( Con%licting &ersions o% AC+ documents can cause
con%usion(
) At *LR
*he Linu"?R*A+ ugrade at MLRS steals time 'hen the ranging cre's are not at 'or$ to sli a dis$ dri&e 'ith the ne'
oerating system and so%t'are into the oerational ranging system( *hus %ar, the R*A+?Linu" system roerly controls all the
e"isting hard'are %rom meteorological sensors, to timing electronics, to the laser and telescoe( 4ard'are#-ased simulation
o% trac$ing can run %or hours 'ithout une"ected ro-lems( *ests trac$ing stars and satellites sho' the system can roerly
handle the telescoe mount( Real satellite ranging 'as only attemted once so %ar, 'ith internal cali-rations 'or$ing
roerly( No satellite data 'as o-tained, -ut that 'as not surrising since the engineering sta%% and not an o-ser&ing cre'
made the attemt(
A coule ma=or issues remain( *he so%t'are could ro-a-ly -e used in roduction as is, although that 'on't -e done -ecause
the CAMAC de&ice dri&er is not yet running in hard real time mode( *he result is that any ma=or dis$ accesses, such as
starting a 'e- -ro'ser or comiling so%t'are 'ill temorarily dro real time interruts and there%ore re&ent ranging(
*he other issue is that shutting do'n or -ooting CentOS ta$es much longer than 'ith the rorietary real time OS or other
Linu" distri-utions such as Bedora or !-untu( *ests 'ill -e made 'ith the latest !-untu long term suort (L*S) &ersion
'ith the aim at relacing CentOS( +nitial results are encouraging(
+ At ,,AO
*he ugrade to R*A+ %or the 012 %acility is art o% an ongoing moderni>ation e%%ort( Currently the %acility uses a CAMAC
inter%ace 'ith +SA comuter -oards %or its hard'are?so%t'are inter%ace( !sing a modern comuter 'ith a CC+ and CC+
@"ress -us, it is intended that the entire console and control logic -e relaced, as 'ell as the otical encoders and the ser&o
re#amli%iers( CC+ and CC+ e"ress +?O cards are lanned to relace the entire CAMAC inter%ace(
3
Much o% the so%t'are code structure is -eing maintained %or the ne' system, ho'e&er, the old Moti% /!+ is -eing relaced
using the /*EF tool$it( +n addition, as R*A+ runs as its o'n $ernel, it must communicate 'ith the regular Linu" $ernel
through shared memory and R*A+ B+BOs( A ma=or so%t'are re#'rite is under'ay(
Currently, much o% the /!+ so%t'are has -een 'ritten( *iming signals and analog out signals are -eing controlled and read in
real time using R*A+( @ncoders ha&e -een read in so%t real time, and con&ersion to hard real time is under'ay( *hese are
signi%icant stes to roducing a real time system caa-le o% controlling the telescoeG an encoder#in analog#out system
ro&ides the -asic %eed-ac$ loo necessary(
Due to the large scale o% the ugrading e%%ort, rogress 'ith the R*A+ ortion has -een slo'er than hoed, -ut steady( Ne'
otical encoders ha&e -een installed into the system, and a logic inter%ace is -eing tested to read them relia-ly 'ith the ne'
hard'are(
Conclusion
)e -elie&e that, gi&en the results o% our e"ermients at the 01< %acility and MLRS, R*A+ -ased real time Linu" is a good
candidate %or relacement o% rorietary R*OS's in&ol&ing the control o% SLR systems( *here is still much 'or$ to -e done
to ro&e the concet( Crogress seed is deendent on a&aila-le %unding and hours to de&ote to the ro=ect( *he ultimate goal
'ill -e to ac3uire good data using an R*A+ -ased system( )e hoe to ma$e signi%icant rogress to'ards this goal in the
coming months(
Ac%no$ledgments
Ric$le%s 'ould li$e to than$ NASA %or suort through NASA contract NN/76DA7HC and others in the laser ranging
community %or their encouragement(
4o%%man 'ould li$e to than$ Ian Mc/arry, *om Jag'ods$i, Iac$ Chee$, 4o'ard Dono&an, and many others at NASA ,
4*S+, and the +LRS community %or their continuing suort(
Re(erences
9:; KReal#*ime and Cer%ormance +mro&ements in the 5(6 Linu" Eernel L Linu" Iournal(K Linux Journal | The Original
Magazine of the Linux Community( )e-( 5A Iuly 57::( Mhtt,??'''(linu"=ournal(com?article?170:N(
95; Di Milano, Politecnico. R*A+ # O%%icial )e-site( )e-( 5A Iuly 57::( Mhtt,??'''(rtai(orgN(
98;Arch Linux( )e-( 8: Iuly 57::( Mhtt,??'''(archlinu"(org?N(
90;The Community ETer!ri"e O!erating #y"tem( )e-( 8: Iuly 57::( Mhtt,??'''(centos(org?N(
9D; KAdeos(K )e-( 8: Iuly 57::( Mhtt,??home(gna(org?adeos?N(
Correspondence
@&an 4o%%man
4oney'ell *echnology Solutions, +nc(
HD:D Mission Dri&e, Lanham, MD 57H76
@&an(4o%%manO4oney'ell(com
Randall Ric$le%s
*he !ni&ersity o% *e"as at Austin, Center %or Sace Research
8A5D )( Bra$er Lane, Suite 577, Austin, *. H1HDA#D85:
ric$le%sOcsr(ute"as(edu
4