• Non ci sono risultati.

Advanced techniques for HIL simulation of renewable energy : the case study of PV system

N/A
N/A
Protected

Academic year: 2021

Condividi "Advanced techniques for HIL simulation of renewable energy : the case study of PV system"

Copied!
139
0
0

Testo completo

(1)

Facoltà di Ingegneria

Scuola di Ingegneria Industriale e dell’Informazione

Dipartimento di Elettronica, Informazione e Bioingegneria

Corso di Laurea Magistrale In Ingegneria Elettrica

A D VA N C E D T E C H N I Q U E S F O R H I L S I M U L AT I O N

O F R E N E WA B L E E N E R G Y: T H E C A S E O F P V S Y S T E M

Supervisor:

Prof. Giambattista Gruosso

Master Graduation Thesis by:

Harshavardhan Palahalli Mallikarjun

Person Code: 10543042

(2)

Advanced Techniques For HIL Simulation of Renewable Energy: The Case Of PV System

(3)
(4)
(5)

The need of alternative energy is pushing PV to be more pre-dominant to supply energy. Conducting real-time simulations before commissioning the PV plant is much observed to vali-date the project proposals. As PV mathematical model depends on the temperature and the irradiation level of the atmosphere, there is a need of real-time simulation to study the dynamic characteristics of PV system.

The idea of this work is to present Real-time simulation frame-work, coupling modeling environments such as Matlab Simulink to a real-time hardware like National Instruments myRIO. The idea is to draft an implementation of Hardware-in-the-loop sim-ulation for renewable energy systems by taking a case of PV including control strategy and interaction with the rest of the system like micro-grid. They have to cope with different con-straints, the former is the solution of the differential algebraic equation (DAE) system required by the PV which is strongly non-linear. The latter is the fast simulation of the dynamic con-trol strategy of PV such as Maximum power point tracking al-gorithm and the micro-grid with frequency regulation. In the middle several other requirements, including Hardware-in-the loop simulation having interface algorithm of the models over Ethernet and actual measurement is discussed.

This work proposes two kinds of test bench using tools like Simulink, NI VeriStand and Simulink Desktop Real-Time. The choice of kind of simulation depends on the complexity of the model that has to be simulated in real-time. The test benches 1 and 2 uses Simulink, for the model design and C code genera-tion for execugenera-tion in myRIO hardware. Co-Simulagenera-tion platform is presented in the case of test bench 3, where the model is designed in Simulink and they are compiled to execute in In-tel’s processor of the desktop, and the PV model built using LabVIEW VI is made to run as standalone system in myRIO, later both the systems are synchronized through Ethernet for the execution in real-time.

This thesis contains 11 Chapters, in which all the phenomena of Hardware-in-the-loop simulation in the case of PV, having different interface algorithms are being presented.

(6)
(7)

La necessità di introdurre energia alternativa, nel nostro studio è l’introduzione del sistema fotovoltaico(PV) per fornire ener-gia al sistema elettrico. Prima di poter realizzare fisicamente il sistema fotovoltaico dobbiamo simularlo in modo da poter prevedere e capire il comportamento del sistema il modello matematico del sistema fotovoltaico dipende dalla temperatura e dal livello di irraggiamento dell’atmosfera, inoltre dobbiamo studiare la caratteristica dinamica del sistema fotovoltaico at-traverso la simulazione in tempo reale (real-time-simulation).

In questo lavoro proponiamo l’uso di Real-time simulation framework usando Matlab Simulink per la modellizzazione dei componenti della rete e National Instruments myRIO per real-time hardware. L’idea è di implementare una bozza di Hardware-in-loop simulation per i sistemi di energia rinnovabile, pren-dendo come caso il sistema fotovoltaico con il suo corrispettivo sistema di controllo e l’interazione che il PV ha con la micro-grid.

Per realizzare la modellizzazione del PV dobbiamo gestire i seguenti vincoli:

1. Risoluzione della equazione differenziale del sistema richi-esta dal PV, la quale è una equazione non lineare.

2. Realizzazione di Hardware-in-loop-simulation collegando i modelli precedentemente citati attraverso il cavo ether-net e le misure attuali .

3. Realizzazione della simulazione delle dinamiche di con-trollo del PV attraverso l’algoritmo del Maximum point tracking e la regolazione in frequenza della micro-gird. Questo lavoro propone due tipi di test usando strumenti come Simulink, NI VeriStand e Simulink Desktop Real-Time. Il tipo di test dipende dalla complessità del modello che vogliamo sim-ulare in real-time, inoltre in questo lavoro abbiamo fatto tre test. Sia il test 1 che il test 2 usano Simulink, per modellizzazione e il codice C è generato per essere eseguito in myRIO hardware. Il test 3 utilizza la piattaforma di Co-simulation, dove il mod-ello è disegnato in Simulink ed è compilato per essere eseguito da Intel’s processor del Desktop, mentre il modello del sistema

(8)

temi vengono sincronizzati grazie all’ethernet per eseguirlo in real-time.

Questa tesi contiene 11 capitoli, nei quali tutti i fenomeni di Hardware-in-the-loop simulation nel caso del sistema foto-voltaico, avendo diverse interfacce.

(9)

I would like to tribute my deepest gratitude to the following in-dividuals, for helping me in the development of the this work. To Professor Giambattista Gruosso, for providing me an oppor-tunity to work under his supervision, for the development of this thesis and also for introducing me to the field of research. His guidance and ideas intrigue me to work on this topic and to gain more knowledge in the subject matter of interest. To Yujia Huo, Phd Student of Politecnico Di Milano who helped me to solve the complex modeling problems and also for pro-viding the key insights, during the development of this work and the research paper.

To Bhavya Ponna, for helping me to solve the errors encoun-tered while typesetting this document.

To Srikanth Kadiga and Mahanta Raju Penmatsa, my fellow batch mates who provided me all kind of support, when I was in need of it.

To Repubblica italiana, for allowing me to study in it’s pres-tigious institution with scholarship and for providing all the basic needs to nurture my career.

To my parents, for their support from long distances whom I owe all of my achievements to.

(10)
(11)

1 i n t r o d u c t i o n 1

1.1 Motivation . . . 1

1.2 Need of Real-time PV simulations . . . 2

1.3 Problem Formulation . . . 3

1.4 Research Objectives . . . 3

1.5 Thesis Outline . . . 4

i t h e o r e t i c a l a s p e c t s o f h i l 5 2 h a r d wa r e-in-the-loop for power electrical s y s t e m s 7 2.1 Simulation . . . 7

2.1.1 Real-time Simulation . . . 8

2.2 Hardware-in-the-loop . . . 12

2.2.1 Different HIL methodologies for Electric drive system . . . 16

2.3 Power-hardware-in-the-loop . . . 22

2.3.1 Basic architecture of P-HIL simulation . . . 23

2.3.2 Real-time digital simulator and Interface in P-HIL simulation . . . 24

2.3.3 Interface Algorithm . . . 27

2.3.4 Pros and Cons of Interface Algorithms . . 32

2.3.5 Open issues in P-HIL simulation . . . 32

2.3.6 Accuracy issue of P-HIL . . . 36

2.3.7 Procedure to conduct P-HIL simulation . . 37

ii a p p l i c at i o n o f p-hil in renewable energy s i m u l at i o n 39 3 p r o p o s e d r e a l-time simulation architecture 41 3.1 Real-time Digital Simulator . . . 41

3.1.1 NI VeriStand . . . 42

3.1.2 FPGA target . . . 44

3.2 Interface algorithm using actual Measurement sys-tem . . . 45

4 m o d e l i n g o f p v a n d o t h e r s y s t e m s u n d e r s t u d y 49 4.0.1 Solar cell characteristics . . . 49

4.0.2 Mathematical Modeling of PV in MATLAB-Simulink . . . 52

4.1 MPPT System . . . 55

4.1.1 Perturbation and Observation Technique . 57

(12)

4.1.2 Boost Converter . . . 58

4.1.3 Storage System . . . 59

5 r e a l-time simulation and results of pv us-i n g f p g a 61 5.1 Test-bench 1: PV and MPPT with the fixed Resis-tive load . . . 61

5.2 Test-bench 2: PV with storage connected to DC Bus 66 5.2.1 Experiment . . . 66

iii p v a n d m i c r o-grid hil co-simulation hav-i n g hav-i n t e r f a c e a l g o r hav-i t h m ov e r e t h e r n e t 71 6 e t h e r n e t p r o t o c o l f o r r t s i m u l at i o n s 73 6.1 Need of interface algorithm over Ethernet . . . 73

6.2 Characteristics of the Real-time Ethernet . . . 75

6.2.1 Real-time response . . . 75

6.2.2 Synchronization . . . 75

6.3 Real-time UDP Communication Protocol . . . 75

6.3.1 User Datagram Header format . . . 76

7 a r c h i t e c t u r e o f c o-simulation platform 79 7.1 Real-time Digital Simulator . . . 79

7.1.1 Simulink Desktop Real-Time . . . 79

7.2 LabVIEW RIO architecture . . . 81

7.2.1 Architecture of the proposed test-bench . . 82

7.2.2 Model simulated in the test-bench . . . 83

7.3 Modeling of micro Grid and VSC converter . . . . 83

7.3.1 Non Linear model of hydraulic turbine sys-tem . . . 85

7.3.2 Governor system of Turbine . . . 88

7.3.3 Synchronous Machine . . . 89

7.3.4 Turbine and generator relationship . . . 92

7.3.5 Excitation system model of synchronous generator . . . 93

7.3.6 Control of 3φ Voltage Source Converter . . 95

8 p v a n d m i c r o-grid hil co-simulation and re-s u lt re-s 99 8.1 Real-time co-simulation test-bench . . . 99

8.2 Experiment and Results . . . 101

9 c o n c l u s i o n 107 9.1 Contributions to the Engineering Community . . 107

9.2 Recommendations and Future Research . . . 108

10 a p p e n d i x a 111 10.1 How to Create Custom FPGA bit file . . . 111

(13)

10.1.1 Making a copy of the sample FPGA VI

and project . . . 111

10.1.2 Customizing the FPGA VI . . . 112

10.1.3 Compiling the Custom FPGA VI into a Bitfile . . . 113

11 a p p e n d i x b 115 11.1 SLDRT Kernel Installation . . . 115

11.2 Configuring Model . . . 115

11.3 Code generation Parameters . . . 116

11.4 Signal logging to Workspace . . . 116

(14)

Figure 1 Categories of Simulation based on the speed

of execution . . . 8

Figure 2 Execution of steps in real-time and in non real-time simulation . . . 9

Figure 3 Simulation category according to the in-teraction among different modules un-der study . . . 10

Figure 4 Components of Hardware-in-the-loop sim-ulation . . . 13

Figure 5 Architecture of C-HIL simulation . . . 14

Figure 6 Architecture of P-HIL simulation . . . 15

Figure 7 Electrical drive framework . . . 16

Figure 8 DC Drive having a vehicle wheel as a mechanical load . . . 17

Figure 9 Signal level HIL Simulation block diagram 19 Figure 10 Signal level HIL Simulation of DC drive . 19 Figure 11 Power level HIL Simulation block diagram 20 Figure 12 Power level HIL Simulation of Electrical drive . . . 20

Figure 13 Mechanical level HIL Simulation block diagram . . . 21

Figure 14 Mechanical level HIL Simulation of Elec-trical drive . . . 22

Figure 15 Voltage divider circuit . . . 23

Figure 16 Architecture of P-HIL simulation consid-ering a voltage divider circuit . . . 24

Figure 17 P-HIL simulation interface done by cur-rent amplification . . . 28

Figure 18 Ideal-transformer model method of in-terface algorithm . . . 29

Figure 19 Scheme of TLM interface algorithm . . . . 29

Figure 20 TLM interface algorithm . . . 30

Figure 21 PCD interface algorithm . . . 31

Figure 22 DIM interface algorithm . . . 31

Figure 23 Interface of Voltage divider circuit for sta-bility studies . . . 35

Figure 24 Architecture of VeriStand Engine deployed in RT Target . . . 43

(15)

Figure 25 VeriStand interface between PC and the RT Target . . . 44

Figure 26 Sequential procedure that is followed in Real-time execution . . . 45

Figure 27 Analog input ports of myRIO with ADC . 46

Figure 28 Solar cell equivalent electric circuit . . . . 49

Figure 29 Equivalent PV cell circuit used for mod-eling . . . 52

Figure 30 Simulink model of the PV cell . . . 53

Figure 31 Current Characteristics of modeled PV module . . . 54

Figure 32 Power of modeled PV array for different irradiation and @ constant temperature of 298.15K . . . 54

Figure 33 Power of modeled PV array for different temperature and constant irradiation . . . 55

Figure 34 PV with MPPT system connecting to load 56

Figure 35 Perturbation and Observation Technique flowchart . . . 58

Figure 36 Schematic diagram of Boost Converter . . 59

Figure 37 Generic battery model . . . 59

Figure 38 PV with MPPT system in myRIO . . . 61

Figure 39 Input and output voltage of the boost con-verter for change in irradiation from 1000W/m2 to 800W/m2 at 0.5s . . . 62

Figure 40 PV system model compiled for RT simu-lation . . . 63

Figure 41 Simulink model to be compiled for RT simulation . . . 64

Figure 42 Input and output Voltage of the boost converter in RT Simulation for change in irradiation from 1000W/m2to 800W/m2 at 0.5s . . . 64

Figure 43 Maximum Power tracked in real-time with the output voltage maintained by MPPT system across the PV array terminals . . . 65

Figure 44 Simulation results comparison . . . 65

Figure 45 Block diagram of the test bench created . 66

Figure 46 Test-bench used for HIL simulation . . . . 67

Figure 47 Irradiation and temperature measured in real-time . . . 68

Figure 48 Voltage measured across DC bus in real-time . . . 68

(16)

Figure 49 Voltage measured across DC bus using

oscilloscope . . . 69

Figure 50 Power delivered by PV and consumed by load . . . 69

Figure 51 SOC and the battery current . . . 70

Figure 52 Battery terminal voltage . . . 70

Figure 53 UDP Header format . . . 77

Figure 54 UDP Pseudo header format . . . 77

Figure 55 Simulink desktop Real-time architecture . 81 Figure 56 LabVIEW RIO Architecture . . . 81

Figure 57 Co-Simulation architecture used for HIL simulation . . . 82

Figure 58 Block diagram of the simulated model . . 83

Figure 59 Block diagram of Hydroelectric power plant system . . . 85

Figure 60 Block diagram of Hydraulic turbine system 88 Figure 61 Block diagram of Hydraulic turbine gov-ernor . . . 89

Figure 62 Block diagram of DC Exciter type 1 . . . . 94

Figure 63 Block diagram of Control of VSC . . . 97

Figure 64 Test-bench created for co-simulation . . . 99

Figure 65 LabVIEW VI for UDP transmission and reception in myRIO . . . 100

Figure 66 MATLAB-Simulink model compiled for use in SLDRT . . . 101

Figure 67 Power delivered by PV system in both the simulations . . . 102

Figure 68 Power of PV system at 18th s . . . 103

Figure 69 Frequency of the grid in per unit . . . 104

Figure 70 Voltage at PCC in per unit . . . 105

Figure 71 Power delivered by Synchronous gener-ator to grid . . . 105

Figure 72 Reactive power delivered by PV system to grid . . . 106

(17)

Table 1 Pros and Cons of Interface algorithm . . . 34

Table 2 Available communication protocols . . . . 74

Table 3 Excitation System . . . 97

Table 4 Parameters of Synchronous Machine . . . 98

Table 5 Mechanical Driving System . . . 98

(18)

ADC Analog To Digital Converter

C-HIL Controller Hardware In The Loop

DAC Digital To Analog Converter

etc Et Cetera

FIFO First In First Out

FPGA Filed Programmable Gate Array

GUI Graphical User Interface

HIL Hardware In The Loop

HUT Hardware Under Test

HMI Human Machine Interface

MPPT Maximum Power Point Tracking

P-HIL Power Hardware In The Loop

PCC Point of Common Connection

RIO Re-configurable Input Output

ROS Rest of The System

RT Real-time

RTDS Real-time Digital Simulator

SG Synchronous Generator

SLDRT Simulink Desktop Real-Time

SOC State of The Charge

UDP Unigram Data Protocol

VSC Voltage Source Converter

VSS Virtually Simulated System

V2G Vehicle To Grid

(19)

1

I N T R O D U C T I O N

In this chapter I have taken an opportunity to convey my ideas and motivation for thesis work being done on Hardware In the Loop (HIL) simulation studies of renewable energy, by taking case of photovoltaic (PV) system, to demonstrate the platform and to solve the problems of simulating complex mathematical models in real-time.

1.1 m o t i vat i o n

Entire human population of this era, is in the quest of ’Se-cure, Clean and Efficient Energy’. It is one of the big societal challenge that is being addressed by most of the world orga-nizations and the governments. To name one, Horizon 2020 is the biggest EU Research and Innovation programme ever with nearly €80 billion of funding available over 7 years (2014 to 2020) [1], in which the above mentioned problem of energy is one of the societal challenge addressed through this project by European Union.

Increase in energy demand, the constraint of the present in-frastructure to fully exploit the conventional energy source and also environmental concern has made us look at PV cell to har-ness solar energy.

A PV system is mainly used for,

1. Bulk production of electrical energy to meet the existing energy demand as an alternative supply.

2. Satellites, space crafts and in other aero-space applica-tions to harness solar energy in space.

3. Electric vehicles as an hybrid configuration, but not so popular and useful.

A great number of research work is being conducted to bring down PV unit cost and to increase the efficiency of the PV mod-ules. As a result, today we are able to get upto 27% efficient solar cells [43] which are remarkable.

(20)

PV delivers lot of energy in the afternoon, while the peak energy demand is in the morning and evening, hence storage system is very important. But the storage system takes much of the investment and requires maintenance [17]. Instead of hav-ing PV on top of electric vehicles, batteries designed for electric vehicles are used for storing excess energy from the grid, and it is exchanged back when it’s in need. This technology is called as Vehicle to grid (V2G) [20], a ground breaking concept that is in much of interest by the research community.

These upcoming technologies are very promising for mankind to live in a sustainable world. Simulation studies of PV for grid interaction, storage and V2G brings faster implementation of technology from paper to people. As many of the countries are proposing solar power projects, especially developing countries like China and India, a low cost platform to conduct these stud-ies are much appreciated.

1.2 n e e d o f r e a l-time pv simulations

As penetration of PV generation increases, it’s impact on stabil-ity and and securstabil-ity of the power system will become more and more significant, due to the characteristic of randomness and volatility [31]. Modeling and simulation are the basic technolo-gies to study the impact for the power grid in which, large-scale PV generation systems are integrated.

Simulations in usual platform may give good results but they are not able to deliver results for dynamic change in input as present in real-world in run-time, the model may not respond for such a change. When we try to simulate to know the long term performance of a system, the normal simulation requires a very long time to deliver results and the accuracy of the results may also get compromised. Hence it is necessary to conduct real-time simulation with the models that can respond for faster input dynamics [32].

The power generation capability of the PV depends on the ever-changing environmental conditions like temperature and solar irradiation, hence real-time simulation of PV system to-gether with its controller is recommended to validate the con-trol aspects and also to study the behavioral aspects of the sys-tem under different circumstances resulting from external or internal dynamic influence.

’Hardware In the Loop’ is the state of the art simulation that provides the solution for the above requirement, where a

(21)

sys-tem behaviour is emulated in a hardware and tested in real-time according to the requirement.

1.3 p r o b l e m f o r m u l at i o n

While simulating the complex model like PV system interaction with the grid in real-time, we may encounter many problems. The important ones to mention are,

1. The need of a PV mathematical model that can deliver results faster to keep the real-time simulation properties during execution. Solving the algebraic loop in the PV model is an important task as algebraic loops are not sup-ported in the real-time hardwares.

2. There is a need of cost-effective test bench/platform for simulating PV systems in real-time that can be used for control validation, studies of storage system and integra-tion of PV system to the power drive train or grid.

3. Model based design of process and systems are very pop-ular, there are tools available for automatic code genera-tion for the developed model, it’s required to use these tools, that can deliver C code from the model, which can be used for cost effective target hardwares.

4. The memory of the real-time digital Simulator (RTDS) is a main constraint while simulating a complex model like grid, this memory is used for storing and executing the complied C code in real-time. It may be necessary to split the model into two or more separate systems and bridge them using an appropriate interface.

5. Interfacing the two models using respective interfacing al-gorithm introduces some errors in the execution, that re-sults in, instability of the system during run time and also accuracy of the results varies according to the interfacing algorithm used.

1.4 r e s e a r c h o b j e c t i v e s

As explained earlier the main objective of this work is to pro-pose the low-cost real-time simulation platforms, that can be

(22)

used for real-time simulations, incorporating HIL testing method-ologies using hardware. The following objectives are framed to meet in this research work.

1. To create a Mathematical model of PV system that can be used for real-time simulation, which has faster converging behaviour that keeps the execution in real-time.

2. To create a test bench for validating the control or the process validation of the PV system.

3. To use the real world data in run-time of the simulation. 4. To create a co-simulation platform for emulating PV in

a hardware and complex model like grid as rest of the system in the Simulink Desktop real-time.

1.5 t h e s i s o u t l i n e

The thesis is being divided into three parts, Part I contains

Chapter 2, which presents the detailed study of HIL simula-tion by presenting examples and case studies. The need and types of interface algorithms are studied. Also about maintain-ing stability and accuracy durmaintain-ing the execution in run-time are discussed.

Part II contains three Chapters, in Chapter 3 the proposed architecture for time simulation using VeriStand as real-time digital simulator and myRIO as hardware is presented.

Chapter 4presents the detailed modelling of PV, MPPT, DC-DC Converter, etc. Later in Chapter 5 the results of HIL real-time simulation is illustrated with the test bench created.

Part III has four chapters, in Chapter 6 the Ethernet pro-tocol that are being used for data communications are men-tioned and detailed explanation is given on UDP protocol, in

Chapter 7 the architecture of proposed test bench for HIL co-simulation having interface algorithm over Ethernet is being presented. TheChapter 8deals with the created test-bench and the execution of real-time experiment along with the discussion of results. Finally the conclusion of this work is drawn in Chap-ter 9.

(23)

T H E O R E T I C A L A S P E C T S O F H I L

In this part the detailed study of Hardware-in-the-loop simulation is presented. It is very essential to understand the basic ideology of this type of simu-lation methods for the development of the PV test bench for different test case scenarios. The major problem in executing HIL simulation is, having the system states stable throughout the simulation and also to maintain accuracy without affecting the char-acteristics of the emulated system. In my case the emulated system is PV array whose characteristics depends on the series and parallel resistances, which can be affected by introducing the interfacing algo-rithm of HIL simulation. The key points that has to be understood for successful execution of HIL simu-lation is given in this part.

(24)
(25)

2

H A R D WA R E - I N - T H E - L O O P F O R P O W E R

E L E C T R I C A L S Y S T E M S

This chapter will light on the facts of simulation, its categories and need of different kind of simulation techniques. It also narrates, state of the art real-time simulation, Hardware-in-the-loop, Power-hardware-in-the-Hardware-in-the-loop, their methods and issues. My main goal in this work is,

1. To present a real-time simulation framework coupling mod-elling environment such as MATLAB Simulink to a real-time hardware, in this work National Instruments myRIO is chosen as the real-time hardware which is being ex-plained in the later section.

2. To conduct Co-simulation in real-time, incorporating Hard-ware in the Loop simulation strategy for simulating PV system and grid whose mathematical models are inter-faced through Ethernet.

HIL is widely used for testing in automotive industries, ma-rine and aerospace applications etc., but nowadays it is gain-ing much popularity in real-time testgain-ing in Electrical power domain, especially in renewable energy planning, testing and commissioning. Though HIL has much benefits, it is still a emerging topic in the field of research, hence the detailed study of HIL simulation is given in this chapter.

2.1 s i m u l at i o n

The development of many products and the process is charac-terized by the integration with digital control systems. The in-tegration is performed by the hardware and the software com-ponents. Because of the expanding multifaceted nature and the mutual relationship between the design of the process and con-trol system, computer aided techniques for modeling, simula-tion and furthermore the design methods are required. There are many tools available in the market to address these needs.

Thus, a faster way to validate research proposals pertaining to the above-mentioned characteristics is by adopting

(26)

tion techniques. With respect to the required speed of the com-putation, the simulation can be grouped into three categories [19].

1. Simulation without time limitation 2. Real-time Simulation

3. Simulation faster than real-time

In simulation without any time restrictions, the results are not forced to be available at particular time instances. A degree of freedom with respect to the execution time is given for the simulator to solve the equation and to continue the iteration for the specified time. Whereas in real-time simulation, the ex-ecution time is as same as real world clock. The equations are forced to deliver the output at particular time instances and the iterations of model equations are done while interacting with outside world in real-time. The simulation faster than real-time provides the solution of the equations as it is immediately avail-able after processing which enavail-ables to monitor faster dynamics of the real world.

The three categories and their brief usage is represented in Fig-ure 1.

Figure 1: Categories of Simulation based on the speed of execution

2.1.1 Real-time Simulation

Real-time simulation means not only fast computing, its task is to control or react to the events that take place in real world with the clock speed same as that of the real-world clock [26].

(27)

Digital real-time simulation (DRTS) of the electric power sys-tem is the reproduction of voltage or current waveforms with the desired accuracy, that are representative of the behavior of the real power system being modeled.

To achieve such a goal, a digital real-time simulator needs to solve the model equations for one time-step within the same time in real-world clock [15]. Therefore, it produces outputs at discrete time intervals, where the system states are computed at certain discrete times using a fixed time-step.

Two situations can arise depending on the time required by the simulation platform to complete the computation of state outputs for each time-step, if the execution time Tsfor the

simu-lation of the system is shorter or equal to the selected time-step, the simulation is considered to be real-time, it is shown in the

Figure 2.

Figure 2: Execution of steps in real-time and in non real-time simula-tion

In the first execution step the model gives the solution exactly at same time of the real world clock tnbut the second execution

step results the solution faster than next clock step Tn+1, but

in this case the real-time property is maintained by making the model to wait, until reaching the next clock step Tn+1. This wait

time is called as idle time and solution is made available exactly at real-time. In the next case it is illustrated in the figure that the first execution step takes little longer than Tn+1.

In the later case the simulation will miss a step of execution where this phenomena is called as overrun. The occurrence of overrun in the simulation makes the model to loose the prop-erty of real-time.

A simulated system will provide a dynamic output subject to its particular simulation time-step, which can be faster/slower than the real-life system’s dynamics. Therefore, ensuring RT

(28)

is not a matter of accelerating or slowing the simulation, but providing valid outputs at precise (reality-consistent) instants. Having an early or a delayed result makes the simulation fail as it no longer captures the real dynamics of the system.

2.1.1.1 On-line and Off-line Simulation

Another significant subdivision among simulation technologies is, whether they keep running on-line or off-line. This charac-teristic is a determinant for setting up the abilities of the simu-lation framework and their scope as shown in theFigure 3. The reason for the real-time requirement is mostly that one part of the investigated system is not simulated, but real. A process can be understood as a series of steps along a sequential “line” of events. The implication of on-line alludes to the considera-tion of the simulaconsidera-tion in between the process, so performing the tasks of a certain step.

Figure 3: Simulation category according to the interaction among dif-ferent modules under study

Those system under study ordinarily incorporate the associ-ation with the rest of the sub-process. Therefore input/output exchange is necessary.

Off-line simulation can adapt to systems that require no in-teraction with different sub processes either in light of the fact that the entire framework is simulated or such communication is incorporated artificially. e. g., infusing recorded data from the process during runtime of the simulation.

Briefly, on-line simulation influences the modeled sub-system to some portion of the full process as it runs, while off-line sim-ulation runs independently. Both methodologies can adapt to human intercession so as to modify set-points or parameters; be

(29)

that as it may, such human interaction yields on-line behavior only if it is an actual sub-process in the previously mentioned line of events i. e., when it can’t be infused by programmed infusion of the data.

On-line simulations can only be run if real-time properties are ensured, as the surrounding events react under real world clock timing. In this way, the simulation copes with the dy-namic behavior and the input/output characteristics of the sim-ulated sub-process. Effective on-line simulation will be useful for detailed analyses as the collected data will depict close-to-real process behavior. In this way, bandwidth, precision, gains and limits, as well as stability, sensitivity, noise rejection, out-put effort, etc., can be studied due to dynamical consistency and minimized assumptions.

It is worth mentioning that real-time off-line simulations are possible. As long as the deterministic simulation deadlines are met effectively, hence in theFigure 3the real-time simulation is connected to off-line simulation methodology in a dotted line. The RT simulation can be guaranteed on an independent envi-ronment. However, it has no input/output interaction with the real world exists in this case.

2.1.1.2 In-the-loop Simulation

Whenever a process is cyclical, a “loop” instead of a line defines the system’s flow. Having any in-the-loop sub-process implies the same on-line integration with the surrounding system. The In-the-Loop (IL) notation is used to denote such an interaction together with the specific system being added to the main pro-cess. Numerous simulation strategies are accessible to address the issues of the framework outlined [28]. They are, model-loop (MIL), software-model-loop (SIL), processor- in-the-loop (PIL), hardware- in-the-in-the-loop (HIL) and power-hardware-in-the-loop (P-HIL). They directly refer to the specific technolo-gies used and their supported interactions. Brief narration on each of the In-the-loop simulation techniques are as follows.

1. Model-in-the-loop: Controller and the plant are simulated in the host computer without any real hardware compo-nents.

2. Software-in-the-loop: Simulated plant is run with the sim-ulated control in the host computer

(30)

3. Processor-in-the-loop: Plant/control runs in a digital plat-form (Micro-controller/DSP/FPGA) and the controller or plant runs in the host computer.

4. Hardware- in-the-loop: Process in which a plant, synthe-sized in a compiled code, runs in digital platform and in-teracts in real-time with a physical controller. In this tech-nique the simulated process in the external digital plat-form and is operated with the real control hardware. As shown inFigure 3HIL and simulation techniques based on HIL require real-time conditions to be met, as actual real world signals or power interactions are used as the interface.

Summarizing, a simple non-real-time simulation will wait for all results to be ready after performing the required ordinary differential equation (ODE) solver operations. This will gener-ally take a long time to be processed and will give "ideal" dis-crete results. Real-time simulation powers the process to fit into a deterministic time-step, so showing the real-time qualities of the system. Real-time results are closer to reality since all pro-cessing modules are demanded to react for changes at the rele-vant time scale.

Finally, HIL incorporates the actual hardware solution to be implemented. Consequently, the real-time model accounts for those cases at the appropriate time scale to which the Hardware-under-Test (HUT) is to be subjected.

2.2 h a r d wa r e-in-the-loop

The hardware- in-the-loop simulation (HIL) is characterized by operating real components in connection with real-time emu-lated components. Usually, the control system hardware and software are the real system, as they are used in production. The controlled process consists of actuators, where as plant/-physical process and sensors are emulated or some parts of it are real. Consider this example of ‘Soyuz Simulator’ to train as-tronauts. In this case the astronaut is subject under test where as the flight behaviors are emulated, the controllers and the ac-tuators are real. A HIL framework composed of three crucial parts, a hardware under test (HUT), a virtually simulated sys-tem (VSS) and an interface that connects both HUT and VSS.

Figure 4 gives practical example of HIL simulation. In this case, the simulator mimics a virtual environment of docking and re-entry that is continuously changing according to the

(31)

Figure 4: Components of Hardware-in-the-loop simulation

hardware’s (the human pilot) reaction. When the pilot receives the vision through the monitors, he makes real-time decisions and sends the commands back to the simulator using control switch or other input tools. The display screen, human eyes, and the control switch comprises the HIL interface.

One of the flourishing area of HIL is rapid control prototyp-ing. In this case, the real embedded controller is tested with the emulated plant, the HUT is subjected to ability of the real-time digital simulator to integrate complex dynamical systems many simple and complex dynamical system are emulated and used for control prototyping. As an example, HIL platform for prototyping and testing of wind generator controllers are pre-sented in the paper [34]. In this, author described a 10-turbine wind farm that is connected a single feeder, which is emulated in real-time simulator. One of the wind turbine is controlled us-ing an externally emulated wind turbine controller havus-ing the interface using analog and fast digital inputs and outputs in real-time.

Another example for product prototyping using HIL is sim-ulation of Hybrid electric vehicle for the evaluation of differ-ent characteristics. Authors in the paper [30] are evaluating the characteristics of the motor when it is installed in the vehicle and used in different terrains and driving mode. They propose a model in which they will have a vehicle simulator, a controller and the dynamo-meter. Here dynamo-meter is the real-world system used to create vehicle dynamics and it is also the sys-tem under test. The vehicle simulator consists of all the actual vehicle information and its dynamic characteristics. The PI con-troller used in real-time gathers the information from the ve-hicle dynamics and actual motor speed and it commands the motor which is under test to perform accordingly.

HIL simulation is categorized into two groups 1. Controller-hardware-in-the-loop (C-HIL)

(32)

2. Power-hardware-in the-loop (P-HIL)

2.2.0.1 Controller-HIL and Power-HIL

Most of the rapid control prototyping HIL applications exchange the signals between the simulator and the HUT are at low power levels typically in the voltage range of ±12V and they can easily interact with the real world using analog to digital converter or vice versa with good accuracy and no power ex-change takes place between the simulator and the HUT, this type of HIL testing is called as C-HIL.

Figure 5shows the basic architecture of Controller-hardware-in-the-loop. In this type of simulation only signals are exchanged between the real-time digital simulator (RTDS) and the hard-ware under test. Usually the electronic control unit is subjected to the hardware under test which receives the forward signals of the process/plant emulated in RTDS. The forward signal-s/feedback signals generated in the RTDS will undergo digi-tal to analog conversion to feed the pseudo measurements of process/plant to the controller. The controller interprets this pseudo measurement signals as real world signals. After it pro-cessing the information, it generates the control signal that is fed to RTDS through a analog to digital converter to behave according to the instructions obtained by HUT.

Figure 5: Architecture of C-HIL simulation

Whereas in many cases, there is a need of exchanging power between the simulator and the HUT (example Electric vehicle motor as HUT) and the simulator should be able to address

(33)

this request. The HUT may absorb the real power henceforth acting as a sink, it can be handled by incorporating appropriate power amplification and conversion apparatus and this kind of HIL testing is called as P-HIL simulation, the basic architecture of P-HIL simulation is as given in Figure 6.

In this simulation methodology the hardware that absorbs the real power, is subjected to be the HUT. The RTDS comes with real-time model emulated in it along with the human ma-chine interface to control the simulation process. The emulated model will generate the forward signals which will go under digital to analog conversion. These signals are amplified to the power level using a power amplifier. There by providing the real power to HUT, as if it is working in the real world scenario. The HUT will react to the power obtained and it behaves accordingly in the real world. The measurements of the HUT is taken using appropriate sensors and they are fed to RTDS through ADC’s which are received as feedback signals for the model emulated in the RTDS. To the obtained forward signals the model emulated in the RTDS will act and generate neces-sary forward signal and this process repeats in the simulation as it progress with respect to time. The power amplifier and the sensors used for measurements together forms the power interface between the emulated system and the HUT.

(34)

2.2.1 Different HIL methodologies for Electric drive system

To know the different HIL methodologies that can be imple-mented in electrical domain, I introduce an example of Electric drive system given in the paper [10], the author has given the distinctive techniques for directing HIL simulation for electric drives. In which he clarifies the interfaces and the strategies to go from signal level to mechanical level of integration.

An electrical drive can be defined as an electro-mechanical device for converting electrical energy into mechanical energy to impart motion to different machines and mechanisms for various kinds of process control [27].

Figure 7: Electrical drive framework

The electric drive framework incorporates the following seg-ments in it. Power modulator, Sources, Control unit, Sensing unit, Electrical machines and loads. The control unit holds the process control where it gathers the information from the avail-able sensors and as per the requirement it yields the pulses for the power electronic switches present in the power modulator which interface the source and the electrical machine. The elec-trical drive framework is represented in the Figure 7.

The type of control unit selected depends on the dynamics of the process control, if it involves faster dynamics then high-speed devices called FPGA are used to control the faster dy-namics and to reach high frequency modulation of the power electronic converter. A complete model of DC drive is shown in the below Figure 8.

The illustrated DC drive model contains a battery source Vs

that provides the required voltage and delivers the current is to

the IGBT power converter, the motor terminals are connected to the power converter whose output voltage is given by the ex-pression Voand the load current is given by im. The rated speed

of motor is Wm rad/s and the torque generated is Tm which is

(35)

Figure 8: DC Drive having a vehicle wheel as a mechanical load

box Wg is the speed of the vehicle in rad/s and Tg is torque of

the vehicle in Nm. The battery voltage measurement Vs, load

current im and the desired output torque of the wheel Tgref is

given to the controller which produces the gate pulses for the IGBT switches for power regulation.

2.2.1.1 Mathematical model of the selected DC drive system

The chopper converts the input source voltage Vs to the output

voltage Voas per the duty cycle ’D’ applied by the controller. By

this also the source current is and the load current im is related

as shown below. Vo= Vs∗ D

is = im∗ D

(1) Where D is the modulation index of the chopper.

The DC machine characteristics can be described using volt-age applied on the armature winding, the armature current pro-duced and the back EMF generated and it is given by,

Ldia

dt = ia∗ Ra− Eemf− Vo (2)

where, L and R are motor inductance in H and resistance in Ω respectively.

(36)

The torque of the DC machine is is proportional to the arma-ture current ia and the EMF generated if proportional to the

speed of the machine Wm.

Tm = ka∗ ia

Eemf = ka∗ Wm

(3) where, Ka is the torque co-efficient.

Gearbox gives the torque Tg and the speed of the wheel Wg

from the machine torque and the machine speed using the gear ratio kg.

Tg= kg∗ Tm

Wm = kg∗ Wg

(4) The wheel converts the rotational motion Wg to the linear

motion Vspeedand also the obtain torque Tgto the traction force

Ftract using the wheel radius Rwheel.

Ftract = Tg Rwheel Wg = Vspeed Rwheel (5)

Vehicle speed is obtained by equation of vehicle dynamics relation with traction force Ft and resistant force Fres.

MdVspeed

dt = Ftract− Fres (6)

where, M is the mass of the vehicle including the rotating mass. The resistant force Fres is calculated using the relation,

Fres = Fo+ αVspeed+ bVspeed2 + M∗ g ∗ sin(θ) (7)

where, Fo is the frictional force, α is the friction co-efficient, b

is the drag co-efficient,θ is the slope angle to the horizontal surface and g is acceleration due to gravity.

2.2.1.2 Signal level HIL Simulation

In signal level of HIL simulation, only the control hardware that holds the process control is tested. The other parts such as power modulator, electrical machine and the mechanical load are simulated in real-time. The simulation should be able to ex-change the signals between the controller (HUT) and simulated

(37)

Figure 9: Signal level HIL Simulation block diagram

model, hence the simulated model is emulated in another con-troller board which can provide the signal characteristics of the power parts in the system.

A specific signal conditioning is being adapted to impose the same input and output of the power parts. This method of HIL is called as “signal level HIL simulation” because only signals are used as the interface between the HUT and the simulated system.

Figure 10: Signal level HIL Simulation of DC drive

Equation 1toEquation 6are modeled and emulated in a DSP for real-time simulation.The measurement parameters such as source voltage Vs and armature current im are sampled to feed

them as pseudo variables. These variables can be gathered dur-ing the measurement usdur-ing sensors in real world but now it is being simulated. The DSP is also emulating the behavior of the power modulator hence the step size of DSP is much smaller when compared to the controller HUT, the overall configura-tion is shown in the Figure 10.

(38)

2.2.1.3 Power level HIL Simulation

In this case actual controller board and the power electronics converter are evaluated, the other parts of the drive are simu-lated. The simulation will impose the inputs and outputs on the power electronic converter and the controller under test. In this method the simulation environment is composed of sec-ond power converter and a secsec-ond controller to simulate the same dynamics of the motor, Figure 11 shows above described configuration.

Figure 11: Power level HIL Simulation block diagram

The DC machine behavior is mimicked by connecting the power modulator under test to another chopper in series with an inductor as shown in the Figure 12.

Figure 12: Power level HIL Simulation of Electrical drive Equation 2 to Equation 6 are being simulated in the DSP in real-time. The second chopper modulation ratio Demu is

calcu-lated and converted into gate pulses by selecting proper switch-ing frequency so that the same current im is imposed through

the inductor as given by the DC motor Equation 2. In this type of simulation the machine characteristics is emulated by em-ploying the current control loop in the real-time simulator. Se-lecting the proper chopping frequency to allow the current in

(39)

the continues conduction mode and the time constant of the inductive circuit is a key for correct emulation of the machine characteristics. This kind of HIL simulation helps to test the chopper influence (EMC on control) and unwavering quality, real battery execution when it is incorporated with the vehicle and in like manner tests.

2.2.1.4 Mechanical level HIL Simulation In Mechanical level HIL Simulation1

, the whole drive i. e., con-trol, power electronic converter and the DC machine is tested using a simulated mechanical load. The simulation must ex-change the mechanical inputs and outputs with the electrical machine under test. To simulate the load behavior another elec-trical machine is used as controlled mechanical load, it is sup-plied by the second power electronic converter and also the sec-ond controller which is running in real-time, the block diagram of the mentioned architecture is given in the Figure 13.

Figure 13: Mechanical level HIL Simulation block diagram

The second controller should control the mechanical load as well as it should send the fictitious mechanical measurements to the controller under test. The interface between the real and simulated terms are composed of mechanical variables.

When this type of the HIL testing is employed in the electrical vehicle DC drive, it provides the static test bench for testing and product prototyping.

To simulate the behavior of the mechanical power train, the DC machine is connected to another electric machine (Induc-tion motor) which is powered by a power converter as shown in the Figure 14. The DSP controller board simulates the Equa-tion 4 to Equation 6 in real-time and the inverter modulation vector Demuis calculated to impose the same speed of rotation

1 This is the method proposed by the author in the work [10], though this kind of simulation is not exactly classified classified as Mechanical-HIL but it usually referred as Power-HIL.

(40)

of Wg to the gear transmission. In this method a closed speed

control loop is needed to emulate the behavior of the vehicle. Using this type of test the effect of power electronics on torque and the machine limitation can be easily tested

Figure 14: Mechanical level HIL Simulation of Electrical drive

2.3 p o w e r-hardware-in-the-loop

P-HIL is becoming progressively well-known because of the accentuation on not endangering power systems, power elec-tronics, and other associated electrical apparatuses before com-missioning these devices in the actual systems. As already dis-cussed, the whole P-HIL simulation system design is based on the hybrid configuration of computer simulation of part of the system, known as the “rest of system” (ROS), in real time, the control and measurement of the hardware under test (HUT) that is connected to that real-time simulation and on their inter-facing through digital and analog input/output signals. A fun-damental component of the P-HIL approach is the closed-loop nature of the interfaces, allowing two-way interaction between the HUT and the virtual simulated system (VSS).

When a subsystem module/device of a large system to be deployed, it is highly recommended to do P-HIL test making the device that has to be tested as HUT and the large system emulated in the RTDS at an early development stage. It enables to know the system level interactions and possible to mitigate the issues if present. Further, for systems that have not yet been fully realized, development schedules for various components of the system may differ substantially, preventing components developed early in the cycle to be tested with other components of the system until later in the development cycle. In this case, P-HIL simulation offers a way to perform integration testing of

(41)

the HUT at an early stage, making use of models of the other components in the system.

P-HIL experiments can be conducted in a tightly controlled lab environment in which experiments can be quickly and grace-fully terminated, P-HIL simulation provides a means to test the HUT for extreme or dangerous conditions that would not be at-tempted with a fully hardware-based test bed of the surround-ing system.

Though it has so much advantages, this methodology is often forgotten in the scientific community, hence a less number of re-search work is being carried in this area. Due to advancement in digital dives like FPGA and immediate need of addressing energy issues using renewable sources. P-HIL tests are gaining more emphasis in this regard for design, project evaluation and testing of integration of renewable energy source with the grid simulation for worst case scenarios. P-HIL is a safe risk reduc-ing method that is extremely applicable because it provides a more realistic environment than software simulation alone. 2.3.1 Basic architecture of P-HIL simulation

Consider a primitive voltage divider circuit as shown in the

Figure 15, it is composed of a voltage source Vo, source resistor

R1 and the load resistor R2.

Figure 15: Voltage divider circuit

The source voltage connection with the resistors closes the circuit and makes the current i1 to flow through them and

the voltage V1 is observed across R2. Now if we like to make

the load resistance as HUT and the voltage source along with its source resistance is simulated in real-time in a RTDS, we shall implement this basic architecture of P-HIL as shown in

Figure 16.

The idea is the component to be tested is replaced by a cur-rent source or a voltage source in the simulated model where as the component is imposed with the real voltage or current

(42)

Figure 16: Architecture of P-HIL simulation considering a voltage di-vider circuit

source as same as the magnitude as in the simulated system. In the source side, the resistor R2 is replaced by a controlled

current source in the model developed and the voltage across the current source is calculated in simulation. The calculated voltage V1 obtained in the simulated system is applied to the

terminals of the actual hardware through a power interface, this creates the virtual voltage V1to be the real world actual voltage

V10, ideally these two voltage are same i. e., V1 = V

0

1. The current

measured from the hardware circuit i1 is sent back to the

sim-ulated model running in RTDS as a feedback signal, model in the RTDS incorporates this feedback signal as the actual current flowing in the circuit.

This method shows the possible setup of power interface in P-HIL system, as there are many interfacing methods are avail-able. The principle of this real-time simulation implies that the electrical signals of the physical power system (i.e., current and voltage) are identically replicated by the RTDS [15]. The simu-lators used and integrated in P-HIL simulations must be able to solve the differential equations of the corresponding power system within the defined time step, and this requirement must be fulfilled all the time.

2.3.2 Real-time digital simulator and Interface in P-HIL simulation To conduct a P-HIL-based experiment, several things are taken care and issues are addressed. Among them the most important are,

(43)

2. Power amplifier 3. Interface

2.3.2.1 Real-time digital simulator

RTDS plays a major role in entire P-HIL simulation because of the model emulated is controlled by RTDS and it is only respon-sible for keeping the simulation in real-time. A wide variety of real-time digital simulators are available in the market. Some real-time engines cater more toward bulk power applications and thus, form a P-HIL standpoint. It is also a software bridge between the emulated model in the target device and human, it provides the HMI between the tester and the real-time target. The selection of the target device is based on many factors, but one importantly is the computing capability of it. To model the high switching characteristics of converters, a fast processor is needed to reach the minimum step size as low as 1µs. A real-time simulator needs to solve a grid-scale model by roughly 50µs or a smaller time-step, a simulation of such a system may require more computing capability and the ability to simulate with a very small time-step. From a hard ware architectural point of view, the RTDS can be grouped into the following cat-egories.

• PC based

• Custom processor based • Supercomputer based • FPGA based

The PC-based RTDS uses general-purpose multi core proces-sors that run on RT-Linux and execute real-time code gener-ated from the system model with optimized solvers. Custom-processor-based RTDS are based on RISC processors running on VxWorks RT-OS and its user interface. Supercomputer-based RTDSs are based on machines with large computational plat-form and the last one uses FPGAs as the main computational hardware that is used for both large-scale and small-scale sim-ulation activities. Simsim-ulation on FPGA is a good solution to achieve the custom performance. However, the coding of com-plex solvers for FPGA is still very comcom-plex and often requires low-level FPGA programming expertise.

(44)

Most of the RTDS comes with the application software where an inbuilt library providing GUI to do build model by drag and drop, also they provide a platform to build custom model using C code or any other tool. The application software holds the solver methodology to solve the model as well. Most promi-nently usage of MATLAB model gives an easy development en-vironment. As, a well-defined libraries enables user to cut the development time, but very less RTDS support this facility. 2.3.2.2 Power amplifiers

As P-HIL experiments involve the transfer of power through the interface, an amplifier is needed to reproduce simulated conditions at the point of common coupling with the HUT. In P-HIL-based experiments, it is typically desired to test the electrical apparatus at its intended power rating and dynamic events may further require voltages and currents more than the rated values for limited duration. Thus, it is required to utilize an amplifier that is sized appropriately for the task and that additionally has a bandwidth that can conduct the planned dynamic tests. Also, considerations that must be taken care in-cludes slew rate limiting due to bandwidth limitations as well as quantization error in voltage/current synthesis.

It’s the task of the engineer who is testing to select appropri-ate power amplifier according to his testing needs. The guide to select proper power amplifier is given in [24] in this paper they suggest three types of power amplifiers addressing differ-ent needs. They are,

1. Switched mode power amplifier: Switched-mode ampli-fiers are commonly used for P-HIL simulation ranging from small-scale power applications up to the megawatt range. Typical AC/DC/AC converter typologies consist-ing of front-end rectifier and back-end inverter is used in this method. Based on type of P-HIL experiment, control strategy of the amplifier, switching frequency and the out-put filters are selected.

2. Linear power amplifiers: They are most suitable for P-HIL applications in the small to medium power scale.

3. Generator-type power amplifiers: This type of amplifica-tion employs a three-phase synchronous generator driven by a DC or AC motor and separate exciter systems.

(45)

The following characteristics must also be carefully consid-ered to select the amplifier for the P-HIL application.

• Power ratings of the device under test • Amplifier interface connections

• Source and sink power ratings of the amplifier • Amplifier response times

• Amplifier slew rate

• Amplifier harmonic distortion and frequency resolution • Amplifier input and output voltage/current range • Amplifier input and output impudence

2.3.2.3 Interface

Interfacing the RTDS with the HUT holds an important task in P-HIL simulation. Type of interface will decide the stability and accuracy of the simulation, selecting the proper interfacing al-gorithm is the key to get accurate results and meeting the goals of the P-HIL simulation. Many types of interface algorithms are available and it’s being explained in detail in the next section. 2.3.3 Interface Algorithm

Interface algorithms provide the means of relating simulated voltage and currents at the PCC between the ROS and the HUT to the measured voltage and current of the P-HIL am-plifier. This element is critical as it has a profound influence on the accuracy and stability of the P-HIL-based experiment. Few commonly known methods of interface algorithm are pre-sented here [36]. Dual forms of each method, referred to as voltage type and current type, are generally available to accom-modate operation with an amplifier accepting either a voltage reference or a current reference, respectively.

Figure 16 shows the interfacing method, where the voltage V1is amplified for the same kind of P-HIL application it can be

interfaced by amplifying current instead of voltage and the volt-age across the HUT is sent as feedback to the RTDS as shown in theFigure 17.

(46)

Figure 17: P-HIL simulation interface done by current amplification

These two methods are duals in every interface algorithm and gives different boundaries of stability hence a suitable type of amplification for interface method should be selected. 2.3.3.1 Ideal-Transformer Model

Ideal transformer Model (ITM) is the most commonly employed method employed in interfacing RTDS and the HUT, because of its straight forward nature, not being complex to realize the system and also, it is most accurate and immediate solution to think of. Depending on type of signal to be amplified it is again categorized into Voltage type ITM and current type ITM. Here time delay ∆t is considered as the only error in P-HIL interface amplification, while there are many factors involved which are discussed in later section, but this one is major, since it involves in the stability of the test.

In this method the reference signal is given to the power am-plifier with a unity gain no modifications are made, the feed-back signal is given to the RTDS at proper sampling rate as shown in theFigure 18.

The open loop transfer function for this algorithm is given by,

GIT M = −exp(−s∆t)∗

Zs(S)

Zl(S) ∗ Tpa(S)∗ Tm(S) (8) Where,

∆t Total time delay

Tpa(S) is the dynamic transfer function of the Power amplifier

(47)

Figure 18: Ideal-transformer model method of interface algorithm

∆t is occurred due to the delay in the signal, occurred due to power amplifier ∆td1and due to measurement process ∆td2.

The stability of this interface depends on ratio of Zs(S)

Zl(S) in the

voltage type amplification interface and on Zl(S)

Zs(S) in the in the

current type amplification.

2.3.3.2 Time-variant First order Approximation

Time-variant First order Approximation (TFA) is based on the assumption that, HUT in a Power-HIL simulation can be mod-eled as first-order linear system having RL or RC topology. With the recorded historical simulation data, the co-efficients of HUT model can be solved and updated on line during the experiment. Compensations can then made in the simulator to correct the errors introduced by the interface.

2.3.3.3 Transmission line model

Transmission line model (TLM) uses a linking inductor or ca-pacitor to interface the RTS with the HUT as shown in the Fig-ure 19.

(48)

The inductor or capacitor is taken as a Bergeron transmission line and modeled as an equivalent Norton circuit or Thevenin circuit. The detailed interface of this method is shown in the

Figure 20.

Figure 20: TLM interface algorithm

The equations of the TLM method are given by following equations, Linkage impedances is given by Equation 9and line coefficient is given by Equation 10respectively.

Zlk = L ∆t Zlk = ∆t C (9) β = Zs− Zlk Zs+ Zlk Zlk∗ Tamp(S)∗ Tflit(S) (10)

The open loop transfer function using this algorithm is, GT LM= 1 − β∗ exp(−2S∆t) 1 + β∗ exp(−2S∆t)∗ Zs Zlk ∗ Tamp(S)∗ Tflit(S) (11) Where,

∆t is the time delay

Tamp(S) Transfer function of power amplifier

Tflit(S) Transfer function of filter L Inductance in mH

C Capacitance in µF

2.3.3.4 Partial Circuit Duplication

The partial circuit duplication (PCD) method includes a linking impedance Zab in the simulated system and also on the

(49)

Figure 21: PCD interface algorithm

Large values of the linking impedance improves the stabil-ity of the interface but introduces inaccuracies due to increased power losses. The open loop transfer function of the PCD method is given by

Gpcd =

ZsZhut

(Zs+ Zab)(Zhut+ Zab)

∗ exp(−s∆t) ∗ Tamp(S)∗ Tfilt(S)

(12) Where,

∆t is the time delay

Tamp(S) Transfer function of power amplifier

Tflit(S) Transfer function of filter

Zab Impedance linked

2.3.3.5 Damping Impedance Method

The damping impedance method(DIM) is a composite of the ideal transformer and PCD methods. It has a linking impedance Zab similar to the PCD and includes a damping impedance

Zdamp as shown in Figure 22. The DIM method has very high

(50)

stability when the value of Zdamp is equal to Zhut. The open

loop transfer function of the DIM method is given by Equa-tion 13.

Gdim =

Zs(Zhut− Zdamp)

(Zs+ Zab+ Zdamp)(Zhut+ Zab)

∗ exp(−s∆t) ∗ Tamp(S)∗ Tfilt(S)

(13)

Where,

∆t is the time delay

Tamp(S) Transfer function of power amplifier

Tflit(S) Transfer function of filter

Zab Impedance linked

Zdamp Damping Impedance

There are many interface algorithms are coming up accord-ing to the needs and to address the issues, but the above men-tioned are the basic types that can be incorporated easily. 2.3.4 Pros and Cons of Interface Algorithms

Several advantages and disadvantages of using different inter-face algorithms are briefly presented in theTable 1 [14, 36]. 2.3.5 Open issues in P-HIL simulation

As with any modeling and simulation work, the accuracy of the virtual surrounding system is limited by the accuracy of the models employed in that system. Second, the restrictions imposed by the real-time simulation requirement may impose additional limitations on the size and level of detail that can be included in the models. Real-time simulators typically employ fixed step solvers with some minimum achievable time-step sizes. This restriction can have implications on the time constants that can be represented, switching frequencies that can be employed for switching power electronics models, and generally on the frequency band over which the models can appropriately represent reality.

Additionally, the amplifiers, actuators, sensors and ADC or DAC cards comprising the P-HIL interfaces introduce time de-lays, distortion, and their own bandwidth limitations which can affect the experiments and, in some cases, lead to instabilities.

Capability limitations in terms of voltage, current, torque, speed, etc. of the amplifiers and actuators also impose further

(51)

Interface Algorithm Pros and Cons

ITM

Pros:

Simple to implement and highly accurate. Cons:

Stability depends on the ratio of source impedance to the load impedance in case of voltage type and on the ratio of load impedance to the source impedance in case of current type.

TFA

Pros:

Approaches modeling of HUT as first order, high bandwidth, Functionality for error correction.

Cons:

Computational complexity due to matrix inversion, Instability due to predictive behavior, Inaccurate due to extreme sensitivity to the sensor noise, it has limitations with non-linear systems and high frequency signals.

TLA

Pros:

highly stable because of it’s based on trapezoidal approximation

Cons:

The algorithm replaces linking

inductor and capacitor with a resistor which accounts of the power

consumption which is not acceptable. Low flexibility and high maintenance cost.

restrictions on the range of experiments that can be conducted. Thus, it is important to consider the limitations of a P-HIL ex-periment, and it is important to properly consider the accuracy of the results in the context of the points noted. Indeed, two of the most important aspects of the analysis of P-HIL experi-ments are assessment of stability and accuracy.

(52)

Interface Algorithm Pros and Cons

PCD

Pros:

Highly stable, it is a promising method to implement for large scale circuits and systems.

Cons:

Value of linking component ratio to source or load impedance affects accuracy. Accuracy is often low due to stability requirements on Zab, poor

convergence limits the applicability of the relaxation technique.

DIM

Pros:

high stability and accuracy when the damping impedance is equal to the load impedance of HUT, this method has the ability to adapt.

Cons:

High fidelity impedance based model of the HUT is required, though it may often not available.

Table 1: Pros and Cons of Interface algorithm

2.3.5.1 Stability issue of P-HIL

the closed-loop system in real-time simulation platform con-sists of DAC converters, power amplifier, HUT, measurement probes, sample-and hold circuit and ADC converters should not exhibit unstable/oscillatory behavior. Stability is a neces-sary criterion for the accuracy of the simulation and for the equipment safety, HUT devices may be damaged when the sys-tem becomes unstable. Hence, appropriate counter measures should be implemented to detect undesired modes of opera-tion and return to a safe state.

One of the main sources of instability in P-HIL simulations is the computation time and data acquisition time of the RTDS system [36]. Even if the time step is very short as small as micro seconds, for certain parameter values of the hardware part to be simulated and the hardware part attached as real HUT device, the P-HIL simulation may become unstable. Additionally, de-pending on the equipment used and its realization, the power amplifier may be far from ideal by introducing additional

(53)

de-lays, exhibiting other dynamic behavior or even distortions due to nonlinearity.

Consider the voltage divider circuit as shown in Figure 23, the load impedance is the physical resistor while the other parts of the circuit are simulated. To facilitate this the voltage ampli-fier produces the simulated voltage V1 as a physical voltage V

0

1

and imposes it on to the actual load resistor.

Figure 23: Interface of Voltage divider circuit for stability studies

The actual current i2 flowing through the resistor is

mea-sured and fed back to the RTDS which incorporates that signal as the actual current flowing inside the simulated circuit.The original circuit is known to be stable but it’s implementation in P-HIL simulation is found instable. Let an error  occurs dur-ing the voltage amplification of V2 at the time instance te, the

corresponding error in i2 is given byEquation 14.

∆V2(te) =  and i2= V2 Zl ∆i2(te) =  Zl (14)

When this current is fed back to simulator it will cause fur-ther error in V1and it is given by Equation 15.

∆V1 = Vs− Zs∗ i1

∆V1(tk+1) = −

Zs

Zl

 (15)

By sending out this updated value of V1 in the new time step,

the previous error is effectively amplified by a factor of −Zs

Riferimenti

Documenti correlati

Definition of the compressive inelastic strain functional to the definition of the compression hardening data (Abaqus Documentation 2012) ... Key cantilever of the Ridracoli dam

Figure 4.14 – Three level configuration: harmonic contents of the line current in discharging phase (I d = -1), from the simulation and from the test bench. The fundamental of the

Therefore, for the each day of the year one can establish precise hours when some volume of the energy should be delivered from the grid/energy system to cover the energy needs of

The paper organizes as follows: as a starting point, we focus on a standard PV system with standard DC/DC converter commanded by an MPPT controller as presented in figure (1)

The proposed multi-criteria analysis performed using the method of analytical network process (ANP) and the calculation program Super Decisions © has proven to be an effective

The effect of the number of shaded cells is obviously clear on the characteristic I - V curve of PV panel, the drop in the current for different shaded cells from the string

Table 1 presents the annual energy gains from the photovoltaic system, the amount of energy that can be used by the household, the amount of energy that will be directed to the

In June, July and August, the demand for energy to drive the cooling unit is higher than the electricity demand for other electrical appliances in the building.. 7 Savings due to