Hardware-in-the-Loop Simulation



Similar documents
SCADA, OPC and Database Systems

DAQ in MATLAB HANS-PETTER HALVORSEN,

Temperature Control of Air Heater with DeltaV

Introduction to Virtualization

Temperature Control with DeltaV

Web Services. with Examples. Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics

Performance Study based on Matlab Modeling for Hybrid Electric Vehicles

Data Acquisition in LabVIEW

Introduction to the NI Real-Time Hypervisor

Echtzeittesten mit MathWorks leicht gemacht Simulink Real-Time Tobias Kuschmider Applikationsingenieur

Exercise 10: Basic LabVIEW Programming

Control and Simulation. in LabVIEW

Industrial DAQ System for Measurements and Monitoring. Hans-Petter Halvorsen, M.Sc.

Research Methodology Part III: Thesis Proposal. Dr. Tarek A. Tutunji Mechatronics Engineering Department Philadelphia University - Jordan

Cloud-based Data Logging, Monitoring and Analysis

Level control with DeltaV

Automatic ASAM MCD-3 supported test. PikeTec GmbH Dr. Jens Lüdemann

Level Control with DeltaV

Model-based Testing of Automotive Systems

Best Practices for Verification, Validation, and Test in Model- Based Design

Degree programme in Automation Engineering

Siemens and National Instruments Deliver Integrated Automation and Measurement Solutions

Hardware in the Loop (HIL) Testing VU 2.0, , WS 2008/09

Data Logging and Monitoring Pro. Hans-Petter Halvorsen, M.Sc.

Controller Design using the Maple Professional Math Toolbox for LabVIEW

A Design of a PID Self-Tuning Controller Using LabVIEW

Network Infrastructure

Testing for the Unexpected: An Automated Method of Injecting Faults for Engine Management Development

Wireless Data Acquisition in. LabVIEW

OPC and Real-Time Systems in LabVIEW

Dr.-Ing. Rainer Rasche dspace GmbH Rathenaustrasse Paderborn automotive testing expo June 22, 2010

NI Platform for automotive measurement and test applications

Introduction to LabVIEW

Plug. & Play. Various ECUs tested by automated sequences. dspace Magazine 3/2009 dspace GmbH, Paderborn, Germany info@dspace.com

Stremtan Mircea-Emil Technical Consultant& Sales Manager S RO

An Overview of Hardware-In-the-Loop Testing Systems at Visteon

ni.com/vision NI Vision

A Study of Speed Control of PMDC Motor Using Auto-tuning of PID Controller through LabVIEW

SignalPad Data Logging and Analysis Software

Virtual Integration and Consistent Testing of Advanced Driver Assistance Functions

Android Programming. Høgskolen i Telemark Telemark University College. Cuong Nguyen,

EBERSPÄCHER ELECTRONICS automotive bus systems. solutions for network analysis

Dr. Yeffry Handoko Putra, S.T., M.T

Microcontroller-based experiments for a control systems course in electrical engineering technology

DATA ACQUISITION FROM IN VITRO TESTING OF AN OCCLUDING MEDICAL DEVICE

PT-100 Temperature Measurement

Service Oriented Architecture for Agricultural Vehicles

Modeling and Autonomous Flight Simulation of a Small Unmanned Aerial Vehicle

SIMULATION AND EMR» Prof. A. Bouscayrol (University Lille1, L2EP, MEGEVH, France) Aalto University Finland May 2011

Automated Data Acquisition & Analysis. Revolutionize Validation Testing & Launch With Confidence

Making model-based development a reality: The development of NEC Electronics' automotive system development environment in conjunction with MATLAB

Implementing PID Temperature Control Using LabVIEW. Abstract. Introduction

Monitoring & Control of Small-scale Renewable Energy Sources

LabVIEW Advanced Programming Techniques

Software Documentation

Lecture 3 - Model-based Control Engineering

Implementation of Fuzzy and PID Controller to Water Level System using LabView

Lab Inventory System. Label Writer Access Card with Barcode Barcode Reader. Hans- Pe(er Halvorsen, M.Sc.

EET 310 Programming Tools

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Professional Station Software Suite

DELLORTO. Instructions Manual. Deuss Service Tool For ECS System ECU. Dell Orto Deuss Service Tool instruction manual Page 1 of 11.

Experiment 4: Sensor Bridge Circuits (tbc 1/11/2007, revised 2/20/2007, 2/28/2007) I. Introduction. From Voltage Dividers to Wheatstone Bridges

LabVIEW DSP Test Integration Toolkit for TI DSP

Create a Virtual Test Environment

Department of Aerospace Engineering Indian Institute of Science Bangalore

NOV Drilling Simulator. Presented by Tore Berg

Model Based System Engineering (MBSE) For Accelerating Software Development Cycle

SA-9600 Surface Area Software Manual

Lab View with crio Tutorial. Control System Design Feb. 14, 2006

Functional safety. Essential to overall safety

In networking ECUs in heavy-duty vehicles, it is the J1939 protocol that. plays a key role. J1939 networks are based on the CAN bus (high-speed

Electric motor emulator versus rotating test rig

TOTAL COMMITMENT. Vehicle Automation by Kollmorgen FOR LOWER TOTAL COSTS

High Power Programmable DC Power Supplies PVS Series

Distance-Learning Remote Laboratories using LabVIEW

Introduction to Data Acquisition

DATA LOGGING SYSTEM FOR PRESSURE MONITORING

Bioreactor Process Plant Powered by NI LabVIEW and NI CompactRIO

Dynamic test environment for fuel cells From stack to vehicle energy system

Systems Engineering: Development of Mechatronics and Software Need to be Integrated Closely

ELEC 5260/6260/6266 Embedded Computing Systems

DS1104 R&D Controller Board

How cloud-based systems and machine-driven big data can contribute to the development of autonomous vehicles

Using the NI 17xx Smart Camera Direct Drive Lighting Controller

dspace DSP DS-1104 based State Observer Design for Position Control of DC Servo Motor

Introduction to Process Control Actuators

Introduction to MATLAB Gergely Somlay Application Engineer

Hybrid Modeling and Control of a Power Plant using State Flow Technique with Application

How To Write a Technical Lab Report with Practical Examples

Manage Software Development in LabVIEW with Professional Tools

LONG BEACH CITY COLLEGE MEMORANDUM

Model-based Testing of Automotive Systems

Model-based Testing of Automotive Systems

Embedded Software Development and Test in 2011 using a mini- HIL approach

Verification by. Simulation. Verification by. Simulation. Verification by. Simulation / Model Check. Validation and Testing.

6.2.2 TECHNICAL ARGUMENTS FOR OWN SCADA AND OWN SCADA WITH PID CONTROL.

Best Practises for LabVIEW FPGA Design Flow. uk.ni.com ireland.ni.com

Using big data in automotive engineering?


Transcription:

Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics Hardware-in-the-Loop Simulation Introduction What is Hardware-in-the-Loop (HIL) Simulation or What is Hardware-in-the-Loop (HIL) Test? The Hardware-in-the-Loop process has existed for no more than 15 to 20 years. Its roots are found in the Aviation industry. The reason the use of a HIL process is becoming more prevalent in all industries is driven by two major factors: time to market and complexity. Hardware-in-the-loop (HIL) simulation is a technique that is used in the development and test of complex process systems. HIL simulation provides an effective platform by adding the complexity of the plant under control to the test platform. The complexity of the plant under control is included in test and development by adding a mathematical representation of all related dynamic systems. These mathematical representations are referred to as the plant simulation. Hardware-In-the-Loop is a form of real-time simulation. Hardware-In-the-Loop differs from real-time simulation by the addition of a real component in the loop. This component may be an Electronic Control Unit (ECU). The Figure above shows that the plant is simulated and the ECU is real. The purpose of a Hardware-In-the-Loop system is to provide all of the electrical stimuli needed to fully Faculty of Technology, Postboks 203, Kjølnes ring 56, N-3901 Porsgrunn, Norway. Tel: +47 35 57 50 00 Fax: +47 35 57 54 01

exercise the ECU. In this way you fool the ECU into thinking that it is indeed connected to a real plant. The HIL simulation includes a mathematical model of the process and a hardware device/ecu you want to test, e.g. an industrial PID controller we will use in our example. The hardware device is normally an embedded system. 2 Why use HIL simulation? This question is an important part of understanding real-time technology. To restate the question using a control systems term: Why not connect the embedded system under test to the real plant, that is the dynamic system being controlled, to perform development and testing? In many cases, the most effective way to develop an embedded system is to connect the embedded system to the real plant, if such a plant exists. Increasingly however, HIL simulation is more efficient and or required. The main purpose with the HIL Simulation is to test the hardware device on a simulator before we implement it on the real process. The metric of development and test efficiency is typically a formula that includes the following factors: Cost Duration Safety You may want to test the different part of the system individually to make sure it works as planned and HIL simulation is important in design and testing of the different systems. It may be very useful, e.g., to test a controller function with a simulated process before the controller is applied to the real (physical) process. If the mathematical model used in the simulator is an accurate representation of the real process, you may even tune the controller parameters (e.g. the PID parameters) using the simulator. It is also very useful for training purposes, i.e., the process operator may learn how the system works and operate by using the hardware-in-the-loop simulation. Another benefit of Hardware-In-the-Loop is that testing can be done without damaging equipment or endangering lives. For instance, potentially damaging conditions in an engine, such as over-temperature, can be simulated to test if the ECU can detect and report it. Another instance would be an anti-lock braking (ABS) simulation at performance extremes. If

3 simulated, the performance of the ABS system can be evaluated without risk to the vehicle or operator. Below wee se a typical HIL test system: HIL should be an integrated part of the design and testing cycle. The Figure below represents the design cycle of a typical system, e.g. a control system. As the complexity of the hardware being controlled increases, so too does the complexity of the embedded system that is designed to control the hardware. Hardware-in-the-Loop (HIL)

4 simulation is a technique that is used increasingly in the development and test of complex real-time embedded systems. The purpose of HIL simulation is to provide an effective platform for developing and testing real-time embedded systems, often in close parallel with the development of the hardware. Software development no longer needs to wait for a physical plant in order to write and test code. HIL simulation provides an effective platform by adding the complexity of the plant under control to the development and test platform. The complexity of the plant under control is included in test and development by adding a mathematical representation (model) of all related dynamic systems. These mathematical representations are referred to as the plant simulation. Challenges When testing, we have lots of challenges: Cost to test Cost of failure Availability System variation Repeatability In these situations is HIL simulation a powerful technique. With HIL Testing we will reduce cost and risk. With HIL Testing cost and risk will be reduced: Increased reliability and quality More efficient development Lower cost to innovate Applications Embedded Control Systems HIL simulation is widely used in developing Embedded Control Systems, such as:

5 Medical Devices Industrial machines Power Generation Systems White Goods Aerospace Automotive Process Control Procedure The main steps in HIL Simulation are as follows: 1. Develop a mathematical model. Create a mathematical model of the real environment where the hardware device is meant to be used. 2. HIL Simulation (Software + Hardware). Test your device on a simulated process (mathematical model). 3. Implement your hardware on the Real Process (Hardware only). If everything is OK, you may want to implement your hardware device in the real environment where it meant to be used. These tasks follow the main idea with a HIL simulation. First step is to simulate your system in software. Next is to test your hardware on the simulated process. Finally you implement your hardware on the real system.

6 Practical Example Introduction It may be very useful to test a controller function with a simulated process before the controller is applied to the real (physical) process. If the mathematical model used in the simulator is an accurate representation of the real process, you may even tune the controller parameters (e.g. the PID parameters) using the simulator. If the controller to be tested is implemented in the controller hardware, often denoted the electronic control unit (ECU), and the simulator has to run in real time, i.e. the simulation time develops as real time. This real time simulation is obtained by setting the simulation algorithm cycle time equal to the simulation time step. Typically, the simulator communicates with the ECU via ordinary I/O (current, voltage, digital). Such a system - where the real controller is controlling a simulated process - is denoted Hardware-in-the-loop (HIL) simulation. HIL-simulation is used in many industries, e.g. automotive industry for testing clutch automation systems and in marine and aircraft industry to test autopilots of vessels. The Figure below illustrates the principle of testing a control system by replacing the physical system (or process) to be controlled by a simulated system. The controller is assumed to be a PID controller, but the figure applies to any controller function.

7 Simulated Process In this example a mathematical model of the following small-scale process is used ( Air Heater ): The mathematical model is: { [ ( ) ]} Where: [ ] is the control signal to the heater. [ ] is time-constant. [ ] is the heater gain. [ ] is the time-delay representing air transportation and sluggishness in the heater. is the environmental (room) temperature. It is the temperature in the outlet air of the air tube when the control signal to the heater has been set to zero for relatively long time (some minutes). Hardware The main purpose with the HIL Simulation is to test the hardware device on a simulator before we implement it on the real process.

8 In this we use an ordinary industrial PID controller, such as Fuji PGX5. We will test the Fuji PGX5 PID controller on a model, and if everything is OK we will implement the controller on the real system. We will use LabVIEW in order to implement the HIL Simulation. LabVIEW is a graphical programming language from Nation Instruments, and it is well suited for such implementation. Procedure The procedure is as follows: 4. PID Control and Simulation in LabVIEW (Software only). Simulate the model and implement the built-in PID controller in LabVIEW. No hardware involved. 5. Configure the Fuji PGX5 PID controller (Hardware only). Configure and be familiar with the industrial Fuji PGX5 PID controller. 6. HIL Simulation in LabVIEW (Software + Hardware). Test your industrial Fuji PGX5 PID controller on your simulated process. 7. PID Tuning (Software + Hardware). Find proper PID parameters, etc. for the controller based on the model. 8. Implement your hardware, i.e., the Fuji PGX5 PID controller on the Real Process (Hardware only). Now that you have tested your Fuji PGX5 PID controller on the

9 simulated process, it s time to implement it on the real process. Fine-tune PID parameters if neccecary. These tasks follow the main idea with a HIL simulation. First step is to simulate your system in software. Next is to test your hardware on the simulated process. Finally you implement your hardware on the real system. Below we see the difference between a traditional process system using a software program for implementing the control system and a HIL simulation. Traditional process system using a software program for implementing the control system: In this case you need to scale the voltage signal you get from the process and the DAQ to a temperature value ( ). HIL Simulation: In this case you need to scale the temperature value you get from the simulated process before you send the value to the Fuji PGX5 PID controller ( ).

10 HIL Simulation in LabVIEW Below we see an excerpt of the program created in LabVIEW: In the example we have used a Simulation Loop in LabVIEW, but an ordinary While Loop may also be used. The model is implemented in a Simulation Subsystem. PXG5 PID.vi: Inside the SubVI PXG5 PID.vi is the I/O from and to the PXG5 PID controller implemented using an ordinary DAQ device (NI USB-6008 USB DAQ device), i.e., the simulated process value needs to be sent to the controller and the manipulated value from the controller need to be sent to the simulated process. Scaling is also implemented in this SubVI. Below we see the PXG5 PID.vi : Mathematical Model:

In the Model Air Heater.vi simulation subsystem is the mathematical model implemented as shown below: 11 Results: The simulation results become: The Set Point (SP) is set on the PXG5 PID controller (in this case 30 at time ). The simulation is based on PID parameters set on the PXG5 PID controller using the built-in Autotuning functionality that the PXG5 PID controller has.

12 References The following references have been used in this document: National Instruments (2011) - http://www.ni.com/hil/ OPAL-RT TECHNOLOGIES (2011) - http://www.opal-rt.com/about-hardware-in-theloop-and-hardware-in-the-loop-simulation PrecisionMBA (2011) - http://www.precisionmba.com/hardware_in_the_loop.htm Wikipedia (2011) - http://en.wikipedia.org/wiki/hardware-in-the-loop_simulation

Telemark University College Faculty of Technology Kjølnes Ring 56 N-3918 Porsgrunn, Norway www.hit.no Hans-Petter Halvorsen, M.Sc. Telemark University College Faculty of Technology Department of Electrical Engineering, Information Technology and Cybernetics E-mail: hans.p.halvorsen@hit.no Blog: http://home.hit.no/~hansha/