MATLAB Expo 2013 Simulation Based Automotive Communication Design using MATLAB- SimEvent Sudhakaran M Anand H General Motors 1
Agenda Introduction Different Analysis Methods Analytical vs. Simulation Approach Why and when to use Simulation Based Approach Use cases Q&A 2
Value from Electronics & Software Evolution of Electronics and Software Functionality Fuel Cell X-By-Wire Hybrid PT Electric Brake ACC DoD Electric Ignition BCM ABS OnStar OBD II HI Spd Data Rear Vision Passive Entry Side Airbags GDI... TCC Rear aud/vid Head Airbags EGR CDs Electric Fan 1970s 1980s 1990s 2000s 2010s 2020s ABS: Antilock Brake System ACC: Adaptive Cruise Control BCM: Body Control Module DoD: Displacement On Demand ECS: Electronics, Controls, and Software EGR: Exhaust Gas Recirculation. GDI: Gas Direct Injection OBD: Onboard Diagnostics TCC: Torque Converter Clutch PT: Powertrain 3
Total Network Bandwidth (Mbps). Exponential Increase in Bus Bandwidth Capacity Available Bus Capacity 16 14 12 10 8 6 4 2 0 2000 2005 2010 2015 2020 Known Data Forecasted Data year Caveat: This is assuming that the same architectural pattern is maintained in the future. 4
Emerging Technical Challenges Exponential increase in communication bus and computing processor requirements Broadcast communication and synchronization Increase in supervisory control layers and distributed closed loop control Heterogeneity in transmit models Move from 1 function 1 ECU paradigm to up-integration of functions Reduce No of ECUs Move from fail safe towards fail operational Active Front steering to Steer by Wire Federated vs. integrated fault tolerant devices 5
Architectural Patterns Some of the potential network architectural patterns Router Isolated Backbone Linear Utilized Grid Use a Backbone router public as bus a means as a high to speed, share data high between bandwidth domain means busses to Single Use share a CAN Multiple data public bus. between bus Buses Features as a domain to high contend are speed, added gateway with high as modules needed bandwidth bandwidth. as new means to support modules, share data some or integrated between modules domain into directly existing gateway modules. modules Public Bus DLC LIN LIN P/T CHASSIS EBCM Router SAFETY BODY SAFETY BODY SDM INF/TEL PT CAN CH CAN LIN Body Safety CAN CAN Chassis LIN Safety Body CAN LIN Infotainment Infotainment 6
Complexity in satisfying the architectural needs Maintainability/serviceability Complexity Timing - Jitter Re-use Low Infrastructure Cost 6 5 4 3 2 1 0 Expandability Flexibility Requirement exceeds capability Low Cost to Add Features Mid Content Isolated Backbone Safety Packaging Energy Efficiency Capability exceeds requirement Timing - Latency Domain Isolation 7 7
Question? What methods and tools will assist the system architect to come up with an architecture that meets these challenges? 8
Analysis Methods System level performance analysis Analytical approach Mathematically represent the system for worst case and best case scenario for a given design Simulation approach Simulates the system for a given scenario and is time based to predict best design 9
Simulation Vs Analytical Worst case model Upper Bound T analytical T sim T real Best case model Analytical Lower Bound Simulation Implementation 10
Metrics Metric\Approach Analytical Simulation Latency Y (Worst case) Y (Average) Load (CPU or Network) Buffer Management Y (Worst case) Y (Worst case) Jitter N Y Y (Average) Y (Average) Initialization Time N 11 Y
Why Simulation Approach Study the behavior of a system without building the real system. Find un-expected phenomenon, behavior of the system. Easy to perform ''What-If'' analysis. Simulations take the building/rebuilding phase out of the loop by using the model already created in the design phase Simulation testing is cheaper and faster can be done at very early stage of development Simulators can be used as an effective means for teaching or demonstrating concepts of a real system. 12
SimEvent Toolbox Library set SimEvents provides a discrete-event simulation engine and component library for Simulink Enables modeling event-driven communication between components to analyze and optimize end-to-end latencies, throughput, packet loss, and other performance characteristics It has Libraries of predefined blocks, such as queues, servers, and switches, which enables to accurately represent actual system SimEvents can design distributed control systems, hardware architectures, sensor and communication networks etc 13
Introduction to CAN Protocol CAN bus (Controller Area Network) is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other within a vehicle without a host computer. CAN features an automatic arbitration-free transmission. A CAN message that is transmitted with highest priority will succeed, and the node transmitting the lower priority message will sense this and back off and wait. 14
CAN Frame Format 15
CAN Network Simulation Model 16
Load Bus load vs Time Time in (ms) 17
CAN ID CAN ID vs Time Time 18
No of occurrences Histogram if Inter- arrival Time of a Message Time in (ms) 19
Conclusions Simulation based approach can help us in verifying the design without actually building it. It can be used to re-create field issues including boundary conditions, which is not possible using analytical method. Many design alternatives can easily be compared. 20
21