A Review of PHIL Testing for Smart Grids—Selection Guide, Classiﬁcation and Online Database Analysis

: The Smart Grid is one of the most important solutions to boost electricity sharing from renewable energy sources. Its implementation adds new functionalities to power systems, which increases the electric grid complexity. To ensure grid stability and security, systems need ﬂexible methods in order to be tested in a safe and economical way. A promising test technique is Power Hardware-In-the-Loop (PHIL), which combines the ﬂexibility of Hardware-In-the-Loop (HIL) technique with power exchange. However, the acquisition of PHIL components usually represents a great expense for laboratories and, therefore, the setting up of the experiment involves making hard decisions. This paper provides a complete guideline and useful new tools for laboratories in order to set PHIL facilities up efﬁciently. First, a PHIL system selection guide is presented, which describes the selection process steps and the main system characteristics needed to perform a PHIL test. Furthermore, a classiﬁcation proposal containing the desirable information to be obtained from a PHIL test paper for reproducibility purposes is given. Finally, this classiﬁcation was used to develop a PHIL test online database, which was analysed, and the main gathered information with some use cases and conclusions are shown.


Introduction
In recent years, Smart Grids have been connected to the electric grid widely, increasing the number and diversity of the systems installed in the electric grid [1]. Smart Grid devices have to communicate and operate among themselves. Therefore, they need to be able to take their own decisions, in order to efficiently deliver sustainable, economical and secure electricity supplies [2]. As a consequence of this increase in complexity [3][4][5], the future power system modelling, analysis and design meet new challenges. To ensure the proper operation of these new technologies, achieving renewable electric grid integration and guaranteeing a sustainable and secure electricity supply, research in affordable test systems is needed [6][7][8][9]. Figure 1 compares all available test system methods for Smart Grid applications in terms of fidelity, coverage and cost. Simulation tests allow a wide test coverage at a low cost, but the test fidelity is compromised by the accuracy between the model and the real system.
Controller Hardware-in-the-Loop (CHIL) systems use a Digital Real-Time Simulator (DRTS) and physical interface [10,11]. They allow the running of models in order to test the device's hardware and software. Therefore, CHIL tests have slightly less test coverage than software simulation due to the real-time limitation, but improve the test fidelity feature.  [12]): simulation, CHIL, PHIL, power test bed and full system. Figure 2 shows a typical PHIL configuration. The DRTS holds a mathematical model of the simulated system executed in real-time, sending at every time-step the output set-point to the PA (so-called power interface). This PA changes the set-point information received into real voltage or current, and the HUT reacts to its new value. This reaction is measured by the PA and by the DRTS sensors, adding it to the mathematical model to calculate the next step. HUT type?

Minimum bandwidth(*)
Type of test?   There are some mandatory characteristics to be considered before starting the PHIL system selection guideline. EMC regulation compliance is mandatory to avoid problems with the rest of the laboratory equipment. In addition, the research facility could already have a DRTS or a PA, so future acquisitions have to be compatible with these devices. Moreover, the maximum power of the PA may not be more than the maximum power of the facility. Finally, the laboratory budget (cost) narrows the possible elements list down to complete the test bed.
After the binding aspects, the HUT type to be tested is the best starting point to select the PHIL test bed. The HUT application and characteristics will define the required PA features. Below, the most important characteristics are pointed out, whose value is usually provided by the manufacturer datasheet.

•
The range of voltage, current and power that the PA has to deliver to test HUT at nominal behaviour.

•
The operation quadrants, depending on the apparent HUT nominal power.
• The minimum bandwidth, e.g., Amitkumar et al. [17] suggested that the PA needs to have five times more bandwidth than the test inverter's current loop for an accurate emulation.
Furthermore, the HUT type establishes the types of tests to be done, which define some important features of PHIL systems. The development time to carry out a test is an important feature to take into account too. In addition, the DRTS plays an important role in speeding up the experiments. DRTS features, such as a user-friendly interface, libraries with verified models of the elements to be simulated and application examples provided by the manufacturer or found in the literature, could help in this purpose. Finally, the versatility of DRTS and PA can economise the time to perform the experiment.
As can be seen in Table 1, the PA choice is a trade-off between performance and efficiency. For this reason, depending on the required accuracy and the total consumed energy during experiments, laboratories could decide between the two main PA families: linear amplifier and switched mode amplifier. Table 1. Advantages and disadvantages of different types of power amplifiers [18,19].

Advantages Disadvantages
Switched amplifier · Less expensive · Highest efficiency · Great flexibility (can operate both as current and voltage amplifier) · Smallest size · Lowest operating temperature · Low-power factor handling · High delay and lower accuracy than linear amplifier

Linear amplifier
· Very high dynamic performance (0-5 kHz bandwidth or more) · Short time delay · Easy transfer function with fewer stability issues · Highest crest-factor · Highest start-up surge current · Very low power efficiency · Low power output (as a consequence of the first one) · Biggest size Synchronous generator amplifier · High power output · Only for testing where balanced three phase power is required · Higher level of time delay and the lowest accuracy Accuracy, stability and security of PHIL tests are strongly related. Increasing accuracy also increases test stability and vice-versa, which boosts the overall security. An important study for PHIL accuracy evaluation can be found in [20,21].
Before performing the test, laboratories have to know the highest frequency in the model that has to be closed-loop controlled, which will define what the simulated model bandwidth is [16]. For example, to simulate the electric grid transient, a maximum frequency of 2 kHz is usually taken [22]. More examples can be found in [16,[23][24][25] where the time-step requirements of the most typical real-time tests are described.
To ensure that the PHIL test bench can achieve the desired frequency, it is proposed to follow the procedure detailed in [16], which provides the model cycle time, the PA bandwidth and the maximum open delay depending the closed-loop controlled model frequency. The authors set forth that, to have a stable experiment in closed-loop, the total open-loop phase shift at the desired frequency has to be less than −75 • . This open-loop phase shift is the sum of the maximum open delay (Dt X ) of each subsystem in the direct chain PHIL control and the PA transfer function, which is shown in Figure 4. The phase margin at the desired frequency guarantees stability, using a regulator with a pole located at the origin.
The maximum delay between "Core Output" and "Core Input" to ensure an open-loop phase shift less than −45 • has to be: The open-loop phase shift at the PA frequency bandwidth is −45 • . To obtain, at the most, an open-loop phase shift of −30 • , the minimum bandwidth of the PA has to be at least 1.5 times wider than the highest frequency of the model to be simulated: • Model cycle time: The maximum time-step that the simulator has to achieve depends on the highest dynamic or frequency bandwidth of the simulated model. To generate this highest frequency, Lemaire et al. [16] determined that the minimum time step must be at least 25 times less than the inverse of the desired frequency: Figure 5 describes graphically Equations (2)-(4) and shows an example of the characteristics needed to test an electric grid transient, whose maximum frequency of interest is 2 kHz. In this case, the minimum bandwidth of the PA is 3 kHz, the time step has to be less than 20 µs and the maximum open-loop delay less than 60 µs.

PABWf(3dB) > 3 kHz Time StepSimulation < 20µs
Dtopen_loop < 60µs Figure 5. PHIL system requirements depending the bandwidth of the model to test [16]. In this case, an example of an electric grid transient test is given, for which the maximum frequency of interest is 2 kHz.
Finally, when the elements selection is focused on only two or three systems from the entire spectrum, a deeper comparison considering the main system characteristics is advisable. For example, parameters such as the resolution of the ADC-DAC, types of communications, number of inputs/outputs, compatibility with other simulation systems, etc. could be used for this comparison. To compare different PA systems, parameters such as the voltage and/or current bandwidth, slew rate, efficiency, current and voltage THD, etc. would be the factors that tip the balance. The decision between the different kind of sensors is usually more simple as it is a more mature technology.

Information Classification for Reusability Purposes
Reproducibility is essential in scientific reports, saving laboratories both time and effort. According to Vandewalle et al. [26]: "A research work is called reproducible if all information relevant to the work, including, but not limited to, text, data and code, is made available, such that an independent researcher can reproduce the results". It is understood that sometimes it is not possible to show all the PHIL test information because there are conflicts of interest. Furthermore, in the case of PHIL testing, often it is not possible to repeat exactly the same experiments, due to the difficulty of replicating all the boundary conditions. Therefore, regarding the use-case complexity, Vandewalle et al. [26] recommended the reusability of experiments rather than reproducibility.
Therefore, it is crucial to identify the correct information from a scientific report, in order to be able to provide the reusability of the PHIL test. Although the information organisation could be done in several ways, the same or equivalent information should be considered. In the following, the possible classification of the desirable information to be obtained from a PHIL test paper is outlined with the aim of reusing the test data. The information is organised into nine groups according to our criteria and experience. Each group has its own particularities, and here the most important ones are shown. In addition to the technical data, more subjective information is proposed in order to give a complete understanding of the described experiments.

PHIL Tests Database Analysis
PHIL reviews found in the literature [9,23,[27][28][29][30][31][32] mainly focus on technical aspects which help to improve the overall PHIL performance. However, current state-of-the-art reviews do not provide enough information to help laboratories choose the PHIL systems efficiently, and to facilitate the reusability of PHIL tests. To give a tool for laboratories to move towards the desired objectives, an online database about the state-of-the-art PHIL tests was created. For its development, the information classification of the previous section was used as a guide. To the authors' best knowledge, no similar PHIL tests database review has been published yet in the literature with this level of scope and detail. Table 2 shows the different tables of the database in every column and their fields. More detailed information about the online database can be found in [33].
To obtain the most important and used systems and techniques of the PHIL tests developed in the literature, an analysis of the online database information is described below. Moreover, complementary material about these systems and techniques, which are not included in the database, are shown.

Digital Real Time Simulator
The current state of the technologies used in the real-time simulation industry for power system application is shown in [23]. The complete table, with a summary of salient features and options of the most commonly used real-time digital simulators in both industry and academia, is remarkable. All of these DRTSs can be used for both HIL and PHIL.
In the online database, only four DRTSs are used to perform all the included PHIL experiments. These DRTSs and the published papers where they were used are listed below: There are also more commercial DRTSs which could be used for HIL and PHIL tests [23]. However, since PHIL is a recent technique, examples of all of them have not been found. For this reason, they have not been included in the database.
Furthermore, in the literature, some examples of ad-hoc real-time simulators can be found. These ad-hoc systems often run commercial simulation software and are used to perform HIL, but references to PHIL tests have not found for all of them. Therefore, they have not been included in the database. However, they could be an option for PHIL tests, thus a list of these ad-hoc DRTSs, depending on their hardware system and the reference which describes them, are shown below:

Hardware under Test (HUT)
HUT is the most used abbreviation to designate the system to be tested. Besides, it can be called Device Under Test (DUT) [30,35,37,53,95,96] or Equipment Under Test (EUT) [97,98]. This element, together with the kind of test to be done and its objective, define the main characteristics to be considered in the PHIL test bench.
One of the most important online database uses is to search for the desired HUT to be tested and to know what the main element choices of the scientific community are, checking their main problems and results. As an example, Table 3 shows a database sample classified by HUT groups, denoting the type of IA used, the simulated system in the DRTS and its time step, the maximum power reached by the PA and the objective of the test.

Power Amplifier
Three different types of PA are compared in [19], and their main characteristics classification are shown in Table 1. In the case of switched amplifiers, which are non-linear interface converters, it can be useful to know what considerations have been made by the authors in every test about the accuracy and stability of PHIL [99]. To give to the reader an overview of the most important PA included in the online database, the main PA manufacturers and the published papers where they were used are listed below: • Linear Amplifier: Furthermore, several research papers of new types of PA for PHIL purposes can be found in [96,98,[109][110][111][112][113]. Usually, these new systems are switched amplifier instead of linear amplifier, due to the fact that it is a more efficient technology and the specific and density power is clearly higher. These PAs have not been included in the database, but it is expected that this technology will be the new generation of PA in the future.

Interface Algorithm
In [31], a review of IA with references to several discussions about their relative strengths and weaknesses is described. Furthermore, another review is done in [114], where the stable area of the main IAs is calculated. The online database shows that the most used IAs are the Ideal Transformer Model (ITM) and the Damping Impedance Method (DIM). The first one is used because of its accuracy and ease of implementation, but it could have some stability problems. The second one is increasingly used because, if the HUT impedance is estimated accurately, this IA achieves very good stability and accuracy on the simulation side [115].

Communication
The online database shows that the main type of communication used between the DRTS and PA is an analogue voltage signal of ±10 V. The advantage compared with a digital one is the interoperability between systems of different manufacturers. Nevertheless, it is more vulnerable to electromagnetic noise, which could reduce the total accuracy of the PHIL test.
There are few examples of digital communication and some efforts are being made by manufacturers. In [116], a serial communication between the DRTS and the PA has been used. Other communication protocols such as EtherCAT or ORION have been implemented in [34], which can be used to communicate with PA such as those in [106,107].

Smart Grid PHIL System Sizing
To give an example of the possibilities offered by the previous classification, a use case for the selection of PHIL systems for Smart Grid tests using the online database is presented below. The needed PHIL test bed targets and characteristics of the use case example are: To achieve this purpose, the online database could show the solutions that other laboratories have developed for a similar objective. After downloading the database and entering as a guest in the login page shown, the access to "Table Reports" in the "Check Information" group shows the literature PHIL database experiments. A table filtering process using the fields "Simulated Systems", "Test Power" and " Step Time" gives the result shown in Table 4. The laboratory could get the following valuable information from this table: 1. There are two main DRTS companies that the scientific community uses to simulate an electric grid with a high number of nodes in real-time. It seems that there are not so many options in the market to simulate this kind of complex electric grid in real-time. 2. There are no tests in which a time step below 50 µs to simulate an electric grid in real-time is used. Therefore, if the test bed target changes and the model bandwidth increases, undesirable problems could appear. 3. The main interests of the laboratories are to know how the PV inverters and storage systems will behave in each electric grid. The test of another kind of grid side power electronics system will need a more detailed study. A less restrictive database filtering process, with the purpose of obtaining more results, could help to find more information. 4. Both linear and switched amplifiers are used. Consequently, the used PA topology will depend on other factors such as price. 5. More than half of the reports searched for were published during the last year. It shows that the state of the art is up-to-date and, therefore, the conclusions are more reliable.
After this quick process, the Smart Grid laboratories could have an overview of the main systems and the possibilities of developing their PHIL test bed. More database fields, which are not shown in Table 4 for readability reasons, could help in the selection process, such as the algorithm, results or conclusions.

Conclusions
The Smart Grid is increasing the electric grid complexity and, therefore, flexible test system methods are needed to ensure its stability and security. An emerging test technique is Power Hardware-In-the-Loop (PHIL), which will play a major role in the development of the Smart Grid. To help laboratories set PHIL facilities up, this paper presents a schematic diagram selection guideline depending on the type of HUT and test. This scheme shows that the manufacturer data are needed as much as the state-of-the-art information to select the proper systems. However, not all the scientific reports about PHIL tests contain the information needed for the system selection, and, therefore, for its reproducibility. Consequently, a classification proposal of the desirable information that should be extracted from a PHIL test paper to guarantee the reproducibility of the experiments is suggested. This could help in the reusability of the test data and in the improvement of the PHIL state of the art. This classification has been organised into nine groups, based on our criterion and experience. It contains technical aspects, as well as more subjective information, which could aid in the full test comprehension.
To give a tool to laboratories for PHIL system selection and for PHIL test data reusability, a PHIL review online database is presented. This database was analysed to obtain the most valuable and general information for researchers and laboratories. The feasibility of this tool was checked showing a use case oriented towards Smart Grid application. Several results were drawn from this use case. First, there are only a few options on the market to simulate in real-time complex electric grids in real-time with a time-step of 50 µs. Another point is that the main interest of the laboratories is to test the behaviour of PV inverters and storage systems. Moreover, both linear and switched amplifiers are used to test the same HUT. Finally, PHIL tests have become more used in recent years. Furthermore, in the database, more than 90% of the PHIL tests are voltage-type, mainly due to the fact that the majority of the HUTs are current sources.
It is expected that this online database will be a useful tool which helps and boosts the improvement of the Smart Grid.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: