Software ‐ in ‐ the ‐ Loop Simulation of a Gas ‐ Engine for the Design and Testing of a Wind Turbine Emulator

: In order to investigate the grid integration of wind turbines (WT) of various scales and designs, a wind turbine emulator (WTE) is being built in Flensburg within the state ‐ funded project GrinSH. The special feature of this WTE is the use of a large gas engine instead of an electric motor to emulate the behavior of a WT. In order to develop the controls of this innovative WTE and to design the upcoming test runs under safe conditions, a software in the loop model (SILM) was applied. This SILM contained a mathematical model of the wind turbine, mathematical models of the gas engine with an integrated controller, and a model of the generator and frequency converter unit, as well as a preventive modulator of the reference signal (PMRS). The PMRS module converts the reference signal of the emulated WT in such a way that the dynamics of the engine components can be calculated and balanced in advance to enable the required behavior of the entire SILM despite the dynamics of the gas engine. It was found that the PMRS module, developed and tested in this work, increased the ability of the WTE, based on a gas engine, to reproduce the dynamics of a WT.


Introduction
Experimental research in a laboratory offers many advantages compared to the research on a real WT in the field. These advantages arise from the independence from prevailing wind conditions, as well as from higher freedom in operation and the control of the entire test facility under laboratory conditions. Due to these advantages, many WT test facilities have been built in the past. The majority of these facilities are designed for testing and validating specific WT components. The main focus here is on the determination of the mechanical loads on the large components such as the WT nacelle [1], drive train [2], and bearing of the rotor [3]. The investigation of the WT components is an important issue but not the only area of the wind industry that would benefit from WT emulators of the relevant size. The increasing number of WT, which are integrated into the conventional grid, leads to the increasing demands on the grid support provided by the WT. Topics like inertia provision [4], feed-in management [5,6], and grid support [7] have become more and more important in recent years. There are several simulationbased studies [8,9] on the aforementioned network integration problems, but no WT emulators are known to the authors.
As the demand for the new solutions in the field of grid integration is increasing, in parallel to the increasing number of installed WTs, the development and construction of a facility for researching the grid-connected operation of WTs is an important step towards the future development of the wind energy [10,11]. A state-funded research project, called GrinSH, conducted at Flensburg University of Applied Sciences, aims to set up a wind turbine emulator (WTE) with the required conditions for researching gridconnected operation of WTs under laboratory conditions at a relevant scale.
It is a state-of-the-art large-scale WTE that uses the electric grid as a source for driving power and as a sink for the generated power [12]. While this is a reasonable approach for the testing and the validation of single WT components, experimental research with a focus on the grid integration of WTs requires a grid-independent source of driving power [12]. For this reason, the GrinSH WTE, which is currently under construction, adopts a gas-fired combustion engine instead of an electrical motor. This approach ensures the interaction of the GrinSH WTE with the grid in the same way as a real WT would do. Even though the use of a large gas-fired engine for emulating the aerodynamics and the structural dynamics of a WT is a promising approach, it is not state of the art. Therefore, the reproducibility of the key parameters of a WT by means of the envisaged engine must be examined.
A well-proven method to perform feasibility assessments of complex technical applications in an early stage is the software in the loop (SIL) approach [13]. Figure 1 shows a comparison of the real simulation tasks with those based on the SIL approach. As illustrated in Figure 1, the implementation of the SIL allows replacing the real processes and the real control systems with models.  Figure 2 shows the entire setup of the intended WTE in the form of a SIL application, adapted to the needs of this work. Following the structure introduced in Figure 1, the simulated process in this software in the loop model (SILM) was implemented as a WT model developed by Gloe et al. [11]. The simulated control system consisted of a PMRS module, a mathematical gas-engine model, a mathematical generator model, and a frequency converter model, as well as a power controller and a speed controller for the WT. The simulated control system described above is referred to as a WTE model in order to distinguish it from the real WTE, which is currently being set up in Flensburg. The block diagram shown in Figure 2 illustrates the interaction of the SIL components during the simulation. The WT model, implemented in the SIL, has a dual function. On the one hand, it provides the reference signal, given by the angular speed and the electrical power measured on the generator of the WT model; on the other hand, it acts as a validation model for the output signal of the SILM.
The reference power signal from the WT model is sent to the power controller. The power controller calculates the power set point and sends it to the frequency converter model of the WTE model. The frequency converter model adjusts the torque of the generator model in such a way that together with the actual rotational speed of the generator model, the electrical power generated by the generator model reproduces the power given by the reference signal of the WT model. The torque of the generator model needs to be balanced by the gas engine in such a way that the rotational speed on the generator reproduces the speed of the WT model. The rotational speed of the WTE model is controlled by a speed controller and the PMRS module mentioned above.
An important difference between the WTE and the WT is the way in which the two facilities are controlled.
A distinction should be made between two basic types of scenarios, which can occur during the operation of the WT and shall be investigated in this work.
In scenario No. 1, the rotor speed of the WT changes as a result of a wind speed variation. The rotational speed of the generator changes as a result of this. As a consequence, the generated power also changes.
Scenario No. 2 was a scenario in which a power change is specified on the WT generator, and the rotor speed is set as a result of this specification.
In scenario No. 1, the WT is controlled in such a way that the change in the rotational speed of the rotor is transmitted to the generator, thereby changing the power output. At the WTE; however, the change in the speed on the generator arises as a result of the activation of the speed controller. The electrical power is set via the frequency converter. According to that, the variation in the rotational speed of the WTE would not result in the Simulated process

Simulated control system
change of electrical power on the generator. Therefore, in the case of scenario No. 1, it must be ensured that the WT specifies both the speed and the power used in the WTE simulation.
The control process of scenario No. 2 describes the opposite case. Here the rotational speed must follow the power variation on the generator. In the case of the WT, the prescription of the generator to change the power is transmitted to the pitch controller, which changes the speed of the rotor and thus the speed of the generator. The rotor drives the generator at the changed speed, which leads to a change in the electrical power at the generator. The control algorithm of the WTE is different. The power change takes place via the frequency converter, which sets the new power directly on the generator. As a result, the torque on the generator changes. This change in torque leads to a change in the insert gas value initiated by the speed controller of the gas engine in order to compensate for the torque change coming from the generator. In scenario No. 2, the power of the WT was very easily reproduced by the WTE. The rotational speed follows the changes of the generator power due to the dynamics of the WTE model. In scenario No. 2, only the power must be specified by the WT to be emulated. If the WTE model receives both the power and the rotational speed as the input signals, the rotational speed modeled by the WTE model will be overregulated.
The research questions here were, first, whether it is possible to simulate the dynamics of the WT rotor by means of a gas engine and the PMRS module connected in series, and secondly, whether the WTE on the basis of a gas engine is able to simulate the behavior of the WT in terms of energy feed-in. According to that, the final goal of the research was to find a method to control the gas engine model and the model of the generator-converter unit in order to reproduce the incoming signal with as little deviation as possible. The degree to which this goal was achieved was measured by the similarity between the rotational speed and the electrical power at the generator of the WTE model compared to the results of the reference WT model. The important criteria for the statement about reproducibility are the phase, magnitude, and temporal delay of the simulated time series.
The authors propose the hypothesis that the use of a PMRS module based on an inverse transfer function allows the WTE to significantly improve the reproduction of the dynamics of the WT rotor. The investigations carried out in this work are created with the intention to further implement it in the controller of the real WTE that is currently under construction in Flensburg.

Methodology
This chapter is divided into four subchapters. The first subchapter gives generalized information about the modeling of internal combustion engines; the second describes the concrete implementation of the GrinSH WTE model. The third subchapter gives an introduction to the subject of signal adaptation and provides the necessary distinction between the PMRS developed here and other methods. The fourth subchapter describes the mathematical background and the implementation of the GrinSH PMRS.

Modeling of the Gas Engine
Internal combustion engines operate on the following basic principle. The combustion inside a cylinder leads to the expansion of the high-temperature and highpressure gases; this expansion transmits a force on the piston. This force moves the piston and transforms the chemical energy into mechanical energy. Different mathematical and physical models depending on the purposes of desired application can describe this process [14].
The engine, modeled in this work, was a prototype gas engine (Type: 8V 4000 M55RN) designed and built by the manufacturer MTU (https://www.mtusolutions.com/eu/de/stories/marine/kommerzielle-schiffe/mtu-gas-engine-formselectrical-generator -set.html, accessed on 15.05.2021.) for use in large ships. Due to the circumstance that no experimentally obtained in-cylinder pressure data of the 8V 4000 M55RN was available at the current stage of the project, it was decided to predict the incylinder pressure as a function of the crankshaft angle and from the calculated energy release. The lack of the experimental data of the modeled engine was a strong limiting condition, which negatively affects the expected quality of the results of the model. It was decided to address this risk with the following rationale. In the earlier phase of the project, the purpose of the model is limited to verifying the basic assumptions in the design and operation of the WTE. The model depth based on the calculated pressure curves is sufficient for these applications. To have the opportunity to improve the model at a later stage of the project, a modular structure was applied. The operation process is broken down into several process components interacting with each other. These components are described mathematically in such a way that they can be replaced at any time by an improved mathematical description. Thus, after the experimental results are available, the overall model can be significantly improved. Particular attention is paid to the modeling of the mechanical structure of the engine in the context of the modular design. This mechanical structure ensures the correct interaction of the interchangeable model components.
As the model of the gas engine will be integrated into the WTE model, the description of the mechanical structure and the concrete mathematical implementation of the model are described in the next chapter.

Modeling of the GrinSH WTE
The basic components of the WTE model developed in this work were the engine model with a speed controller and the generator and frequency converter model.
The entire process of the WTE model operation could be described as a balance between driving power from the engine and extracted power from the generator. This balance could be described as an interaction of the torque increasing processes, torque decreasing processes, and torque oscillations.
The torque-increasing processes were represented by the thermodynamic processes due to the combustion of gas in the cylinders. The torque decreasing processes were represented by the inertia of the crankshaft and of the generator rotor. The torque oscillations were represented by the torque due to the mass oscillation of the crankshaft and due to compression and expansion of the gases in the cylinders [13].
The mechanical structure of the WTE model was built as shown in Figure 3. Using this structure, the entire drivetrain can be described by the differential Equations (1)-(7). These equations describe the spring-mass interaction between all cylinders to connect the torques in the single cylinders with the torques in the flywheels and the generator wheel.
JFlydωFly/dt DG ωFly ωG k θG θFly JGendωGen/dt TFly TGen The constants k and D and the value of the inertia of all components used in the differential equations are provided by MTU. The angular speed ω and the angle of rotation θ can be calculated by the WTE model using the geometry data of mechanical components, also provided by MTU.
To solve the differential Equations (1)- (7), the torques of all components must be calculated.
The torque of each cylinder pair is calculated as a superposition of the torques of two cylinders connected in this block, minus the torque, which arises from the spring-mass interaction with other sections of the drivetrain. The torque of each cylinder is calculated using Equation (8). Each cylinder contributes to the entire torque with its unique time delay, which is calculated from the angular speed, according to the firing order.
In Equation (8), the cylinder torque is calculated as a superposition of the three components, leading to the entire torque. These are the combustion torque, TCombustion(θ), compression and expansion torque, Tcompr/exhaust(θ), and the mass torque due to the oscillation of moving masses in the cylinder, TOscillation(θ).
The contribution of the combustion is calculated using the empiric Equation (9), which was implemented by Isermann et al. [13]: The input parameters for calculating the combustion are θmax, which is the crankshaft angle of the maximal torque in one cycle. In this application, it is set to 370° according to the data provided by MTU. The parameter θ describes the position of the rotational mass during the initialization. The parameter Tstatic is the static torque, given by the average value over one full cycle. This value is calculated by the speed controller from the gas amount due to Equation (10): where, H (kJ/kg) is the low calorific value of the fuel, g (kg) is the amount of fuel injected into the cylinder during one cycle, and μ (g/kWh) is the specific gas consumption, which can be taken from a lookup table, derived from the specification given in Figure 4.  The contribution of the oscillation torque is calculated according to Equation (11): The constants , , and are calculated from the geometrical data of the engine.
The variables , , and are computed in the simulation for each cylinder, based on the firing order and the rotational speed of the crankshaft.
The contribution of the compression and expansion in the cylinder is calculated according to Equation (12): where .
is the compression-expansion pressure, which can be calculated from the geometry of cylinder and from amount of inserted fuel.
The crankshaft of the engine is loaded with a squirrel cage induction generator, which is connected to the grid via the frequency converter. Hence, the generator can run with variable speeds in a speed range, as shown in Figure 4. The generator and frequency converter model is implemented as a PT1 (first-order low pass filter) module with the gain factor set to 0.5 and the time constant set to 0.001 s.
The speed controller is built as a PI (proportional-integral) controller managing the gas insert value of the gas according to the operating point of the engine.
The controller is adjusted for different operating points. Around this operating point, the behavior of the controlled model can be considered linear.
The MTU provided the test results, generated with the confidential MTU model of the engine. This data is used here to tune the controller for the angular speed of 1500 RPM and for three load steps, which are represented by the red line in the subplot (b) of Figure  5. The adjustment of the GrinSH speed controller was achieved by a stepwise approach to the results of the MTU Model. Figure 5 shows the adaptation of the PI controller of the GrinSH WTE model speed controller to the results of the MTU brake power test. The subplot (a) shows the reference result of MTU (blue line) compared with the GrinSH WTE model result (red line). Subplot (b) of Figure 5 shows the load step input used for both models in order to generate the response seen in the upper subplot. The adaptation was carried out for three power steps. The results of the adaptation are analyzed in the following for each power step.
Power The results show that the GrinSH model represented the MTU model of the gas engine only in proximity. The adjustment of the controller allowed the GrinSH WTE model to achieve the same variation of rotational speed as at the reference model of the MTU in terms of magnitude and slope of the reference rotational speed. However, the time delay of up to 1.8 s for the worst reproduced operating points occurred, and the duration of the transients was up to 50% longer for the GrinSH model for one operating point. However, it must be considered that the worst results of the GrinSH Model simulation corresponded to the operating point where the validation model had also not achieved a steady operating point.
In the context of this work, the GrinSH gas engine model will be used to find out if control of the gas motor with the aid of a PMRS module represents the desired behavior. This means that the focus was the ability of a PMRS module to compensate for the temporal and magnificent disparity of the rotational speed. The GrinSh model achieved the same magnitude of speed reduction with the same gradient as the MTU Model. These are two very important criteria for the planned application. The GrinSh Model shows a more inert control behavior compared to the MTU model; however, the control time remains in the acceptable range for the planned application. The temporal delay and the longer signal setting process are additional factors that the PMRS module has to compensate for.
For the better adjustment of the GrinSH model, the measurement results of the real engine tests are necessary.

Preventive Signal Adaptation
It is a common case that the control system, represented by a real or modeled process, needs to be controlled in the way that it reproduces a certain behavior.
In the case of simple control systems, which can be considered linear, the correct parameterization of the PID controller is often sufficient to achieve this goal [15].
However, often it is the case that the system dynamics of the processes to be controlled are so complex that the settings of the PID controller are no longer sufficient to achieve the desired behavior of the system. A compensator is often used here.
There are many different types of compensators. In most cases, the compensators adjust the phase shift of the systems to be controlled. These compensators are based on certain transfer functions, which advance or retard the phase, i.e., they are lead or lag compensators, respectively. However, there are also other applications besides phase control, which the compensator can work with, for example, the correction of offset and gain errors.
Another way to reach the goal of reproducibility of desired behavior by the given system is the implementation of "model predictive control" (MPC) [16].
In general, the MPC application is based on advanced controller hardware and requires high computational effort. To keep them applicable for real time applications, high computing power is required [17].
For specific applications such as the control of the engine within the operating scenario given by a WT, solutions with less computational afford than used for MPC applications are required. Looking for such solutions, the authors of this work decided to use inversed transfer function of the model for pre-calculation of the control input signal. This approach can be used in applications, where the main objective is set to the definition of the signal, which leads to the predefined behavior of the controlled model. The challenge of this application is to find the transfer function, which describes the modeled process and the inversion of it [18].
In this work, the inversion of the transfer function, which represents the model of the WTE was used. Further, the output of the reference WT was preprocessed using the inverted transfer function. Finally, this preprocessed signal is used as an input for the WTE simulation. The method, as well as the mathematical background, are discussed in detail in the following section.

Inversion of the Input Signal
The aim of the method described below is to retrieve the reference signal of the WT model as precisely as possible by means of the WTE model. The crucial parameters to be emulated are the power and the rotational speed on the generator of the WT. The frequency converter sets the power of the WTE generator. This is implemented with almost no time lag and without mechanical influences on the overall system. The rotational speed of the generator results from the dynamics of the engine. The MTU gas engine is controlled via rotational speed only. For this reason, only the set point of the speed controller of the WTE model was modified by the method described below.
The idea of the method is to find the transfer function G, which represents the model, and then to use its inverse function G*, on the input signal u, coming from the reference WT model. This mathematical operation creates a new input signal u*, which, being used as the input to the WTE model, generates the output signal equal to the signal of the reference WT model. Reversing the order of the transfer function and the inverse transfer function would not change the result [19] (see Figure 6). The mathematical background of this method is presented by Equations (13) and (14), which show that if a transfer function G* is an inverse G, the overall input and output of a serial connection of both systems remain identical.
However, to apply these principles to the GrinSH application, the WTE model needs to be expressed as a transfer function, which is not possible because of the non-linearity of the WTE model. The approximation of the WTE model by PT1 and PT2 transfer functions is a compromise, which allows the use of the principle shown in Figure 6 by replacing G* with inverted PT1 and PT2 followed by the WTE model itself instead of G (Figure 7).  For a better understanding of the results given in Figure 8, a block diagram was added in the left upper corner of Figure 8. The colors chosen in the block diagrams correspond to the colors of the simulation results shown in Figure 8. The blue curve gives the reference signal for the simulation (step function). The red signal is the output of the WTE simulation without the use of any PMRS module. The yellow line is the result of the processing of the step function with the PT1 (15) transfer function. The purple curve is the result of processing the step function with the PT2 (16) function.
The inversion of PT1 and PT2 functions is performed using the approach introduced and tested by Joerg J. Buchholz and Wolfgang v. Gruenhagen [18] as a proper inversion of transfer functions of dynamic systems. This method solves the problem that the Simulink Matlab is not able to simulate the inversion of strictly proper transfer functions. The strictly proper transfer function is given if the degree of its numerator is smaller than the degree of its denominator, which applies to the transfer function (15) and (16) used in this work.
The method of proper inversion is based on the idea that the transfer function, which is to be inverted, is used in the feedback branch of a control loop with a very high controller gain K. The transfer function of the inverter is then given by Equation (17). * 1 * 1 * * * (17) This application can be implemented in the Simulink environment as a block diagram, shown in Figure 9. To test the method introduced above, a step function was processed with a PT2 inverted function and with the PT2 function connected in series. The subplot (a) shows the input u according to the nomenclature introduced in Figure 9. The subplot (b) shows the u* and the subplot (c) shows the y*. The Gain Factor K was set to 150,000.
As can be seen from Figure 10 that the proper inversion approach managed to generate the inverted function from the proper transfer function (16), which can then be used to reproduce the reference signal y* = u in good approximation. Due to the results shown in Figure 10, the method introduced here and tested on the step function using the PT2 inversed transfer function followed by the application of the transfer function lead to a sufficient result.
The method illustrated in Figure 7 was applied to the real scenario generated by the WT model and tested on the WTE model with a PMRS module, consisting of a PT1 or PT2 Step u K > 999 u* G G y* = u inverse function, connected in series before the WTE model. The results and discussion of this application will be presented in the next chapter.

Results
As described in the introduction, there are two possible scenarios, which had to be investigated separately.
Scenario No. 1 is when the rotational speed at the rotor changes as a result of a wind profile. The power output at the generator changes as a result of this rotational speed variation.
Scenario No. 2. is when a power change is specified on the WT generator, and the rotor speed is set as a result of this specification.
For investigation of the first scenario, a so-called Mexican hat event was chosen. This event became its name because of the shape of the wind speed variation, represented in the subplot (a) of Figure 11. The variation of the rotational speed on the generator of the WT is shown in subplot (b), and the generated electrical power on the generator of the WT is shown in the subplot (c) of Figure 11.   Figure  11 act as the input signal for the WTE and, at the same time, as the validation signal according to the block diagram shown in Figure 12. The power and generator speed time series generated with the WT model describe the response of the WT to the Mexican hat event. As a result of this wind condition, the WT controled the rotational speed, as shown by the blue line in Figure 12. In order to better interpret the consequences of the application of PMRS to the emulation, the following pairs of time series should be separated: 1. The blue and red graph representing the reference signal from the WT and the output signal of the WTE model with no PMRS applied; 2. The blue and dashed magenta graph from the subplot (a), representing the reference signal from the WT and the output signal of the WTE model with PMRS based on inverted PT1, was applied; 3. The blue and solid magenta graph from the subplot (b) representing the reference signal from the WT and the output signal of the WTE model with PMRS based on inverted PT2 applied.
As can be seen from the analysis of the first pair, the WTE model without the PMRS module shows the ability to reproduce the shape of the reference signal but with a time delay of approximately two seconds. In addition, the magnitude and the phase are significantly higher than for the reference signal.
The test run with PT1 inversed input, represented by the second pair, solved the problem of the time delay and also showed the ability of the method to resolve the shape of the angular speed variation of the WT but failed to reproduce the amplitude of the reference signal.
The simulation performed with the PT2 inverted signal, the third pair of time series, reproduced the shape of the reference signal with a high degree of consistency in terms of phase, time delay, and magnitude of variation.
The power simulation the generator is shown in Figure 13. In Figure 13, the reference signal is given by the blue line. The results of WTE simulations deliver the same result for the power and fall together in the graphical representation. As can be seen from Figure 13, the power simulation reproduced the reference power signal successfully. The results shown in Figures 12 and 13 demonstrate the ability of the intended method of preventive signal adaptation to course a significant improvement of the simulation result by means of the PMRS, built by the PT2 inversion, in the case of scenario No.1.
For investigation of the second scenario type, a scenario investigated at WETI by Gloe et al. [20] was chosen. This scenario describes the behavior of the WT in case of a sudden power reduction on the generator. This scenario is shown in Figure 14.   As can be seen from Figure 15, the phase and magnitude of rotational speed are emulated in the best way if the PMRS based on the inversed PT2 is applied. However, the magnitude of speed variation resulting from the power reduction on the generator between 85 and 100 s was up to 1.5 times higher than the magnitude of the reference speed signal (blue line) for all WTE simulations.
The simulation results, represented in Figure 16, illustrate the reaction of the WTE to a power reduction on the generator combined with a constant input to the speed controller (blue line in subplot (a) Figure 16). The simulation result, represented by the red line in the subplot (a) of Figure 16, must be compared with the result of the WT emulation (yellow line). As can be seen from Figure 16, the phase and time delay of rotational speed as well as the electrical power on the generator was reproduced sufficiently by the WTE.

Discussion
Considering the results and the research question, an analysis of the method was carried out as follows.
For scenario No. 1, a significant improvement in the emulation results was achieved as a result of the use of PMRS. This result demonstrates the effectiveness of the use of a PMRS based on the inversed transfer functions. Nevertheless, the method has to be investigated further. In order to be able to implement hardware in the loop application based on this method, the stability of the control with the PMRS compared to the control of the gas engine without the PMRS must be examined. The behavior of the method at further operating points as well as the control at the transition between distant operating points must be examined.
Another advantage of this method, which was tested during the implementation, was the low computing power that is required when calculating the modeled signal. This fact makes the method particularly attractive for applications where computing power is a limiting factor. This fact also suggests that a real-time application can be developed and implemented on the basis of this method.
The application of the method to scenario No. 2 is limited to the investigation of the ability of the gas engine to emulate the rotational speed of the WT generator using only the generator power of the reference WT as a set point parameter. The input of rotational speed of the reference WT did not contribute to the control process in the case of scenario No. 2. The use of reference rotational speed would lead to the result, where the rotational speed of the WTE generator will be emulated too high (see Figure 15). This occurred due to the processes described in the Introduction chapter (see description of Figure 2). The results of the emulation, based only on the generator power as a reference signal, showed that the magnitude and phase of the rotational speed signal were successfully emulated by the WTE model. However, the specific course and small-scale variation of the reference rotational speed signal were not reproduced by the WTE model. For this reason, information on the aerodynamic behavior of the emulated WT is missing in applications based on scenario No. 2. These results show that the engine model used in the WTE model is capable of simulating the consequences of the power variation on the generator of the WT in a proper way but without being able to reproduce the small-scale changes in the rotational speed of the WT generator. This fact needs to be considered when planning complex scenarios in which both types of scenarios occur.

Conclusions
The results discussed in previous sections show the capability of the GrinSH WTE model to emulate a WT under consideration of limitations discussed in the previous chapter. As the WTE is modeled considering the parameters of the real components, this work also approves the theoretical capability of a real WTE, driven by the gas engine, to reproduce the behavior of the WT.
The application of the PMRS module developed in this work leads to a significant improvement of the ability of the WTE model to reproduce the rotational speed of the reference WT, which confirms the hypothesis proposed in the Introduction.
The method delivers sufficiently good results and can be used to address the further research of the grid integration of the WTs. It also allows investigating the dynamic of WT in the context of grid integration and examines specific questions as for example, the use of the rotor inertia to support the grid with additional power during transient events in the grid. For this task, the complex of topics worked out in the previous research work of the WETI department [21,22] shall be used.
However, the investigations presented in this paper already reveal that the risk of excessive speed excursions needs to be considered when planning test runs with the real WTE. In order to enable the simulation of scenarios where both scenario types can occur, an additional tool shall be developed. This tool must keep the set point of the rotational speed constant for the period, where scenario No. 2 dominates the simulation. Alternatively, further development of the PMRS module can be performed in order to enable the emulation of the small-scale variations of the rotational speed of the WT for scenarios like scenario No. 2.
The method was investigated for a limited range of operating points. In order to test the method for the whole range of possible operating points, measurements on the real WTE need to be performed in the future. Hence, the real WT emulator shall be applied for the WT of different sizes in the range of 240 kW to 5000 kW; the method needs to be tested for different WT Models introduced in Rohr et al. [12].
The model of the gas engine developed for the GrinSH WTE model also provides the possibility of creating a satisfactory mathematical representation of the combustion engines based on limited parameter information. This model could also be easily adopted and improved without changing the overall structure. The implementation of the WTE model and PMRS module was performed using Matlab software. This software is highly compatible with other software packages and is routinely used by scientific and technical institutions. As a result, this method can easily be reproduced and further developed by third parties if necessary.
The entire approach provides the possibility to investigate and adjust the interaction between the different control and hardware components of the entire WTE, as well as to make a statement about the feasibility of the method in an early stage of the WTE development.
Author Contributions: A.R.: conceptualization, methodology, development, and implementation of the WTE model with all its sub-models, conducting the simulations, visualization, writing-Original draft preparation; C.J.: conceived the initial concept of the WTE, development of the WT model, discussions and comments on the development of the WTE model, writing-Additions to the original draft, reviewing, and editing. All authors have read and agreed to the published version of the manuscript.
Funding: This research is funded by the Bundesministerium für Bildung und Forschung und der gemeinsamen Wissenschaftskonferenz.

Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author.