Вы находитесь на странице: 1из 11

7/9/2019 Essential aspects of the V-cycle software development process – x-engineer.

org

UNDERGRADUATE ENGINEERING  / GRADUATE ENGINEERING  /


AUTOMOTIVE ENGINEERING  / QUIZ ! / NEWS / PROJECTS

HOME  GRADUATE ENGINEERING  MODELING & SIMULATION 


MODEL BASED DESIGN 
Essential Aspects Of The V-Cycle Software Development Process

MODEL BASED DESIGN

Essential aspects of the V-cycle


software development process

The usage of electronic systems in automotive industry is  continuously


expanding, even at at faster pace. Compare with a previous model, every
new vehicle model has more vehicle functions, meant to improve
connectivity, security, driveability and comfort.

More vehicle functions means more electronic control modules (ECU) with
more and complex software. Due to the complexity and size of the control
software, it’s mandatory to use a development process which shall
improve the overall quality of the software, increase development e ciency
and eliminate systematic software bugs.

The standard software development process used in the automotive


industry is the V-cycle. The V model splits the software development
process into two main phases. The left side of the V is the part of
requirement analysis, function/software design and change management.
Try 30 days
The right side of the V concentrates the main veri cation and validation
activities. SIGN UP

Recent Comments

Alan Rosean on Air-fuel ratio,


lambda and engine
performance

https://x-engineer.org/graduate-engineering/modeling-simulation/model-based-design/essential-aspects-of-the-v-cycle-software-development-pro… 1/11
7/9/2019 Essential aspects of the V-cycle software development process – x-engineer.org

James Gathura Kihiu on Twin-


scroll turbochargers

Anthony Stark on Power vs.


Torque

Kevin J Kelleher on Power vs.


Torque

Kevin Kelleher on Power vs.


Torque

Patreon

Image: V-cycle process for software development

Function Requirements

The process starts with the analysis of the function requirements. This is a
very important step because it de nes what is expected from the control
software in terms of functionality. There is an entire engineering area
dedicated to requirements, which is called requirements engineering. Recent Posts
Some companies have dedicated requirements engineers working on a
daily basis de ning requirements. Most of the time, the system engineer is
Exhaust Gas Recirculation
responsible with requirement de nition.
(EGR) complete guide –
components
The function requirements describes what the software should do from the
functional point of view.  When de ning requirements, the author will use Exhaust Gas Recirculation
(EGR) complete guide –
dedicated keywords, which have a precise meaning. The keywords are
introduction
de ned in the document RFC2119 as:
Effects of vehicle pollution on
Keyword Meaning human health

Engine combustion process


MUST This word, or the terms “REQUIRED” or “SHALL”, mean
explained
that the de nition is an absolute requirement of the
speci cation. EV design – mode
management (vehicle control
MUST This phrase, or the phrase “SHALL NOT”, mean that system)
NOT the de nition is an absolute prohibition of the
speci cation.
Categories
SHOULD This word, or the adjective “RECOMMENDED”, mean
that there may exist valid reasons in particular
circumstances to ignore a particular item, but the full Select Category
implications must be understood and carefully weighed
before choosing a different course.
Pages
SHOULD This phrase, or the phrase “NOT RECOMMENDED” mean
NOT that there may exist valid reasons in particular
circumstances when the particular behavior is About

https://x-engineer.org/graduate-engineering/modeling-simulation/model-based-design/essential-aspects-of-the-v-cycle-software-development-pro… 2/11
7/9/2019 Essential aspects of the V-cycle software development process – x-engineer.org

acceptable or even useful, but the full Contact


implications should be understood and the case
Cookie Policy
carefully weighed before implementing any behavior
described with this label. Privacy Policy

MAY This word, or the adjective “OPTIONAL”, mean that an Terms and Conditions
item is truly optional. One vendor may choose to include
the item because a particular marketplace requires it or
because the vendor feels that it enhances the product
while another vendor may omit the same item. An
implementation which does not include a particular
option MUST be prepared to interoperate with another
implementation which does include the option, though
perhaps with reduced functionality. In the same vein an
implementation which does include a particular
option MUST be prepared to interoperate with another
implementation which does not include the option
(except, of course, for the feature the option provides.)

Source: RFC2119

Example: In case of an engine managements system (EMS) software


development, there should be a protection function which doesn’t allow the
engine to exceed the maximum possible value (e.g. 6500 rpm). The
requirement will be written as:

“ The engine control software MUST limit the engine speed at 6500
rpm. ”

A function requirement, most of the time, describes what should happen


and doesn’t necessarily give details regarding the exact implementation. If
you notice, the above requirement speci es what the engine controls
should do,  but not how it should be achieved. It’s often to the function
developer to decide on the implementation details.

When de ning requirements, the requirements/systems engineer must


work closely with the function developer to make sure that the
requirements are clearly de ned and implementable. Most of the cases
the requirement come in a form of  a document (*.pdf) or managed in a
dedicated requirements database like DOORS.

https://x-engineer.org/graduate-engineering/modeling-simulation/model-based-design/essential-aspects-of-the-v-cycle-software-development-pro… 3/11
7/9/2019 Essential aspects of the V-cycle software development process – x-engineer.org

Try 30 days free. SIGN UP

Function Development

Once the function requirements are clearly de ned and agreed between the
developer (function engineer) and requirements/systems engineer, the
function development can start. The function development is performed by
the function developer and consists in using a model based development
(MBD) environment to design and test the required functionality.

A model based development environment uses tools as Matlab/Simulink or


Scilab/Xcos to implement control functions. The control function is
developed as a block diagram which has the capability to be simulated and
highlight potential errors of the design.

For the requirement above the engine speed limiting function can be
designed as:

Image: Engine Speed Limit Function Xcos (MBD)

Notice that the function developer has also de ned how the speed
limitation is going to be achieved. When the measured engine speed
( EngN_rpm ) is bigger than the limit ( EngNMaxLim_Cal_rpm ) the
requested engine torque ( EngTqReq_Nm ) will be set to 0 Nm . Otherwise,
if the engine speed is below maximum limit, the requested engine torque
will be equal to the raw engine torque ( EngTqRaw_Nm ). We will assume
that the raw engine torque is calculated based on accelerator pedal
position.

After the function design is complete, the function developer will run a
series of tests. These tests are called Model in the Loop (MiL) tests since

https://x-engineer.org/graduate-engineering/modeling-simulation/model-based-design/essential-aspects-of-the-v-cycle-software-development-pro… 4/11
7/9/2019 Essential aspects of the V-cycle software development process – x-engineer.org

they are using models (block diagrams) to simulated the required


functionality.

Once the MiL test are complete and the results are meeting expectations,
the model (*.mdl, *.xcos) will be send to the software developer for the
software design phase.

Software Development

The actual software development is performed by the software developer.


Almost all electronic control units (ECUs) within a modern vehicle are
programmed in C language. The input for the software developer is either
the model developed by the function developer or a document with detailed
description of the function.

At this stage of  development there are more details regarding the
functionality. In addition to the algorithm which needs to be coded, the
software developer needs to know what data types needed for each of the
software variables. The software developer is also responsible in delivering
an optimized C code, in terms of memory resources and CPU loading.

For the engine speed limitation function, an equivalent C code for the block
diagram above could be:


#include <EngNCalc.h>
#include <EngTqPedlCalc.h>

void EngSpdLimFct(void)
{
extern float EngN_rpm;
extern float EngTqRaw_Nm;
extern float EngTqReq_Nm;
float EngNMaxLim_Cal_rpm;

if (EngN_rpm > EngNMaxLim_Cal_rpm)


{
EngTqReq_Nm = 0;
}
else
{
EngTqReq_Nm = EngTqRaw_Nm;
}
}

Modern software development processes are using model based design


tools which automatic code generation capabilities. This means that the
function developer can generate C code automatically from the block
diagram. Therefore, in this situations, the role of function and software
development are combined for the same engineer.

Examples of automatic code generations tools:

Embedded Coder (needs Simulink to be pre-installed) from


Mathworks
https://x-engineer.org/graduate-engineering/modeling-simulation/model-based-design/essential-aspects-of-the-v-cycle-software-development-pro… 5/11
7/9/2019 Essential aspects of the V-cycle software development process – x-engineer.org

Target Link (needs Simulink to be pre-installed) from dSpace


ASCET from ETAS

With automatic code generation capabilities the developer can perform


Software in the Loop (SiL) test. This technique allows to compile and run
the production intent C code on the development laptop/computer. By
doing SiL tests, the function developer can check if the software is
providing the required functionality (compared to the model). Also it is
possible the see the rounding errors in case of  xed point implementation
of the C code.

The output of the software development phase are the corresponding C


code les (*.c and *.h) for the required functionality.

A NETFLIX FILM

Try one month free.


WATCH NOW

Software integration

The software integration is the process of combining together all


software modules required for a particular projects. A particular function
can have impact on several software  modules, developed by different
software developers. Integration means compiling and linking all the les
(*.c, *.h) for a speci c application and turning them into a machine code
le (*.hex and *.a2l).

At this stage, the testing of the required functionality is done at system


level (complete ECU software).  The purpose of the integration test is to
verify the  interaction between  the software modules and to check the
impact of the functional changes on the legacy code (through  non-
regression tests).

Most of the time, integration test are performed using Hardware in the
Loop (HiL) techniques.

https://x-engineer.org/graduate-engineering/modeling-simulation/model-based-design/essential-aspects-of-the-v-cycle-software-development-pro… 6/11
7/9/2019 Essential aspects of the V-cycle software development process – x-engineer.org

Image: dSpace Scalexio Simulator for HiL systems


Image: ETAS Lab
Credit: dSpace
Credit: ETAS

A HiL environment consists of using a simulator which has the role of


replacing the real vehicle. The simulator will have all the electrical
connections (battery supply, sensors and actuators) required by the
electronic control module (ECU). Also it will simulate the dynamic behavior
of the vehicle in order to be able to test closed loop control scenarios.

The main purpose of the HiL environment is to replicate, in an indoor


environment, the behavior of a vehicle so that the ECU can be tested
without the need of a real vehicle.

HiL environments can be at the component level (engine, transmission,


etc.) or at the vehicle level. A vehicle level HiL usually connects in a
network several simulators and ECUs. The advantage of the vehicle level
HiL is the possibility to test a distributed function (e.g. Adaptive Cruise
Control).

Affordable
Ad Long ser
system, stab
Bodor® Laser

Learn mor

The HiL tests are veri cation tests.  Veri cation con rms that the
software  properly re ect the speci ed requirements. In other words,
veri cation ensures that ”you built it right.”

Function integration

The function integration is usually performed by the function developer or


by a test engineer. The purpose is to test the developed function at the
vehicle level (production model or a prototype). The purpose of the vehicle

https://x-engineer.org/graduate-engineering/modeling-simulation/model-based-design/essential-aspects-of-the-v-cycle-software-development-pro… 7/11
7/9/2019 Essential aspects of the V-cycle software development process – x-engineer.org

test is to validate the correct implementation of the requirements  and


the integration with the other control modules (e.g Transmission Control
Module, Anti-lock Braking System control module, etc.).

The function integration is performed with a computer connected at the


target ECU. The target electronic control unit can be the Powertrain Control
Module (PCM), Transmission Control Module (TCM), Body Control Module
(BCM), etc.

Image: Vehicle testing using laptop with logging and calibration software tools
Credit: Bosch (vehicle)

The laptop must be equipped with proper tools for accessing software
variables (INCA, Canape) and network bus messages (Canalyzer). These
tools connect to the target ECU using different communication standards
(ETK, CAN, etc.)

Vehicle testing is performed after a de ned test scenario. The test


engineer will drive the vehicle in certain operating condition suitable for the
activation of the function subject to test. For example, in order to test the
engine speed limit, the engine needs to be accelerated until it reaches the
maximum speed. For this particular example it is recommended that this
function is tested on a simulation environment (HiL) before vehicle testing.

The function integration tests are validation tests. Validation con rms that
the product, as provided, will ful ll its intended use. In other words,
validation ensures that ”you built the right thing.”

Function calibration

The last step in software development is the function calibration. This task
is performed by a calibration/tuning engineer.

Most of the software control function are generic, they are suitable for
different vehicle applications (variants). The role of the calibration engineer
is to set the right parameters for the software functions. For our example,
the calibration is the value of the maximum speed limit. Depending on the
engine type, it can have different values (e.g. 6500 rpm for gasoline
engines, 4500 rpm for diesel engines).
https://x-engineer.org/graduate-engineering/modeling-simulation/model-based-design/essential-aspects-of-the-v-cycle-software-development-pro… 8/11
7/9/2019 Essential aspects of the V-cycle software development process – x-engineer.org

The calibration engineer will tune the software parameters so that it


achieves best performances in terms of driveability, performance,
emissions, etc.

The function calibration activities, most of the time, are performed on a


vehicle with the same setup as for a function integration.

The main advantages and disadvantages of the V-cycle for software


development process are listed in the table below:

Advantages Disadvantages

it is relatively simple and it is rigid, doesn’t allow


easy to use shortcuts in case of
each phase has clear roles emergency situations
and speci c deliverables there are no early
works very well and e cient prototypes of the
if the requirements are clear software since it’s
and understood by the developed at a later
developer stage
there is no clear process
on how to handle
problems found during
testing phases

For any questions or observations regarding this tutorial please use the
comment form below.

Don’t forget to Like, Share and Subscribe!

https://x-engineer.org/graduate-engineering/modeling-simulation/model-based-design/essential-aspects-of-the-v-cycle-software-development-pro… 9/11
7/9/2019 Essential aspects of the V-cycle software development process – x-engineer.org

Affordable laser EV design – mode PCB Fab and


cutters management (vehicle Assembly
control system)
Ad Bodor® Laser x-engineer.org Ad PCBA Store

Top 20 CIS Controls How to calculate wheel On-Board Dia


radius (OBD) – introd
the Modes

Ad NNT x-engineer.org x-engineer.org

One Response

asp 

very clear explanations for absolute beginners.


Thanks a lot.

Leave a Reply

Comment Text*

Name*

Email*

Website

https://x-engineer.org/graduate-engineering/modeling-simulation/model-based-design/essential-aspects-of-the-v-cycle-software-development-pr… 10/11
7/9/2019 Essential aspects of the V-cycle software development process – x-engineer.org

I'm not a robot


reCAPTCHA
Privacy - Terms

SUBMIT YOUR COMMENT

x-engineer.org     
Engineering Tutorials

Copyright © 2019 x-engineer.org Powered by Ubuntu and Scilab

https://x-engineer.org/graduate-engineering/modeling-simulation/model-based-design/essential-aspects-of-the-v-cycle-software-development-pr… 11/11

Вам также может понравиться