<<

View metadata, citation and similar papers at core.ac.uk brought to you by CORE

provided by Archive Ouverte en Sciences de l'Information et de la Communication

AUTOSAR and SysML – A Natural Fit? Andreas Korff

To cite this version:

Andreas Korff. AUTOSAR and SysML – A Natural Fit?. Conference ERTS’06, Jan 2006, Toulouse, France. ￿hal-02270421￿

HAL Id: hal-02270421 https://hal.archives-ouvertes.fr/hal-02270421 Submitted on 25 Aug 2019

HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. AUTOSAR and SysML – A Natural Fit?

Andreas Korff1 1: ARTiSAN Software Tools GmbH, Eupener Str. 135-137, D-50933 Köln, [email protected]

Abstract: This paper should give some ideas on how the UML 2 and the SysML can help defining the 2. AUTOSAR different AUTOSAR artifacts and later applying the specified AUTOSAR part to real implementations. 2.1 The AUTOSAR Initiative The AUTOSAR definitions are currently being In July 2003 the AUTOSAR (AUTomotive Open defined on top of the UML 2.0. In parallel, the OMG ARchitecture) partnership was formally started in 2003 a Request for Proposal to define a launched by its core partners: BMW Group, Bosch, UML-based visual modeling language for Continental, DaimlerChrysler, Siemens VDO and Engineering. This SysML is also an addition to the Volkswagen. Afterwards Ford Motor Company, UML 2.0, so comparing the aims and ideas from General Motors, PSA Peugeot Citroën and Toyota AUTOSAR and from SysML is an obvious idea. This Motor Company become core partners as well. paper will show that using the AUTOSAR concepts Since inception, many other OEMs and automotive for automotive modeling and adding SysML suppliers have joined AUTOSAR as premium concepts will lead to complete picture of the members. Core and premium members assign automotive domain. resources to the different working groups within AUTOSAR. Associate members are allowed to view Keywords: AUTOSAR, SysML, Model-based finalized documents in advance to the public. Development, Domain-specific Modeling, Visual Development members can be nominated to participate in the AUTOSAR working groups. Modeling, UML

2.2 Objectives The AUTOSAR initiative will define standards, on which the implementation of future automotive 1. Current Situation applications will be based. By following these standards, it will be possible to manage the growing All current functional implementation solutions for E/E complexity of the development of automotive automotive electrical and electronic development are functionality. This will also result in greater flexibility proprietary. It is therefore quite difficult to exchange for product maintenance, enhancements and functions and applications between automotive updates. The solutions based on the AUTOSAR OEMs and suppliers. If this type of development approach will be scalable in and across product process structure continues, the foreseeable future lines. In addition, the exchange of functions between growth in functional complexity will result in the need OEMs and suppliers will be possible. All domain to invest increasingly more manpower while areas in automotive will be addressed: Powertrain, sacrificing complete control of the development Chassis, Safety, Multimedia/Telematics, process. Body/Comfort and Human Machine . The

automotive customer will therefore get cars of higher Modern cars have reached an exceptionally high quality with more reliable electronic components. level of functional complexity. Driven by new legal safety and environmental regulations, in addition to Three main topics have been defined: customer feature demands, automotive functionality • A basic software core requires ever more complex software and electronic components, which must be very closely coupled in • Standardized functional interfaces and a network structure to perform completely and • Methods for software integration. correctly. 3. Technical Concept of AUTOSAR

ERTS 2006 – 25-27 January 2006 – Toulouse Page 1/7 Structure . Above the ECU-Hardware, the Basic Software provides services to the AUTOSAR Software Components. Inside the Basic Software, there are four different elements: • The Services including RTOS services. Since the definition of an RTOS is not considered as a goal for AUTOSAR, existing RTOSes will be taken into account here. The basic Services also include communication functions for all relevant vehicle buses like FlexRay, CAN, MOST or LIN. • The Microcontroller abstraction which interfaces to the • ECU abstraction and • Complex Device Drivers, which allows direct access to Microcontroller-specific hardware, so complex sensors or actuators with specific functional and non-functional requirements can be implemented. The overall design concept in AUTOSAR is the separation of application and infrastructure. An application is formed by the connection of different Figure 1: The AUTOSAR Approach AUTOSAR software components. An example is given in figure 3. AUTOSAR will define a common software AutomaticLightControl ComingHomeLea- «ClientServerInterface» LightMaster Interface Interface vingHome infrastructure based on standardized interfaces. This if_light_request rain_li- : rain_light_condition driver_- driver_door «use» will include a standardization of different API’s, ght co- doorIF Interface passen- passenger_door resulting in the separability of the AUTOSAR ger do- software layers. An encapsulation of functional light_request «Interface» outside_brightness software components will be defined as well as the outside_brightness if_outside_brightn- «implement» ess data types of the software components. In order to allow these software components to work, the Figure 3: Example application, consisting of software infrastructure including basic software connected software components modules will be identified and specified. These basic software modules will have standardized interfaces. Partitioning and defining the best resource usage will As seen in the example, the AUTOSAR software therefore be possible, while still allowing local is the most important structural element. optimisation to meet specific non-functional Similar to the UML 2 components, the AUTOSAR constraints. software components contain – here unique- ports to interact with their outside world. Also in AUTOSAR required and provided interfaces are defined. These are connected to the ports, which are either PPort when their interface provides data or services, or RPort when a interface is required. AUTOSAR goes beyond UML 2 to define interfaces as either “Sender-Receiver” or “Client-Server”. A Sender- Receiver-Interface provides or requires data, whereas a Client-Server-Interface defines services. UML 2 stereotypes together with appropriate constraints are a promising way to support this. An example of a Client-Server connection is shown in Figure 4.

Figure 2: The ECU Architecture

The AUTOSAR software architecture consists of a layered design: Figure 1 shows this as a UML

ERTS 2006 – 25-27 January 2006 – Toulouse Page 2/7 «AUTOSAR Software Component» provides to other components. In addition, the client1 infrastructure requirements, the hardware resources «ClientServerInterface» Service_requested needed, and specific implementation details to be followed, are specified in the software component «AUTOSAR Software Component» server description.

«ClientServerInterface» If an AUTOSAR software component is Service_provided «AUTOSAR Software Component» implemented, this implementation is independent client2 from the specific ECU (or the Microcontroller

«ClientServerInterface» architecture within the ECU) to which the component Service_requested is mapped. Even the software components that are needed to get the necessary data or functionality Figure 4: Client-Server communication don’t have to reside on the same ECU. Additionally it is possible to have multiple instances of the same The AUTOSAR sender-receiver communication software components running. always exchanges data asynchronously and in a There are specific AUTOSAR software components non-blocking manner. New symbols can and should for sensors or actuators. These generally run on the be used to quickly communicate this to those who ECU that the sensor or actuator is physically read the . This is shown in figure 5. Note: connected to, and encapsulate the physical nature of Since the interface symbols “ball” and “socket” the sensor output or actuator input. The technical currently couldn’t be replaced graphically, the details of the ECU and its Microcontroller(s) are synonym Interface dependencies defined within the hidden as usual - the Sensor/Actuator software UML have been used here. component depends on the sensor or actuator for «AUTOSAR Software Component» Class rece receiver1 which it is designed. «use»

«AUTOSAR Software Component» sender «Interface» send_information «implement»

«AUTOSAR Software Component» Class rece receiver2

«use»

Figure 5: Sender-Receiver communication

The size of an AUTOSAR software component is not defined. However, a software component is atomic, as such it cannot be divided and thus cannot run on several ECU’s. In a UML model, this can be Figure 6: Hardware Interaction achieved by defining a 1:1 relationship between the software component and the appropriate ECU. 4. Virtual Functional Bus Although an AUTOSAR software component is designed independently from the available In order to make AUTOSAR Software components infrastructure, its interface, functional and non- relocatable, the concept of the Virtual Functional Bus functional constraints must be described. Within (VFB) has been developed. Using software AUTOSAR, the format and structure of the software component descriptions as input, the VFB validates component description has to follow the definitions of the interaction of all components and interfaces the so-called software component template. This before software implementation. So the integration guarantees that the description contains all the can be tested much earlier than today. necessary information, such as the operations and attributes that the software component requires or

ERTS 2006 – 25-27 January 2006 – Toulouse Page 3/7 «AUTOSAR Software Component» «AUTOSAR Software Component» software to hardware mapping should be done with Actuator SW Component Application SW Component tool support. AUTOSAR SW : AUTOSAR Interface : AUTOSAR Interface 6. UML 2.0 and its extension mechanism «AUTOSAR Software Component» «AUTOSAR Software Component» Application SW Component Sensor SW Component When cross-referencing the ideas of UML and AUTOSAR, it is obvious that UML 2 and AUTOSAR : AUTOSAR Interface : AUTOSAR Interface use similar concepts, e.g. components, ports and «API 2» «API 2» «API 2» interfaces, which are defined in the UML class model VFB for composite structure diagrams. Therefore the UML 2 syntax can be used directly for the system description within AUTOSAR. However, some «ECU Firmware» «Standard Software» Complex Device Drivers «API 2» «API 2» «API 2» Services concepts in AUTOSAR require the adaptation of : Standardized Interface : AUTOSAR Interface UML to fit to the AUTOSAR syntax. A UML Profile for AUTOSAR is necessary, which adds all AUTOSAR specific information and containers into ECU Abstraction UML 2. Some have been defined in the figures in : AUTOSAR Interface this paper using the graphical adaptability of ARTiSAN Studio 6.0. Figure 7: Atomic Software Components and Since the Meta model of AUTOSAR is based on the AUTOSAR Services connected to the Virtual UML 2.0, the first step to make a UML tool like e.g. Functional Bus ARTiSAN Studio AUTOSAR-compliant is defining additions to UML specifically for AUTOSAR within an Within the VFB, all necessary connectability between AUTOSAR Profile. Then developers can use a tool AUTOSAR Software Components is abstracted, like ARTiSAN Studio to describe AUTOSAR independent from their future location in the vehicle. compliant software by using the domain-specific So if two components have to communicate, this can terms and graphical elements. In order to support be specified even without the knowledge of the domain-specific modeling even further, it is specific hardware on which these software necessary to be able to specify rules for modeling. components are running. Also the communication This enables the user to avoid modeling errors from needs of an AUTOSAR Software Component are the beginning or helps him by adding e.g. fulfilled within the VFB in an abstract manner (using AUTOSAR-specific elements or structures its underlying layers like OS or hardware drivers). automatically to the manually edited model Well-defined communication patterns within the VFB elements. ARTiSAN Studio 6.0 includes this provide the abstract communication services. The capability by the possibility to add scripts to those realization within the different ECU’s is done by the UML stereotyped extensions, which can also be AUTOSAR Run-time Environment (RTE) after the used to restrict the modeling activities to the mapping onto the existing hardware. Within the RTE, connections and properties allowed in AUTOSAR. the communication functionality is implemented in the Basic Software and its communication means. 7. SysML Figure 6, a graphically stereotyped UML composite structure diagram, shows the elements that can be The AUTOSAR structural definitions base on UML connected via the VFB. Only the Complex Device 2.0. In parallel, the OMG started a Request for Drivers and the ECU abstraction are specific to the Proposal in March 2003 to define a UML-based Hardware used. modeling language for . Currently two teams, the SysML partners and the 5. Technical Artifacts SysML Submission Team are working in parallel to meet the schedule to finalize the SysML specification In order to build up systems using the concepts of by Q1 2006. AUTOSAR, several artifacts have to be created. First every AUTOSAR Software Component will be The SysML is defined to be a graphical modeling described by its Software-Component Description. language For Systems Engineering in response to This is XML-based and includes detailed definitions the requirements developed by the OMG, INCOSE, of the ports, interfaces and connections between the and AP233. It re-uses a subset of UML 2.0 and add Software Components. ECU descriptions, also in extensions to it, thus supporting the specification, XML format, will describe the available resources. In analysis, design, verification and validation of a addition, the System Constraint Description will give broad range of complex systems. The systems may additional information about the constraints given by include hardware, software, data, personnel, an already existing network architecture. This procedures, and facilities.

ERTS 2006 – 25-27 January 2006 – Toulouse Page 4/7 SysML complements the UML 2, so both Systems The SysML does not use all the thirteen diagram Engineers using the SysML and Software Engineers types defined in the UML 2.0. Instead it uses its own working with UML 2.0 can seamlessly cooperate diagram taxonomy, where two new diagram types using the same graphical language with different are introduced: characteristics. • Requirement Diagram «metamodel» MOF • Constraint Diagram Some structural diagram types are defined in a simpler way compared to the UML 2 to reflect systems engineering concepts better. Also some diagram type names have been changed.

«Diagram Type» SysML Diagram «instanceOf» «metamodel» «metamodel» UML SysML «Diagram Type» «new Diagram» «Diagram Type» Structure Diagram Requirements Diagram Behavior Diagram «import»

«modified Diagram» «modified Diagram» Diagram Timing Diagram Block Definition Diagram Internal Block Diagram

Instance Diagram State Machine Diagram

«new Diagram» Constraint Diagram «instanceOf» same as UML 2 «modified Diagram» «instanceOf» Simplified Parametric Diagram «userModel» «modelLibrary» in SysML v0.9 XYZ Model Derived from UML 2.0 SysML Profile Composite Structure Diagrams

«reuse» Figure 10: SysML Diagram Taxonomy

In order to understand the focus of the SysML better,

let’s have a look on the new diagram types. They Figure 8: Embedding of SysML and SysML models explain the gaps for systems engineering within the into UML 2.0 UML 2. This existing modelling language already incorporated very important structural modelling Since the work on SysML is not finalized yet, the capabilities like structural sequences and composite concepts and ideas presented here contain the structures. However, especially the ability to use and status of the on-going work today, in November model requirements is essential for systems 2005. They may change until the final SysML engineers. specification is released. req VehicleSystemRequirementsFlowDown

«reqDocument» VehicleSystemUseCases 8. The SysML Profile Structure MarketNeeds «rationale» UCD uc Ref: Statement of Work Drive Vehicle «trace»

«trace» Driver In order to extend the UML 2, the SysML defines a «requirement» SysML Profile. This is divided into several sub- Vehicle System Specification

Vehicle System Design packages. «requirement» «satisfy» «requirement» R111 VehicleAcceleration «» id# SysML 111 «block» Vehicle txt System shall ... «profile» «profile» «profile» «requirement» Blocks Activities ModelElements {id# = 102; 1 txt = System shall «deriveReq» id# = 111 accelerate from 0 - 1 1 brake 60 mph in lest «modelLibrary» «modelLibrary» «block» «block» Units ControlValues than 8 seconds Power Train Brakes under the specified... «rationale» Ref: Trade Study

«requirement» Power Subsystem Design (Alternative=V6) Power Subsystem Specification «satisfy»

«profile» «profile» «profile» «profile» ConstraintBlocks Flows Requirements Allocations «requirement» «requirement» {id# = 337} {id# = 340} R337 R340

«verify»

«testCase» Engine Horsepower Test Figure 9: SysML Profile structure The sub-profiles, stereotypes and tag definitions Figure 11: Requirements Diagram defined in the SysML Profile extend the existing Within automotive development, the success of meta model elements of UML 2. requirements management tools show the big need of this engineering perspective. Within the SysML, it 9. SysML Graphical Notations will be possible to use a standardized set of profile

ERTS 2006 – 25-27 January 2006 – Toulouse Page 5/7 elements to describe requirements completely. This systems modelling. The UML 2 only uses - includes the requirements properties like e.g. name, based modelling, which is enough for the software ID, requirement descriptions and others. Additional perspective. To build up a system also using the the requirement dependencies like the fact that one systems engineering perspective, it is additionally requirement is derived from others or a requirement needed to be able to use e.g. physical equations. contains other requirements can be graphically shown. The really new -and important- modelling cns Mass Equat ion capability is that the requirements can be linked to other modelling artefacts like system elements from the system design or test cases. This is done using «constraintUsage» stereotyped dependencies like <> for test m l = cases or > for design elements. The fact to r have all three perspectives, requirements, design elements and tests, in one model will empower the user to trace down any missing link between these three worlds. If there is a requirement, which is not satisfied by at least one design item or which does not have a link to a defined test which can verify it, p this can be automatically analysed. «constraintUsage» The next new concept within the SysML is the d m1 * m2 v notation of blocks. Similar to the UML 2 components, the block are not restricted to software components. They represent a module which can be at any level in the system hierarchy, including external systems, Figure 13: Constraint Block Example logical or physical subsystems, independent if consisting of software and/or hardware. Blocks can The frame itself represents a constraint block, the be used for black-box or white-box modelling. pins on the frame show parameters. In the constraint Block definition diagrams are simplified class block there is the possibility to include other diagrams from the UML 2. They use the composition constraint blocks. The constraints can be linked to association, now between blocks. blocks. So flows are supported as well, i.e. flow

def System Blocks properties, flow items and flow ports. The SysML definition for flows extends the UML 2 information «block» 11«block» flow. Tank sink Water System

«flowPort» {in} 11sourceFlow : Water The diagrams are enhanced within the liquidIn : Liquid source sinkFlow : Water SysML to include the continuous item flows, so the «flowPort» {out} liquidOut : Liquid behavior of elements are better and completely 1 described. 1 pump «block» act Pump Pump

«continuous» «flowPort» {in} «continuous» LIn : Liquid LOut : Liquid pumpedIn inLiquid outLiquid «flowPort» {out} PumpLiquid pumpedOut gain : Real pumpSpeed : Real «continuous» {rate = 10/s} pumpSpeedFlow gainFlow Figure 12: Block Definition Diagram gain : Real pumpSpeed : Real on : controlValue «controlOperator» ControlCompressor EnablePumping The internal block diagrams are stereotyped demand : Real pump : Real composite structure diagrams. The compositions already modelled in the block definition diagrams are speedDemand pumpingFlag re-used. However, the internal connectivity is added in this diagram form. Figure 14: Activity Diagram Example

The next new diagram within the current SysML 10. Conclusion definition is the constraint diagram. Within the The AUTOSAR initiative shows how domain-specific version 0.9 of the SysML profile, it was called modeling for automotive modeling can be defined to parametric diagram. The reason behind this addition standardize concepts, interfaces and services. This to the UML 2 is the necessity to include time- will be specified based on the UML 2.0 using a UML continuous modelling and physical equations into the Profile for AUTOSAR. All necessary constructs for

ERTS 2006 – 25-27 January 2006 – Toulouse Page 6/7 software components, system constraints and system definitions will be included. However, taking into account the generic systems engineering requirements for modeling complex systems, these can be used in automotive modeling as well. The SysML closes the gaps between systems and by streamlining and extending the UML 2 concepts to fit better for modeling systems of systems.

7. References

[1] Information about AUTOSAR: http://www.autosar.org/find02.php [2] UML 2.0 Superstructure: http://www.omg.org; Unified Modeling Language: Superstructure, version 2.0, formal/05-07-04 [3] UML 2.0 Infrastructure: http://www.omg.org; Unified Modeling Language: Infrastructure, version 2.0, ptc/04-10-14 [4] SysML: http://www.omg.org; UML for SE RFP: ad/03-03-41 [5] SysML: http://www.omg.org; SysML V0.9: ad/05- 01-03 [6] Information about ARTiSAN Software Tools: http://www.artisansw.com/.

8. Glossary

AUTOSAR AUTomotive Open System ARchitecture UML Unified Modeling Language SysML Systems Modelling Language SW-C AUTOSAR Software Component VFB Virtual Functional Bus ECU Electronic Control Unit XML eXtensible Markup Language

ERTS 2006 – 25-27 January 2006 – Toulouse Page 7/7