“I can make just such ones if I had tools, and I could make tools if I had tools to make them with.”
to make them with.”
Automotive Software Development and Model Based Design
(Matlab & Simulink)
Outline
Common Software Design Life Cycle
• AGILE
• WATERFALL • V-MODEL
V-Model SDLC and LEAR
• People • Process
• Tools for the right job
MATLAB and Lear
Software Design Life Cycle
AGILE
WATERFALL
WATERFALL
V-MODEL
Constraints
Validated and
100% Working
Software
Validated and
Verified
Safety Critical
Safety Critical
Constraints
Recalls
Recalls
Constraints
Global Team
SPAIN THAILAND GERMANYGlobal Team
SOFTWARE
PHILIPPINES INDIA USA AUSTRALIASOFTWARE
PHILIPPINES AUSTRALIASoftware Design Life Cycle
AGILE
WATERFALL
V-MODEL
• Changing Requirements • Customer Transparency
• High quality software in least
possible time
• Simple to implement • High visibilty
• Quality
• Resources are minimal
• Simple to implement
• Higher success rate than the
Waterfall
• Validation and Verification • Issues are found early
• Difficult to manage on a
large project
• Lack empahsis on designing
and documentation
• No place for newbies
• Dependent on each phase • Rigid / Not flexible
• Roadblocks
• Changes in specification
• Issues are found early • Needs a lot of resources • No early prototypes
• More documents • No place for newbies
Software Design Life Cycle
The Vehicle
Body Control
Module
Interior
Lighting
Lighting
Engine Control
Module
Infotainment
Infotainment
Anti-lock Brake
System
Exterior
Lighting
Wayne Enterprises
Body Control
Module
Basic Software
Hardware
Application
Software
V-Model SDLC (Requirement Analysis)
Process
• Needs of the costumer • Behavior of the software • Guildline for the Software
Architect • Ideal System • Ideal System • Customer • Specification Engineer • Software Architect
People
• Software Architect • Software Engineer • Validation EngineerV-Model SDLC (Requirement Analysis)
Park Brake Switch
Alarm Theft Protection
Central Locking System
Central Locking System
Immobilizer
Remote Start
V-Model SDLC (High Level Design)
Process
• List of modules
• Functionality of the modules • Communcation
• Interface Relationships
• Software Architect
V-Model SDLC (High Level Design)
Application Layer
Application Layer
Application Layer
Runtime Environment
Runtime Environment
• Vehicle Features• Relevance to the Application Layer • Access to I/O Layer
Services Layer
Runtime Environment
Runtime Environment
Complex
Drivers
Complex
Drivers
Services Layer
ECU Abstraction Layer
• Diagnostics
• Vehicle Network Communcation • Access to peripherals of the uC
ECU Abstraction Layer
Drivers
Drivers
Microcontroller
Microcontroller
Microcontroller Abstraction Layer
Microcontroller Abstraction Layer
• Direct access to Internal peripherals • Internal Drivers
V-Model SDLC (High Level Design)
Application Layer
Application Layer
Runtime Environment
Runtime Environment
Application Operating System CommunicationRuntime Environment
Runtime Environment
Complex
Drivers
Complex
Drivers
Services Layer
ECU Abstraction Layer
Software
Basic Software
Hardware I/O
Drivers
Drivers
Microcontroller
Microcontroller
Microcontroller Abstraction Layer
Microcontroller Abstraction Layer
Basic Software
Diagnostics Hardware I/O
V-Model SDLC (Detailed Specification)
Process
• Detailed function of the
application
• Signal Inputs and Outputs • Interface with other
applications applications
• Software Engineer
V-Model SDLC (Detailed Specification)
• Park Brake Switch
• Park Brake Switch Indicator
Input and Output
Functional Behavior
• When Park Brake SwitchSwitchSwitchSwitch == ON • Park Brake Switch IndicatorIndicatorIndicatorIndicator = ON
Functional Behavior
• When Park Brake SwitchSwitchSwitchSwitch == OFF • Park Brake Switch IndicatorIndicatorIndicatorIndicator = OFF • Park Brake Switch IndicatorIndicatorIndicatorIndicator = OFF
V-Model SDLC (Coding)
MATLAB
• Simulink
• Embedded Coder • Stateflow
• Verification and Validation
• Software Engineer
People
V-Model SDLC (Coding)
main(){
Do Task1();
Start Task If TaskDo Task1();
Do Task2();
If Task3 == TRUE{
Do Task4();
}
}
If End Task}
V-Model SDLC (Coding)
main(){ while(){
if(Park Brake Switch == TRUE){
Park Brake Switch Indicator = TRUE; }
Traditional Coding
}
else{
Park Brake Switch Indicator = FALSE; }
} }}
V-Model SDLC (Coding)
Model Based Design
Model Based Design
COMPLEX
EVOLVING
EVOLVING
READABILITY
MAINTAINANCE
MAINTAINANCE
“ Any code of your own that you haven't looked at for six or more months might as well
have been written by someone else. ”
- Eagleson's law
V-Model SDLC (Code Generation)
Auto Generated Code
Auto Generated Code
• Switch Case • Optimized
Park Brake Switch
Model
Source Codes
Model
MATLAB
V-Model SDLC (Unit Testing)
MATLAB
• Simulink • Stateflow
• Stateflow Coder
V-Model SDLC (Unit Testing)
Unit Testing
REMOTE START ALARM PARK BREAK SWITCH• Individual units of source code • Smallest Testable part of the
software
• White Box Testing
APPLICATION • Software Engineer
People
INTERIOR LIGHTS CENTRAL LOCKING SYSTEM IMMOBILIZER • Software EngineerV-Model SDLC (Unit Testing)
MATLAB Signal Builder
Lear MVT
Park Brake
Lear MVT
Park Brake Switch
Indicator
Park Brake
Switch
V-Model SDLC (Integration Testing)
MATLAB
• Simulink • Stateflow
• Stateflow Coder
CAN(Controller Area Network)
CAN(Controller Area Network)
Bus Simulation Tool
• Test all the modules of the
vehicle
• Black box testing
Process
• Software Engineer • Validation Engineer
People
V-Model SDLC (Integration Testing)
Flap Brake
Body
Anti-Lock
Weapons
Module
Flap Brake
Module
Body
Control
Module
Anti-Lock
Brake
System
Instrument
Module
Instrument
Panel
Module
Telematics
Control
Module
Seat
Module
Stealth
Module
Exterior
Lights
V-Model SDLC (IntegrationTesting)
CAN – Controller Area Network
LIN – Local Interconnect Network
Weapon Module
Flap Brake Module
Body Control
Module
Seat Module
LIN – Local Interconnect Network
Stealth Module
Anti – Lock Break
System
Telematics Control
V-Model SDLC (IntegrationTesting)
Telematics Control Module
Flap Brake Module
Stealth Module
Telematics Control Module
(HARDWARE)
Body Control Module
CAN BUS
Weapon Module
Flap Brake Module
Stealth Module
Anti – Lock Break
System
Body Control Module
(HARDWARE)
Software Simulation
Software Simulation
CAN BUS
V-Model SDLC (IntegrationTesting)
Telematics Control Module
Weapon Module
Flap Brake Module
Telematics Control Module
(HARDWARE)
Body Control Module
Matlab
Matlab Simulink
Simulink
Model (Simulated)
Model (Simulated)
CAN BUS
Weapon Module
Stealth Module
Anti – Lock Break
Body Control Module
(HARDWARE)
Model (Simulated)
Model (Simulated)
CAN BUS
Seat Module
Anti – Lock Break
System
Exterior Lights
Software Simulation
Software Simulation
V-Model SDLC (Operational Testing)
Process
• Actual vehicle testing
• Customer acceptance test
• Validation Engineer • Customer
Summary
Software Design Life Cycle
Model Based Design
• AGILE
• WATERFALL • V-MODEL
Matlab and Lear
• Readable • Tracability
• Faster development time • Early detection of issues
Model Based Design
• Simulink
• Real-Time Workshop
(Research)
• Verfication and Validation • Stateflow
• Stateflow