Professional Documents
Culture Documents
The AUTOSAR Way of Model-Based Engineering of Automotive Systems
The AUTOSAR Way of Model-Based Engineering of Automotive Systems
The AUTOSAR Way of Model-Based Engineering of Automotive Systems
Automotive Systems
Heiko Dörr
International Conference on Graph Transformation
Leicester, 12.09.2008
Future model-based
engineering of
automotive systems will
use AUTOSAR
Long history of
graph transformation
Explore
Explorepotentials
potentials
Sound body of theory of
ofthe
theapplication
application
of
ofgraph
graph
Several areas of application transformation
transformationin in
Tool-support available to handle larger models an
an AUTOSAR
AUTOSAR
development
development
Identification
Identificationof
of
research
researchand
and
- - Folie 2
development
developmenttopics
topics
1
Content.
1 2 3 4
Automotive
AutomotiveSystem
System AUTOSAR
AUTOSAR Methodology
Methodologyof
of R&D
R&DTopics
Topics
Engineering
Engineering Standardization
Standardization System
SystemDevelopment
Development
AUTOSAR
AUTOSAR
AUTOSAR
AUTOSAR
SW-C
SW-C
SW-C
SW-C
...
2
1
n
Architecture
Virtual Functional Bus
ECU
Methodology of SW components
System Constraint
Descriptions Description
Application
Methodology
Interfaces ECU I ECU II ECU m
AUTOSAR
AUTOSAR
AUTOSAR
AUTOSAR
SW-C
SW-C
SW-C
SW-C
...
n
RTE RTE RTE
Gateway
- - Folie 3
2
Automotive Open System Architecture
Cooperate on standards – compete on implementation
Non functional
legal requirements
Vehicle family
management
Resource efficiency
Driver assistance
Driving dynamics
Safety functions
(active/passive)
Comfort functions
Exchangeability
between
OEM a supplier‘s
Platform b.1 solutions OEM c
Platform b.2
Platform b.n
Platform a.1
Platform a.2 Supplier A Supplier B
Platform c.1
Platform a.n Chassis
Chassis Platform c.2
Safety Platform c.n
Safety
Exchangeability Body/Comfort Telematics
Multimedia
between Multimedia OEM d
manufacturer‘s Supplier C
applications Body/Comfort
Powertrain
OEM f Telematics
Multimedia Platform d.1
Platform d.2
OEM e Platform d.n
Platform f.1
Platform f.2 Exchangeability
Platform f.n
Platform e.1
between vehicle
Platform e.2 platforms
Platform e.n
3
Model-based Development.
General Task.
Driver
W*
Vehicle
Demand U
Measurement Actuators
R Control
Sensors
Y
Plant
(Electronic) Control Unit
Z
Environment
W
U
R
Control Unit
W WINT UINT U
Power /
Input Micro- Communi
Decoder controller cation
R RINT Control
- - Folie 7
MbE-Slides by M. Conrad, Abb: Schäuffele/Zurawka: Automotive Software Engineering; Foto: www.bba-reman.com/ images/ecu.jpg
Model-based Development.
Paradigm Shift.
Model based
Document based
development
development process
Idea process
Micro controller
WINT A/D WDIS Software
converter UDIS D/A UINT
converter
RINT A/D RDIS
converter
Software component
for computation of
- - Folie 8
control functions
MbE-Slides by M. Conrad
4
Model-based Development.
Evolution of Models.
Idea
Requirements /
Behavioral model of system
t
Physical model
Implementation model
Autocode
*.c *.h
Micro controller
WINT A/D WDIS Software
converter UDIS D/A UINT
converter
RINT A/D RDIS
converter
- - Folie 9
MbE-Slides by M. Conrad
Complex
Operating Hardware Device
System Drivers
Standardized Interface
DIO PWM CAN Driver
Microcontroller Abstraction
10
5
Use case ‘Front-Light Management’
Exchange of type of front-light
SwitchEvent LightRequest Front-Light Manager Xenonlight
Headlight
check_switch () switch_event(even request_light(type, mode) set_light(type, mode)
t) get_keyposition()
switch_event request_light
set_light(type, mode) set_current (…)
(event) (type, mode)
Complex
Operating Hardware Device
System Drivers
Standardized Interface
DIO PWM
DIO CAN Driver
Microcontroller Abstraction
11
Distribution on ECUs
SwitchEvent LightRequest
LightRequest Front-Light Manager Xenonlight
check_switch () switch_event(even request_light(type, mode) set_light(type, mode)
t) get_keyposition()
switch_event request_light
set_light(type, mode) set_current (…)
(event) (type, mode)
AUTOSAR RTE
Standardized Std. AUTOSAR Standardized AUTOSAR AUTOSAR
Interface Interface Interface Interface Interface
Communi- ECU
Services cation Abstraction
Standardized
Complex
Operating Device
System Drivers
Standardized Interface
DIO PWM
DIO CAN Driver
Microcontroller Abstraction
ECU-Hardware
12
6
Use case ‘Front-Light Management’ – Multiple ECUs
SwitchEvent LightRequest Front-Light Manager Xenonlight
check_switch () switch_event(event) request_light(type, mode) set_light(type, mode)
get_keyposition()
switch_event request_light
set_light(type, mode) set_current (…)
(event) (type, mode)
CAN Bus
13
AUTOSAR Standardization
14
7
AUTOSAR – Core Partners and Members
Status: 13th March 2008
67 Associate Member
52 Premium Member
AUTOSAR
Project Objectives and Main Working Topics
16
8
AUTOSAR
Main Working Topics
Architecture:
Architecture
Software architecture including a complete basic or
Application
environmental software stack for ECUs – the so called
Methodology
Interfaces
AUTOSAR Basic Software – as an integration platform for
hardware independent software applications.
Methodology:
Exchange formats or description templates to enable a
Architecture
Application
Methodology
seamless configuration process of the basic software stack
and the integration of application software in ECUs and it
Interfaces
Application Interfaces:
Architecture
Specification of interfaces of typical automotive applications
Application
Methodology
from all domains in terms of syntax and semantics, which
Interfaces
should serve as a standard for application software.
17
18
9
AUTOSAR ECU Software Architecture
Application Software
(ASW)
Standardization of
interfaces
Not standardized in
AUTOSAR
Basic Software
(BSW) +RTE
Standardization of
interfaces and behavior
19
Interf.
Watchdog Manager
Development Error
Function Inhibition
AUTOSAR Diagnostic SM
Diagnostic Event
Communication
Manager FIM
Manager DEM
COM Com.
I/O Hardware
Manager
Manager
Tracer
LIN Abstraction
FlexRay NM
NVRAM
Manager SM
PDU Router CAN NM
IPDU
Multi- FR
LIN CAN FlexRay
plexer SM
TP TP TP
Watchdog Interface
EEPROM Flash EEPROM
BSW Scheduler
CAN transc
FR transc
Abstraction Emulation
Ext. CAN
Ext. FR
Driver
Driver
Driver
Driver
External
Watchdog Ext.
Driver EEPROM Ext. Flash
Driver Driver
LIN Communication
SPI Handler Driver
internal EEPROM
Watchdog Driver
Flash Check
PORT Driver
PWM Driver
MCU Driver
ADC Driver
GPT Driver
CAN Driver
DIO Driver
ICU Driver
LIN Driver
RAM Test
FR Driver
Driver
Stack
Clock Unit
EEPROM
e.g. CCU
e.g. PCP
e.g. TPU
Ext. BUS
Power &
FlexRay
FLASH
PWM
CCU
WDT
MCU
ADC
CAN
GPT
DIO
SCI
SPI
LIN
Microcontroller µC
20
10
Intra- and Inter-ECU Communication
Hardware
Sensor
Communication Bus
Communication Path
21
AUTOSAR aims at finding the best solution for each requirement and
2 not finding the highest common multiple.
22
11
Main Concepts: Application Interfaces
Standardization approach
Current stage of standardization
23
Complex
Operating
System Semantics of Interfaces:
Device
Drivers
Standardized
Physical properties, units, etc.
Interface
Basic Software
Supporting re-use across product Micro- lines
controller
In scope of AUTOSAR workAbstraction
packages specifying application
interfacesECU-Hardware
24
12
To ease the re-use of software components across several OEMs,
AUTOSAR proceeds on the standardization of the application interfaces agreed
among the partners.
Example
Data Type Name LongAccBase
…
Data Type Name YawRateBase
ESP-Sensors
ESP-Sensors
Description Yaw rate measured along vehicle z- axis
(i.e. compensated for orientation).
Coordinate system according to ISO
Base Sensor Signals
I1
Interface of ESP
8855
and VLC
25
OK
Chassis Domain
ActualVehicleSpeed
CentralLockingMaster
VehicleLongSpeed DataElement
Name DataType
ESP ACC
Steering VehicleLongSpeed VehicleLongitudinalSpeed
SSM Min Bit; size; Res; phys low; phys up; Unit
Suspension ?? ?? ?? ?? ?? ??
EPB
… ?
VLC
26
13
AUTOSAR Application Interfaces – Conclusion
27
28
14
Following the AUTOSAR Methodology, the E/E architecture is
derived from the formal description of software and hardware components.
AUTOSAR
AUTOSAR
SW-C
SW-C
SW-C
SW-C
... Components” (SW-C).
2
1
n
Using “Software Component
Descriptions“ as input, the „Virtual
Virtual Functional Bus
Functional Bus“ validates the
interaction of all components and
interfaces before software
Tool supporting deployment implementation.
of SW components
ECU
Descriptions
System Constraint Mapping of “Software Components” to
Description
ECUs and configuration of basic
software.
ECU I ECU II ECU m
The AUTOSAR Methodology supports
AUTOSAR
AUTOSAR
AUTOSAR
AUTOSAR
SW-C
SW-C
SW-C
...
1
Gateway
29
AUTOSAR Methodology
Derive E/E architecture from formal descriptions of soft- and hardware
components
VFB view
SW-C SW-C SW-C SW-C
DescriptionDescriptionDescription Description
AUTOSAR
AUTOSAR
SW-C
SW-C
SW-C
...
1
Mapping
Tools for
- support of component mapping
ECU I ECU II ECU m
- generation of RTE, i.e. inter- and
AUTOSAR
AUTOSAR
AUTOSAR
AUTOSAR
SW-C
SW-C
n
1
...
RTE RTE RTE Standardized Basic Software
Basic Basic Basic (BSW) architecture, detailed
Software Software Software
specifications for implementation
and configuration of BSW
Gateway
30
15
To configure the system, input descriptions of all software
components, ECU resources and system constraints are necessary.
Example
SwitchEval
SW-Component Description
ECU Resource ECU Resource ECU Resource
Description Description Description
BlinkInputModule
SwitchEval
SW-Component Description
BlinkInputModule
Supported protocols:
BlinkMaster
CAN, LIN, FlexRay
SMLS System BlinkMaster
SW-Component Description
Description
BC-H LightActuatorsControl
BC-V LightActuatorsControl
LightSourceSetting
SW-Component Description
CAN
LIN LightSourceSetting
31
System Configuration
SWCMappingDefs DataMappingDefs
BlinkRequest
SwitchEval
Blink
Blink
Input
Master
Module
BlinkInputModule
BlinkMaster
Comm.Matrix for BodyCAN
LightActuatorsControl
FrameInstance
…BlinkRequest
LightSourceSetting SignalBS1SignalBS2 SignalBS3
32
16
AUTOSAR – System Design – Implementation Process
Input: Requirements & Vehicle Info
1a 1c 1b
SW Component System ECU Resource
Description Description Description
2
Configure System
& generate extracts
of ECU descriptions Iterative corrections
and(/or optimizations
(if required)
3
Configure
each ECU
SW Component
4
Generate SW
executables
for each ECU
SW executables
for each ECU
33
„v_warn()“
Template
ponent m
SW Com-
ponent 3
„get_v()“
SW Com-
Description
Description
Description
Description
...
Example: speed
warning device Virtual Functional Bus
34
17
AUTOSAR – Input Descriptions (1 of 3)
Step 1a): Description of SW-Components independently of hardware
SW Component Description
General characteristics (name,
manufacturer, etc.)
Communication properties:
Information for each SWC - p_ports
e.g. “get_v()” - r_ports
- interfaces, behavior (repetition rate, ...) - interfaces
- direct hardware interfaces (I/O) inner structure (composition)
- requirements on run-time performance - sub-components
(memory, computing power, throughput, - connections
timing/latency, …) required HW resources:
- ... - processing time
- scheduling
- memory (size, type, etc.)
„get_v()“
AUTOSAR-Description
Software Component
Editor
Description
= tool based
35
AUTOSAR-Description ECU 1
Editor Resource
Description
= tool based
36
18
AUTOSAR – Input Descriptions (3 of 3)
Step 1c): Description of system
System Description
Network topology
- bus systems: CAN, LIN, FlexRay
- connected ECUs, Gateways
- power supply, system activation
System Information
overall system Communication (for each channel)
- bus systems, protocols, - K-matrix
communication matrix and - gateway table
attributes (e.g. data rates, timing, …) Mapping / Clustering of SW
- function clustering components
- function deployment
(distribution to ECU)
- ...
System-
AUTOSAR-Description
Description
Editor
= tool based
37
Configuration-
SW Com-
SW Com-
„get_v()“
ponent n
ponent 3
Description
Description
Description
Description
Descript.
Configuration-
ECU1
System-
- Description
Descript.
Configuration-
1,
ECU2
... - Description 2, 5,
- Description
Descript.
- ... - Description
- Resources
ECUm
- Description
6, k,
- ... - Description n,
- ... - Ressources
- ...
- ... - Ressources
AUTOSAR-System Definition (Distribution of SW-Compo-
nent-Descriptions considering resources available) ... - ...
SystemDescription
ECU-Resource
ECU-Resource
ECU-Resource
ECU-Resource
-Description
-Description
-Description
ECU 1
ECU 2
ECU 3
to CAN matrices
... - ...
38
19
AUTOSAR – ECU-Configuration
Step 3: Generation of required configuration for AUTOSAR-Infrastructure
per ECU
AUTOSAR-Configuration
ECU1
Configuration-
Descript. ECU1 System Description configuration of
the AUTOSAR-RTE
- Description 1, - e.g. mapping of signals
- Description 2, to CAN matrices
- ... - ... configuration of
AUTOSAR OS
- Resources
configuration
of MCAL
AUTOSAR - ECU Configuration Generator
Configuration
AUTOSAR-RTE-Config-Info of COM stack
- communication mechanisms
- transport protocols
etc
- ...
= tool based
39
Application SW AUTOSAR-Library
Body of the - communication
SW components - transport protocols, ...
(code, macros, Objects, ...)
SW-Components ECU1
AUTOSAR-Configuration (derived partially from the Virtual Function Bus)
ECU1 Tooling
AUTOSAR-
configuration of AUTOSAR-RTE
RTE
the AUTOSAR-RTE
Generator
configuration of OS
AUTOSAR OS Generator OS
configuration MCAL-
MCAL COM
of MCAL Generator
40
20
AUTOSAR Methodology – Conclusion
The meta model approach and the tool support for specifying the
2 AUTOSAR information model allow working at the right level of
abstraction.
41
CAN Bus
42
21
Topics for Research and Development
System configuration
Semi-automatic mapping of communication
- - Folie 43
System Configuration.
1a 1c 1b
SW Component System ECU Resource
Description Description Description
2
Configure System
& generate extracts
of ECU descriptions
22
System Configuration.
Communication Mapping.
ECU I ECU II
Appli- Appli- Appli-
cation cation cation
SW-C SW-C SW-C
Application
A B C
Data Types
Ports
System Signals
RTE VFB RTE
AUTOSAR Interaction Protocol
Infrastructure Data Units
BSW BSW
Frames
Hardware
Sensor
Communication Bus
Communication Path
- - Folie 45
Communication Mapping.
Level 1: Primitive Data Types System Signals.
23
Communication Mapping.
Level 2:
System Signals
Run Time Environment
Interaction Protocol Data Units.
Communication Mapping.
Level 3: Interaction Protocol Data Units Frames.
Mapping of Communication
Manager to PDU Router
24
Communication Mapping.
Tooling.
Description
„v_warn()“
Configuration-
SW Com-
SW Com-
„get_v()“
ponent n
ponent 3
Description
Description
Description
Description
Descript.
Configuration-
ECU1
System-
- Description
Descript.
Configuration-
1,
ECU2
... - Description
- Description
Descript.
2, 5,
- ... - Description
- Resources
ECUm
- Description
6, k,
- ... - Description n,
- ... - Ressources
- ...
- ... - Ressources
AUTOSAR-System Configuration Generator
(Definition of mappings) ... - ...
SystemDescription
ECU-Resource
ECU-Resource
ECU-Resource
ECU-Resource
- e.g. mapping of signals
ECU m
-Description
-Description
-Description
-Description
ECU 2
ECU 3
ECU 1
to CAN matrices
... - ...
Challenges
Complexity and size of system configuration
- - Folie 49
Conclusion
AUTOSAR
Leverages model-based engineering of automotive software to whole systems
Standardization itself is highly formalized and so supports formal system
development
Shifts implementation efforts to configuration
Graph Transformation
Is the technology for semi-automatic configuration
Can reduce the configuration complexity
Needs to build domain knowledge
- - Folie 50
25
Further Information
http://www.autosar.org
Published version of
AUTOSAR Release 3.0
request@autosar.org
- - Folie 51
Backup
- - Folie 52
26
Challenges in Automotive E/E Development
53
Application Layer
Microcontroller
54
27
Example: “NVRAM Manager” ensures the storage and maintenance
of non-volatile data and is independent of the design of the ECU.
Example
Memory Services
NVRAM Manager
EepIf_Read()
EepIf_Write()
Memory Hardware Abstraction
Mem Abstraction Interface
Application Layer
EEPROM Abstraction
AUTOSAR Runtime Environment (RTE)
System Services Memory Services Communication I/O Hardware Complex
Services Abstraction Drivers
SPI µC EEPROM
External EEPROM
55
56
28
AUTOSAR Metamodel
Formal description of all methodology related information
57
29