SlideShare a Scribd company logo
1 of 57
Download to read offline
REAL TIME EMBEDDED CONTROL SYSTEMS
USING MBD CONCEPT
Eng. Mahmoud Hussein
18-oct-19 RTECS 2019
1
Contact Person
2
 Course Instructor
 Mahmoud Hussein
 Lecturer assistant, French university
 Email: Mahmoud.ahmed2013@gmail.com
 Mobile: 01007148378
RTECS
Rules
13
RTECS
‫الذكية‬ ‫للصواريخ‬ ‫القومى‬ ‫المشروع‬
4
Which methodology will you use to develop a SAM?
A: Manually Write Assembly
B: Manually Write C-Code
C: MBD: Auto-Code Generation
RTECS
Welcome to
Real Time Embedded Control Systems
RTECS
Course Objective
6
 The course shows one design path for real time embedded systems.
 It starts by system level simulation based design.
 It ends by real time implementation of control algorithms.
RTECS
Course Syllabus
7
 Part 1 : Introduction to Matlab and Simulink
 Recognize MATLAB and Simulink Environment
 MATLAB Fundamentals and Basic Operations
 M-File and Programming Basics
 Data Visualization (2D/3D)
 State flow.
 S-function
RTECS
Course Syllabus
8
Part 2 : Basics and Modelling
 Introduction to Real Time Embedded Control Systems
 Physical System Modelling of Mechanical Systems
 Dynamic SystemAnalysis
 Physical System Modelling of Electrical Systems
 Modelling Electric Motors
RTECS
Course Syllabus
9
Part 3: Control and PID
 Control Systems
 PID Controller
 Tuning PID Controllers
 Numerical Integration
 PID Advanced Topics
 Digital Controller Design
RTECS
Course Syllabus
10
Part 4: Advanced Topics
 Embedded Coder .
 State Machine Concept.
 MathWorks Automotive Advisory Board- MAAB(Optional)
RTECS
T
ools
11
 Matlab & Simulink
 Control System Toolbox
 Simulink Control Design
 State Flow
 Embedded Coder
RTECS
Domains of Appplication of Embedded
Systems
RTECS 2010 12
Control Systems
• Vehicles
• Appliances
General Computing
• ATM
• Video Games
Signal Processing
• Radar, Sonar
• Video Processing
Communication &
Networking
• Moblie Phones
• Servers
Real Time Embedded Control Systems Applications
RTECS 2010 13
Steam Turbine
Control
Flight Control
Print Head
Control
Navigation
Control
Engine Control
Dryer Cycle
Control
Medical Device
Control
Model Based Design
RTECS
Model Based Design
• In Model-Based Design, a system model is at the center of the
development process, from requirements development, through
design, implementation, and testing.
• The model is a graphical representations of math-based simulation
methods.
RTECS 2019 15
Elements of Model Based Design
RTECS 2019 16
Elements of Model Based Design
17
Model
Executable
Specificatio
n
Design with
Simulation
Automatic
Code
Generation
Continuous
Test and
Verification
Executable Specification
• Executable
• The model can be simulated to illustrate functional behavior.
• Specification
• An explicit design intended to meet certain requirements.
18
Elements of Model Based Design
19
Model
Executable
Specification
Design with
Simulation
Automatic
Code
Generation
Continuous
Test and
Verification
Design with Simulation
• Use simulate during the design stage to verify that the model meets
the requirements, detect and correct errors early in the design stage
20
Elements of Model Based Design
21
Model
Executable
Specificatio
n
Design with
Simulation
Automatic
Code
Generation
Continuous
Test and
Verification
Coding Traditional Approach
RTECS 2010 22
Problems:
• Communication
• Ambiguity of specs
• Resource conflicts
 Large turnaround time!
Production
Code
Specs
Function Developer
 algorithm
knowledge
#include <math.h>
if (a > 0)
ki = 0.4*x+z1;
Software Specialist
 implementation
& coding knowledge
Time
Automatic Code Generation
RTECS 2010 23
Function Developer
 algorithm
knowledge
Software Specialist
 implementation
knowledge
Coding knowledge:
• ANSI-C
• language extensions
• assembly language
• processor architecture
 … and how to
optimally use it!
Code Generator
 coding knowledge
Automatic Code Generation Features
• Scheduling and integration with RTOS
• MISRA C
• Autosar
• Customizable code
24
Automatic Code Generators
• TargetLink from dSPACE, since 1999
• Real-Time Workshop Embedded Coder from
MathWorks
RTECS 2010 25
Automatic Code Generation
RTECS 2019 26
Implementation Model
(fixed-point)
C Code
Code generator
Compiler
(Linker)
Host PC
Target
Physical Model
(floating-point)
Cross-compiler
(Linker / Loader)
Automatic Code Generation
RTECS 2019 27
Implementation Model
(fixed-point)
C Code
Code generator
Compiler
(Linker)
Host PC
Target
Physical Model
(floating-point)
Cross-compiler
(Linker / Loader)
Elements of Model Based Design
RTECS 2019 28
Model
Executable
Specification
Design with
Simulation
Automatic
Code
Generation
Continuous
Test and
Verification
Continuous Test and Verification
• Deign test cases to test the model
• Reuse test cases to test software implementation
• Simulation models enable to test conditions that would be
destructive or cost-prohibitive to run in the lab or on the road
• Automatically generating test cases from the model to ensure
Modified Condition/Decision Coverage (MC/DC)
• Writing the MC/DC tests would take as least as long as the original design
effort
RTECS 2019 29
RTECS 2010
30



test output
result
comparison
physical model
implementation model
test stimuli
C code (target)
ECU
MiL (physical model)
MiL (impl. model)
SiL
PiL
C code (host)
Model in the Loop (MIL)
• Proof of Concept and Design Optimization
• Pure simulation
• Modelling of both the application and the
environment may be wrong
31
Controller
running in e.g. Simulink
Plant
running in e.g. Simulink
Software in the Loop (SIL)
• Compiled application
• Simulation at an early stage
• Accelerated simulation
• Low cost & short development time
• Non real-time
RTECS 2010 32
Controller
running as binary
Plant
running in e.g. Simulink
Processor in the Loop (PIL)
• Determining Memory Usage
• Determining the time needed for the Algorithm
• Assures that the tool chain does not cause problems
• Determining problems related to the resolution of
the processor (16 bits, 32 bits, fixed point)
33
Controller
running on target HW
Plant
running in e.g. Simulink
MIL SIL PIL
RTECS 2010 34
Hardware in the Loop (HIL)
• HIL system replaces the real world environment
• Production hardware can be tested without any
changes
• Application is executed in real time on an
appropriate hardware platform
RTECS 2010 35
Controller
running on target
Plant
Running in real-time on a HIL
Simulator
HIL Simulator: dSPACE
RTECS 2010
36
Dynamic
Models
Processor Board
I/O Board
GUI and
Automation
Diagn. Tool
ECU
Loads
FIU
User Interface for Interactive Use of the HIL System
RTECS 2010 37
Networked HIL Simulation
38
Vehicle
dynamics
Comfort
(central unit)
Transmission Engine
GigaLink
CAN
2004 Audi A6
Networked HIL Simulation
RTECS 2010 39
Mercedes-Benz 2005 A-Class
Breadboard Table
appr. 8 powertrain
and chassis ECUs
appr. 20 body ECUs
What is a Model?
RTECS 2014
15
RTECS
What is a Model?
16
A model is a representation of a real system focusing onsome
important aspects
 Scale model
 Represents geometric proportions
 Flight simulator
 Focuses on flight dynamics
RTECS
What is a Model?
17
 In Model-Based Design, a system model is at the center of the
development process, from requirements development, through
design, implementation, and testing.
 What is meant here by model is a graphical representations of
the system
RTECS
Model Based Design Rationale
18
 Think: can you draw a rectangle with 3 lines
RTECS
Model Based Design Rationale
19
 Executable specification
RTECS
Model Based Design Rationale
20
 Automatic Code
Generation
RTECS
Model Based Design Rationale
21
1. Graphical Representation
2. Executable Specification
3. Automatic Code Generation
RTECS
Physical Systems
RTECS
Definition of System
23
 From engineering point of view, a system is defined as an
interconnection of many components that act together to
perform a certain objective
 Automobile
 Machine tool
 Robot
RTECS
Physical Systems Classification
24
Physical
System
Static System Dynamic
System
RTECS
Static System
25
 Output of the system depends only on the current input
 The system has no memory
RTECS
Dynamic System
26
 Output of the system depends on the current input as well as
previous inputs/outputs
 The system has internal memory
A dynamic system can be represented mathematically
using differential equations
RTECS
What is a Real Time System?
RTECS
Real-Time System
43
 A real-time system is a software system where the correct
functioning of the system depends not only on the results
produced by the system but also on the time at which these
results are produced.
 The system has "real-time constraints"
RTECS
Hard Real-Time System
44
 A hard real-time system is a system whose operation is incorrectif
results are not produced according to the timing specification.
 Car engine control system is a hard real-time system
 because a delayed signal may cause engine failure or damage
 Flight Control System
 Airbag crash detection system
RTECS
Hard Real-Time System
45
 Delay = Failure
 Time granularity
 Millisecond
 RequiredAnalysis
 Worst possible scenario
 Need for redundancy
 To meet safety requirements
RTECS
Hard Real-Time System Example
46
 Airbag crash detection system
 Airbag must inflate between 10 and 20 msec from the detection of a crash
 Not too early—since this would make the airbag deflate before it can catch
the passenger
 Nor too late—since the airbag could then injure the passenger by blowing up
in his face and/or catch him too late to prevent his head from banging into the
steering wheel
RTECS
Soft Real-Time System
47
 A soft real-time system is a system whose operation is
degraded if results are not produced according to the specified
timing requirements.
 Non-safety-critical system
 Keypad input
 Message visualization
 System status representation
RTECS

More Related Content

What's hot

Brushless dc motor, Principles of Mechanical Vs Electronic Commentator Constr...
Brushless dc motor, Principles of Mechanical Vs Electronic Commentator Constr...Brushless dc motor, Principles of Mechanical Vs Electronic Commentator Constr...
Brushless dc motor, Principles of Mechanical Vs Electronic Commentator Constr...Waqas Afzal
 
Hardware in Loop System Design
Hardware in Loop System DesignHardware in Loop System Design
Hardware in Loop System Designparulo123
 
electrical engineering project
electrical engineering projectelectrical engineering project
electrical engineering projectvasav2204
 
Special Electrical Machines
Special Electrical MachinesSpecial Electrical Machines
Special Electrical Machinesjohny renoald
 
Electric drives
Electric drivesElectric drives
Electric drivesSamsu Deen
 
Sensor based motion control of mobile car robot
Sensor based motion control of mobile car robotSensor based motion control of mobile car robot
Sensor based motion control of mobile car robotNaidu P
 
Comparison and analysis of electrical motor used in Electric Vehicles..
Comparison and analysis of electrical motor used in Electric Vehicles..Comparison and analysis of electrical motor used in Electric Vehicles..
Comparison and analysis of electrical motor used in Electric Vehicles..MANAS GILDER
 
PPT on INDUSTRIAL AUTOMATION, PLC, SCADA
 PPT on INDUSTRIAL AUTOMATION, PLC, SCADA PPT on INDUSTRIAL AUTOMATION, PLC, SCADA
PPT on INDUSTRIAL AUTOMATION, PLC, SCADAAakashkumar276
 
ACCIDENT PREVENTION AND SECURITY SYSTEM FOR AUTOMOBILES
ACCIDENT PREVENTION AND SECURITY SYSTEM FOR AUTOMOBILESACCIDENT PREVENTION AND SECURITY SYSTEM FOR AUTOMOBILES
ACCIDENT PREVENTION AND SECURITY SYSTEM FOR AUTOMOBILESAdrija Chowdhury
 
vector control induction motor.ppt
vector control induction motor.pptvector control induction motor.ppt
vector control induction motor.pptRajaDesingu2
 
Three phase Induction Motor (Construction and working Principle)
Three phase Induction Motor (Construction and working Principle)Three phase Induction Motor (Construction and working Principle)
Three phase Induction Motor (Construction and working Principle)Sharmitha Dhanabalan
 
Robotic car project presentation
Robotic car project presentationRobotic car project presentation
Robotic car project presentationAkshay Parmar
 
An Overview of Vehicle Control Systems
An Overview of Vehicle Control SystemsAn Overview of Vehicle Control Systems
An Overview of Vehicle Control SystemsBehzad Samadi
 

What's hot (20)

Brushless dc motor, Principles of Mechanical Vs Electronic Commentator Constr...
Brushless dc motor, Principles of Mechanical Vs Electronic Commentator Constr...Brushless dc motor, Principles of Mechanical Vs Electronic Commentator Constr...
Brushless dc motor, Principles of Mechanical Vs Electronic Commentator Constr...
 
Hardware in Loop System Design
Hardware in Loop System DesignHardware in Loop System Design
Hardware in Loop System Design
 
electrical engineering project
electrical engineering projectelectrical engineering project
electrical engineering project
 
Special Electrical Machines
Special Electrical MachinesSpecial Electrical Machines
Special Electrical Machines
 
Motor drives
Motor drivesMotor drives
Motor drives
 
ppt
pptppt
ppt
 
Electric drives
Electric drivesElectric drives
Electric drives
 
Sensor based motion control of mobile car robot
Sensor based motion control of mobile car robotSensor based motion control of mobile car robot
Sensor based motion control of mobile car robot
 
Comparison and analysis of electrical motor used in Electric Vehicles..
Comparison and analysis of electrical motor used in Electric Vehicles..Comparison and analysis of electrical motor used in Electric Vehicles..
Comparison and analysis of electrical motor used in Electric Vehicles..
 
Density based traffic signal system
Density based traffic signal systemDensity based traffic signal system
Density based traffic signal system
 
PPT on INDUSTRIAL AUTOMATION, PLC, SCADA
 PPT on INDUSTRIAL AUTOMATION, PLC, SCADA PPT on INDUSTRIAL AUTOMATION, PLC, SCADA
PPT on INDUSTRIAL AUTOMATION, PLC, SCADA
 
ACCIDENT PREVENTION AND SECURITY SYSTEM FOR AUTOMOBILES
ACCIDENT PREVENTION AND SECURITY SYSTEM FOR AUTOMOBILESACCIDENT PREVENTION AND SECURITY SYSTEM FOR AUTOMOBILES
ACCIDENT PREVENTION AND SECURITY SYSTEM FOR AUTOMOBILES
 
Electric locomotive
Electric locomotiveElectric locomotive
Electric locomotive
 
vector control induction motor.ppt
vector control induction motor.pptvector control induction motor.ppt
vector control induction motor.ppt
 
Alcohol detector
Alcohol detectorAlcohol detector
Alcohol detector
 
Three phase Induction Motor (Construction and working Principle)
Three phase Induction Motor (Construction and working Principle)Three phase Induction Motor (Construction and working Principle)
Three phase Induction Motor (Construction and working Principle)
 
Robotic car project presentation
Robotic car project presentationRobotic car project presentation
Robotic car project presentation
 
Mechatronics
MechatronicsMechatronics
Mechatronics
 
An Overview of Vehicle Control Systems
An Overview of Vehicle Control SystemsAn Overview of Vehicle Control Systems
An Overview of Vehicle Control Systems
 
Bldc motors ppt
Bldc motors pptBldc motors ppt
Bldc motors ppt
 

Similar to MIL_SIL.pdf

To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...
To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...
To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...ijsrd.com
 
Innovate with confidence – Functional Verification of Embedded Algorithms
Innovate with confidence – Functional Verification of Embedded AlgorithmsInnovate with confidence – Functional Verification of Embedded Algorithms
Innovate with confidence – Functional Verification of Embedded AlgorithmsJoachim Schlosser
 
It‘s Math That Drives Things – Simulink as Simulation and Modeling Environment
It‘s Math That Drives Things – Simulink as Simulation and Modeling EnvironmentIt‘s Math That Drives Things – Simulink as Simulation and Modeling Environment
It‘s Math That Drives Things – Simulink as Simulation and Modeling EnvironmentJoachim Schlosser
 
Real-Time Engineering Simulators
Real-Time Engineering SimulatorsReal-Time Engineering Simulators
Real-Time Engineering SimulatorsGSE Systems, Inc.
 
Engage with...Romax | Driving the Electric Revolution Webinar
Engage with...Romax | Driving the Electric Revolution WebinarEngage with...Romax | Driving the Electric Revolution Webinar
Engage with...Romax | Driving the Electric Revolution WebinarKTN
 
Functional verification techniques EW16 session
Functional verification techniques  EW16 sessionFunctional verification techniques  EW16 session
Functional verification techniques EW16 sessionSameh El-Ashry
 
Using Modelica and FMI to evaluate requirements compliance early in system d...
Using Modelica and FMI to evaluate requirements compliance early in system d...Using Modelica and FMI to evaluate requirements compliance early in system d...
Using Modelica and FMI to evaluate requirements compliance early in system d...Modelon
 
Automotive engineering design - Model Based Design
Automotive engineering design - Model Based DesignAutomotive engineering design - Model Based Design
Automotive engineering design - Model Based DesignVinayagam Mariappan
 
Model-Based Design & Analysis.ppt
Model-Based Design & Analysis.pptModel-Based Design & Analysis.ppt
Model-Based Design & Analysis.pptRajuRaju183149
 
Inception Institute of Industrial Training Brochure 2014 by APRM
Inception Institute of Industrial Training Brochure 2014 by APRMInception Institute of Industrial Training Brochure 2014 by APRM
Inception Institute of Industrial Training Brochure 2014 by APRMATHAL Public Relations & Marketing
 
Modelon Modelica executable requirements Ansys Conference 2016
Modelon Modelica executable requirements Ansys Conference 2016Modelon Modelica executable requirements Ansys Conference 2016
Modelon Modelica executable requirements Ansys Conference 2016Modelon
 
10 good reasons to go for model-based systems engineering in your organization
10 good reasons to go for model-based systems engineering in your organization10 good reasons to go for model-based systems engineering in your organization
10 good reasons to go for model-based systems engineering in your organizationSiemens PLM Software
 
Model Based System Design PPT MODULE IV.pptx
Model Based System Design PPT MODULE IV.pptxModel Based System Design PPT MODULE IV.pptx
Model Based System Design PPT MODULE IV.pptxssuseraaa4d6
 
DCS_Check-Out_and_Operator_Training_with_HYSYS_Dynamics_White_v1.3.pdf
DCS_Check-Out_and_Operator_Training_with_HYSYS_Dynamics_White_v1.3.pdfDCS_Check-Out_and_Operator_Training_with_HYSYS_Dynamics_White_v1.3.pdf
DCS_Check-Out_and_Operator_Training_with_HYSYS_Dynamics_White_v1.3.pdfOkeke Livinus
 
Mechatronics design team project v2
Mechatronics design team project v2Mechatronics design team project v2
Mechatronics design team project v2Waleed El-Badry
 
Design of Mechatronics System
Design of Mechatronics SystemDesign of Mechatronics System
Design of Mechatronics SystemVeerakumar S
 

Similar to MIL_SIL.pdf (20)

To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...
To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...
To Perform SIL And PIL Testing on Fast Dynamic System using Economical AVR Co...
 
Innovate with confidence – Functional Verification of Embedded Algorithms
Innovate with confidence – Functional Verification of Embedded AlgorithmsInnovate with confidence – Functional Verification of Embedded Algorithms
Innovate with confidence – Functional Verification of Embedded Algorithms
 
It‘s Math That Drives Things – Simulink as Simulation and Modeling Environment
It‘s Math That Drives Things – Simulink as Simulation and Modeling EnvironmentIt‘s Math That Drives Things – Simulink as Simulation and Modeling Environment
It‘s Math That Drives Things – Simulink as Simulation and Modeling Environment
 
Real-Time Engineering Simulators
Real-Time Engineering SimulatorsReal-Time Engineering Simulators
Real-Time Engineering Simulators
 
Engage with...Romax | Driving the Electric Revolution Webinar
Engage with...Romax | Driving the Electric Revolution WebinarEngage with...Romax | Driving the Electric Revolution Webinar
Engage with...Romax | Driving the Electric Revolution Webinar
 
Functional verification techniques EW16 session
Functional verification techniques  EW16 sessionFunctional verification techniques  EW16 session
Functional verification techniques EW16 session
 
Using Modelica and FMI to evaluate requirements compliance early in system d...
Using Modelica and FMI to evaluate requirements compliance early in system d...Using Modelica and FMI to evaluate requirements compliance early in system d...
Using Modelica and FMI to evaluate requirements compliance early in system d...
 
Automotive engineering design - Model Based Design
Automotive engineering design - Model Based DesignAutomotive engineering design - Model Based Design
Automotive engineering design - Model Based Design
 
Model-Based Design & Analysis.ppt
Model-Based Design & Analysis.pptModel-Based Design & Analysis.ppt
Model-Based Design & Analysis.ppt
 
Inception Institute of Industrial Training Brochure 2014 by APRM
Inception Institute of Industrial Training Brochure 2014 by APRMInception Institute of Industrial Training Brochure 2014 by APRM
Inception Institute of Industrial Training Brochure 2014 by APRM
 
CIM unit-1
CIM  unit-1CIM  unit-1
CIM unit-1
 
Modelon Modelica executable requirements Ansys Conference 2016
Modelon Modelica executable requirements Ansys Conference 2016Modelon Modelica executable requirements Ansys Conference 2016
Modelon Modelica executable requirements Ansys Conference 2016
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
 
10 good reasons to go for model-based systems engineering in your organization
10 good reasons to go for model-based systems engineering in your organization10 good reasons to go for model-based systems engineering in your organization
10 good reasons to go for model-based systems engineering in your organization
 
Model Based System Design PPT MODULE IV.pptx
Model Based System Design PPT MODULE IV.pptxModel Based System Design PPT MODULE IV.pptx
Model Based System Design PPT MODULE IV.pptx
 
Mechatronics engineer
Mechatronics engineerMechatronics engineer
Mechatronics engineer
 
shwetabisht
shwetabishtshwetabisht
shwetabisht
 
DCS_Check-Out_and_Operator_Training_with_HYSYS_Dynamics_White_v1.3.pdf
DCS_Check-Out_and_Operator_Training_with_HYSYS_Dynamics_White_v1.3.pdfDCS_Check-Out_and_Operator_Training_with_HYSYS_Dynamics_White_v1.3.pdf
DCS_Check-Out_and_Operator_Training_with_HYSYS_Dynamics_White_v1.3.pdf
 
Mechatronics design team project v2
Mechatronics design team project v2Mechatronics design team project v2
Mechatronics design team project v2
 
Design of Mechatronics System
Design of Mechatronics SystemDesign of Mechatronics System
Design of Mechatronics System
 

Recently uploaded

Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 

Recently uploaded (20)

DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 

MIL_SIL.pdf

  • 1. REAL TIME EMBEDDED CONTROL SYSTEMS USING MBD CONCEPT Eng. Mahmoud Hussein 18-oct-19 RTECS 2019 1
  • 2. Contact Person 2  Course Instructor  Mahmoud Hussein  Lecturer assistant, French university  Email: Mahmoud.ahmed2013@gmail.com  Mobile: 01007148378 RTECS
  • 4. ‫الذكية‬ ‫للصواريخ‬ ‫القومى‬ ‫المشروع‬ 4 Which methodology will you use to develop a SAM? A: Manually Write Assembly B: Manually Write C-Code C: MBD: Auto-Code Generation RTECS
  • 5. Welcome to Real Time Embedded Control Systems RTECS
  • 6. Course Objective 6  The course shows one design path for real time embedded systems.  It starts by system level simulation based design.  It ends by real time implementation of control algorithms. RTECS
  • 7. Course Syllabus 7  Part 1 : Introduction to Matlab and Simulink  Recognize MATLAB and Simulink Environment  MATLAB Fundamentals and Basic Operations  M-File and Programming Basics  Data Visualization (2D/3D)  State flow.  S-function RTECS
  • 8. Course Syllabus 8 Part 2 : Basics and Modelling  Introduction to Real Time Embedded Control Systems  Physical System Modelling of Mechanical Systems  Dynamic SystemAnalysis  Physical System Modelling of Electrical Systems  Modelling Electric Motors RTECS
  • 9. Course Syllabus 9 Part 3: Control and PID  Control Systems  PID Controller  Tuning PID Controllers  Numerical Integration  PID Advanced Topics  Digital Controller Design RTECS
  • 10. Course Syllabus 10 Part 4: Advanced Topics  Embedded Coder .  State Machine Concept.  MathWorks Automotive Advisory Board- MAAB(Optional) RTECS
  • 11. T ools 11  Matlab & Simulink  Control System Toolbox  Simulink Control Design  State Flow  Embedded Coder RTECS
  • 12. Domains of Appplication of Embedded Systems RTECS 2010 12 Control Systems • Vehicles • Appliances General Computing • ATM • Video Games Signal Processing • Radar, Sonar • Video Processing Communication & Networking • Moblie Phones • Servers
  • 13. Real Time Embedded Control Systems Applications RTECS 2010 13 Steam Turbine Control Flight Control Print Head Control Navigation Control Engine Control Dryer Cycle Control Medical Device Control
  • 15. Model Based Design • In Model-Based Design, a system model is at the center of the development process, from requirements development, through design, implementation, and testing. • The model is a graphical representations of math-based simulation methods. RTECS 2019 15
  • 16. Elements of Model Based Design RTECS 2019 16
  • 17. Elements of Model Based Design 17 Model Executable Specificatio n Design with Simulation Automatic Code Generation Continuous Test and Verification
  • 18. Executable Specification • Executable • The model can be simulated to illustrate functional behavior. • Specification • An explicit design intended to meet certain requirements. 18
  • 19. Elements of Model Based Design 19 Model Executable Specification Design with Simulation Automatic Code Generation Continuous Test and Verification
  • 20. Design with Simulation • Use simulate during the design stage to verify that the model meets the requirements, detect and correct errors early in the design stage 20
  • 21. Elements of Model Based Design 21 Model Executable Specificatio n Design with Simulation Automatic Code Generation Continuous Test and Verification
  • 22. Coding Traditional Approach RTECS 2010 22 Problems: • Communication • Ambiguity of specs • Resource conflicts  Large turnaround time! Production Code Specs Function Developer  algorithm knowledge #include <math.h> if (a > 0) ki = 0.4*x+z1; Software Specialist  implementation & coding knowledge Time
  • 23. Automatic Code Generation RTECS 2010 23 Function Developer  algorithm knowledge Software Specialist  implementation knowledge Coding knowledge: • ANSI-C • language extensions • assembly language • processor architecture  … and how to optimally use it! Code Generator  coding knowledge
  • 24. Automatic Code Generation Features • Scheduling and integration with RTOS • MISRA C • Autosar • Customizable code 24
  • 25. Automatic Code Generators • TargetLink from dSPACE, since 1999 • Real-Time Workshop Embedded Coder from MathWorks RTECS 2010 25
  • 26. Automatic Code Generation RTECS 2019 26 Implementation Model (fixed-point) C Code Code generator Compiler (Linker) Host PC Target Physical Model (floating-point) Cross-compiler (Linker / Loader)
  • 27. Automatic Code Generation RTECS 2019 27 Implementation Model (fixed-point) C Code Code generator Compiler (Linker) Host PC Target Physical Model (floating-point) Cross-compiler (Linker / Loader)
  • 28. Elements of Model Based Design RTECS 2019 28 Model Executable Specification Design with Simulation Automatic Code Generation Continuous Test and Verification
  • 29. Continuous Test and Verification • Deign test cases to test the model • Reuse test cases to test software implementation • Simulation models enable to test conditions that would be destructive or cost-prohibitive to run in the lab or on the road • Automatically generating test cases from the model to ensure Modified Condition/Decision Coverage (MC/DC) • Writing the MC/DC tests would take as least as long as the original design effort RTECS 2019 29
  • 30. RTECS 2010 30    test output result comparison physical model implementation model test stimuli C code (target) ECU MiL (physical model) MiL (impl. model) SiL PiL C code (host)
  • 31. Model in the Loop (MIL) • Proof of Concept and Design Optimization • Pure simulation • Modelling of both the application and the environment may be wrong 31 Controller running in e.g. Simulink Plant running in e.g. Simulink
  • 32. Software in the Loop (SIL) • Compiled application • Simulation at an early stage • Accelerated simulation • Low cost & short development time • Non real-time RTECS 2010 32 Controller running as binary Plant running in e.g. Simulink
  • 33. Processor in the Loop (PIL) • Determining Memory Usage • Determining the time needed for the Algorithm • Assures that the tool chain does not cause problems • Determining problems related to the resolution of the processor (16 bits, 32 bits, fixed point) 33 Controller running on target HW Plant running in e.g. Simulink
  • 34. MIL SIL PIL RTECS 2010 34
  • 35. Hardware in the Loop (HIL) • HIL system replaces the real world environment • Production hardware can be tested without any changes • Application is executed in real time on an appropriate hardware platform RTECS 2010 35 Controller running on target Plant Running in real-time on a HIL Simulator
  • 36. HIL Simulator: dSPACE RTECS 2010 36 Dynamic Models Processor Board I/O Board GUI and Automation Diagn. Tool ECU Loads FIU
  • 37. User Interface for Interactive Use of the HIL System RTECS 2010 37
  • 38. Networked HIL Simulation 38 Vehicle dynamics Comfort (central unit) Transmission Engine GigaLink CAN 2004 Audi A6
  • 39. Networked HIL Simulation RTECS 2010 39 Mercedes-Benz 2005 A-Class Breadboard Table appr. 8 powertrain and chassis ECUs appr. 20 body ECUs
  • 40. What is a Model? RTECS 2014 15 RTECS
  • 41. What is a Model? 16 A model is a representation of a real system focusing onsome important aspects  Scale model  Represents geometric proportions  Flight simulator  Focuses on flight dynamics RTECS
  • 42. What is a Model? 17  In Model-Based Design, a system model is at the center of the development process, from requirements development, through design, implementation, and testing.  What is meant here by model is a graphical representations of the system RTECS
  • 43. Model Based Design Rationale 18  Think: can you draw a rectangle with 3 lines RTECS
  • 44. Model Based Design Rationale 19  Executable specification RTECS
  • 45. Model Based Design Rationale 20  Automatic Code Generation RTECS
  • 46. Model Based Design Rationale 21 1. Graphical Representation 2. Executable Specification 3. Automatic Code Generation RTECS
  • 48. Definition of System 23  From engineering point of view, a system is defined as an interconnection of many components that act together to perform a certain objective  Automobile  Machine tool  Robot RTECS
  • 50. Static System 25  Output of the system depends only on the current input  The system has no memory RTECS
  • 51. Dynamic System 26  Output of the system depends on the current input as well as previous inputs/outputs  The system has internal memory A dynamic system can be represented mathematically using differential equations RTECS
  • 52. What is a Real Time System? RTECS
  • 53. Real-Time System 43  A real-time system is a software system where the correct functioning of the system depends not only on the results produced by the system but also on the time at which these results are produced.  The system has "real-time constraints" RTECS
  • 54. Hard Real-Time System 44  A hard real-time system is a system whose operation is incorrectif results are not produced according to the timing specification.  Car engine control system is a hard real-time system  because a delayed signal may cause engine failure or damage  Flight Control System  Airbag crash detection system RTECS
  • 55. Hard Real-Time System 45  Delay = Failure  Time granularity  Millisecond  RequiredAnalysis  Worst possible scenario  Need for redundancy  To meet safety requirements RTECS
  • 56. Hard Real-Time System Example 46  Airbag crash detection system  Airbag must inflate between 10 and 20 msec from the detection of a crash  Not too early—since this would make the airbag deflate before it can catch the passenger  Nor too late—since the airbag could then injure the passenger by blowing up in his face and/or catch him too late to prevent his head from banging into the steering wheel RTECS
  • 57. Soft Real-Time System 47  A soft real-time system is a system whose operation is degraded if results are not produced according to the specified timing requirements.  Non-safety-critical system  Keypad input  Message visualization  System status representation RTECS