Model-based Demonstrator for Smart and Safety Systems.
1. MODES3 - MODEL-BASED DEMONSTRATOR
FOR SMART AND SAFE SYSTEMS
ZSOLT MÁZLÓ
IOT DEVELOPER
2. About me
Software Engineer, BSc (2016)
IoT and HW/SW integration
Software developer and IoT enthusiast (IncQuery Labs)
www.linkedin.com/in/zsoltmazlo
3. IncQuery Labs
Our mission
„Cutting edge”
innovation
Open Source
Education
Software
development
and modeling
Customized
design and
development
tools
Critical
systems,
Internet of
Things
In figures
2013 –
22 R&D
engineers
7 PhD
Partners
4.
5. What is MoDeS3?
Goals
A technology demonstrator for
education
Playground for testing out IoT
technologies within the safety
critical domains
Connect two aspects:
Development methodologies
for
safety-critical systems
Internet-of-Things technology
stack
7. Engineer
Applications addressing
real-world / everyday
problems embedded in
a natural/human
environment:
Cities,
transportation
Energy grids,
buildings
Healthcare, sport
User
Okos otthon
Perspectives on IoT
8. The best of both worlds – Smart and Safe IoT
systems
Safety Critical Systems Internet of Things
Data
acqui-
sition
Commu-
nication
Analysi
s
Act
Combination of both worlds:
Development techniques used for
safety-critical systems
with technologies from Internet-of-Things
11. Demonstrator
11
Railway control
system
- Roco system for
controlling devices
on the railway
- Operate standard:
DCC
- Control message
protocol: XpressNet
Railway
control
system:
XpressNet
DCC
Source: https://www.dccconcepts.com/product/roco-10810-multimaus-control-system/
16. Demonstrator
16
Railway
control
system:
XpressNet
DCC
Occupanc
y sensing:
S88
6 units of
BeagleBo
ne Blacks:
Ethernet
Switch
Segments
Custom
cape for
BeagleBo
ne Black:
Expander
s
Segment
Actuator:
Stopping
trains on
segment
Turnout
Actuator:
Control
and sense
railway
switches
Turnout Actuator
- Expander for
BeagleBone cape
- Control one railway
switch on table
- Sensing the state of
switch
18. Distributed Safety Logic
18
Railway
control
system:
XpressNet
DCC
Occupanc
y sensing:
S88
6 units of
BeagleBo
ne Blacks:
Ethernet
Switch
Segments
Custom
cape for
BeagleBo
ne Black:
Expander
s
Segment
Actuator:
Stopping
trains on
segment
Turnout
Actuator:
Control
and sense
railway
switches
Distributed Safety LogicSW
Monitoring and Control SystemSW
HW
20. Monitoring and Control System
20
Railway
control
system:
XpressNet
DCC
Occupanc
y sensing:
S88
6 units of
BeagleBo
ne Blacks:
Ethernet
Switch
Segments
Custom
cape for
BeagleBo
ne Black:
Expander
s
Segment
Actuator:
Stopping
trains on
segment
Turnout
Actuator:
Control
and sense
railway
switches
Distributed Safety LogicSW
Monitoring and Control SystemSW
HW
21. Monitoring and Control System
21
Additional level of safety – high level
monitoring
Computer
vision
Camera subsystem
22. Monitoring and Control System
22
Additional level of safety – high level
monitoring
Computer
vision
Communicatio
n Monitoring
Complex Event Processing
https://www.eclipsecon.org/europe2015/session/iot-
supercharged-complex-event-processing-mqtt-eclipse-
technologies
23. Event Stream („live
model”)
Recognised event pattern
2 trains would collide
Reaction: stopping the trains
Complex event processing
Source: http://us.123rf.com/450wm/booblgum/booblgum1505/booblgum150500047/39735839-grey-
passenger-train-isolated-vector-illustration.jpg?ver=6
Event
Train 1
Segment 2
Event
Train 1
Stops
Event
Train 2
Segment 3
Event
Switch
Divergent
Segment 1 Segment 3
Event occured
Train 1 arrives on segment 2
Could not go further
Event occured
Train 2 arrives on segment 3
Free road, could go onwards
Event occured
Switch changed to divergent
„Typical” application
domains
• Log analysis
• Fraud detection
• Algorithmic trading
Technologies
• Microsoft, Oracle,
SAP
• Drools Fusion, Esper
Eclipse Open IoT:
VIATRA-CEP (EPL
Licence)
24. Monitoring and Control System
24
Additional level of safety – high level
monitoring
Computer
vision
Communicatio
n Monitoring
VEPL
VIATRA-CEP
Shut down the system in
case of dangerous
situation
Monitorin
g Logic
Execution
26. Education and research applications
26
Academic contributors
• Fault Tolerant Systems Research Group
• MTA-BME Research Group on Cyber-Physical
Systems
Courses
• Cyber-physical systems
• Model-based Systems Design
• System Modelling
• Formal methods
Student projects
• 2 MSc & 7 BSc students
27. Conclusions
Initial version is out
• MoDeS3
http://modes3.tumblr.com/
• Source GitHub repo
https://github.com/FTSRG/BME-MODES3
As a demonstrator your contributions (feedback,
forum posts, ideas, bugzillas, patches) are very
welcome!
• Where to go what do demonstrate?
• Any additional IoT inspired service?
I have just finished bacheler degree this year and now I work as an full-time software-developer at Inc.L.
Middle-sized company focusing on cutting edge technologies. As you can see, there is 22 R&D engineers working in this company and 7 of them have PhD degree so for me it’s a good place to learn and work.
Our partners mainly related to safety critical systems, like thales and embraer but also have a strong connection with the BUTE
We are really proud that we have just received the Rising Stars award from Deloitte a week ago.
Collaborative project with Budapest University of Technology and Economics, Ericcson, Quanopt and also with National Academy of Science
We can test how safety cricital requirements can be served by IoT technologies.
We have placed third in the 2016 Eclipse Open IoT Challenge out of 89 teams.
As you know, everybody talks about IoT, but it’s seems to me a big buzzword, and I wanted to see how many phrases there are about the same stuff, and as you can see, I found quite a lot
It seems that both microsoft and IBM focusing on the city as an important factor while Ericcson and the European Union is always talks about society.
In the US you guys prefer Cyber physical systems, however Germany are really focusing on Industry 4.0
If you have any more phrases about IoT, please, send me an email and I will put it on this slide.
I think there is two aspects of IoT and these aspects are mixed in the previously mentioned phrases:
The first one is about what is the goal using these technologies, user side, there are real-world problems in our environment, and how could we solve these problems
Second aspect is the engineering perspective,
which includes the fact that huge sets of sensors and actuators are communicating over network,
and huge amount of data are generated by these devices
so we need to focus on how could we analyse and process all of these data in an effective way.
So IoT is about Data Acq. And then communcation,
There should be an act based on the given data, but also the consequences of act
Satefy C. Development now are using model-based dev. Techniques, like early model-based validation, code and configuration generation, monitoring synthesis and so on.
Now I show you a video about the working state of the demonstrator. It was recorded several days ago, when we were demostrated it at EclipseCon Europe 2016.
As you can see there is a webcam over the table and we were streaming the state of the demonstrator.
Also there is a dashboard which collect the data of all sensors and display it in a web-based user interface.
One of my bosses were at the event and he brought a Leap Motion device with himself. We have established a connection between the event and with the office and he managed to control the trains with complex gestures recognised by our system.
As you may think it has a very complex hardware design which I want to show you.
First of all, the upper side of the table remained clean (by purpose), I wanted to hide every electronics, therefore all of them went below the table.
As you can see, there is a tons of wires and hardwares fixed to the table. We wanted to make an maintainable hardware design, and I think we have achieved this goal.
Our system based on several hardware components, like...
And now I want to intruduce shortly the main components of the hardware.
Standard comm. In model railway systems (sends messages to the decoders)
And we are managed to create a component which receives commands in our network (Ethernet) and translate them to XpressNet commands.
But railway system could not provide for use the data where the trains are, therefore we had to divide the whole layout into segments, and to get the information which segments are occupied by a train, we needed some COTS hardwares. We are using S88 protocol to collect this data and the collector algorithm is implemented on an Arduino device.
Also we have a distributed system of embedded microcomputers. We have choose the BeagleBone Black for this porpuse, and we have 6 of them.
The BeagleBone Black units could not powered by 12VDC only with 5V, so we had to design a custom capes for them. It has a power circuit to give a power source to the BeagleBone.
We have designed this cape also to be able to expand the functionality on the hardware level, so we have 8 expander slots with constist of 4 GPIO pins and different power sources (like 5V or 12V).
Also there is an I2C slot and an EEPROM slot for future usage.
One of the two expander which we have designed is the segment actuator. It goes directly onto the cape. With this expander the BeagleBone is capable of stopping trains on segments no matter what the control command is. For economical reasons we have designed it to control 2 segments but in an independent way.
The second expander which has developed is the turnout actuator. It controls one railway switch on table and also sensing the state of it. So if someone changes the switch manually we will sense it and we can notify the other components of the system about the change.
Based on these hardware elements we have created a complete platform, on which we have developed some software components.
And now lets talk about the safety logic
The safety logic were developed with model-driven techniques. Now we are using Yakindu StateChart tools, but previously we were used BridgePoint language, which is an Eclipse-based technology to describe systems.
With model driven dev. We can execute early model validations using viatra query and we could also verificate these models with formal methods based on the UPPAAL model checker.
After all of them we can garanatue if our model satesfies the safety critical requirements or not and if it does, then with...
Using code generator tools we are able to generate native code which could be deployed on the BeagleBone units
One of our main component is a monitoring and control system...
...which is a computer vision based on the open cv library and this is a parallel safety channel next to the distr. logic executed by the beaglebone units.
It’s using a camera subsystem on a raspberry pi
and with special markers we are able to locate the trains more precisely and even get the speed of them.
https://www.eclipsecon.org/europe2015/session/iot-supercharged-complex-event-processing-mqtt-eclipse-technologies
Thesee informations are processed in the computer vision module and sent to the monitoring component. It’s using a complex event processing technology, and if you are interested in this particular technology, please follow the URL as you can see.
But I want to show you the concept behind it.
Lets say that this our layout with 3 segments and one switch.
There are also sensors which are provides us events about like a segment occupied by an train and so on and these events could be serialized into an event stream.
Lets say that we want to avoid collisions on the track, therefore we are interested in complex events which are indicate a future collision if we are not intervene.
Also the complex events could be refined with time-window constraints.
Also important to mention that Complex event processing is not a novel thing, it has already been used in various domains like log analysis or algorithm trading, however it’s application
This close to hardware level sensor processing is a novelty. It provides you high level specification language directly on the sensor data thus easing the sensor-fusion.
VIATRA-CEP is able to achieve this and it is EPL Licence, so there is an opportunity to integrate into propriarty environment too and using it without any constraints.
With CEP the monitoring system could achieve higher functionality. We could define dangerous situations in a domain specific language called VEPL, where we could define what should we do if one of them are about to happen – like shutting down the system.
This is a collaboration between our company and the university. The F.T.S.R.G is working continously on this project and also there is a national academy-university association which are sponsoring this project, this is the Research Group on Cyber Physical systems.
It developed mainly by students.
Thnak you for your attention!
If you want to get familiar with the state of this demostrator you can check our tumblr blog or even check the source-code. This is an open-source project and we have a public github repository on the following link.
Your contributions with this project are very welcome! We are committed to the project and if there are any ideas we want to hear about them.
Thanks for kind attention, it was a great honor to be here and if you have any questions, you can reach me out in the following links.