accessors in ptolemy ii using hybrid...
TRANSCRIPT
![Page 1: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/1.jpg)
iRobot PursuitHybrid Simulation
using Accessors in Ptolemy II
Nikunj BajajMarten LohstrohShromona Ghosh
![Page 2: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/2.jpg)
Scenario*The environment E features some valuable asset A that is protected by guards G. The objective of intruder I is to reach and capture the asset and then escape, evading the guards. The guards will come into action when I enters critical zone Z, and will chase down the intruder.
Challenges:● Noisy range measurements between robots (Bluetooth RSSI)● Noisy sensors to keep track of orientation (Electronic Compass)● Error in actuation (iRobot)
A
E
I
Z
G
*Inspired by earlier work done by Ilge Akkaya.
![Page 3: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/3.jpg)
A
E
I
Z
![Page 4: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/4.jpg)
Goal
Ptolemy II(Simulation)
SpaceEx(Verification)
iRobot(Implementation)
Hybrid Simulation
Simulation/Verification
Model/Implementation
Model/Implementation
Model and iRobot interact to help tune parameters like noise, latency, sensor, and actuation errors.
Simulation/Verification
The Ptolemy II model is translated into a SpaceEx model. We assume bounds on the dynamics of the system that are supported by data obtained from the simulations.
Isolate and physically test a critical component (iRobot) while still fully capturing the dynamic behavior of an interaction with the entire system.
![Page 5: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/5.jpg)
ImplementationiRobot
Beaglebone Black (+WiFi, Bluetooth, accelerometer, magnetometer)
...Power converters
![Page 6: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/6.jpg)
Wiring
![Page 7: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/7.jpg)
...function fire() { try { command = url + "?" + "angle=" + get(angle) + "&turnSpeed=" + get(turnSpeed) + "&distance=" + get(distance) + "&driveSpeed=" + get(driveSpeed); response = JSON.parse(httpRequest(command, "GET", null, "", timeout)); } catch(e) { error("Error accessing network: " + e); } send(response.turned, turned); send(response.driven, driven); send(response.collided, collided);}...
Software Platform
HTTP
Gevent Pyrobot
Python
Linux
Beaglebone
iRobot
![Page 8: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/8.jpg)
ExperimentationTwo types of Actuation Errors1. Angle rotation2. Distance traversed
Three sets of experiments1. To find the optimal speed for controlling the robots; reasonably fast yet with minimal error2. To find a model for the actuation error in angular displacement the robot3. To find a model for the actuation error in linear displacement of the robot
Improve our controller on the iRobot
![Page 9: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/9.jpg)
Error with Varying SpeedsGeneral trend?
● Error increases with higher speeds.
Speed of Choice?
● 200 mm per second seems a good trade-off between speed and error.
![Page 10: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/10.jpg)
Error with Varying AnglesWhat’s to blame?
● Imprecision in measurement.
● Slipping wheels.
● Delay in control-loop: it takes time to retrieve the package with new sensor readings, so the controller is likely to overshoot, especially with higher speeds and smaller angles.
![Page 11: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/11.jpg)
Angle Correction
Hyperbolic Function: 3.1132/x -0.0063
![Page 12: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/12.jpg)
Distance Variation
Constant error: 0.0196
![Page 13: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/13.jpg)
Latency
● ~ ms between request and actuation● Not really significant, because:
○ We chose precision over responsiveness.○ Actuation itself takes a lot of time, and our actuation
process is blocking.○ By implementing a low-level controller on the robot
locally, precision is not dependent on network delays and timing issues in the high-level controller.
![Page 14: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/14.jpg)
Received Signal Strength Indication (RSSI)Why so random?
● Reflections; for RSSI to be practical, we need an anechoic room.
● Transmission power too high. Shielding helped, but not enough.
![Page 15: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/15.jpg)
CompassActual North
![Page 16: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/16.jpg)
No useful sensors. Now what?
Let’s assume we know the start locations for all robots…..
![Page 17: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/17.jpg)
Ded-ReckoningWe implemented ded-reckoning in Ptolemy II for the scenario on the right.
A
E
I
Z
![Page 18: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/18.jpg)
A
E
I
Z
![Page 19: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/19.jpg)
PerformanceWe ran the robot on the following trajectory 10 times.
Results:Expected End location:(196.6, 328.3) Range of values:
x = (107.95, 204.47)y = (304.75,319.99)
Average: (175.4505, 313.767)
![Page 20: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/20.jpg)
![Page 21: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/21.jpg)
![Page 22: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/22.jpg)
Intruder controlled by WiiMote
![Page 24: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/24.jpg)
Future Work● Experimentation with different control strategies. ● Formal verification; is the intruder always
caught?● Higher operating speeds, more asynchrony,
tighter bounds on latency.● Non-blocking accessors? Websockets?● Other sensors to determine relative angle and
distance. Ultrasound? Video? Laser?
![Page 25: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/25.jpg)
Acknowledgements
SoftwarePyrobot - Damon KohlerPtolemy II - Edward A. Lee et al
AdviseIlge Akkaya, Antonio Iannapollo
![Page 26: Accessors in Ptolemy II using Hybrid Simulationchess.eecs.berkeley.edu/eecs149/fall2014/projects... · actuation errors. Simulation/Verification The Ptolemy II model is translated](https://reader034.vdocument.in/reader034/viewer/2022042400/5f0f6cc47e708231d4441874/html5/thumbnails/26.jpg)
Questions