You are on page 1of 11

Decibels Lab Private Limited CIN: U80904KA2019PTC126675

#2362, 24th main road +91 7411019255


st
1 sector, HSR layout contact@decibelslab.com
Bangalore, Karnataka, 560102

Model based design approach


for automotive embedded
system development

Created By:
Krishna S.H - Application engineer
Abhinav Aravind – Battery development engineer

www.lms.decibelslab.com 1
Decibels Lab Private Limited CIN: U80904KA2019PTC126675
#2362, 24th main road +91 7411019255
st
1 sector, HSR layout contact@decibelslab.com
Bangalore, Karnataka, 560102

The process for development of Plant model & Controller, validating the both models at system level &
deploying code of controller in real time micro-controller. In our case we will take Cell as Plant model &
controller as BMS

www.lms.decibelslab.com 2
Decibels Lab Private Limited CIN: U80904KA2019PTC126675
#2362, 24th main road +91 7411019255
st
1 sector, HSR layout contact@decibelslab.com
Bangalore, Karnataka, 560102

Activities involved in cell model development:


Cell testing:

• Getting to know the requirements for cell testing. List the tests (such as Pulse, HPPC, DST & Drive
cycle) required & collect data which gives a purpose for cell model development.

Approaches for Cell model development

www.lms.decibelslab.com 3
Decibels Lab Private Limited CIN: U80904KA2019PTC126675
#2362, 24th main road +91 7411019255
st
1 sector, HSR layout contact@decibelslab.com
Bangalore, Karnataka, 560102

ECM methods (considered in our case)

Cell Thevenin system Cell model

Cell model is nothing but representing the cell behaviour in realistic way with help of mathematical model.
There are different methods to represent such as Electro chemical modelling method & Equivalent circuit
method. To represent Electro chemical cell requires physical data of cell, where in Equivalent circuit method
represents cell into Electrical system (Thevenin circuit). In our case, we will be considering Equivalent
circuit method.

With tests conducting on cell such as static capacity test, HPPC etc we will end up getting the voltage
response for the cell, with voltage curve & Ohm’s equation (V=I*R) we can estimate the cell resistances
(Ohmic & polarization), so these are components of Thevenin circuit. These resistances are also affected by
some parameters such as temperature, c-rates, SOC. Once data is gathered, with set of equations we can
develop the model.

www.lms.decibelslab.com 4
Decibels Lab Private Limited CIN: U80904KA2019PTC126675
#2362, 24th main road +91 7411019255
st
1 sector, HSR layout contact@decibelslab.com
Bangalore, Karnataka, 560102

Testing & Validation Cell model:


As cell model is developed, testing & validation has to be carried out. The model has to be tested with many
possible scenarios, in order to validate the behaviour of cell model with the test data.

The test cases could be such as starting with Constant current charge/discharge, At different c-rate (charge
/discharge), Variable current profile…etc

www.lms.decibelslab.com 5
Decibels Lab Private Limited CIN: U80904KA2019PTC126675
#2362, 24th main road +91 7411019255
st
1 sector, HSR layout contact@decibelslab.com
Bangalore, Karnataka, 560102

BMS Model development


Requirement Setup
Once the Cell model development is done, then we can look into BMS model. As we talk about automotive system
development, process or approach is referred to V-type model. The first step is requirement set up for BMS model. It
could be either functional or non-functional

In MATLAB & SIMULINK tool, we can make use of SIMULINK REQUIRMENTS to set up the model
design requirements (Algorithms approaches, equations, mathematical models, flow charts, Test
requirements, test cases & SYSTEM COMPOSER tool for architecture setup of model.

Controller model development (BMS)

www.lms.decibelslab.com 6
Decibels Lab Private Limited CIN: U80904KA2019PTC126675
#2362, 24th main road +91 7411019255
st
1 sector, HSR layout contact@decibelslab.com
Bangalore, Karnataka, 560102

Model testing
Once controller model (BMS) is developed it must be taken to testing, unit level testing to controller
model level testing, with all possible scenarios & test cases. We can make use of SIMULINK TEST tool
as part of Simulink, setting test harness and making use of test manager. Different types of test can be
conducted such as external, internal, logical ..etc & in test manager as simulation, base line,
equivalence etc.

www.lms.decibelslab.com 7
Decibels Lab Private Limited CIN: U80904KA2019PTC126675
#2362, 24th main road +91 7411019255
st
1 sector, HSR layout contact@decibelslab.com
Bangalore, Karnataka, 560102

Model design verification


Once testing is done, further model must be taken for Model verification. We can make
use of DESIGN verifier tool in Simulink. With this tool we can eliminate errors, improve
performance & model coverage analysis.

Model in Loop (MIL)


As testing & verification of controller model is done, then we can integrate Plant & BMS
model. Simulation of this integrated model is called MIL, again testing is conducted on MIL
to check the behaviour/response of controller model based on Plant model input.

www.lms.decibelslab.com 8
Decibels Lab Private Limited CIN: U80904KA2019PTC126675
#2362, 24th main road +91 7411019255
st
1 sector, HSR layout contact@decibelslab.com
Bangalore, Karnataka, 560102

Software in Loop (SIL)


Once the model has been verified in MIL simulation, the next stage is Software-in-Loop (SIL), where
we can generate code only from the controller model and replace the controller block with this code.
Then, run the simulation with the Controller block (which contains the C code) and the Plant, which is
still the software model. This step will give you an idea of whether your control logic i.e., the
Controller model can be converted to code and if it is hardware implementable. We should log the
input-output data and bring it to comparison to verify. If we experience a huge difference in compared
results, we may have to go back to MIL and make necessary changes & repeat the same procedure.

Processer in Loop (PIL)


The next step is Processor-in-the-Loop (PIL) testing. In this step, we will put the Controller model into
an embedded processor and run a closed-loop simulation with the simulated Plant (software model).
So, we will replace the Controller Subsystem with a PIL block which will have the Controller code
running on the hardware. This step will help you identify if the processor is capable of running the
developed Control logic. If there are glitches, then go back to your code, SIL or MIL, and rectify them.

We can make use of embedded coder tool for SIL & PIL applications

www.lms.decibelslab.com 9
Decibels Lab Private Limited CIN: U80904KA2019PTC126675
#2362, 24th main road +91 7411019255
st
1 sector, HSR layout contact@decibelslab.com
Bangalore, Karnataka, 560102

Hardware in Loop
Before connecting the embedded processor to the actual hardware, you can run the simulated plant
model on a real-time system such as simulator. The real-time system performs deterministic
simulations and have physical real connections to the embedded processor

www.lms.decibelslab.com 10
Decibels Lab Private Limited CIN: U80904KA2019PTC126675
#2362, 24th main road +91 7411019255
st
1 sector, HSR layout contact@decibelslab.com
Bangalore, Karnataka, 560102

Actual Hardware deployment


Once all the above testing (MIL, SIL, PIL, HIL) is done we go for complete standalone deployment into
target hardware.

www.lms.decibelslab.com 11

You might also like