Hardware-in-the-Loop Simulation

Similar documents
HIL Simulation Lab Work

System Identification and Estimation

Figure 1.1: Quanser Driving Simulator

CarSim/TruckSim/BikeSim Real-Time Hardware In the Loop Mechanical Simulation Corporation

Laboratory set-up for Real-Time study of Electric Drives with Integrated Interfaces for Test and Measurement

Introduction to Real-Time Systems

Digital Control Lab Exp#8: PID CONTROLLER

Control Design Made Easy By Ryan Gordon

Internet of Things (IoT) Control System

LabVIEW 8" Student Edition

Data acquisition and instrumentation. Data acquisition

National Instruments Accelerating Innovation and Discovery

Auntie Spark s Guide to creating a Data Collection VI

EE 300W Lab 2: Optical Theremin Critical Design Review

Introduction to. An Open-Source Prototyping Platform. Hans-Petter Halvorsen

A Virtual Instrument for Automobiles Fuel Consumption Investigation. Tsvetozar Georgiev

Success Story. An innovative HIL Test Bench to Validate Embedded SOCOMEC Inverter Software

Experiment 9. PID Controller

Peripheral Link Driver for ADSP In Embedded Control Application

STEP 3: TIME PROPORTIONING CONTROL If you re using discrete outputs for PID control, you will need to determine your time period for the output.

Supplementary Software Document for A Fully Automated Microfluidic Femtosecond Laser Axotomy Platform for Nerve Regeneration Studies in C.

Development of 4/16-Channel Data Acquisition System Using Lab VIEW

Success Story. 1. Context

Hardware-in-loop Electronic Throttle System Based On Simulink Ning Chen 1,a,Pinchang Zhu 1,b

Chapter 5. Tracking system with MEMS mirror

EXPERT VISIT January 2017 University of Limerick

Hardware-In-the-Loop simulator for turboprop and turboshaft engine control units

Glossary of terms. Short explanation

EKT 314/4 LABORATORIES SHEET

Labview Based Gain scheduled PID Controller for a Non Linear Level Process Station

David Howarth. Business Development Manager Americas

Further Control Systems Engineering

The number theory behind cryptography

EE 4314 Lab 3 Handout Speed Control of the DC Motor System Using a PID Controller Fall Lab Information

Quanser Products and solutions

Observer-based Engine Cooling Control System (OBCOOL) Project Proposal. Students: Andrew Fouts & Kurtis Liggett. Advisor: Dr.

Wideband Spectral Measurement Using Time-Gated Acquisition Implemented on a User-Programmable FPGA

A Universal Motor Performance Test System Based on Virtual Instrument

Rotary Motion Servo Plant: SRV02. Rotary Experiment #02: Position Control. SRV02 Position Control using QuaRC. Student Manual

Test And Validation: Coping With Complexity The state of play in vehicle software and system validation

ECE411 - Laboratory Exercise #1

Report on Dynamic Temperature control of a Peltier device using bidirectional current source

Real-Time Testing Made Easy with Simulink Real-Time

Pragmatic Strategies for Adopting Model-Based Design for Embedded Applications. The MathWorks, Inc.

Model-based Design of Coordinated Traffic Controllers

Software Computer Vision - Driver Assistance

A SOFTWARE-BASED GAIN SCHEDULING OF PID CONTROLLER

Low Cost Labview Based Sensor Simulation

TF Electronics Throttle Controller

When testing meets intelligence MECHATRONICS

Executive Summary. Chapter 1. Overview of Control

Design of PID Control System Assisted using LabVIEW in Biomedical Application

Understanding the Arduino to LabVIEW Interface

A PID Controller for Real-Time DC Motor Speed Control using the C505C Microcontroller

Design of Experimental Platform for Intelligent Car. , Heyan Wang

Compact temperature regulator for subsea sensor

LV 124 MEASUREMENT AND ANALYSIS DEVICE

DATA ACQUISITION AND CONTROL SOFTWARE FOR THE EDUCATIONAL KIT FESTO (LEVEL AND TEMPERATURE CONTROL)

Creating Retinotopic Mapping Stimuli - 1

Virtual Testing of Autonomous Vehicles

Measurements with Scattering Parameter By Joseph L. Cahak Copyright 2013 Sunshine Design Engineering Services

AutoBench 1.1. software benchmark data book.

Procidia Control Solutions Dead Time Compensation

*Engineering and Industrial Services, TATA Consultancy Services Limited **Professor Emeritus, IIT Bombay

Introduction to Model-Based Design for Offshore and Marine applications C. Kleijn

Measurement & Control of energy systems. Teppo Myllys National Instruments

AUTOMATION & MECHATRONIC SYSTEMS COURSE MODULES

AC : THE UBIQUITOUS MICROCONTROLLER IN MECHANICAL ENGINEERING: MEASUREMENT SYSTEMS

Embracing Complexity. Gavin Walker Development Manager

SMART DATA ACQUISITION TECHNIQUE FOR LEVEL PROCESS USING LIFA

Lecture 2: Embedded Systems: An Introduction

Virtual car models for handling and ride bridging off and on-line simulations

Various levels of Simulation for Slybird MAV using Model Based Design

PID CONTROLLERS DESIGN APPLIED TO POSITIONING OF BALL ON THE STEWART PLATFORM

Digital Control of MS-150 Modular Position Servo System

Sfwr Eng/TRON 3DX4, Lab 4 Introduction to Computer Based Control

PRODUCTS AND LAB SOLUTIONS

CHAPTER 7 HARDWARE IMPLEMENTATION

Lab VIEW Programming for Vibration Analysis

LESSONS Lesson 1. Microcontrollers and SBCs. The Big Idea: Lesson 1: Microcontrollers and SBCs. Background: What, precisely, is computer science?

The DC Machine Laboration 3

Effective Teaching Learning Process for PID Controller Based on Experimental Setup with LabVIEW

INTERNATIONAL JOURNAL OF ADVANCED RESEARCH IN ENGINEERING AND TECHNOLOGY (IJARET)

Synchronization between a SystemC based offline Restbus Simulator and a HIL FlexRay network

Hardware in the Loop Simulation for Unmanned Aerial Vehicles

We are IntechOpen, the world s leading publisher of Open Access books Built by scientists, for scientists. International authors and editors

AC : A LOW-COST LABORATORY EXPERIMENT TO GEN- ERATE THE I-V CHARACTERISTIC CURVES OF A SOLAR CELL

Behind the Test Challenges of Automotive Radar Systems

A Real-Time Regulator, Turbine and Alternator Test Bench for Ensuring Generators Under Test Contribute to Whole System Stability

Testing in the Google car era Are we ready?

Automate. Hardware: Software: 1. Somove Lite V (or latest version available) for drive configuration optional

SCOE SIMULATION. Pascal CONRATH (1), Christian ABEL (1)

Mechanical Simulation. Advanced Vehicle Dynamics Solutions

Undefined Obstacle Avoidance and Path Planning

Optimal Control System Design

Determining the Fatigue Life of Aero-Engine Blades

Monitoring and Control of Speed of DC Motor

GE 320: Introduction to Control Systems

Image Compression Using SVD ON Labview With Vision Module

Transcription:

University College of Southeast Norway 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 purpose of a Hardware-In-the-Loop system is to provide all of the electrical stimuli needed to fully 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. 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. http://home.hit.no/~hansha

2 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 simulated, the performance of the ABS system can be evaluated without risk to the vehicle or operator. HIL should be an integrated part of the design and testing cycle. 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) 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

3 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: 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. 4

5 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. Simulated Process In this example a mathematical model of the following small-scale process is used ( Air Heater ):

6 The mathematical model is: T "#$ = 1 θ $ T "#$ + K + u t θ. + T /01 Where: u [V] is the control signal to the heater. θ $ [s] is time-constant. K + [deg C / V] is the heater gain. θ. [s] is the time-delay representing air transportation and sluggishness in the heater. T /01 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. In this we use an ordinary industrial PID controller, such as Fuji PGX5.

7 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

8 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 (1 5V 20 50 ). 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 (20 50 1 5V ). HIL Simulation in LabVIEW

9 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:

10 Results: The simulation results become: The Set Point (SP) is set on the PXG5 PID controller (in this case 30 at time t = 2s). 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.

11 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

Hans-Petter Halvorsen, M.Sc. E-mail: hans.p.halvorsen@hit.no Blog: http://home.hit.no/~hansha/ University College of Southeast Norway www.usn.no