Enabling industry 4.0 Event-driven architectures and smart micro services Dr., Systems and control, Chalmers Chalmers, Automation +46 (0)768 979561 Kristofer.bengtsson@chalmers.se
The key to industry 4.0 Be able to integrate and develop new services and devices easily (without changing other parts) Allow a multitude of programming languages, tools, visualizations, data structures, data bases, message formats, standards, etc. Use a simple core / integration layer and focus on allowing rapid changes Use Event-driven architecture and not old style SOA push events and never p2p
What is it about? To understand and control the factory
We need to gather and understand information
More complicated than expected! Different brands Different generations Different technologies Different formats Different user perspectives
But how do we manage it today? Different brands Different generations Different technologies Different formats Different user perspectives Usually with a lot of struggle
How often do the machine stand still?
Up time: 2 min Down time: 0 min
Up time: 10 min Down time: 0 min
Up time: 17 min Down time: 1 min
Up time: 134 min Down time: 12 min
Up time: 670 min Down time: 45 min
Up time: 670 min Down time: 45 min
Up time: 670 min Down time: 45 min What is the down time, on Thursdays? By the way, we need more machines!
Machine 1: Down time: 670 min Down time: 45 min Thursdays:??? Data structure not flexible Point-to-point communication
Problem Often very rigid and inflexible solutions Hard to change Dedicated solutions But in reality the requirement changes over time Hardcoded interfaces and high coupling between low level and high level = Expensive!
The tweeting factory concept Flexible message structure Asynchronous and event-based communication Publish / Subscribe Micro services Transformations
The concept at Volvo cars 4000-5000 devices connected 1000 robots 500 PLCs scanners, rfid-readers, etc
Tweets Simple messages about events When a product changes position When an operation starts When a machine breaks down The more that tweet, the better
Machine 1: Down time: 670 min Down time: 45 min Thursdays: 9 min I m up now Events include an id, timestamp, and the data My operation started I used 2 KWh the last operation Help me, i m down
Event-based architecture Message bus (ActiveMQ) Publish / Subscribe
Event-based architecture - Persistence If something happens, the events can be sent back onto the bus Storage in a journal database
Event-based architecture - Transformations Filter Publish Transformation Fill e.g. from rfid byte to data about product and position Map e.g. add current product in machine to alarm event Fold e.g. aggregate all events related to a product
Flexible services Smart transformation is used to transform and standardize low level data for higher level services In the same way, commands are transformed to low level devices
Flexible services Avoid shared state via DBs if not absolutely necessary Easy to connect visualization tools Indexing of unstructured data (using elasticsearch)
The concept at Volvo cars
The concept at Volvo cars
The concept at Volvo cars Both control and information is handled by the concept at volvo Much easier to integrate new services than before Simple integration when installing new equipment or upgrading Doesn t matter if they use rfid or bar-code reader as id reader, the higher level services doesn t change
Energy optimization Robots sends out when operation starts and when they stop We implemented a driver that sends out detailed events about the program pointer Also possible to sample the trajectory in high speed.
Energy optimization Aggregated and visualized live at volvo cars Also good for cycle time analysis
Optimization service Describe when each operation can execute They motions are optimized and new trajectories are sent back Energy is saved by Lower acceleration Moving slower when possible New sequences
FILM: https://www.youtube.com/watch?v=obhjcfgf35i
Prediction service Same information from robots but is used by a prediction service Predicting when to change the welding tip We also implemented a service that predicts stopping alarms based on warnings
Emergency Department
Emergency Department
Lessoned learned The sender should not know the receiver (in most cases) Avoid to much structure in middle-layer (from the senders perspective) push events Small self-contained services The result are sent back Each service should keep its own state Simple logic in devices Avoid aggregation on devices (expensive to change code on low level) Communication with hardware should handle various protocols (avoid one solution for everything, i.e. not only allow OPC) Simple and flexible message format, use transformations to adopt Json, xml, protobuf, doesn t really matter Do not spend a lot of time defining ontologies and structure. It will change!
The key to industry 4.0 Be able to integrate and develop new services and devices easily (without changing other parts) Allow a multitude of programming languages, tools, visualizations, data structures, data bases, message formats, etc. Use a simple core / integration layer and focus on allowing rapid changes Use Event-driven architecture and not old style SOA push events and never p2p
kristofer.bengtsson@chalmers.se +46 (0)768 979561