Dr Ben Black – Systems Engineer National Instruments ben.black@ni.com
Agenda • Trends in Automotive Electronics • Flexible HIL Solutions • High Speed Deterministic Data Transfer • Distributed HIL • Discontinuous Simulation Solvers
The “Bad” The “Good” The “Ugly”
Global Automotive Industry Trends • Consumer electronics technologies in vehicles • Alternative Energy • Cost Reduction • Reduced Emissions • Increased Safety • Differentiation through Features The “Ugly” • Global Design and Manufacturing
Automobiles Then and Now… Mechanics and hydraulics Electromechanics 3 ECUs 15 to 80 ECUs AM/FM radio Telematics (Infotainment) Relay-control units Power-control units CAN CAN, LIN, FlexRay, ...
…and Software defines the Functionality Engine control unit
Software-Based Hardware Designs “For the next 10 years an increase of 10% -15% of software in the share of costs of a vehicle is forecasted every year” - McKinsey&Company Study • Benefits • Challenges Rapid Advancements More functions to test New and Improved More measurements to Functionality make Lower Cost Unique functions to test
Control Design Process Modeling and System Design Testing Hardware-in- Rapid the-Loop Prototyping Testing Targeting
Modeling and Design Control K c K p Setpoint Error Output Feedback Controller Plant Modeling and Design Produce Controller and Plant Models
Rapid Control Prototyping Control K p K c Setpoint Error Output Feedback Plant Controller Creating a Functional Prototype of the Controller
Rapid Control Prototyping Example NI CompactRIO Drivven: “We prototyped a full - authority engine control system … in just 3 man-months. In past projects, it took us at least 2 man-years and over $500,000 to develop similar ECU systems.”
Hardware-in-the-Loop Simulation Control K c K p Setpoint Error Output Feedback Controller Plant Testing Production Controller with Simulated Plant
What is HIL? • The use of real-time I/O hardware to simulate the dynamic behavior of a device that interfaces to the unit under test. Dynamic – stimulus reacts to the response of the UUT (closed- loop) Static – stimulus ignores the response of the UUT (open-loop) • The simulator may use programming languages, state charts, modeling languages or other methods to describe the input/output behavior (dynamics) of the device
What is HIL? • Types of test • Methods in test Functional Temperature/power variation Parametric Salt/sand spray Validation (V&V) EM radiation Durability (HALT/HAST) Loading/resistance End-of-line HIL Simulation … …
The “Bad” The “Good” The “Ugly”
Example…the automobile 3 ECUs 15 to 70 ECUs in 10 years
Automotive Electronics vs. CO2 Consumption The effect... Electronic causes 5% of a cars CO2 Emissions State of the art Infotainment System: 4-6 Ampere ≈ 0,1 Liter gasoline ≈ 2 Gramms CO2 Innovation vs. CO2 Reduction
The “Bad” The “Good” The “Ugly”
HIL for ECU Test Challenges – Modularity: No method of drag-and-drop ECU hardware architecture Flexibility: Difficult to add or swap ECUs in a current test configuration Wiring/Cabling: Direct I/O wiring makes re-wiring tedious and time-consuming Cost: Significant loss of “up - time”
Flexible HIL Solutions • I/O with Deterministic Data Transfer • Integrated Signal Conditioning • High Resolution Measurements (up to 24 bits) • Flexible and Modular ECU/HIL Testing Environment • Distributed Simulation
FPGA and Reconfigurable IO FPGA on cRIO 8-Slot cRIO C-Series Modules Backplane ADC and Integrated Signal Conditioning
FPGA and Reconfigurable IO Knock Signal Generation Sensor Simulation (LVDT) Crankshaft Simulation Custom Serial Protocols
HIL for ECU Test Engine Control Unit Up to 100 ECUs I/O Points Real-Time for a single Processors AI, AO, DI, DO, CAN solution
FPGA in HIL ECU Test Bring the I/O Nodes to the ECUs ECU NI FPGA Backplane with I/O Modules
FPGA in HIL ECU Test Rack-Mount Controller LabVIEW Real- PXI Time Desktop or ECU with I/O Module Real-Time Processor Industrial PC
High Speed Deterministic Data Transfer • Master/Slave Architecture • Expandable I/O • Optimized for Single-Point Industrial Data Transfer • Predictable Timing and Precise Synchronization • Masters Use Off-the-Shelf Ethernet Interface • Continuous Data Flow Through Multiple Slaves • High Bandwidth Efficiency
High Speed Deterministic Data Transfer NI Masters PXI NI 8353 Rack-Mount RT NI Slaves Future 8-Slot cRIO Smart Camera
Flexible HIL Solutions Need to add another ECU? Real-Time Processor (Master)
Flexible HIL Solutions Add another Slave to the chain Real-Time Processor (Master) Ethernet cables make re-wiring simple
Flexible HIL Solutions Need to test a different car? Real-Time Processor (Master) Change out ECUs as needed with pre- assembled ECUs and I/O modules
Flexible HIL Solutions Need to test a different car? Real-Time Processor (Master) Use same RT Processor, just switch ECU software models
Distributed Simulation
Discontinuous Simulation Solvers
Summary of Computer Simulation What Why How Plant (dynamic system) Design prototype controller Variable step : for precision Off-line Controller Investigate behavior Fixed-step : for speed Validate prototype controller Fixed step - HIL Real-Time Plant (dynamic system) Field diagnostic tool Dynamic Systems Discontinuous Systems Mechanical Systems Electrical Systems Chemical Systems Physical Systems
Simulation of Dynamic System Dynamic system Differential equations u y ∫ y(t) = u(t) Variable step approximation Solved through error control u u u y(2) y(1) y(1) y(a) y(a) y(a) t t t t a t a t 1 t b t b t a t 1 t 2 t b In the presence of a discontinuity : Iteratively locate the discontinuity until (t k – t k-1 ) = very very small T θ k = non-deterministic … … t t 1 t k-1 t k t 2 t a t b
Simulation of Dynamic System Fixed-step approximation u y 1 step methods Forward Euler y(n-1) y(n) = y(n-1)+Ty(n-1) y(n-1) t t t(n-1) t(n) t(n-1) t(n) y u y(n) y(n) Backward Euler y(n) = y(n-1)+Ty(n) t t t(n-1) t(n) t(n-1) t(n) y u y(n) Trapezoidal y(n-1) y(n) = y(n-1)+½T(y(n)+y(n-1)) t t t(n-1) t(n) t(n-1) t(n)
Simulation of Dynamic System In the presence of a discontinuity : u T θ y T θ Forward Euler t(n) t t(n-1) t t(n-1) t(n) T θ y T θ u Backward Euler t(n) t y(n) t(n-1) t t(n-1) t(n) T θ y T θ u Trapezoidal t(n) t t(n-1) t t(n-1) t(n)
Simulation of Dynamic System with Discontinuities Impact of discontinuity errors : Electrical system example + I ref + - I abc + 360 Vdc Standard fixed step (Ts = 20 μs ) 3 HP 3 Current error (in A) 2 1 0 h -1 Ideal variable step 3 Current error (in A) -2 2 -3 1 0 0.1 0.2 0.3 0.4 0.5 0 h Time (in s) -1 -2 Standard fixed step (Ts = 2 μs ) 3 Current error (in A) -3 2 0.1 0.2 0.3 0.4 0.5 0 1 Time (in s) h 0 -1 -2 -3 0.1 0.3 0.5 0 0.2 0.4 Time (in s)
Fixed step simulation of discontinuous systems Discontinuous system Piecewise continuous system continuous y(n-1) - u y( θ ) Boundary : special calculation t(n) T θ t(n-1) Problems : - Where is the boundary ? y(n) + y( θ ) continuous T θ = ? In fixed step : - What happens at the u - boundary ? 2 y( θ ) y(n) 1 y(n-1) 3 T θ t(n) t(n-1) + 4 y( θ ) y(n) 1 – Calculate y(n) (discontinuity undetected). 3 – Process the boundary : special calculation. 2 – Detect the discontinuity and determine T θ . 4 – Recalculate y(n).
Real-Time Simulation of Power Electronics Circuits Electric Drive Test Bench 60 Motor Angular Velocity Angular velocity (in rpm) 50 Ideal + 40 New (55 μs) I ref 30 New (75 μs) + - 20 I abc 10 0 -10 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 + Time (in s) 360 Vdc Real-Time (Ts = 55 μs ) 3 3 HP Current error (in A) 2 1 0 h -1 -2 Ideal variable step 3 Current error (in A) -3 2 1 0 0.1 0.2 0.3 0.4 0.5 Time (in s) 0 h -1 Real-Time (Ts = 75 μs ) -2 3 Current error (in A) -3 2 1 0 0.1 0.2 0.3 0.4 0.5 0 h Time (in s) -1 -2 -3 0 0.1 0.2 0.3 0.4 0.5 Time (in s)
The “Good” Approach Flexible solutions • Customize software with LabVIEW • Customize hardware with FPGA • Integrate I/O nodes quickly and easily • Distribute the simulation Improved Solver
Recommend
More recommend