Title: Reactive Swtiching Strategies for the Control of Autonomous Uninhabited Air Vehicles
1REACTIVE SWITCHING STRATEGIES FOR THE CONTROL OF
UNINHABITED AIR VEHICLES Yale University Peter
Belhumeur Paul Hudak
A. Stephen Morse
- Rapid Prototyping
- Reliable Autonomous Maneuvering
- Reconfiguration
- Robustness
- Reactive Design Verification
- Real-time Programming
- Reuse of Software Components
My goal To bring programming language research
to bear on control systems design,
implementation, and verification.
2We Need Domain Specificity
- A domain-specific language (or DSL) is a language
that precisely captures a domain semantics no
more, and no less. - We also need domain specific
- formalizations (starting point!)
- optimizations and transformations
- software tools
- type systems, aspects, constraints, etc.
- Emphasizes semantics over syntax.
3The Bottom Line
4FRP (Functional Reactive Programming)
- High-level, declarative, domain-specific language
(DSL) and environment for programming complex
hybrid systems. - Two key concepts
- Continuous, time-varying behaviors.
- Discrete streams of events.
- Current Uses of FRP
- Graphics and Animation (Fran)
- Robotics (Frob)
- Vision (Fvision)
- User Interfaces (FranTk)
5Behaviors
- Continuous behaviors capture any time-varying
quantity, whether - input (sonar, temperature, video, etc.),
- output (actuator voltage, velocity vector, etc.),
or - intermediate values internal to a program.
- Operations on behaviors include
- Generic operations such as arithmetic,
integration, differentiation, and
time-transformation. - Domain-specific operations such as edge-detection
and filtering for vision, scaling and rotation
for animation and graphics, etc.
6Example Behaviors in Fran
leftRightCharlotte moveXY wiggle 0
charlotte wiggle sin (pi time)
7Stretching with a Wiggle(and a waggle)
dance hvDance (stretch wiggle charlotte)
(stretch waggle
pat) hvDance im1 im2 moveXY wiggle 0 im1
over moveXY
0 waggle im2
8The Power of Composition
charlottePatDoubleDance hvDance aSmall
aSmall where aSmall
stretch 0.5 charlottePatDance charlottePatDance
hvDance charlotte pat
9Integrate Twice Acceleration
accelBecky moveXY x 0 becky where
x -1 integral v
v 0 integral 1
10Mouse Position is a Behavior
beckyChaseMouse move offset becky where
offset integral vel vel
mousePos - offset
11Events
- Discrete event streams include user input as well
as domain-specific sensors, asynchronous
messages, interrupts, etc. - They also include tests for dynamic constraints
on behaviors (temperature too high, level too
low, etc.) - Operations on event streams include
- Mapping, filtering, reduction, etc.
- Reactive behavior modification (next slide).
12Reactivity Where the Continuous Meets the
Discrete
- x until e gt y can be read, Behave as x
until event e, then behave as y. - Well-founded semantics.
- Rich algebra of transformations.
- Examples...
13ReactivityControlling Discrete Values
tricycle withColor (cycle3 green yellow red)
(stretch (wiggleRange 0.5
1) circle) where cycle3 c1 c2 c3
c1 untilB lbp gt cycle3 c2 c3 c1
14ReactivityControlling Continuous Values
growFlower stretch size flower where
size 1 integral bSign bSign 0 until
(lbp gt -1 until lbr gt bSign)
.. (rbp gt 1 until rbr
gt bSign)
15Advantages of FRP
- The declarative and domain-specific natures of
FRP facilitate - Rapid prototyping (algorithmic exploration).
- Verification and testing.
- Clarity and conciseness.
- Transformation and optimization.
- Programming by non-programmers(i.e. by the
domain experts).
16FRP versus Related Systems
- Advantage of FRP over conventional programming
languages FRP is domain-specific. - Advantages of FRP over Simulink and other
graphical programming languages - FRP is a full-fledged programming language.
- FRP provides better support for logic-based
control. - FRP is extensible.
- FRP is aspect-oriented simulation, testing,
compilation, etc. - FRP programs are isomorphic to higher-order
dataflow graphs (see diagram).
17Visual FRP
18Nomadic Technologies SuperScout
Vision
Wheel Controls
16 Sonars
Bumpers
Computing PC running Linux Hugs Radio
Modem
19Objectives Maintain a specified distance
from wall Dont turn too much toward wall
Stop (slowly) when approaching an obstacle
ahead.
20Jet Engine Embedded Control
21New Application Jet Engine Embedded Controller
- Aaron Sweitzerhof grad student and employee of
Pratt and Whitney. - Experience in design and validation of engine
controllers. - PW current design tools and SW development
methods are weak. - Logic more the stumbling block than control.
- FRPs integration of logic and control appears to
be an excellent match. - An attempt to bridge academia and industry.
22Flavors of FRP and Other DSLs(or, when to Think
DSL)
- Other applicable efforts
- Distributed FRP
- Scripting COM/CORBA components
- Haskell-Linda
- If you are thinking API, perhaps you need a
DSL. - If you are thinking MoC (model of computation),
perhaps you need a DSL. - If you are thinking Component or Software
Architecture, perhaps you need a DSL. - Key theme compositionality.