RT-LAB based real-time simulation of flywheel energy storage system associated to a variable-speed wind generator

Received Oct 20, 2020 Revised Mar 20, 2021 Accepted Apr 22, 2021 This paper presents a new simulator used to distribute and executereal-time simulations: the RT-LAB, developed by Opal-RT Technologies (Montreal, Canada). One of its essential characteristics is the perfect integration with MATLAB/Simulink. The RT-LAB allows the conversion of Simulink models in real time via real-time workshop (RTW) and their execution on one or more processors. In this context, the paper focuses on the RT-LAB real-time simulation as a complement to the Matlab Simulink environment, which has been used to perform the simulation of the Flywheel energy storage system (FESS)-Variable speed wind generation (VSWG) assembly. The purpose of employing a fairly new real-time platform (RT-LAB OP5600) is to reduce the test and prototype time. This application will be executed on each element of our model that was previously developed under MATLAB/Simulink. The real-time simulation results are observed in the workstation.


INTRODUCTION
In recent days, every researcher wishes to build their models in real-time. Since the mid-20th century, the simulation tools have been used extensively for the conception and development of electrical systems. The improvement of simulation tools has advanced in parallel with the progress of computer technology. These days, computer technology has greatly enhanced its capabilities and has become widely accessible at a constantly declining cost. As a result, simulation tools have also shown dramatic performance gains and consistent decreases in cost. Now the researchers and engineers have the availability of affordable and efficient simulation tools which were earlier too costly, with the exception of the larger manufacturers and utilities. This paper has discussed a particular category of digital simulator known as the real time simulator [1].
The goal of Real-Time Simulation is ensuring that a computing unit works at a pace similar to that of the real physics model. All input treatment, unit computations, and final output are performed in the desired interval of time. Real-time strategies have become time-sensitive and have been utilized for many industry processes such as motors, control power systems, robotics, and games. RT-Lab, created by Opal Laboratory, is most commonly applied due to its versatility and may be used within any approach [2]. The predicators are constructed under the off-line simulink interface of the host PC, while the OP5600 simulation target based on Opal-RT conducts a real-time simulation [3]- [5]. The Real-Time Simulator principally -if running time, Te of system simulation is less than or equal to the chosen time slot, the simulation is classified as real time -if Te is larger than its time slot length to one or several time slots, overshoots result so simulation is classified as non-real time. For this last situation, either the time stand size may be enlarged or the system template may be streamlined to execute in real time [6]. This paper will touch on real-time simulation of flywheel energy storage system associated to a variable-speed wind generator, in addition to the Matlab Simulink environment, which was used to perform the simulations mentioned in [7], The popular MATLAB/Simulink was used as an approach to build, edit and visualize graphical models in schematic form. The functional shema designs are the spring from which code may be systematically created, posted, loaded on target CPUs for real-time monitoring. The use of the RT-LAB template in Figure 1, existing in the SCAMRE LABORATORY represents many advantages for this kind of applicationssuch us [8]: enables to detect errors at an early stage, ensures coherent time responses, determinism is required when real hardware is connected to the simulation, allows the simulation to lure the real hardware. This paper is organized as follows: The Section 2 presents a brief description about RT-LAB simulator, then how to convert asimulinkmodel to real-time environment in Section 3, Subsequently, we present the REAL-TIME simulation of FESS associated to VSWG under the rt-lab platform. The test results and discussions are described in Section 4 and, finally, the main conclusions are provided in Section 5.

RT-LAB SIMULATOR
It is the simulator that we used during the real-time simulation of the studied stockage system. This real-time simulator is available at SCAMRE Laboratory in the National Polytechnic School of Oran, Algeria, is developed by Opal-RT Technologies (Montreal, Canada) [3]. One of its key features is seamless integration with MATLAB/Simulink. It is composed of two parts: Command station (hosts), Computing station (target) as shown in Figure 2 [9], where Table 1 summarizes the RT-LAB specifications used in this paper.

FROM SIMULINK ENVIRONMENT TO REAL-TIME ENVIRONMENT
The research reported in [7] is focused on the analysis, modelling and non-real-time simulation of the Flywheel Energy Storage System Associated to a Variable-Speed Wind Generator using MATLAB/ Simulink, in the aim to resolve the problem of fluctuating power output. In this work we will describe the modeling and the real-time simulation of the system under study using RT-LAB OP 5600 simulator. One of the strengths points of the OPAL-RT system is the ability to easily convert and use Matlab/Simulink models as real-time simulations. In this section, we will present the different steps required to simulate in real time our model previously built in Simulink.

Changing Matlab configuration
The first step is to modify the configuration of the template with the aim of respect the real-time constraint by choosing a solver for fixed time steps and the single task option [10].

Creation of sub-systems
This step consists of grouping the model into various systems that will be run on different compute nodes. Indeed, each Simulink subsystem must have a name beginning with a specific prefix ( Figure 3) [11]: Figure 3. Communication between the console and the computation node -SC: Console subsystem SC console sub-system is the sub-system running at control station which allows you to interface directly into the system. It includes all the simulink/system build blocs connected to the acquisition and visualization of scopes. The Blocs that are required while or after the real-time model run, should be contained in the bloc SC, when operates in asynchronous mode from the other subsystems. Observe that there can be only one console per model [6].

Add the OpCommcommunication block(s)
After grouping the model through console and computing blocks, specific pads named Opcomm have to be included in the subsystems. They are simply traversal blocs which intercept all arriving signals before forwarding them to the computing Bloks of selected subsystem.

Execution under RT-LAB
The last step is to run the model under RT -LAB according to the following steps [9]:

REAL-TIME SIMULATION OF FESS ASSOCIATED TO VSWG UNDER THE RT-LAB PLATFORM
In [7] proves that the FESS shows an attractive way to adjust the production to the consumption. Figure 3 illustrates the real-time model of the FESS-VSWG combination under study. The FESS involved involves a low-speed flywheel and an induction machine, which latter one operates in the weakening flux region, thus allowing operation at rated power [13]- [17]. The VSWG utilized is based on a DFIG wherein its stator is directly linked to the grid and its rotor is linked to the grid through power converters as shown in Figure 4. To study the power transfer between the wind turbine and the grid [18]- [22], we used an independent power control. Thus, two control blocks (FESS control and DFIG control) were available in the device under study. The first one is branched to control the energy storage in the flywheel, the second one is branched to control the active and reactive power exchanged between the grid and DFIG. Both blocks can be controlled separately. A REAL-TIME simulation [23]- [25] has been developed to test the proper functioning of the investigated system, in terms of dynamic response and output power smoothing.  Figure 5 presents two subsystems; the first one named "SS_VSWG" contains the simulink model ofthe eolien system. Another named "SM_FESS" contains the simulink model of the storage system, while subsystem named "SC_console" represents the model foronline data acquisition, and Figure 6 also shows the console set which is presented in 2 subsystems

RESULTS AND ANALYSIS
The OpWriteFile block is used to save the simulation results in Matlab workspace. The goal is to demonstrate the performance of the FESS on a charge/discharge cycling process utilizing speed control strategy. The simulation of the module in the RT-LAB environment was carried out in fixed steps over a period of 45 secondes while keeping the same parameters of the simulated module in non-real time. Figures 7 and 8 show the simulation of the indirect field-oriented control of a DFIG-based wind system. These figures demonstrate that our system has satisfactory dynamicwith a null static error. Figure 9 presents the wind profile, Figure 10 illustrates the delivered power by the wind system to the power grid. It is seen on this figure, that the power grid gets a fluctuating power. The objective of FESS is to adjust this power. Figure 11 corresponds to the storage power flywheel energy storage system. It may be positive or negative. It depends on the wind power and the power load needed. We note that it is positive when the wind power produced is greater than -2.2 KW (stored energy) and is negative when there is a less power produced compared with that of the load (recovered energy). Figure 12 displays the flywheel speed and its reference. The rotational speed increases when the energy is transferred to the flywheel, and decreases when the flywheel is unloaded. In Figure 13 shows the flux of the IM component corresponding to the response.
The results obtained by RT-LAB are very satisfactory and the dynamics are much improved compared to the results obtained by MATLAB. It is also noted that for a simulation time of 45 seconds, the results of non-real-time simulations lasted 11 minutes, which does not reflect the reality. Whereas, the Real Time simulation lasted 45 seconds, which corresponds exactly to the real time. The REAL TIME simulation also gives good performance: High speed response to any setpoint variation; the total absence of overrun; a perfect rejection of perturbation.

CONCLUSION
It was performed in this work a real-time simulation of the Flywheel energy storage system (FESS) -Variable speed wind generation (VSWG) assembly using RT-LAB. Also, this study is an important contribution to rapid control prototyping by using OP5600 OPAL-RT real-time simulator as a core of the RCP system. This application was executed on each element of our model that was previously developed under MATLAB/Simulink. The good control effect is proved by the simulation results. the procedures for charging and discharging are stable and control objectives are achieved. The results obtained by RT-LAB are very satisfactory and the dynamics are much improved compared to the results obtained by MATLAB.