View
201
Download
1
Embed Size (px)
Citation preview
Cassting Demonstrator
Mads Kronborg Kim G. Larsen Marco MunizPetur Olsen Thomas Pedersen Arne Skou Jiri Srba
Center for Embedded Software SystemsAalborg University, Denmark
InfinIT, November 3, 2016
Introduction Demonstrator Raspberry Pi Conclusion
Introduction
Cassting demonstrator
Implementation on Raspberry Pi
2/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
Overview
European research project
System synthesis
Floor heating controller
Demonstrator
Real and simulated devices
3/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
4/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
5/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
Homeport
Middleware for heterogeneous home automation networks
Abstracts underlying physical devices
Adapters
RESTful interface
Real and simulated devices
6/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
Adapter1 Adapter2... Adaptern
HomePort API
DiscoveryService
EventHandler
RequestHandler
Data Model
Application1 Application2... Applicationm
LoggingService
DaemonService
Devices Devices Devices...
Clients Clients Clients...
7/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
Tool Chain Architecture
Uppaal-Stratego
HomePort GUI
Seluxit adapters
temperature readings valve control
data strategy
weatherforecast
current data
temperatureset-point
8/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
Tool Chain Architecture
Uppaal-Stratego
HomePort GUI
temperature readings valve control
ddtTi (t) =
∑nj=1 A
di ,j(Tj(t) − Ti (t)) + Bi (Tenv(t) − Ti (t)) + Hv
j ,i · vj
data strategy
weatherforecast
current data
temperatureset-point
8/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
Tool Chain Architecture
Uppaal-Stratego
HomePort GUI
temperature readings valve control
ddtTi (t) =
∑nj=1 A
di ,j(Tj(t) − Ti (t)) + Bi (Tenv(t) − Ti (t)) + Hv
j ,i · vj
data strategy
weatherforecast
current data
temperatureset-point
8/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
HomePort Library
RestWebservice
Simulinkto
Seluxit
SeluxitAdapter
HouseGFX
(SDL2)
SimulinkERT
Adapter
ForecastAdapter
Controller
SimulinkModel
LCD ScreenUPPAALSTRATEGO
SeluxitGateway
Setpoint Ctrl
Relay Box Valve1..n
9/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
HomePort Library
RestWebservice
Simulinkto
Seluxit
SeluxitAdapter
HouseGFX
(SDL2)
SimulinkERT
Adapter
ForecastAdapter
Controller
SimulinkModel
LCD ScreenUPPAALSTRATEGO
SeluxitGateway
Setpoint Ctrl
Relay Box Valve1..n
10/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
11/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
Implementation on Raspberry Pi
Not Uppaal
Homeport with adapters
Matlab/Simulink Code Generation
GUI - C++/SDL2
12/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
Matlab/Simulink
Thermodynamics simulation
Four times per second
Homeport adapter
Sends new values to Homeport
Received values from Homeport
Code generation out-of-the-box
13/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
Graphical User Interface
Simple DirectMedia Layer
C++
OpenGL
Game development
Simple game loop - event, update, render
Dynamic rendering
14/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
15/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
16/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
17/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
Performance issues
Runs at about 2-3 FPS
CPU utilization about 40%
Vast majority of CPU time spent waiting for drawing
Grid tiles 96x54 = 5184
18/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
Possible solution
Pre-render background
Bake rooms
Did not help
Full HD 1920x1080
Proves to much for the graphics chip
No graphics upgrade in new Raspberry Pi
19/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
Possible solution
Pre-render background
Bake rooms
Did not help
Full HD 1920x1080
Proves to much for the graphics chip
No graphics upgrade in new Raspberry Pi
19/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
Possible solution
Pre-render background
Bake rooms
Did not help
Full HD 1920x1080
Proves to much for the graphics chip
No graphics upgrade in new Raspberry Pi
19/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
Conclusion
Excellent platform for the demonstrator
(Mostly) Easy to develop on
Prototyping with Matlab/Simulink
Very good performance, except
Lacking graphics performance
20/21 [email protected] Cassting Demonstrator
Introduction Demonstrator Raspberry Pi Conclusion
Questions?
21/21 [email protected] Cassting Demonstrator