# Accelerated Real-Time Simulations for Testing a Reactive Power Flow Controller in Long-Term Case Studies

Authors: Katja H. Sirviö; Mike Mekkanen; Kimmo Kauhaniemi; Hannu Laaksonen; Ari Salo; Felipe Castro; Davood Babazadeh
Journal: Journal of Electrical and Computer Engineering
 (2020)

---

## Abstract

This paper presents the development of an accelerated real-time cosimulation and testing platform, especially for long-term simulations of power systems. The platform is planned to be utilized in the development and testing of active network management functions for microgrids and smart grids. Long-term simulations are needed in order to study, for example, the potential weekly, monthly, or yearly usage of distribution-network-connected distributed energy resources for different technical flexibility services. In order to test new algorithms in long-term study cases, real-time simulations or hardware-in-the-loop tests should be accelerated. This paper analyzes the possibilities and challenges of accelerated long-term simulations in studying the potential use of a large-scale wind turbine for reactive power flow control between distribution system operator (DSO) and transmission system operator (TSO) networks. To this end, the reactive power flow control is studied for different voltage levels (HV and MV) in the Sundom Smart Grid in Vaasa, Finland. The control of reactive power flow between HV and MV networks is realized with a reactive power window control algorithm for a 3.6 MW MV-network-connected wind turbine with a full-scale power converter. The behaviour of the reactive power controller during long-term simulations is studied by offline and real-time simulations. Moreover, the real-time simulations are performed with both software-in-the-loop and controller-hardware-in-the-loop.


---

## Body

## 1. Introduction

Utilization of the distribution-network-connected distributed energy resources (DER), that is, flexibilities, is becoming increasingly important for improving local and system-wide grid resiliency and for providing the technical flexibility services needed by DSOs and TSOs. Flexibilities consist of active (P) and reactive (Q) power control of flexible resources, such as controllable distributed generation (DG) units, energy storages (ESs), controllable loads, and electric vehicles (EVs), which are connected in DSO grids. The flexibility services from DER for DSOs and TSOs can, for example, be realized as part of active network management (ANM) functions for grid-connected microgrids.Currently, the standards for microgrids, especially IEEE and IEC, for control and management are under development, and only a few standards for microgrids have been published so far [1–10]. However, for the development of microgrid control and management functions, different simulation studies and tests have been performed [11, 12]. Different kinds of vendor-defined microgrid controllers have already been developed and tested [13], but there is a lack of standardized tests for microgrid control [14]. One of the challenges with vendor-defined solutions is that they might not meet interoperability and grid-code requirements. Figure 1 presents the traditional impact of standardization on product development, illustrating the product’s lifetime cycle and standardization phases [15]. Because of the phase of the standardization, it can be concluded that microgrid controllers are in the stage of “need for product standards to resolve issues.” Despite this standardization situation, the different solutions for microgrid management are becoming increasingly global.Figure 1
Product sales and standards cycle [15].However, the software upgradability of new products becomes more important as requirements (e.g., grid codes and standards) change. Standardization takes more time as products and solutions become more complex, while at the same time, technology development goes faster, and the need for new solutions becomes faster. Start-ups in particular will probably not wait for the final standards. Therefore, many standards could be obsolete when they are released and require an immediate upgrade process.The standardization of microgrid control systems is intended to define the requirements for microgrids “regardless of topology, configuration or jurisdiction and to present the control approaches required from the distribution system operator and the microgrid operator” [1]. The IEEE Standard 2030.7 defines the functions that a microgrid control system must perform, and the IEEE Standard 2030.8 presents the testing procedures for adopting the functional specification of microgrid control systems. According to [1], a microgrid control system is defined as “a system that includes the control functions that define the microgrid as a system that can manage itself, operate autonomously, and connect to and disconnect from the main distribution grid for the exchange of power and the supply of ancillary services; it includes the functions of the Microgrid Energy Management System (MEMS); it is the microgrid controller if implemented in the form of a centralized system” [1, 2].One requirement for microgrid controller functions is to provide flexibility services like ancillary services (AS) [1], which can be realized with a technical or market-based approach. Technical AS are related to, for example, the control of reactive power (Q) flow between the DSO’s and the TSO’s networks. The testing approach of microgrid controllers should include definitions for the test scenarios, the performance metrics, and the testing environment, which can range from a fully simulated environment to real equipment installed in the field [2, 16]. Figure 2 presents the coverage and fidelity of the different testing methods [17, 18]. Pure simulation is utilized in the research stage and in a very early stage of product development. In controller-hardware-in-the-loop (CHIL) simulations, the controller is a real device, but everything else is simulated. In power-hardware-in-the-loop (PHIL) simulations, there are real power devices (e.g., photovoltaic units, loads, and storage) in addition to the controller.Figure 2
The coverage and fidelity of the different testing methods. Adapted from [17].Consequently, it is essential to build comprehensive test platforms for microgrid controllers that can perform the CHIL and PHIL simulations and the tests for different types of required functionalities [1, 2] to verify the proper operation of the functions of the developed microgrid controller. Besides, the test platform should be flexible so that it can serve different kinds of microgrids [4] with the purpose of(i)
Improving electricity supply reliability and network resilience by intentional islanding(ii)
Providing power to remote areas with lower cost(iii)
Reducing the energy cost for microgrid users in grid-connected mode(iv)
Providing preparedness for disastersIn HIL simulations, the Hardware under Test (HuT) is connected to the simulated system running in the real-time simulator or target. The real connection has delays and affects the stability of the system that has to be respected. In CHIL simulations, the delay consists of the target input/output processing and communication time delay/latency as well as processing time of the controller [19]. The effect of the delay should be taken into account when tuning controller control parameters. Further, in PHIL simulations, the error is caused by delays and distortion introduced by the power interface. Moreover, the power amplifier between the power hardware and the target (the real-time simulator) may cause the system to be unstable. Therefore, it is essential to develop an interfacing algorithm between the target (simulated system) and the HuT. In addition to the previous ones, the utilized sample time of the real-time simulation has a major impact on the stability behaviour. [18, 20].Based on the literature review on selected CHIL testbeds [21–24] and PHIL testbeds [25] suitable for microgrids, transition and dispatch function in power balance management and ancillary services are of great interest. The focus of [21–24] is on implementing control algorithms on hardware and stability issues. Long-term case studies in simulations are lacking. The authors in [22] present the results of a software controller for dynamic power-sharing with three PV units in islanded microgrid operation in which the PV generation profiles are represented in one-day historical data. The time scale was compressed into 14 min in real-time simulations, but analysis of the method and the effect of delays are not presented. New kinds of algorithms, computational techniques, or models could be developed for accelerating long-term simulations.The focus in this paper is on developing an accelerated real-time cosimulation and a testing platform and setup, especially for long-term simulations. Furthermore, the aim is to test controller behaviour in the accelerated real-time simulations, in which the feasibility of the platform is evaluated. This kind of platform is novel; we did not come across any similar solution in the literature. The platform is planned to be utilized for the development and testing of microgrid controller ANM functions for microgrids in the grid-connected mode, particularly for long-term case studies. The long-term simulations are needed in order to study, for example, the potential weekly, monthly, or yearly usage and operation of distribution-network-connected DER for different technical flexibility services. The simulation setup developed consists of the real measurement data from the Sundom Smart Grid (SSG), a simulated power grid, communications, control functions, and a controller.In the next section,Sundom Smart Grid (SSG), the SSG, and the different requirements for the reactive power flow are presented. After that, the section “The Real-Time Cosimulation Platform” presents the developed real-time cosimulation platform. The different simulations, executed tests, and experiments with the developed platform are presented in the section “Executed Tests and Experiments.” The final section is “Conclusions and Discussion.”


## 2. Sundom Smart Grid (SSG)

Figure3 presents the SSG, which is a pilot of a local MV-network-based smart grid created in cooperation with ABB, Vaasan Sähköverkko (DSO), Elisa (communications), and the University of Vaasa [27]. The SSG enables the development of AS solutions for future grids beyond the traditional boundaries from the HV level to the LV level. In the SSG, there are four MV feeders, and one feeder (J08) is only for the wind turbine (WT). Real-time IEC 61850 generic object-oriented substation event (GOOSE) measurements and sampled value (SV) measurements are gathered online from all the four feeders at the HV/MV substation, as well as from three MV/LV substations with 20 measurement points. For future research purposes, the measurement data are collected in servers.Figure 3
Sundom Smart Grid [26].The different requirements for the reactive power flow between the MV and HV networks in the SSG studied, with several requirements and targets, are presented in [28]. In Europe, the European Network of Transmission System Operators for Electricity (ENTSO-E) sets grid-code requirements, for example, for connection of demand facilities and generators [29, 30]. Moreover, the national TSO has set requirements for the DSO’s reactive power flow by a “reactive power window” [31] at the point of interconnection (POI), that is, between the TSO and DSO networks. The reactive power window (RPW) specifies the amount of reactive power that can be exported to the HV network and imported from the HV network without separate compensation. This RPW requirement and related compensation tariff aim to optimize the reactive power flow from the transmission network’s point of view. In addition, reliable and future-proof islanding detection, as well as the possibility of making a stable transition to islanded operation, can be considered simultaneously with the reactive power flow control between HV and MV networks [26, 32–34].Based on the results presented in [35], there would be an 80 k€ yearly cost for the DSO, caused by the capacitive reactive power flow generated by the cables in the SSG. In [36], the use cases and future scenarios for reactive power management are developed further to study and develop the RPW controller. The scenarios studied are Scenario 2018, Scenario 2028, and Scenario 2035.


## 3. The Real-Time Cosimulation Platform

The utilized real-time simulation platform is based on an OPAL-RT system consisting of power system simulations with ePHASORSIM (transient stability, phasor mode), as well as control and communications with eMEGASIM (electromagnetic transients, discrete type). Communication between the controller and the interfaces of the simulated power system is implemented with IEC 61850 GOOSE messages on Ethernet. Figure4 presents an outline of the platform.Figure 4
The real-time cosimulation platform [36].In previous researches [19, 36] for software-in-the-loop (SIL) simulations, a GOOSE publisher block is implemented in the real-time simulation model to publish (send) the measured active power (Pmeas) and the measured reactive power (Qmeas) from the target (OP5600 simulator). Furthermore, a GOOSE subscriber block is implemented to subscribe (receive) the Pmeas and Qmeas values from the Ethernet network. For the CHIL tests, a GOOSE subscriber and publisher are implemented in the hardware under testing, in addition to the RPW control algorithm. The implementation process is presented in [19], in which the simulation time step (Ts) is 0.01 s for the real-time SIL and CHIL simulations. The results gathered by the real-time target are the hourly average active and reactive powers (PHVavg and QHVavg), the instantaneous active and reactive powers (PHV and QHV), the active and reactive powers from WT (PWT and QWT), and the bus voltages. The CHIL tests are performed for the BeagleBone Black (BBB) as well as for the field-programmable gate array (FPGA) controllers. The IEC 61850 GOOSE message packets traveling over the network are captured by Wireshark software (.pcap files) from the traffic between the controller and the target. The results in [19] show that FPGA controllers are more efficient for future microgrid controller studies.


## 4. Executed Tests and Experiments

In this research, the parameters for reliably performing the accelerated real-time simulations are defined and analyzed by testing the improved RPW control algorithm [36]. The offline SIL, real-time SIL, and CHIL tests are performed with the parameters defined in the platform developed in [19] in order to determine how the real-time simulations could be accelerated, what kind of phenomena can occur, and when the results are reliable. The results from the real-time SIL and CHIL tests should correspond to the offline SIL results when there are no communication and hardware processor delays.In this study, the simulations are performed with the controller limits set according to Figure5. The limits for the controlled values are set ± 50 kVAr tighter, except QD1 = Qi + 200 kVAr for the controller of the WT converter. In other words, the controller operation (a trigger for calculating a setpoint value for the WT converter) limits are the TSO limits (the red limits), but the setup limits for the WT converter are set tighter (the blue limits).Figure 5
The setup for the controller limits.The offline SIL simulations, as well as the real-time SIL and CHIL tests, are presented below. In order to run long-term power flow simulations, for a one-year period, in this case, the simulations are accelerated by implementing the input-data-reading step from the OpFromFile block. This block reads from a Matlab file (.mat) and outputs the samples from the file. Further, the time factor, coefficientTd, for reading a data row from the input data (in this case, the hourly average values over one year from the SSG) or the look-up table is set so as to correspond to the reading step of the one-hour input data. The aim of this study is to test different values for Td to find a value that does not distort the results, that is, answering the question of how much the real-time simulations can be accelerated. For the one-year simulation, the hourly average values of the one-year measurements as input data generate 8760 rows of data, and the coefficient Td is set accordingly to find the initial range for which the results are reliable.Generally, the use of accelerated simulation would mean the modification of the models so that their behaviour in the accelerated time scale is equivalent to the behaviour in real-time scale. This means that the modified model is dimensionally similar. In this study, this kind of approach would have meant overly complicated modifications to the models, so another approach was used. Instead, the original time-scale-based models were used with a suitable selection of the simulation time steps so that the desired outcome was reached.The cosimulation platform and the concept are presented in more detail in Figure6. Different simulation time steps are also shown in Figure 6, where Ts = 0.01 s represents the simulation time step both for the simulated power system in ePHASORSIM and for the measurements, PI/I control, and so forth in eMEGASIM. Further, Td represents the time step for the reading cycle of the input data (PQload and PQgeneration). Tc represents the time step for reactive power setpoint (Qset) value calculation in the RPW controller.Figure 6
The emulated system and the RPW controller.The involved time steps and the limiting factors of the system are the following:(1)
Simulation time stepTs is the same for the SIL (Ts,m) and CHIL (Ts,p) setups: Ts,m=Ts,p=Ts=0.01s.(2)
Data reading cycleTd is the same for the SIL (Td,m) and CHIL (Td,p) setups.The input data reading cycle has to be defined so that it enables maximum acceleration of the simulated system, while the results are not disrupted. The results can be proved with the equivalent results from offline SIL and real-time SIL as well as from the CHIL tests. In addition, the input data reading cycle based on the (measurement) data type has to be selected for real-time tests, so that reasonable computation times are achieved.(3)
RPW controller operating time stepTc in the SIL (Tc,m) and CHIL (Tc,p) setups.Tc,m for SIL controller can be selected as Tc,m=n∗Ts, where n is an integer. Controller operating time step Tc,p for CHIL controller depends on the processor of the hardware; FPGA has Dual-Core ARM Cortex™ A9 (925 MHz) processor, whereas the BBB has AM335 × 1 GHz ARM® Cortex-A8.Both of these hardware controllers were fast enough, not limiting the accelerated CHIL tests in this case. Within one simulation time step,Ts, they were able to receive P_HV and Q_HV values, process the new setpoint value Qset, and send it back to real-time simulator.(4)
I or PI controller operating time step: the I or PI controller operation depends on the defined sampling time for it. In this study, the sampling time is the same as the simulation time stepTs.(5)
Acceleration.In this case, an input data (De) row represents the one-hour average value of active power, and the output values thus represent hourly averages. The data type could also be, for example, 10 min average (D10min) or 5 min average (D10min) keeping in mind that acceleration:(1)A=DeTd.The electricity network model is running in real time withTs = 0.01 s, which is selected so that the transient phenomena have time to decay, and the system has reached steady state before new input data is read with time steps Td of 0.1 s or more.Table1 presents the coefficients and the effects of their values. For example, in Option 1, selecting Td = 0.1 means that a one-year accelerated real-time simulation will take 876 s (around 15 min) with one-hour average input data. Further, the simulation time step Ts = 0.01 s is equivalent to 360 s in real-world time, which means that the power flow of the system is known in intervals of 360 s. Option 29 (Td = 20) presents the setup in which the power flow would be calculated every 1.8 s (representation of the real-world time). In this case, the accelerated real-time simulation would take 49 hours. The time step for the RPW controller action, Tc, could be selected in SIL, which is also presented. The selection of Tc mimics how often the RPW controller can calculate a new setpoint if desired, and Ts determines when the potential new setpoint value comes into effect for the WT converter. In the following sections, the evaluation of the suitable initial coefficients for accelerated real-time simulations is presented with the results from the offline simulations.Table 1
Coefficients for accelerated real-time simulations.
OptionTd (s)Input data row equivalency in real-world timeDe (s)Input data row equivalency in real-world timeDe (min)Acceleration a (i.e.,∗ times faster)Number of data rowsnOne-year accelerated real-time simulation timeAs (s)Controller time stepTc (s)Tc/QWTset equivalency: time rep. in real-world time (s)Simulation time stepTs (s)Ts equivalency: time rep. in real-world time (s)10,1360060360008760876» 15 min0,013600,0136020,1600106000525605256» 9 h0,01600,016030,13005300010512010512» 35 h0,01300,013040,1360060360008760876» 15 min0,136000,0136050,1360060360008760876» 15 min1360000,0136061360060360087608760» 2,5 h0,01360,013671600106005256052560» 88 h0,0160,016813005300105120105120» 350 h0,0130,01394360060900876035040» 10 h0,0190,0191046001015052560210240» 350 h0,011,50,011,5114300575105120420480» 1400 h0,010,750,010,75124360060900876035040» 10 h0,1900,019134360060900876035040» 10 h19000,019145360060720876043800» 12 h0,017,20,017,21556001012052560262800» 438 h0,011,20,011,2165300560105120525600» 1752 h0,010,60,010,6175360060720876043800» 12 h0,1720,017,2185360060720876043800» 12 h17200,017,2197360060514876061320» 17 h0,015,10,015,1207600108652560367920» 613 h0,010,90,010,9217300543105120735840» 2453 h0,010,40,010,4227360060514876061320» 17 h0,151,40,015,1237360060514876061320» 17 h1514,30,015,12410360060360876087600» 24,5 h0,013,60,013,62510600106052560525600» 876 h0,010,60,010,626103005301051201051200» 3504 h0,010,30,010,32710360060360876087600» 24,5 h0,1360,013,62810360060360876087600» 24,5 h13600,013,629203600601808760175200» 49 h0,011,80,011,83040360060908760350400» 97 h0,010,90,010,93180360060458760700800» 195 h0,010,450,010,45The total number of data rows is 8760, with a data-row equivalency in real-world time of 3600 s.1 equivalency: time representation in real-world time.


### 4.1. Offline SIL Tests

Several offline SIL tests are performed to define the initial coefficientTd for the accelerated real-time simulations. The comparisons of the results between Option 1 and Option 6 (Td = 0.1 and Td = 1), as well as between Option 6 and Option 24 (Td = 1 and Td = 10), are presented in Figure 7. It can be seen that there is a difference between both comparisons due to the different Td values, which means that the smaller values (0.1 and 1) are not suitable. For the next trial, the comparisons of the results between Option 14 and Option 24 (Td = 5 and Td = 10), as well as between Option 9 and Option 14 (Td = 4 and Td = 5), are made, and it can be observed that no difference exists between the results. The latter result indicates that a suitable initial Td coefficient is ≥ 4.Figure 7
Results of the offline SIL simulations. Comparison of the reactive power of the WT converter whenTd = 0.1 or 1, Td = 1 or 10, Td = 5 or 10, and Td = 4 or 5.
(a)(b)(c)(d)By examining the results more closely, one can see that a difference in results emerges around 4000 h and later. Figure8 shows that time point in more detail with different Td values. When Td is 0.1 or 1 and even when Td is 5 or 10, QWT was “oscillating” in the time period between 4031 h and 4032 h. The oscillation form, that is, the amplitude of the oscillation, is increasing, which illustrates that the system is in an unstable region during that hour. Further, when Td is smaller, the value of QWT after this oscillating hour is different. When Td = 0.1, QWT = −0.2213 MVAr, and when Td = 1, QWT = -0.2305 MVAr. These observations explain the difference in downstream results (after 4032 h). When Td is 5 or 10, the oscillation also occurs, but now the resulting QWT is the same (−0.3103 MVAr).Figure 8
Results of the offline SIL simulations. Reactive power of the WT converter when Td was 1, 0.1, 5, or 10. The possible “oscillation” moment.
(a)(b)(c)(d)This oscillation phenomenon is presented more closely in Figure9. At t = 403100, the point (QHV, PHV) is inside the window (0.7982 MVAr, 4.9824 MW), consuming active and reactive power, while the reactive power of the WT converter is capacitive, QWTset = QWTmeas = −0.1869 MVAr. In the next time step, t = 403101, the “measured” point (QHV, PHV) is outside the window (QHV = 0.9620 MVArind., PHV = 5.399 MW) (the limit is QD = 0.83 MVAr) when QWTmeas = −0.1869 MVAr. Then, a new setpoint of the WT converter is calculated, QWTset (t = 403101) = −0.1820 MVAr, which is realized by the control at the next time step, t = 403102. However, at that moment, QWTset is not high enough, and (QHV, PHV) is outside the window (0.9994 MVAr, 5.4718 MW) again, while QWTmeas (t = 403102) = QWTset (t = 403101) = −0.1820 MVAr. This phenomenon occurs over a period of time, depending on the selected Td.Figure 9
Oscillation investigation whenTd = 1.After all, a new setpoint aims to influence the reactive powerQHV by correcting the output of the WT converter so that the next (QHV, PHV) point will be inside the window. However, according to Figure 10, the RPW control is lagging a simulation step; that is, the new setpoint is calculated based on the last measurement of (QHV (ti−1), PHV (ti−1)). At this specific time, there is a possibility of having oscillations in the controlled system due to the delay of the control. This delay is dependent on two aspects: the selection of Td as well as the delay of the I or PI controller. The I or PI controller was used to prevent algebraic loops in the modelled system.Figure 10
Flow chart of the RPW controller.Above we stated that the total oscillation time is dependent onTd. The effect of Td selection on the oscillation time is studied further in order to find a relationship. Figure 11 presents the results of the oscillation time in simulations with different values of Td. Increasing the value of Td seems to decrease the total oscillation time τTd,i. In addition, two other results are presented, one with an I controller and one with a PI controller. In both cases, TI = 99.5 and Tc = 0.01 are used for the I controller. For comparison, a PI controller with KP = 1.2 and TI = 99.5, as well as Tc = 0.02, is investigated. The results are presented in Table 2. Based on both these results, with a suitable initial value (in this case, Td ≥ 4), it can be derived that the total oscillation time decreases linearly in the ratio(2)τTd,i=1Td,iτ.Figure 11
Duration of oscillation.Table 2
Oscillation duration.
TdOscillation duration [s]: caseTc = 0.01, I = 99.5Oscillation duration [s]: caseTc = 0.02, P = 1.2, I = 99.50,136001370852822,486,4101414,839,62070219,8403429,9∗50282,88860236,480166,54,95∗16083,25∗2,475∗32041,625∗1,2375∗64020,8125∗0,61875∗128010,40625∗0,309375∗25605,203125∗0,1546875∗51202,6015625∗0,07734375∗87601,30078125∗0,038671875∗∗Calculated values.Based on equation (2), the oscillation time in real-world time would be 1.3 s in the I-controller case and 3 ms in the PI-controller case.The above oscillation phenomenon occurs in accelerated simulations. However, it was found that the duration of the oscillation decreases whenTd increases or becomes closer to real time. The evaluation of how the P and I parameters depend on the accelerated real-time simulation could be a future research topic.


### 4.2. Real-Time SIL Tests

The first real-time SIL tests are performed withTd = 0.1 and Td = 1. The results are presented in Figure 12 by comparing them to the corresponding results of the offline SIL simulations. It can be observed that there are again small differences between both cases. This is due to the delay in communications.Figure 12
Results from the offline SIL and real-time SIL simulations. Reactive power flow of the WT converter whenTd = 0.1 and 1. The RPW controller was set up to the TSO limits of ±50 kVAr, except QD1 = Qi + 200 kVAr.
(a)(b)Next, it is studied whether increasingTd decreases the difference between offline SIL and real-time SIL results, that is, whether it can eliminate the effect of the communication delay. Based on the offline results, Td > 4 could be a suitable value. The reactive power flows at the WT converter are presented in Figure 13 when Td = 5, Td = 7, and Td = 10. It can be seen that the results of the offline SIL and real-time SIL simulations are different when Td = 0.1, 1, 4, and 5, whereas the results look similar when Td = 7 or 10. Based on the above, a suitable factor for real-time simulations could be Td ≥ 7. Figure 14 presents a comparison of the real-time simulation results when Td = 7 and Td = 10. It can be observed that now the results converge.Figure 13
Results of the offline SIL and real-time SIL simulations. Reactive power flow of the WT converter whenTd = 5, Td = 7, and Td = 10. The RPW controller was set up to the TSO limits of ±50 kVAr, except QD1 = Qi + 200 kVAr.
(a)(b)(c)Figure 14
Results of the real-time SIL simulations. Reactive power flow of the WT converter whenTd = 7 and Td = 10. The RPW controller was set up to the TSO limits of ±50 kVAr, except QD1 = Qi + 200 kVAr.Further, the oscillating hour 4031 was investigated from a communication’s point of view. Figure15 presents the situation in which Td = 1, Td = 5, Td = 7, and Td = 10. Oscillations occur when Td = 1 and Td = 5 but not when Td was 7 or 10.Figure 15
Results from the real-time SIL real-time test. Reactive power flow at the WT converter between 4029 h and 4031 h whenTd = 1, 5, 7, and 10.
(a)(b)(c)(d)


### 4.3. CHIL Tests

The long-term CHIL tests were conducted withTd = 7. Now, the coefficient Tc is dependent on the processor capacity of the hardware used. The hardware used for the CHIL tests is an FPGA that has a Dual-Core ARM Cortex™-A9 (925 MHz) processor, as well as 10/100/1000 Mbps Ethernet with a high-speed bus, to exchange data between the hard processor system (HPS) and the FPGA.This scenario aims to compare the CHIL test results with the real-time SIL test results. The RPW controller is set up to the TSO limits of ±50 kVAr, except QD1 = Qi + 200 kVAr. Figure 16 presents the results from the tests with the FPGA against the real-time SIL test results when Td = 7. It can be observed that the results are equal now.Figure 16
Real-time SIL simulation and CHIL results. Reactive power flow of the WT converter whenTd = 7. The RPW controller was set up to the TSO limits of ±50 kVAr, except QD1 = Qi + 200 kVAr.


## 4.1. Offline SIL Tests

Several offline SIL tests are performed to define the initial coefficientTd for the accelerated real-time simulations. The comparisons of the results between Option 1 and Option 6 (Td = 0.1 and Td = 1), as well as between Option 6 and Option 24 (Td = 1 and Td = 10), are presented in Figure 7. It can be seen that there is a difference between both comparisons due to the different Td values, which means that the smaller values (0.1 and 1) are not suitable. For the next trial, the comparisons of the results between Option 14 and Option 24 (Td = 5 and Td = 10), as well as between Option 9 and Option 14 (Td = 4 and Td = 5), are made, and it can be observed that no difference exists between the results. The latter result indicates that a suitable initial Td coefficient is ≥ 4.Figure 7
Results of the offline SIL simulations. Comparison of the reactive power of the WT converter whenTd = 0.1 or 1, Td = 1 or 10, Td = 5 or 10, and Td = 4 or 5.
(a)(b)(c)(d)By examining the results more closely, one can see that a difference in results emerges around 4000 h and later. Figure8 shows that time point in more detail with different Td values. When Td is 0.1 or 1 and even when Td is 5 or 10, QWT was “oscillating” in the time period between 4031 h and 4032 h. The oscillation form, that is, the amplitude of the oscillation, is increasing, which illustrates that the system is in an unstable region during that hour. Further, when Td is smaller, the value of QWT after this oscillating hour is different. When Td = 0.1, QWT = −0.2213 MVAr, and when Td = 1, QWT = -0.2305 MVAr. These observations explain the difference in downstream results (after 4032 h). When Td is 5 or 10, the oscillation also occurs, but now the resulting QWT is the same (−0.3103 MVAr).Figure 8
Results of the offline SIL simulations. Reactive power of the WT converter when Td was 1, 0.1, 5, or 10. The possible “oscillation” moment.
(a)(b)(c)(d)This oscillation phenomenon is presented more closely in Figure9. At t = 403100, the point (QHV, PHV) is inside the window (0.7982 MVAr, 4.9824 MW), consuming active and reactive power, while the reactive power of the WT converter is capacitive, QWTset = QWTmeas = −0.1869 MVAr. In the next time step, t = 403101, the “measured” point (QHV, PHV) is outside the window (QHV = 0.9620 MVArind., PHV = 5.399 MW) (the limit is QD = 0.83 MVAr) when QWTmeas = −0.1869 MVAr. Then, a new setpoint of the WT converter is calculated, QWTset (t = 403101) = −0.1820 MVAr, which is realized by the control at the next time step, t = 403102. However, at that moment, QWTset is not high enough, and (QHV, PHV) is outside the window (0.9994 MVAr, 5.4718 MW) again, while QWTmeas (t = 403102) = QWTset (t = 403101) = −0.1820 MVAr. This phenomenon occurs over a period of time, depending on the selected Td.Figure 9
Oscillation investigation whenTd = 1.After all, a new setpoint aims to influence the reactive powerQHV by correcting the output of the WT converter so that the next (QHV, PHV) point will be inside the window. However, according to Figure 10, the RPW control is lagging a simulation step; that is, the new setpoint is calculated based on the last measurement of (QHV (ti−1), PHV (ti−1)). At this specific time, there is a possibility of having oscillations in the controlled system due to the delay of the control. This delay is dependent on two aspects: the selection of Td as well as the delay of the I or PI controller. The I or PI controller was used to prevent algebraic loops in the modelled system.Figure 10
Flow chart of the RPW controller.Above we stated that the total oscillation time is dependent onTd. The effect of Td selection on the oscillation time is studied further in order to find a relationship. Figure 11 presents the results of the oscillation time in simulations with different values of Td. Increasing the value of Td seems to decrease the total oscillation time τTd,i. In addition, two other results are presented, one with an I controller and one with a PI controller. In both cases, TI = 99.5 and Tc = 0.01 are used for the I controller. For comparison, a PI controller with KP = 1.2 and TI = 99.5, as well as Tc = 0.02, is investigated. The results are presented in Table 2. Based on both these results, with a suitable initial value (in this case, Td ≥ 4), it can be derived that the total oscillation time decreases linearly in the ratio(2)τTd,i=1Td,iτ.Figure 11
Duration of oscillation.Table 2
Oscillation duration.
TdOscillation duration [s]: caseTc = 0.01, I = 99.5Oscillation duration [s]: caseTc = 0.02, P = 1.2, I = 99.50,136001370852822,486,4101414,839,62070219,8403429,9∗50282,88860236,480166,54,95∗16083,25∗2,475∗32041,625∗1,2375∗64020,8125∗0,61875∗128010,40625∗0,309375∗25605,203125∗0,1546875∗51202,6015625∗0,07734375∗87601,30078125∗0,038671875∗∗Calculated values.Based on equation (2), the oscillation time in real-world time would be 1.3 s in the I-controller case and 3 ms in the PI-controller case.The above oscillation phenomenon occurs in accelerated simulations. However, it was found that the duration of the oscillation decreases whenTd increases or becomes closer to real time. The evaluation of how the P and I parameters depend on the accelerated real-time simulation could be a future research topic.


## 4.2. Real-Time SIL Tests

The first real-time SIL tests are performed withTd = 0.1 and Td = 1. The results are presented in Figure 12 by comparing them to the corresponding results of the offline SIL simulations. It can be observed that there are again small differences between both cases. This is due to the delay in communications.Figure 12
Results from the offline SIL and real-time SIL simulations. Reactive power flow of the WT converter whenTd = 0.1 and 1. The RPW controller was set up to the TSO limits of ±50 kVAr, except QD1 = Qi + 200 kVAr.
(a)(b)Next, it is studied whether increasingTd decreases the difference between offline SIL and real-time SIL results, that is, whether it can eliminate the effect of the communication delay. Based on the offline results, Td > 4 could be a suitable value. The reactive power flows at the WT converter are presented in Figure 13 when Td = 5, Td = 7, and Td = 10. It can be seen that the results of the offline SIL and real-time SIL simulations are different when Td = 0.1, 1, 4, and 5, whereas the results look similar when Td = 7 or 10. Based on the above, a suitable factor for real-time simulations could be Td ≥ 7. Figure 14 presents a comparison of the real-time simulation results when Td = 7 and Td = 10. It can be observed that now the results converge.Figure 13
Results of the offline SIL and real-time SIL simulations. Reactive power flow of the WT converter whenTd = 5, Td = 7, and Td = 10. The RPW controller was set up to the TSO limits of ±50 kVAr, except QD1 = Qi + 200 kVAr.
(a)(b)(c)Figure 14
Results of the real-time SIL simulations. Reactive power flow of the WT converter whenTd = 7 and Td = 10. The RPW controller was set up to the TSO limits of ±50 kVAr, except QD1 = Qi + 200 kVAr.Further, the oscillating hour 4031 was investigated from a communication’s point of view. Figure15 presents the situation in which Td = 1, Td = 5, Td = 7, and Td = 10. Oscillations occur when Td = 1 and Td = 5 but not when Td was 7 or 10.Figure 15
Results from the real-time SIL real-time test. Reactive power flow at the WT converter between 4029 h and 4031 h whenTd = 1, 5, 7, and 10.
(a)(b)(c)(d)


## 4.3. CHIL Tests

The long-term CHIL tests were conducted withTd = 7. Now, the coefficient Tc is dependent on the processor capacity of the hardware used. The hardware used for the CHIL tests is an FPGA that has a Dual-Core ARM Cortex™-A9 (925 MHz) processor, as well as 10/100/1000 Mbps Ethernet with a high-speed bus, to exchange data between the hard processor system (HPS) and the FPGA.This scenario aims to compare the CHIL test results with the real-time SIL test results. The RPW controller is set up to the TSO limits of ±50 kVAr, except QD1 = Qi + 200 kVAr. Figure 16 presents the results from the tests with the FPGA against the real-time SIL test results when Td = 7. It can be observed that the results are equal now.Figure 16
Real-time SIL simulation and CHIL results. Reactive power flow of the WT converter whenTd = 7. The RPW controller was set up to the TSO limits of ±50 kVAr, except QD1 = Qi + 200 kVAr.


## 5. Conclusions and Discussion

The accelerated real-time cosimulation platform proves to be useful and efficient in one-year power flow simulations. This research demonstrates how to accelerate the long-term simulations by different setups of the input data. Moreover, this paper clarifies how the input data processed in the long-term simulations or tests affect the results.The offline SIL and real-time SIL simulations show that it is possible to find a data-reading cycle, coefficientTd, to accelerate the long-term real-time simulations. When Td is equal or greater than a particular value, the simulation results do not differ even when Td is increased. Consequently, this value would be a suitable initial value for investigating the coefficient of the accelerated real-time simulations. In addition, it is found that, by increasing the value of Td, the possible oscillation period becomes shorter. Further, based on this result, a suitable I or PI controller can be derived for accelerated real-time tests that enable adaptive closed-loop control, preventing oscillations in the closed-loop controlled system. Finally, even in CHIL tests with an FPGA and the selected coefficient Td, the results of the real-time SIL and CHIL tests do not differ. The performance of the FPGA shows that it is suitable hardware for testing the algorithm in long-term simulations.Our suggestion for long-term simulation runs is to carry out offline SIL simulations by using real-time simulation models with different time factors and verify that the results are equal. The time factor for the real-time SIL simulations can then be selected, and the results would be expected to be close to the offline results, with only an effect of the communication time delay. This method could be utilized to define the test procedure, for example, for CHIL applications in the development of microgrid controllers, especially for ancillary services.The more detailed stability analysis of the proposed control method and detailed technical analysis of the proposed approach will be done in future studies. This paper’s aim is to present the potential and the related issues of the developed method for accelerated real-time simulations.



---

*Source: 8265373-2020-06-05.xml*