Designing And Deploying Service-Oriented Architectures .

Transcription

Design and deploy Service-oriented Architectures(SOA) in SimulinkShwetha Bhadravathi PatilAastha KanwarMark DanielsenLuigi Milia0

Agenda Evolution of architectures and key challenges Simulink for service-oriented architectures (SOA) Simulink support for SOA industry standards– Simulink for AUTOSAR Adaptive– Simulink for Data Distribution Service (DDS) Conclusions and key takeaways2

The rush for Gold SoftwareFrom the news. General Motors Adds 3,000 New TechJobs to Boost Virtual Testing and SoftwareExpertise Continental and Amazon Web ServicesCreate Platform for Automotive SoftwareVolkswagen’s Boss Warns the Troops: WeDon’t Want to End Up Like Nokia Daimler to Cut Out Suppliers to FundSoftware Hiring SpreeBosch Consolidates All Automotive SoftwareAnd Electronics Into New ics-into-new-division/?sh 46032fb81320

Industry trendsElectrificationAutomated drivingConnected vehiclesSoftware Defined VehicleKey enablers:1.Centralization of computing power into high-perfomance, on-board computers2.New approach to E/E and software architectures4

Evolution of E/E architectures 100 ECUs Domain controllers Vehicle/zone controllers One function per ECU Multi-core ECUs High-performance CPUs Heavy and long wiring Gateways and networks(Many-core, GPU, FPGA ) High-speed ethernet7

Towards service-oriented architecturesApplication SoftwareSoftwareApplication Services.Hardware High SW-HWcouplingNo standard APIsNo/minimal SW reuse RTEBasic ServicesBasic SoftwareMiddlewareHardwareHigh PerformanceHardware/Virtual MachineStatic SW componentallocation (design-time)Signal-basedcommunicationHW abstractionMonolithic update (fullimage flashing ) Dynamic Servicediscovery (run-time)Service-orientedcommunicationHigher HW abstractionSelective updates(OTA)10

SOA – What’s it all about? SOA consists of services that communicate across differentplatforms over messages. SOA provides flexibility to add, remove, or update componentswithout impacting the entire, typically large, software system SOA is used by multiple industrial standards including:– AUTOSAR Adaptive Platform– DDS (Data Distribution Services)– ROS (Robot Operating System)15

Key challenges Service-oriented applications are still new for Automotive industry Coexistence of legacy and SOA architectures Reuse of existing expertise, workflows and software assets (don’t start fromscratch)16

Simulink : Deploy software to different targets and standardsApplication SoftwareSoftware.SimulinkRTEHardwareBasic SoftwareLegacy ECUAUTOSAR ClassicµCFPGAGPUMiddlewareAUTOSAR Adaptive / ROS / DDS18

Poll Question #1Are you already working on SOA based applications? (Check all that apply)Yes, I’m working on a production or pilot projectYes, I plan to reuse existing Simulink models / use MBD for SOANo, but I’m going to work on SOA in near futureNo, I’m not planning to work on SOA19

Agenda Evolution of architectures and key challenges Simulink for service-oriented architectures Conclusions and key takeaways20

Simulink Messages for Service-oriented communicationApplication ServicesApplication ServicesBasic ServicesBasic ServicesMiddlewareMiddlewareYou can model service-oriented communicationusing messages (Send/Receive).24

Bus Support for Messages Message lines can be combinedvia a busCan use a queue on the busAccessed either via a busselector or bus element port25

Message Merge Combine multiple message lines into a single message lineSpecify both nonvirtual and virtual buses to carry Messages.26

Event-Based Logging and Animation Inspect and animate events in themodel involving:– Function-Call Subsystems– Simulink Messages– Simulink Functions Using– Event Logging– Event Animation– Sequence Viewer tools.27

Agenda Evolution of architectures and key challenges Simulink for service-oriented architectures (SOA) Simulink support for SOA industry standards– Simulink for AUTOSAR Adaptive– Simulink for Data Distribution Service (DDS) Conclusions and key takeaways28

Simulink support for SOA industry standardsAUTOSAR Adaptive Platform implements the AUTOSARRuntime for Adaptive Applications (ARA) for automotiveindustry.Model, simulate, test and generate code for AUTOSARAdaptive applications in Simulink.29

Simulink support for AUTOSAR Adaptive In AUTOSAR Adaptive, servicesimplement communication through:– Events– Methods– Fields In Simulink, Events can be modeledas Messages and then configured forcode generation using AUTOSARBlockset.AUTOSAR Adaptive C compliant codeis generated by Embedded Coder.30

Adaptive SW architecture conceptsRequiredPortRadar Service Interface"Radar" : {// events"event" : urnIndicator”“rightCarInBlindSpot”},// methods"method" : {"Calibrate""Adjust"},// fields"field" : {“updateRate"}}AdaptiveApplicationLane GuidanceProvidedPortHazard Service Interface“Hazard" : {// events"event" : },// methods"method" : { },// fields"field" : { }}31

Modelling an AUTOSAR Adaptive application in SimulinkAdaptiveApplicationRequiredPort"Radar" : {// events"event" : urnIndicator”“rightCarInBlindSpot”},// methods"method" : {"Calibrate""Adjust"},// fields"field" : {“updateRate"}}32

Modelling an AUTOSAR Adaptive application in SimulinkAdaptiveApplicationProvidedPort“Hazard" : {// events"event" : },// methods"method" : { },// fields"field" : { }}33

Dynamic Service DiscoveryFind adaptive services by usingdynamic discovery Configure AUTOSARadaptive applications to discover andsubscribe to adaptive services asthey become available You can also configure service portprogrammatically as OneTime orDynamicDiscovery34

AUTOSAR Adaptive workflowsSW-CDescriptionAUTOSARSW-CExport ARXMLImport ARXMLSimulink,AUTOSAR plication SWC CodeSW-CDescriptionAUTOSARSW-CImport ARXMLExport ARXML35

AUTOSAR Adaptive in action Create model from ARXML38

AUTOSAR Adaptive in action Create model from ARXML Configure Service DiscoverySubscribe to adaptive services– Only at startup, or– Dynamically, as they becomeavailable39

AUTOSAR Adaptive in action Create model from ARXML Configure Service Discovery Verify AUTOSAR properties41

AUTOSAR Adaptive in action Create model from ARXML Configure Service Discovery Verify AUTOSAR properties Generate code42

AUTOSAR Adaptive in action Create model from ARXML Configure Service Discovery Verify AUTOSAR properties Generate code43

AUTOSAR Adaptive in action Create model from ARXML Configure Service Discovery Verify AUTOSAR properties Generate codeIntegrate Applications with thirdparty Adaptive stack45

Poll Question #2Are you working on AUTOSAR Adaptive applications? (Check all that apply)Yes, I’m working on a production or prototyping projectYes, I’m using Model-Based Design for AUTOSAR AdaptiveYes, I’m writing C code for AUTOSAR AdaptiveNo, but I’m going to work on AUTOSAR Adaptive in near futureNo, I’m not planning to work on AUTOSAR Adaptive46

Data Distribution Services (DDS)Data Distribution Services (DDS) usesSOA methodology, and directly addressespublish and subscribe communications forreal-time and embedded systems.DDS addresses the needs of applicationsthat require real-time data exchange inindustries like aerospace and defense,automotive, and robotics.48

How does DDS Blockset Work?Conceptual DDS Blockset WorkflowStart with aDDS networkand the DDSdefinitionsCreate DDSdefinitionsConfigure DDSinterfaceDeployApplications toDDS Network49

User Workflow with UI Steps2DDS omcentral repo46DeployInterface definitionsQoS definitions(XML)IDL/XML VendorsupportDDS Databus50

DDS Blockset in action Import DDS definitions from XML or createnew Definitions51

DDS Blockset in action Import DDS definitions from XML or createnew Definitions Define/Modify DDS definitions in DDSDictionary– Topic Types– Domains– QoS52

DDS Blockset in action Import DDS definitions from XML or createnew Definitions Define/Modify DDS definitions in DDSDictionary Model applicationsUse DDS Blocks to model a Publisher orSubscriber53

DDS Blockset in action Import DDS definitions from XML or createnew Definitions Define/Modify DDS definitions in DDSDictionary Model applications Simulate DDS models including QoSUse Simulink to model and simulation Quality ofServices (QoS) policies including history toverify the runtime behavior.54

DDS Blockset in action Import DDS definitions from XML or createnew Definitions Define/Modify DDS definitions in DDSDictionary Model applications Simulate DDS models including QoS Generate DDS executables and deploy ona DDS networkWith Embedded coder, generate– C production code with DDS APIs– XML or IDL files from Simulink models todeploy55

DDS Blockset in action Import DDS definitions from XML or createnew Definitions Define/Modify DDS definitions in DDSDictionary Model applications Simulate DDS models including QoS Generate DDS executables and deploy ona DDS networkFull integration with third-party DDS stacksincluding RTI Connext and eProsima Fast DDS56

Poll Question #3Are you working on DDS based applications? (Check all that apply)Yes, I’m working on a production or prototyping projectYes, I am generating C code from Simulink model configured for DDSYes, I am generating C code from Simulink model configured for DDSNo, but I’m going to work on DDS in near futureNo, I’m not planning to use DDS57

Conclusions and Key takeaways Automotive E/E and SW architecture are evolving, pushed by need foradvanced, complex functions New, service-oriented architectures are required to master complexityand enable frequent updates You can design, simulate and generate code to deploy service-orientedapplications in Simulink You can reuse your existing expertise and models to mitigate the risk ofmigration to SOA applications58

To learn more, visit the SOA, AUTOSAR & DDS Blockset oducts/dds.html59

Learn more by visiting demo showcase and partner talks at theMATLAB ExpoThomas Kleinhenz - Elektrobit Automotive - Developing aDriver Monitoring System Using Model-Based DesignFrancisco González - Vector Informatik - Developing aDriver Monitoring System Using Model-Based Design60

Get in touch!Please, reach out to us! We’ll be happy to work with you and embrace yourSOA project together.Poll - Are you interested in more information?a. Yes, I have some questions and would like to talkb. Yes, I would like to schedule follow up session on this topic with my teamc. Not at this time61

Thank you 2021 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See mathworks.com/trademarksfor a list of additional trademarks. Other product or brand names may be trademarks or registered trademarks of their respective holders.62

Designing and Deploying Service-Oriented Architectures (SOA) with Simulink Subject: Designing and Deploying Service-Oriented Architectures (SOA) with Simulink, Shwetha Bhadravatil Patil, Mar