SlideShare a Scribd company logo
1 of 67
Module IV
CONTROLAND TESTING METHODS
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
1
SRI RAMAKRISHNA ENGINEERING COLLEGE
VATTAMALAIPALAYAM, N.G.G.O. COLONY POST, COIMBATORE – 641 022.
DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION ENGINEERING
Controller on Target and Plant on Target
20EI253 MODEL BASED SYSTEM DESIGN
Prepared By
Dr.B.Sharmila
Professor / EIE
Sri Ramakrishna Engineering College
Coimbatore - 22
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
2
Module IV
MODULE IV
CONTROL AND TESTING METHODS
• Controller on target
• Plant on target
• Processor in the Loop (PIL) real-time simulations
• Model In Loop test (MIL)
• Code verification using Software In Loop test (SIL)
• Hardware In loop Test (HIL)
• HIL implementation using raspberry pi: Coupled
Tanks Model, Quarter Car Model
• FPGA based Hardware in Loop simulation (HIL) for
Power Electronics
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
3
On Target Verification
• On-target testing means testing the application in its
target environment.
• It may also be referred to as host-target testing or cross-
testing.
• On-host testing means testing the application on a host
computer (such as the development system used to build
the application).
• This may also be referred to as host-host testing.
• The key principle behind testing an application on-target
is that code is executed in the environment for which it
was designed.
• Rather than in an environment where it was never intended
to be executed.
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
4
On-target verification of embedded
systems difficult
• Every embedded system is different
• There are a huge range of possible applications for
embedded systems, ranging from very simple
• Monitoring the mirror switches on your car door
• controlling the flight control system of an
aerodynamically unstable fighter jet
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
5
On-target verification of embedded
systems difficult
Embedded Processor and OS
• There are many different processor families (different
instruction sets, architectures) – unlike PCs which use slight
variations on a single architecture, which is also backwards
compatible with the original PC architecture from the mid
1980s.
• Different hardware configurations (different memory
layouts, different peripherals) exist – although PCs can
provide different hardware configurations, These are
abstracted away by the OS.
• It’s not necessary, for example, to know where in memory
to put your application when you build the software
• There are many real-time operating systems – unlike
PCs, which use a much smaller number (e.g. Windows, Linux
or Mac OS for desktops/laptops)
• Real-time operating systems also have varying levels
of complexity - some are barely a scheduler, while others are
much more complex.
• Some are modifications of existing desktop operating
systems (e.g. lots are based on the Linux kernel). Some are
commercial products.
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
6
On-target verification of embedded
systems difficult
Real-time embedded systems often have resource
limitations
• They are much slower devices
• Devices with a real-time requirement can’t do single step
debugging, because the plant connected to the device will
break
• Much less memory is available
• Communication to the outside world is limited.
• PCs/phones have nice big graphical displays - an embedded
system might only have a few IO pins and a couple of
LEDs
• Real-time embedded systems are fixed applications. Unlike a
PC, it’s often not possible to run a verification tool on an
embedded system – so any data collected must be transferred
to a separate PC for analysis.
This is a challenge for anyone looking to extract enough
information to perform on-target analysis
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
7
Controller on Target
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
8
STEPS INVOLVED IN CONTROLLER ON
TARGET
Developed mathematical model of
controller will run on the processor
Real time input is given to the processor.
Now the processor act as a real time
controller
On this condition, the performance of
the controller is evaluated with the
project requirement
Plant on Target
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
9
STEPS INVOLVED IN PLANT ON TARGET
Developed mathematical model of plant
(System Model) will run on the processor
Now the processor act as a real time plant
The real time input will be given to the
processor
The model inside the processor will
predict the plant (System) behaviour
SRI RAMAKRISHNA ENGINEERING COLLEGE
VATTAMALAIPALAYAM, N.G.G.O. COLONY POST, COIMBATORE – 641 022.
DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION ENGINEERING
Processor in the Loop real-time simulations (PIL)
20EI253 MODEL BASED SYSTEM DESIGN
Prepared by :
Dr.B.Sharmila,
Professor / EIE
Sri Ramakrishna Engineering College
Coimbatore 22.
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
10
Module IV
PIL (Process In Loop Test)
• This step incorporates changes to the controller code
for embedded hardware features that allows execution
and tuning on the target micro-controller or DSP.
• PIL setup involves
• Loading the compiled object code onto the
target processor or DSP
• Then run the simulations on the plant model
for verification.
1/2/2024 Dr.B.Sharmila- UI Bridge - SIL, PIL and HIL 11
PIL (Process In Loop Test)
• This is a non-real time setup
• Hence allows execution of large number of
V&V test suits to evaluate embedded CPU/DSP
capability to run controller algorithms.
• If there are differences between SIL and PIL
results, then PIL object code is fine-tuned (for
example) for fixed-point precision, memory
footprint or compiler optimization flags
1/2/2024 Dr.B.Sharmila- UI Bridge - SIL, PIL and HIL 12
SRI RAMAKRISHNA ENGINEERING COLLEGE
VATTAMALAIPALAYAM, N.G.G.O. COLONY POST, COIMBATORE – 641 022.
DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION ENGINEERING
Model In Loop test (MIL)
20EI253 MODEL BASED SYSTEM DESIGN
Prepared by :
Dr.B.Sharmila,
Professor / EIE
Sri Ramakrishna Engineering College
Coimbatore 22.
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
13
Module IV
Model in the Loop (MIL) Test
• Model-in-the-loop testing (MIL) and
simulation is a technique used to abstract the
behaviour of a system or sub-system in a
way that this model can be used to test,
simulate and verify that model.
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
14
Model in the Loop (MIL) Test
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
15
Develop a model of the actual plant
(hardware) in a simulation environment
Simulink, which captures most of the
important features of the hardware system.
Plant model is created
Develop the controller model
Verify if the controller can control the plant
(which is the model of the motor in this case)
as per the requirement
Model in the Loop (MIL) Test
• This step is called Model-in-Loop (MIL)
• Process,
• Testing the controller logic on the simulated
model of the plant
• If your controller works as desired
• Should record the input and output of the
controller which will be used in the later stage
of verification
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
16
Model in Loop Test
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
17
SRI RAMAKRISHNA ENGINEERING COLLEGE
VATTAMALAIPALAYAM, N.G.G.O. COLONY POST, COIMBATORE – 641 022.
DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION ENGINEERING
Code verification using Software In Loop (SIL) test
20EI253 MODEL BASED SYSTEM DESIGN
Prepared by :
Dr.B.Sharmila,
Professor / EIE
Sri Ramakrishna Engineering College
Coimbatore 22.
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
18
Module IV
SIL (Software In Loop Test)
• In this case, the model is adapted further according
to the end goals of the embedded platform.
• The controller model is coded in C or C++ (can be auto-
generate code)
• Then inserted back into the simulation environment to
evaluate it along with the plant simulation.
1/2/2024 Dr.B.Sharmila- UI Bridge - SIL, PIL and HIL 19
SIL and PIL
• In a SIL or PIL simulation, code is generated
for either the top model or part of the model.
• With SIL, this code is compiled for and
executed on your development computer.
• With PIL, the code is cross-compiled for the
target hardware and runs on the target
processor.
1/2/2024 Dr.B.Sharmila- UI Bridge - SIL, PIL and HIL 20
SIL vs PIL
Type of SIL or PIL
Simulation
What Happens in SIL Simulation What Happens in PIL Simulation
Specify through:
•Top-model simulation mode
•Model block Simulation
mode parameter
• Test behavior of generated source code
code on development computer.
Simulation does not test code
compiled for target hardware because
code is compiled for the development
computer (different compiler and
different processor architecture than
the target).
• Generated production code compiled
and executed on development
computer as separate process,
independent of MATLAB
®
process.
• Execution is host/host and non-real
time.
• Test object code that you intend
to deploy in production on either
either real target hardware or an
instruction set simulator.
• On development computer,
generated production code cross-
cross-compiled for target. Object
Object code downloaded and
executed on target processor or
instruction set simulator.
• Execution is host/target and
non-real time.
Use SIL or PIL block created
from subsystem.
• Simulation runs compiled object code
through S-function. S-function
communicates with object code
executing as standalone application on
on development computer. SIL block
execution is independent of the
MATLAB process.
• Execution is host/host and non-real
time.
• Simulation runs cross-compiled
object code through S-function
on development computer. S-
function communicates with
object code executing as
standalone application on target
processor or instruction set
simulator.
• Execution is host/target and
non-real time.
1/2/2024 Dr.B.Sharmila- UI Bridge - SIL, PIL and HIL 21
SRI RAMAKRISHNA ENGINEERING COLLEGE
VATTAMALAIPALAYAM, N.G.G.O. COLONY POST, COIMBATORE – 641 022.
DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION ENGINEERING
Hardware In loop Test (HIL)
20EI253 MODEL BASED SYSTEM DESIGN
Prepared by :
Dr.B.Sharmila,
Professor / EIE
Sri Ramakrishna Engineering College
Coimbatore 22.
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
22
Module IV
Hardware-in-the-loop (HIL)
• Hardware-in-the-loop (HIL) simulation is a
type of real-time simulation.
• HIL simulation is used to test controller design.
• HIL simulation shows how controller responds
in real time to realistic virtual stimuli.
• HIL can also be used to determine if your
physical system (plant) model is valid.
1/2/2024 Dr.B.Sharmila- UI Bridge - SIL, PIL and HIL 23
• After the controller code has been verified using PIL;
• Next step usually involves substituting the plant model
with the actual system (or a lab prototype) or a real-
time simulator running the plant model
• For example,
• If a DC motor speed controller is being designed then
the controller code is deployed on the micro-controller
or DSP board that is then interfaced to a real DC motor
by connecting the inputs and outputs at the interface
points such as sensors and power electronics
components.
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
24
Hardware-in-the-loop (HIL)
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
25
Hardware-in-the-loop (HIL)
• HIL testing is one of the last integration levels
that allows debugging and evaluation of
functional and operational tests in a
manageable way in a real-time environment.
• Often a substantial amount of software based
test automation and logging as well as
hardware interfacing components are required
to implement a reliable HIL setup.
• The PIL setup is comparatively easier and
require less hardware and software resources.
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
26
Hardware-in-the-loop (HIL)
1/2/2024 Dr.B.Sharmila- UI Bridge - SIL, PIL and HIL 27
Hardware-in-the-loop (HIL)
Using Simulator for Hardware
• Mathematical model of the system is
developed and same is programmed into
the Microcontroller
• Now, the Microcontroller now act like
that system.
• In this example, a Two Tank system is
modelled and programmed in Arduino
nano
• Now Arduino act as Two Tank System
• From this simulation they found,
• Liquid levels to rise from 2.7 meters
to 3.3 meters when the flow rate was
was increased from 1 cubic meter per
per sec to 1.11 cubic meter per sec
https://reference.wolfram.com/langu
age/MicrocontrollerKit/workflow/HI
L
1/2/2024 Dr.B.Sharmila- UI Bridge - SIL, PIL and HIL 28
Hardware-in-the-loop (HIL)
SRI RAMAKRISHNA ENGINEERING COLLEGE
VATTAMALAIPALAYAM, N.G.G.O. COLONY POST, COIMBATORE – 641 022.
DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION ENGINEERING
HIL implementation using
raspberry pi: coupled tanks model, quarter car model
20EI253 MODEL BASED SYSTEM DESIGN
Prepared by :
Dr.B.Sharmila,
Professor / EIE
Sri Ramakrishna Engineering College
Coimbatore 22.
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
29
Module IV
Coupled Tank Model
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
30
Coupled Tank Parameters
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
31
State space model of the system
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
32
Discrete Model of the system
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
33
Block diagram of HIL Implementation
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
34
Response of the plant with step change
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
35
Quarter Car Model
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
36
State Space Model
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
37
Discrete model
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
38
HIL Setup
• https://www.wolfram.com/language/12/microcontroll
er-kit/hil-simulation-of-a-quarter-car-suspension-
model.html?product=language
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
39
Response of the system
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
40
SRI RAMAKRISHNA ENGINEERING COLLEGE
VATTAMALAIPALAYAM, N.G.G.O. COLONY POST, COIMBATORE – 641 022.
DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION ENGINEERING
FPGA based Hardware in Loop simulation (HIL) for Power
Electronics
20EI253 MODEL BASED SYSTEM DESIGN
Prepared by :
Dr.B.Sharmila,
Professor / EIE
Sri Ramakrishna Engineering College
Coimbatore 22.
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
41
Module IV
Need for FPGA in HIL
• Real-time simulation of power electronic
converter systems, in the context of HIL
testing, is a challenging task.
• This is due to:
1. The computational burden imposed on the
simulator hardware due to the inherent switching
nature of power electronic converters, and
2. The asynchronous digital interface between the
controller PWM outputs and the simulator inputs.
PWM gating signals generated by the controller
rarely coincides with the real-time simulation
time-grid. Switching events are usually imposed
by the controller in-between two simulation
instances.
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
42
Need for FPGA in HIL
2. The simulator, unlike an actual system, cannot
instantaneously respond to the PWM outputs of
the controller and only accounts for it at the end
of the simulation time-step, thus, errors are
introduced to the simulation results.
3. The percentage error due to ITS is a function of
the simulation time-step of the simulator and the
switching frequency of the controller.
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
43
Need for FPGA in HIL
• This problem is more pronounced in multilevel
converter systems,
• particularly when the voltage balancing task of the
converter is carried out through the modification of
the switching functions, with no requirement to
additional power circuitry.
• With the increase in the switching events per
simulation time-step, it will be very likely to have
multiple switching events imposed by the controller
in between two simulation instances. This
phenomenon is called multiple inter-simulation
time-step switching (MITS).
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
44
Need for FPGA in HIL
• Certain issues make running a model real-time
challenging
• Minimum time step
• Model complexity
• Specialized solvers
• It is all about time step
• Thermal – seconds
• Mechanical – milliseconds
• Power Systems – sub-milliseconds
• Power Electronics – microseconds
• Radar – nanoseconds
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
45
Need for FPGA in HIL
• Typical real-time CPU based solutions run in
the sub-millisecond range
• FPGA based solutions run in the microsecond
range
• bordering sub-microsecond for specific applications
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
46
The Need for Small Time Step
Simulations
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
47
Path to FPGA Accelerated Real-time:
Simscape
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
48
Example : Solar Inverter for Real Time
Testing
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
49
Example : Solar Inverter for Real Time
Testing
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
50
Example : Solar Inverter for Real Time
Testing
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
51
Example : Solar Inverter for Real Time
Testing
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
52
Example : Solar Inverter for Real Time
Testing
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
53
Example : Solar Inverter for Real Time
Testing
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
54
Example : Solar Inverter for Real Time
Testing
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
55
Example : Solar Inverter for Real Time
Testing
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
56
Example : Solar Inverter for Real Time
Testing
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
57
Example : Solar Inverter for Real Time
Testing
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
58
Example : Solar Inverter for Real Time
Testing
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
59
Example : Solar Inverter for Real Time
Testing
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
60
Example : Solar Inverter for Real Time
Testing
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
61
Example : Solar Inverter for Real Time
Testing
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
62
Example Video : dSpace
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
63
Example Video : dSpace
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
64
Example Video : dSpace
https://www.youtube.com/watch?v=JTDYQfrR
Xl8
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
65
References
• https://www.design-
reuse.com/articles/42548/embedded-software-
verification-validation-in-model-based-
development.html
• https://in.mathworks.com/matlabcentral/answers/4402
77-what-are-mil-sil-pil-and-hil-and-how-do-they-
integrate-with-the-model-based-design-approach
• https://in.mathworks.com/discovery/model-based-
testing.html
• http://ifatwww.et.uni-
magdeburg.de/ifac2020/media/pdfs/2243.pdf
• https://www.mathworks.com/content/dam/mathworks/
mathworks-dot-
com/images/events/matlabexpo/kr/2019/power-
electronics-hil-testing-using-simscape-to-hdl-
conversion.pdf
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
66
Thank you
1/2/2024
SREC - EIE - 20EI253 - MODEL BASED
SYSTEM DESIGN
67

More Related Content

Similar to Model Based System Design PPT MODULE IV.pptx

FInal_CV_08_4_2016
FInal_CV_08_4_2016FInal_CV_08_4_2016
FInal_CV_08_4_2016
PANKAJ PAL
 
RTCA DO-254 Guidance - Accelerating DO-254 Verification
RTCA DO-254 Guidance - Accelerating DO-254 VerificationRTCA DO-254 Guidance - Accelerating DO-254 Verification
RTCA DO-254 Guidance - Accelerating DO-254 Verification
Tarek Salah
 

Similar to Model Based System Design PPT MODULE IV.pptx (20)

Ankur Goel Resume
Ankur Goel ResumeAnkur Goel Resume
Ankur Goel Resume
 
Mochovce Unit 3 & 4 Full-Scope Simulator Project Key Points and Successes
Mochovce Unit 3 & 4 Full-Scope Simulator Project Key Points and SuccessesMochovce Unit 3 & 4 Full-Scope Simulator Project Key Points and Successes
Mochovce Unit 3 & 4 Full-Scope Simulator Project Key Points and Successes
 
ASIC design verification
ASIC design verificationASIC design verification
ASIC design verification
 
MIL_SIL.pdf
MIL_SIL.pdfMIL_SIL.pdf
MIL_SIL.pdf
 
Model based design-Hardware in loop-software in loop
Model based design-Hardware in loop-software in loopModel based design-Hardware in loop-software in loop
Model based design-Hardware in loop-software in loop
 
Development and validation of an "in-the-loop" simulator for small satellites
Development and validation of an "in-the-loop" simulator for small satellitesDevelopment and validation of an "in-the-loop" simulator for small satellites
Development and validation of an "in-the-loop" simulator for small satellites
 
Real-Time Engineering Simulators
Real-Time Engineering SimulatorsReal-Time Engineering Simulators
Real-Time Engineering Simulators
 
Hardware in loop simulation
Hardware in loop simulationHardware in loop simulation
Hardware in loop simulation
 
Confidence 2017: SCADA and mobile in the IoT times (Ivan Yushkievich, Alexand...
Confidence 2017: SCADA and mobile in the IoT times (Ivan Yushkievich, Alexand...Confidence 2017: SCADA and mobile in the IoT times (Ivan Yushkievich, Alexand...
Confidence 2017: SCADA and mobile in the IoT times (Ivan Yushkievich, Alexand...
 
1. An Introduction to Embed Systems_DRKG.pptx
1. An Introduction to Embed Systems_DRKG.pptx1. An Introduction to Embed Systems_DRKG.pptx
1. An Introduction to Embed Systems_DRKG.pptx
 
FInal_CV_08_4_2016
FInal_CV_08_4_2016FInal_CV_08_4_2016
FInal_CV_08_4_2016
 
Simulation and Modelling of 3-Floor Elevator System using PLC
Simulation and Modelling of 3-Floor Elevator System using PLCSimulation and Modelling of 3-Floor Elevator System using PLC
Simulation and Modelling of 3-Floor Elevator System using PLC
 
RTCA DO-254 Guidance - Accelerating DO-254 Verification
RTCA DO-254 Guidance - Accelerating DO-254 VerificationRTCA DO-254 Guidance - Accelerating DO-254 Verification
RTCA DO-254 Guidance - Accelerating DO-254 Verification
 
Rashmi_Palakkal_CV
Rashmi_Palakkal_CVRashmi_Palakkal_CV
Rashmi_Palakkal_CV
 
Sdlc
Sdlc Sdlc
Sdlc
 
2019 2 testing and verification of vlsi design_verification
2019 2 testing and verification of vlsi design_verification2019 2 testing and verification of vlsi design_verification
2019 2 testing and verification of vlsi design_verification
 
Ports-and-Adapters Architecture for Embedded HMI
Ports-and-Adapters Architecture for Embedded HMIPorts-and-Adapters Architecture for Embedded HMI
Ports-and-Adapters Architecture for Embedded HMI
 
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
EMBEDDED SYSTEMS SYBSC IT SEM IV UNIT V Embedded Systems Integrated Developme...
 
Simics - Break the Rules of Product Development
Simics - Break the Rules of Product DevelopmentSimics - Break the Rules of Product Development
Simics - Break the Rules of Product Development
 
plc8-200417125816.pdf
plc8-200417125816.pdfplc8-200417125816.pdf
plc8-200417125816.pdf
 

Recently uploaded

Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 

Recently uploaded (20)

Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Electromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxElectromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptx
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
 
Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...
 

Model Based System Design PPT MODULE IV.pptx

  • 1. Module IV CONTROLAND TESTING METHODS 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 1
  • 2. SRI RAMAKRISHNA ENGINEERING COLLEGE VATTAMALAIPALAYAM, N.G.G.O. COLONY POST, COIMBATORE – 641 022. DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION ENGINEERING Controller on Target and Plant on Target 20EI253 MODEL BASED SYSTEM DESIGN Prepared By Dr.B.Sharmila Professor / EIE Sri Ramakrishna Engineering College Coimbatore - 22 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 2 Module IV
  • 3. MODULE IV CONTROL AND TESTING METHODS • Controller on target • Plant on target • Processor in the Loop (PIL) real-time simulations • Model In Loop test (MIL) • Code verification using Software In Loop test (SIL) • Hardware In loop Test (HIL) • HIL implementation using raspberry pi: Coupled Tanks Model, Quarter Car Model • FPGA based Hardware in Loop simulation (HIL) for Power Electronics 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 3
  • 4. On Target Verification • On-target testing means testing the application in its target environment. • It may also be referred to as host-target testing or cross- testing. • On-host testing means testing the application on a host computer (such as the development system used to build the application). • This may also be referred to as host-host testing. • The key principle behind testing an application on-target is that code is executed in the environment for which it was designed. • Rather than in an environment where it was never intended to be executed. 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 4
  • 5. On-target verification of embedded systems difficult • Every embedded system is different • There are a huge range of possible applications for embedded systems, ranging from very simple • Monitoring the mirror switches on your car door • controlling the flight control system of an aerodynamically unstable fighter jet 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 5
  • 6. On-target verification of embedded systems difficult Embedded Processor and OS • There are many different processor families (different instruction sets, architectures) – unlike PCs which use slight variations on a single architecture, which is also backwards compatible with the original PC architecture from the mid 1980s. • Different hardware configurations (different memory layouts, different peripherals) exist – although PCs can provide different hardware configurations, These are abstracted away by the OS. • It’s not necessary, for example, to know where in memory to put your application when you build the software • There are many real-time operating systems – unlike PCs, which use a much smaller number (e.g. Windows, Linux or Mac OS for desktops/laptops) • Real-time operating systems also have varying levels of complexity - some are barely a scheduler, while others are much more complex. • Some are modifications of existing desktop operating systems (e.g. lots are based on the Linux kernel). Some are commercial products. 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 6
  • 7. On-target verification of embedded systems difficult Real-time embedded systems often have resource limitations • They are much slower devices • Devices with a real-time requirement can’t do single step debugging, because the plant connected to the device will break • Much less memory is available • Communication to the outside world is limited. • PCs/phones have nice big graphical displays - an embedded system might only have a few IO pins and a couple of LEDs • Real-time embedded systems are fixed applications. Unlike a PC, it’s often not possible to run a verification tool on an embedded system – so any data collected must be transferred to a separate PC for analysis. This is a challenge for anyone looking to extract enough information to perform on-target analysis 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 7
  • 8. Controller on Target 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 8 STEPS INVOLVED IN CONTROLLER ON TARGET Developed mathematical model of controller will run on the processor Real time input is given to the processor. Now the processor act as a real time controller On this condition, the performance of the controller is evaluated with the project requirement
  • 9. Plant on Target 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 9 STEPS INVOLVED IN PLANT ON TARGET Developed mathematical model of plant (System Model) will run on the processor Now the processor act as a real time plant The real time input will be given to the processor The model inside the processor will predict the plant (System) behaviour
  • 10. SRI RAMAKRISHNA ENGINEERING COLLEGE VATTAMALAIPALAYAM, N.G.G.O. COLONY POST, COIMBATORE – 641 022. DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION ENGINEERING Processor in the Loop real-time simulations (PIL) 20EI253 MODEL BASED SYSTEM DESIGN Prepared by : Dr.B.Sharmila, Professor / EIE Sri Ramakrishna Engineering College Coimbatore 22. 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 10 Module IV
  • 11. PIL (Process In Loop Test) • This step incorporates changes to the controller code for embedded hardware features that allows execution and tuning on the target micro-controller or DSP. • PIL setup involves • Loading the compiled object code onto the target processor or DSP • Then run the simulations on the plant model for verification. 1/2/2024 Dr.B.Sharmila- UI Bridge - SIL, PIL and HIL 11
  • 12. PIL (Process In Loop Test) • This is a non-real time setup • Hence allows execution of large number of V&V test suits to evaluate embedded CPU/DSP capability to run controller algorithms. • If there are differences between SIL and PIL results, then PIL object code is fine-tuned (for example) for fixed-point precision, memory footprint or compiler optimization flags 1/2/2024 Dr.B.Sharmila- UI Bridge - SIL, PIL and HIL 12
  • 13. SRI RAMAKRISHNA ENGINEERING COLLEGE VATTAMALAIPALAYAM, N.G.G.O. COLONY POST, COIMBATORE – 641 022. DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION ENGINEERING Model In Loop test (MIL) 20EI253 MODEL BASED SYSTEM DESIGN Prepared by : Dr.B.Sharmila, Professor / EIE Sri Ramakrishna Engineering College Coimbatore 22. 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 13 Module IV
  • 14. Model in the Loop (MIL) Test • Model-in-the-loop testing (MIL) and simulation is a technique used to abstract the behaviour of a system or sub-system in a way that this model can be used to test, simulate and verify that model. 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 14
  • 15. Model in the Loop (MIL) Test 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 15 Develop a model of the actual plant (hardware) in a simulation environment Simulink, which captures most of the important features of the hardware system. Plant model is created Develop the controller model Verify if the controller can control the plant (which is the model of the motor in this case) as per the requirement
  • 16. Model in the Loop (MIL) Test • This step is called Model-in-Loop (MIL) • Process, • Testing the controller logic on the simulated model of the plant • If your controller works as desired • Should record the input and output of the controller which will be used in the later stage of verification 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 16
  • 17. Model in Loop Test 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 17
  • 18. SRI RAMAKRISHNA ENGINEERING COLLEGE VATTAMALAIPALAYAM, N.G.G.O. COLONY POST, COIMBATORE – 641 022. DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION ENGINEERING Code verification using Software In Loop (SIL) test 20EI253 MODEL BASED SYSTEM DESIGN Prepared by : Dr.B.Sharmila, Professor / EIE Sri Ramakrishna Engineering College Coimbatore 22. 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 18 Module IV
  • 19. SIL (Software In Loop Test) • In this case, the model is adapted further according to the end goals of the embedded platform. • The controller model is coded in C or C++ (can be auto- generate code) • Then inserted back into the simulation environment to evaluate it along with the plant simulation. 1/2/2024 Dr.B.Sharmila- UI Bridge - SIL, PIL and HIL 19
  • 20. SIL and PIL • In a SIL or PIL simulation, code is generated for either the top model or part of the model. • With SIL, this code is compiled for and executed on your development computer. • With PIL, the code is cross-compiled for the target hardware and runs on the target processor. 1/2/2024 Dr.B.Sharmila- UI Bridge - SIL, PIL and HIL 20
  • 21. SIL vs PIL Type of SIL or PIL Simulation What Happens in SIL Simulation What Happens in PIL Simulation Specify through: •Top-model simulation mode •Model block Simulation mode parameter • Test behavior of generated source code code on development computer. Simulation does not test code compiled for target hardware because code is compiled for the development computer (different compiler and different processor architecture than the target). • Generated production code compiled and executed on development computer as separate process, independent of MATLAB ® process. • Execution is host/host and non-real time. • Test object code that you intend to deploy in production on either either real target hardware or an instruction set simulator. • On development computer, generated production code cross- cross-compiled for target. Object Object code downloaded and executed on target processor or instruction set simulator. • Execution is host/target and non-real time. Use SIL or PIL block created from subsystem. • Simulation runs compiled object code through S-function. S-function communicates with object code executing as standalone application on on development computer. SIL block execution is independent of the MATLAB process. • Execution is host/host and non-real time. • Simulation runs cross-compiled object code through S-function on development computer. S- function communicates with object code executing as standalone application on target processor or instruction set simulator. • Execution is host/target and non-real time. 1/2/2024 Dr.B.Sharmila- UI Bridge - SIL, PIL and HIL 21
  • 22. SRI RAMAKRISHNA ENGINEERING COLLEGE VATTAMALAIPALAYAM, N.G.G.O. COLONY POST, COIMBATORE – 641 022. DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION ENGINEERING Hardware In loop Test (HIL) 20EI253 MODEL BASED SYSTEM DESIGN Prepared by : Dr.B.Sharmila, Professor / EIE Sri Ramakrishna Engineering College Coimbatore 22. 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 22 Module IV
  • 23. Hardware-in-the-loop (HIL) • Hardware-in-the-loop (HIL) simulation is a type of real-time simulation. • HIL simulation is used to test controller design. • HIL simulation shows how controller responds in real time to realistic virtual stimuli. • HIL can also be used to determine if your physical system (plant) model is valid. 1/2/2024 Dr.B.Sharmila- UI Bridge - SIL, PIL and HIL 23
  • 24. • After the controller code has been verified using PIL; • Next step usually involves substituting the plant model with the actual system (or a lab prototype) or a real- time simulator running the plant model • For example, • If a DC motor speed controller is being designed then the controller code is deployed on the micro-controller or DSP board that is then interfaced to a real DC motor by connecting the inputs and outputs at the interface points such as sensors and power electronics components. 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 24 Hardware-in-the-loop (HIL)
  • 25. 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 25 Hardware-in-the-loop (HIL)
  • 26. • HIL testing is one of the last integration levels that allows debugging and evaluation of functional and operational tests in a manageable way in a real-time environment. • Often a substantial amount of software based test automation and logging as well as hardware interfacing components are required to implement a reliable HIL setup. • The PIL setup is comparatively easier and require less hardware and software resources. 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 26 Hardware-in-the-loop (HIL)
  • 27. 1/2/2024 Dr.B.Sharmila- UI Bridge - SIL, PIL and HIL 27 Hardware-in-the-loop (HIL)
  • 28. Using Simulator for Hardware • Mathematical model of the system is developed and same is programmed into the Microcontroller • Now, the Microcontroller now act like that system. • In this example, a Two Tank system is modelled and programmed in Arduino nano • Now Arduino act as Two Tank System • From this simulation they found, • Liquid levels to rise from 2.7 meters to 3.3 meters when the flow rate was was increased from 1 cubic meter per per sec to 1.11 cubic meter per sec https://reference.wolfram.com/langu age/MicrocontrollerKit/workflow/HI L 1/2/2024 Dr.B.Sharmila- UI Bridge - SIL, PIL and HIL 28 Hardware-in-the-loop (HIL)
  • 29. SRI RAMAKRISHNA ENGINEERING COLLEGE VATTAMALAIPALAYAM, N.G.G.O. COLONY POST, COIMBATORE – 641 022. DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION ENGINEERING HIL implementation using raspberry pi: coupled tanks model, quarter car model 20EI253 MODEL BASED SYSTEM DESIGN Prepared by : Dr.B.Sharmila, Professor / EIE Sri Ramakrishna Engineering College Coimbatore 22. 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 29 Module IV
  • 30. Coupled Tank Model 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 30
  • 31. Coupled Tank Parameters 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 31
  • 32. State space model of the system 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 32
  • 33. Discrete Model of the system 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 33
  • 34. Block diagram of HIL Implementation 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 34
  • 35. Response of the plant with step change 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 35
  • 36. Quarter Car Model 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 36
  • 37. State Space Model 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 37
  • 38. Discrete model 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 38
  • 40. Response of the system 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 40
  • 41. SRI RAMAKRISHNA ENGINEERING COLLEGE VATTAMALAIPALAYAM, N.G.G.O. COLONY POST, COIMBATORE – 641 022. DEPARTMENT OF ELECTRONICS AND INSTRUMENTATION ENGINEERING FPGA based Hardware in Loop simulation (HIL) for Power Electronics 20EI253 MODEL BASED SYSTEM DESIGN Prepared by : Dr.B.Sharmila, Professor / EIE Sri Ramakrishna Engineering College Coimbatore 22. 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 41 Module IV
  • 42. Need for FPGA in HIL • Real-time simulation of power electronic converter systems, in the context of HIL testing, is a challenging task. • This is due to: 1. The computational burden imposed on the simulator hardware due to the inherent switching nature of power electronic converters, and 2. The asynchronous digital interface between the controller PWM outputs and the simulator inputs. PWM gating signals generated by the controller rarely coincides with the real-time simulation time-grid. Switching events are usually imposed by the controller in-between two simulation instances. 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 42
  • 43. Need for FPGA in HIL 2. The simulator, unlike an actual system, cannot instantaneously respond to the PWM outputs of the controller and only accounts for it at the end of the simulation time-step, thus, errors are introduced to the simulation results. 3. The percentage error due to ITS is a function of the simulation time-step of the simulator and the switching frequency of the controller. 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 43
  • 44. Need for FPGA in HIL • This problem is more pronounced in multilevel converter systems, • particularly when the voltage balancing task of the converter is carried out through the modification of the switching functions, with no requirement to additional power circuitry. • With the increase in the switching events per simulation time-step, it will be very likely to have multiple switching events imposed by the controller in between two simulation instances. This phenomenon is called multiple inter-simulation time-step switching (MITS). 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 44
  • 45. Need for FPGA in HIL • Certain issues make running a model real-time challenging • Minimum time step • Model complexity • Specialized solvers • It is all about time step • Thermal – seconds • Mechanical – milliseconds • Power Systems – sub-milliseconds • Power Electronics – microseconds • Radar – nanoseconds 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 45
  • 46. Need for FPGA in HIL • Typical real-time CPU based solutions run in the sub-millisecond range • FPGA based solutions run in the microsecond range • bordering sub-microsecond for specific applications 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 46
  • 47. The Need for Small Time Step Simulations 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 47
  • 48. Path to FPGA Accelerated Real-time: Simscape 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 48
  • 49. Example : Solar Inverter for Real Time Testing 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 49
  • 50. Example : Solar Inverter for Real Time Testing 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 50
  • 51. Example : Solar Inverter for Real Time Testing 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 51
  • 52. Example : Solar Inverter for Real Time Testing 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 52
  • 53. Example : Solar Inverter for Real Time Testing 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 53
  • 54. Example : Solar Inverter for Real Time Testing 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 54
  • 55. Example : Solar Inverter for Real Time Testing 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 55
  • 56. Example : Solar Inverter for Real Time Testing 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 56
  • 57. Example : Solar Inverter for Real Time Testing 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 57
  • 58. Example : Solar Inverter for Real Time Testing 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 58
  • 59. Example : Solar Inverter for Real Time Testing 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 59
  • 60. Example : Solar Inverter for Real Time Testing 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 60
  • 61. Example : Solar Inverter for Real Time Testing 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 61
  • 62. Example : Solar Inverter for Real Time Testing 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 62
  • 63. Example Video : dSpace 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 63
  • 64. Example Video : dSpace 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 64
  • 65. Example Video : dSpace https://www.youtube.com/watch?v=JTDYQfrR Xl8 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 65
  • 66. References • https://www.design- reuse.com/articles/42548/embedded-software- verification-validation-in-model-based- development.html • https://in.mathworks.com/matlabcentral/answers/4402 77-what-are-mil-sil-pil-and-hil-and-how-do-they- integrate-with-the-model-based-design-approach • https://in.mathworks.com/discovery/model-based- testing.html • http://ifatwww.et.uni- magdeburg.de/ifac2020/media/pdfs/2243.pdf • https://www.mathworks.com/content/dam/mathworks/ mathworks-dot- com/images/events/matlabexpo/kr/2019/power- electronics-hil-testing-using-simscape-to-hdl- conversion.pdf 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 66
  • 67. Thank you 1/2/2024 SREC - EIE - 20EI253 - MODEL BASED SYSTEM DESIGN 67