Validating a Wave-to-Wire Model for a Wave Energy Converter — Part II : The Electrical System

The incorporation of the full dynamics of the different conversion stages of wave energy converters (WECs), from ocean waves to the electricity grid, is essential for a realistic evaluation of the power flow in the drive train. WECs with different power take-off (PTO) systems, including diverse transmission mechanisms, have been developed in recent decades. However, all the different PTO systems for electricity-producing WECs, regardless of any intermediate transmission mechanism, include an electric generator, linear or rotational. Therefore, accurately modelling the dynamics of electric generators is crucial for all wave-to-wire (W2W) models. This paper presents the models for three popular rotational electric generators (squirrel cage induction machine, permanent magnet synchronous generator and doubly-fed induction generator) and a back-to-back (B2B) power converter and validates such models against experimental data generated using three real electric machines. The input signals for the validation of the mathematical models are designed so that the whole operation range of the electrical generators is covered, including input signals generated using the W2W model that mimic the behaviour of different hydraulic PTO systems. Results demonstrate the effectiveness of the models in accurately reproducing the characteristics of the three electrical machines, including power losses in the different machines and the B2B converter.


Introduction
Most research effort in wave energy has been mainly focused on maximising the hydrodynamic power absorption of different types of wave energy converters (WECs) from ocean waves. Power from the ocean waves can be absorbed in many different ways, and the different WEC technologies can be categorised into three main groups based on the working principle of each device, as proposed by [1]: oscillating water column (OWC), oscillating-body and overtopping devices. OWC devices comprise fixed or floating structures open below the water surface, where air is trapped above the free surface within the structure. The oscillating motion of the free surface in the structure because of the ocean waves pushes air towards and sucks air from the atmosphere through an air turbine coupled to an electric generator [2]. In the case of oscillating-body devices, in contrast, the action of ocean waves directly moves the device [3,4], which is connected to a power take-off (PTO) system. Finally, overtopping devices capture the water close to the wave crest when it breaks against a structure that includes a relatively large reservoir. A hydraulic pump coupled to an electric generator installed underneath the reservoir converts the potential energy of the stored water into electricity [5].
In the case of oscillating-body WECs, hydrodynamic power is given by the multiplication between the device velocity (ẋ), induced by the excitation force (F exc ), and the PTO force (F PTO ) and can be maximised subject to design limitations by means of different control strategies [6], including advance To that end, mathematical models that include all of the necessary components of the conversion stages from ocean waves to the electricity grid, known as wave-to-wire (W2W) models, are vital. Such W2W models should include balanced parsimonious models for each stage (including nonlinear dynamics if required and considering the constraints and losses of each component), meaning that the level of detail included in the sub-models for the different stages of the W2W model is balanced. The most important aspects to be considered when modelling W2W models are reviewed in [11] for several different PTO systems (pneumatic [12], hydraulic [13], or a mechanical transmission system [14] coupled to a rotational generator, or a direct drive system with a linear generator [15]), which have been suggested in the literature for different WECs.
The W2W model validated in this paper is a combination of inter-connected sub-models, as shown in Figure 1, where the excitation force is F exc . The outputs for each sub-model are a function only of the inputs taken from the preceding and/or following sub-models. In addition, by implementing multirate time-integration schemes [16,17], each sub-model can use a different time step, which enables one to use the appropriate time step in each sub-model.
The large number of components included in W2W models makes the validation of W2W models, as a whole, quite challenging, mainly due to the complexity and costs of building a physical model that incorporates all of the necessary components. Therefore, the authors propose to accomplish the validation by separately validating each conversion stage of the model, which, in fact, is consistent with the way the model is designed.
The hydrodynamic model of the absorption stage is validated against high-fidelity software in [18], where a heaving point absorber is examined when moving with and without control. The validation of the mathematical models for the transmission, generation and conditioning stages is divided into two parts and is presented as a series of two papers. The first paper (Part I) presents the validation of the transmission stage [19], and the second paper (Part II), the present paper, shows the validation for the generation and conditioning stages, as highlighted in Figure 1.
Although specific W2W models can be designed for different PTO systems, all WECs with the purpose of generating electricity require electric generators, either linear [20,21] or rotational [22,23]. Hence, the model for the electric generator is an essential part of any W2W model for electricity-generating WECs, regardless of the type of PTO system. Rotational electric generators are most widely used in WECs, mainly because of their popularity in other renewable energy applications, such as wind turbines, and are off-the-shelf components. In addition, linear generators, despite their potential for high efficiency performance [24], have been shown to be highly challenging in keeping the required air gap without using robust supporting structures, which considerably reduces the power-weight ratio [25].
In a wide majority of PTO configurations suggested by different WEC developers, three electric generators have been used: a squirrel-cage induction generator (SCIG) [22], a permanent magnet synchronous generator (PMSG) [23] and a doubly-fed induction generator (DFIG) [15]. Hence, the validation for these three rotational electric generators and a back-to-back (B2B) power converter is presented in the present paper.
The remainder of the paper is organised as follows: mathematical models are presented for the three electric generators, including electrical and mechanical equations, in Section 2; the setups of the three experimental platforms including the three electric generators are described in Section 3; the details of the experiments are provided in Section 4; a discussion of the validation is presented in Section 5; and the conclusions are drawn in Section 6.

Mathematical Models for Electrical Machines
The dynamics of three-phase electrical machines are typically represented using the two-phase orthogonal rotating reference frame (dq), regardless of the machine topology. Thus, the original alternating-current (AC) signals become direct-current (DC) signals, which simplifies the analysis of the three-phase machines and is convenient for control calculations involving three-phase machines.
The transformation from a three-to a two-phase frame is carried out using the well-known Clarke and Park transformations [26], consecutively. Once all of the necessary variables have been calculated in the dq frame, results can be converted back to three-phase quantities by performing the inverse Park and Clarke transformations.
Mathematical models for the two induction machines, i.e., SCIG and DFIG, are identical except for the rotor voltages V rd and V rq , which are zero for the SCIG and non-zero for the DFIG. Thus, the model for the DFIG is presented in Section 2.1, which can also be used for the SCIG substituting the rotor voltages V rd and V rq by zero in Equations (3) and (4), respectively. The model for the PMSG is presented in Section 2.2.

Induction Machines
The model for an induction machine is based on the equivalent two-phase circuit illustrated in Figure 2, where the circuits for the direct (d) and quadrature (q) axes are shown in Figure 2a  Equations of the induction machine model are given [28] as follows: where V sd , i sd and λ sd represent the voltage, current and flux of the direct axis in the stator, respectively. Subscripts s and r are used for the stator and rotor, respectively. R s and R r are the resistance of the stator and rotor and ω and ω r the angular speed of the reference frame and the rotor, respectively. The flux linkages, λ ij , as function of currents, are represented as, where L s and L r are the stator and rotor leakage inductances, respectively, and L m is the mutual inductance. Hence, the electromagnetic torque developed in an induction machine is given by: where N p is the number of poles in the generator.

Permanent Magnet Machine
The mathematical model for the permanent magnet machine is different from the model for induction machines shown in Section 2.1, due to the major differences in the structure of the electrical machine. Figure 3 illustrates the equivalent circuit for a PMSG, where one can note the substantial differences compared to the equivalent circuit of induction machines shown in Figure 2. The voltage equations for the stator are [27], where ω e is the electric angular frequency of the generator and λ PM the rotor permanent magnet flux. Electromagnetic torque, in the case of a PMSG, is given [27] by: Apart from voltage and electromagnetic torque equations, a mechanical equation for the acceleration of the rotor is required, which is identical for both induction and permanent magnet machines. The electromagnetic torque generated in the generator equals the driving torque (including mechanical losses due to friction and windage). Hence, acceleration of the rotor is given as follows,ω where J is the rotor mechanical moment of inertia of the generator and B wind is the friction/windage damping. It should be noted that Equation (13) provides the electrical rotor speed, which is not necessarily the same as the mechfanical rotor speed. The electrical speed refers to the frequency, while the mechanical speed corresponds to the actual rotational speed of the shaft. The mechanical speed can be calculated by dividing the electrical speed by the number of pole pairs. Finally, voltages and currents from the stator of the generator are converted into active (P s ) and reactive power (Q s ) by means of Equations (14) and (15), respectively. Equations (14) and (15) are also identical for both induction machines and permanent magnet machines.

Back-To-Back Power Converter
Electric generators can be connected to the electricity grid directly (operating at fixed speed) or using a B2B power converter (operating at variable speed) that includes two inverters, a generator-side (GenSI) and a grid-side inverter (GridSI), linked through a smoothing DC line with a capacitor, as illustrated in Figure 4. The inverters of the B2B power converter allow for the control of the speed and air-gap flux in the electric generator and the output power to be delivered into the grid. However, the operating conditions of the electric generators tested in this paper are limited to sub-synchronous speeds, due to the limitations of the experimental platform, as described further in Section 4. Therefore, the air-gap flux is assumed to be constant, and the GenSI controller only controls the speed of the generator. Hence, reference signals for each inverter, reference speed (ω * ) and DC voltage (V * DC ), are given to the corresponding controllers, which are converted into voltage pulses for the inverters by means of the pulse width modulators (PWM), as shown in Figure 4.
Ideally, the mathematical model of an inverter, either GenSI or GridSI, includes the operation of the power switches, reproducing the pulses generated in the PWM units. Despite the accuracy used to define and generate the switching instants in the PWM, it is well known that an inherent waveform distortion occurs in the PWM units (due to switching operations), generating an output voltage signal that necessarily contains harmonics, unless some technique is used to eliminate such harmonics [29]. To examine the performance of the electric generators, however, such harmonics can be neglected [30].
In addition, due to the high switching frequencies of PWM units (typically between 1-20 kHz in applications related to the control of AC motors), simulations require a very refined time step (1-10 µs), which increases computational requirements to prohibitive levels. Therefore, the mathematical model of the B2B power converter presented in this paper neglects the harmonics generated by the PWM unit and considers only the fundamental frequency of the voltage signals delivered into the electric generator and the electricity grid, referred to as V GenSI and V GridSI in Figure 4, respectively. Therefore, the PWM block in Figure 4 is a simple unitary gain, meaning that reference voltage signals obtained in the controllers and the actual voltage signals are identical (V * GenSI = V GenSI and V * GridSI = V GridSI , in Figure 4).
The DC-link between the GenSI and the GridSI can comprise a single capacitor or a bank of capacitors. These capacitors can absorb the instantaneous active power fluctuations, smoothing the output power flow, and work as a voltage source for the converters. Variations of the DC voltage on the capacitor can be obtained as follows [31], where i DC GridSI and i DC GenSI are the currents at the grid and generator side of the capacitor in the DC link, respectively, C is the capacitance of the capacitor(s) at the DC-link and V DC is the voltage in the capacitor(s).

Power Losses
Modelling the power losses in electric generators and power converters is vital to accurately evaluate the final power generation. Electric generators are generally designed to minimise losses at full-load conditions, but losses increase substantially at part-load operations. Power losses may arise from different sources, and it is not always straightforward to include them in the mathematical model.
More insight to the efficiency characteristics of electrical machines is provided in [32], where losses in the SCIG, PMSG and DFIG, including power converters, are studied.

Electric Machines
Power losses in electric generators appear mainly due to large current requirements, which are manifested as large copper losses. The models described in Sections 2.1 and 2.2 for induction and permanent magnet machines, respectively, include the most important electric and mechanical dynamics and consider losses due to the Joule effect (i.e., copper losses in the stator and the rotor), core losses (i.e., stray losses) and mechanical losses (i.e., friction and windage losses). However, it should be noted that iron losses are not included in the model, because they are considered negligible [28]. Figure 5 illustrates the losses in the different parts of an electric generator, from the rotor to the stator. Mechanical losses (P mech loss ) due to friction and windage can be described as follows, while copper losses in the rotor (P r copp ) and the stator (P s copp ) are given as, Stray-load losses (P stray ), which become important when operating at rated power, can be expressed [32] as: where P N is the nominal power of the electric generator, provided in Tables A1-A3 for the generators studied in the present paper.

Power Converters
Power converter units comprise a number of power switches interconnected in a way that allows for the generation of AC signals from DC signals, and vice versa, by switching on and off the power switches.
Energy losses in converters arise from the non-ideal switching and conduction phases, illustrated in Figure 6. Power switches cannot switch on and off instantaneously, and as a consequence, there exits a finite time window, referred to as ∆T on or ∆T o f f for switching on or off, respectively, where the non-zero overlap in time of collector-emitter voltage (V ce ) and current (i ce ) happens in the power switch. Figure 6 illustrates the non-zero overlap in time of the voltage and the current and the power losses associated with switching operations in such time windows. Switching losses, regardless of switching on or off, are commonly expressed as, (21) where f sw is the switching frequency and ∆T is ∆T on when switching on and ∆T o f f when switching off. Conduction losses, on the other hand, can be calculated as follows, where R ds is the resistance of the selected power switch. Such conduction losses are constant for the whole period the power switch is conducting, as illustrated in Figure 6. However, if the operation of power switches in the inverter is not included in the model, as described in Section 2.3, power losses cannot be calculated using Equations (21) and (22). Therefore, another alternative to evaluate power losses in the inverters, via experimental data, is suggested in this paper, as shown in Section 5.2.

Experimental Setup
The three electrical machines used for the validation of the mathematical models presented in Sections 2.1 and 2.2 are installed in the Engineering School of Eibar. The electrical machine is driven, in all of the cases, by a permanent magnet synchronous motor (PMSM) coupled to the rotor of the generator. Only the DFIG is grid connected using a B2B configuration, while the SCIG and the PMSG are connected to a capacitor bank, where energy is stored. That capacitor bank is used as the energy source for the PMSM and as a sink for the energy generated in the generator, forming a closed loop and avoiding the need to dissipate the generated energy.
To generate the validation signals, a control platform is required in the experimental setting. The control platform is identical for the SCIG and PMSG and varies slightly in the case of the DFIG. Figure 7 illustrates the diagram of the experimental platform for the DFIG, including the back-to-back converter and the control platform, where u is the voltage, i g the grid current and subscripts a, b and c represent the three phases of the three-phase representation. In the case of the SCIG and the PMSG, the second inverter of the B2B converter, illustrated inside the red dash-dotted rectangle in Figure 7, does not exist, and the first inverter of the B2B converter is connected to the stator, instead of the rotor. An image of the experimental platform is shown in Figure 8, where all of the components of the diagram in Figure 7 are shown: the PMSM, the DFIG, the control PC with he DS1103 controller board and the GenSI and GridSI, referred to as RSCand GSC, respectively, in Figure 8. The control platform shown in Figure 7, which has been employed to test several control strategies in the context of wind energy [33,34], includes a PC with MATLAB/Simulink R2007a (Mathworks, Natick, MA, USA) and dsControl 3.2.1 software (dSPACE, Paderborn, Germany), as well as the DS1103 Controller Board (dSPACE, Paderborn, Germany) real-time interface using a dSpace system. The DS1103 Controller Board controls the GenSI and GridSI, generating the space vector PWM pulses with a maximum frequency of 7 kHz (143 µs).
The starting sequence of the machines varies for each generator. In the DFIG, the capacitor in the DC-link needs to be charged first. Once the DC-link is charged, the GridSI is connected to the grid by means of connector K1, allowing for DC-link voltage regulation. Voltage in the DC-link must be greater than the peak value of the grid voltage, which is about 540 V for a grid RMS voltage of 380 V. Therefore, the DC-link voltage is set to 570 V in the experiments. After connecting the GridSI to the grid, the stator voltage is synchronised with the grid voltage. This voltage synchronisation is carried out by means of a phase locked loop (PLL), via measurement of the grid side voltage. Finally, the stator is connected to the grid by switching connector K2.
In the SCIG and the PMSG, the capacitor in the DC-link must be charged first as well, but the rest of the starting sequence is significantly different. In fact, the capacitor in the DC-link is a capacitor bank of 3300 µF and 1500 µF in the SCIG and PMSG, respectively, which is used as the voltage source for the GenSI. In the case of the SCIG, once the DC-link is charged, the rated flux is imposed in the generator via the control platform, so that only after rated flux is established in the generator can the rotational speed regulation start. The PMSG, on the other hand, requires determining the initial position of the rotor before starting. To that end, a brief impulse is introduced to the generator, so that the encoder offset with respect to the position of the rotor can be determined. Hence, the rotational speed of the generator can be regulated using an adequate angle compensation.
All of the ratings and parameters for the SCIG, PMSG, DFIG and inverters are provided in Appendix A in Tables A1-A4, respectively.

Experiment Design
The design of the experiments to validate the mathematical models is not a trivial decision. The signals used in the experiments should excite the system over its whole range of operation, so that the experiments cover: • the response to all of the important frequencies and • the full input/output signal ranges, In an efficient way, making a good use of the test time. This is a common issue in system identification [35], where the information of the system's behaviour for the whole range of possible conditions is essential to accurately identify the parameters of the model. Multi-sinusoids, which contain a set of frequencies, or pseudo-random binary signals, which have a flat frequency spectrum, are typically used for the identification of linear systems [36]. However, nonlinear systems require a full operational range of both frequencies and amplitudes, for which pseudo-random signals with randomly varying amplitudes, also known as random-amplitude random-phase (RARP) sequences, are a good candidate [37].
Inputs for the electric generator validation system, which includes the generator, GenSI and the controller as illustrated in Figure 9, are the driving torque (T M ) and the reference rotational speed (ω * ). Electric generators are used in different types of WECs and coupled to different transmission systems, so the input signals utilised in the validation must cover the operating conditions of electric generators included in any WEC and coupled to any PTO system. The pattern of the input torque signal of the electric generator depends on the configuration of the PTO, regardless of the type of WEC. A PTO system that includes large accumulation systems, such as an overtopping device [38] or any wave-activated device with a hydraulic transmission system that includes large hydraulic accumulators [13,39], provides slowly-varying, smooth torque signals. In contrast, transmission systems directly connected to the electric generator, such as air turbines in oscillating water column devices [40], mechanical systems [14] or hydraulic systems without large accumulators [41] provide highly variable torque signals. Therefore, realistic operational conditions can be categorised in two groups: constant input torque and variable input torque. In some cases, the efficiency of the PTO system is improved by varying the rotational speed of the electrical generator [41], which modifies significantly the behaviour of the electric generator. Consequently, the experiments utilised for the validation of electric generators to fully cover all of the different possible realistic conditions must include, at least, three different test cases: constant input torque combined with constant rotational speed, variable input torque with constant rotational speed and variable torque with variable rotational speed. However, the amplitude and period of the input signals, for any of the three test cases, may vary considerably depending on the amplitude and period of the input waves. As a consequence, several different experiments should be considered for each test case, resulting in an infeasible number of experiments.
Nevertheless, the full range of different amplitudes and periods can be efficiently covered by the RARP signals. Therefore, the combination of RARP signals and realistic PTO signals based on single input wave conditions can completely cover the operational conditions of any electrical generator coupled to any type of transmission system and WEC with a minimum number of experiments. Hence, six sets of combined torque and speed signals are specified in total for the validation of each machine, three sets based on RARP sequences and another three sets based on realistic PTO signals. In the latter, the realistic PTO is represented by a hydraulic transmission system, and the input signals are generated using a W2W model, as described in Section 4.2. The six sets of inputs are tested in the three different generators presented in Section 3.

Random Input Signals
The three sets of RARP signals consist of two sets where only one of the inputs varies randomly, while the other remains constant, and a third set where both inputs vary randomly: • Test 1a: Zero driving torque and varying reference speed. • Test 1b: Varying driving torque and constant (rated) reference speed. • Test 1c: Varying driving torque and reference speed, as shown in Figure 10a.
The RARP signals for the first 50 s (out of 200 s) of the Test 1c are illustrated in Figure 10a, for which frequency content and normalized amplitude distribution are shown in Figure 10b,c, respectively. The signal length is chosen to be 200 s, which permits a good coverage of the required amplitude and frequency ranges. Increasing the length of the signals results in a more even coverage of the amplitude range. However, increasing the signals above 200 s, no substantial improvement is seen in the coverage of the frequency and amplitudes. In contrast, the distribution of the frequency content is heavily influenced by the maximum allowable switching period of the signal, which is selected to be 1.4 s [0.7072 Hz] to enable a good coverage of the frequency range, as shown in Figure 10b.
All RARP signals are normalised signals, so that the same inputs can be implemented in different machines by multiplying the normalised signals with the rated torque and speed of the appropriate generator.

Realistic PTO Input Signals
Realistic PTO input signals are generated using a W2W model, producing input signals that an electric generator would experience when coupled to a realistic hydraulic transmission system, which is, in turn, connected to a WEC. Figure 1 illustrates that the W2W model, where the driving torque is produced by the hydraulic motor and the voltage input is given by the power conversion unit, for which γ is the control input represented as ω * in Figure 9. The waves implemented in the W2W model are irregular waves generated using a JONSWAP spectrum [42], and a spherical heaving point absorber is used as the WEC.The JONSWAP spectrum is generated for a peak period of 10 s, a shape factor of 1.25, an intensity of the spectrum of 0.0081 and a peak enhancement factor of 3.3.
Several different hydraulic PTO topologies have been suggested in the literature, which can be organised into two main groups [43]: a hydraulic system with high storage capacity (referred to as constant-pressure configuration consP), and a hydraulic system with limited storage using a variable-displacement hydraulic motor (referred to as variable-pressure configuration varP).
These two hydraulic PTO configurations generate different input signals for the electric generator. Hydraulic PTO systems based on the consP configuration use, in general, electric generators operating at constant rotational speed, and the torque generated by the hydraulic motor is practically constant, as shown in Figure 11a. In contrast, the torque signal in the varP case vary significantly, as shown in Figure 11b,c. In addition, PTO systems based on the varP configuration suggested in the literature use electric generators that operate either at constant or variable rotational speed.
Therefore, the three sets of realistic PTO inputs are organised as follows: • Test 2a: Practically constant driving torque and constant (rated) reference speed, illustrated in Figure 11a. • Test 2b: Varying driving torque and constant (rated) reference speed, illustrated in Figure 11b. • Test 2c: Varying driving torque and varying reference speed, illustrated in Figure 11c.
In Test 2c, rotational speed follows the profile of the driving torque, but is constrained to the rated rotational speed of the generator, as shown in Figure 11c. Similarly to the RARP signals, realistic PTO signals are also normalised signals, so that they can be used for the validation of the different electric generators.

Validation
Electrical and mechanical dynamics of the generators are validated by comparing measurements from real machines to the corresponding output signals from the models. The output signals from the electrical generators, as illustrated in Figure 9, are the rotational speed (ω) and stator currents (i abc ). However, the electromagnetic torque, generated power (real and reactive) and power losses in the generators are also compared to study the suitability of the mathematical models.
Different variables from diverse test cases and electrical generators are studied in the present paper. Hence, for the different error measures to be comparable, an error measure that is suitable for all of the variables is required. Normalised measures facilitate the comparison of diverse datasets with different scales, which is necessary in this case. Unfortunately, the popular mean average percentage error (MAPE) metric cannot be employed, since there are values in the datasets that are zero or close to zero, which would imply a division by zero. The normalised root mean square error (NRMSE) could be a suitable candidate. However, because variables vary from zero to the nominal value in some test cases, using a single average value of the whole simulation for the normalisation can bias the error measure. Therefore, the validation is evaluated by means of an alternative normalized root mean square error, known as the moving average normalised root mean square error (MANRMSE), given in Equation (23). Hence, signals are divided into N parts, using a different average value in each part j to normalise the error. The bias of the error measure decreases as N increases, since the average value corresponding to each j part is more representative of the signal values in that j part. However, there is a value of N, after which increasing Ndoes not affect the error measure. That value of N ensures an unbiased error measure, without losing the characteristics of the signals. In the present paper, the error measure was observed to be constant when the signals were divided into more than 40 parts, so N = 40 was chosen to obtain the fidelity values.
where y is the measured value,ŷ the value given by the model, y j the average value at each part j and n the number of samples in each part. Once the MANRMSEis calculated, the fidelity of the variables from the mathematical model in percentage terms can be obtained as follows,

Electrical Generator Validation
Fidelity values shown in Table 1 for the SCIG show a good overall agreement between the machine and the mathematical model, where fidelity values above 90% are shown for most of the test cases and variables. Results from the mathematical models, considering all of the variables and test cases, show the ability to reproduce the behaviour of the real machine, as illustrated in Figure 12 for the rotational speed, electromagnetic torque and active and reactive power. The chaotic behaviour of the real power in Figure 12b corresponds to the abrupt variations of the inputs signals of the test case Test 1c, as shown in Figure 10. Due to these abrupt variations, the generator rapidly varies from operating close to full-load conditions to part-load condition, or vice versa. As a consequence, high power spikes appear, which can lead to high negative power values when the generator requires sucking power from the grid to reach the new operating conditions. However, the measurements of the real machines show considerable high-frequency fluctuations, as illustrated in Figure 12, which reduce the fidelity of the mathematical models for the electric generators. In fact, one can observe, from Figure 12, that such fluctuations are the main difference between the experimental results and the results obtained from the mathematical models. High-frequency fluctuations appear in all of the test cases and variables, except for the rotational speed, as shown in Figure 12, because the inertia of the rotor shaft smooths out the rotational speed signal. The source of these high-frequency fluctuations are likely to be harmonics generated by power converters and the noise of the measurements. Harmonics inserted by power converters include fluctuations of frequency multiplied bythe fundamental frequency, while the noise added by virtue of the sensors includes a random error in the signal [44]. Figure 13 illustrates the frequency content of the stator voltage signal in Test2b, for which the the fundamental frequency is 50 Hz for the whole simulation, because the rotational speed is constant. In addition to the fundamental frequency, one can clearly see the harmonics at twice (2 × f 0 ) and four-times the fundamental frequency (4 × f 0 ), as well as the noise all over the frequency range in the case of the real machine. The mathematical models described in Section 2, however, do not incorporate switching operations of the power converters, as explained in Section 2.3, and as a consequence, results from the mathematical models show no high-frequency fluctuation, as illustrated in Figure 12. The frequency content associated with the voltage signal of the mathematical model is, indeed, zero far from the fundamental frequency, as shown in Figure 13.
In the case of the PMSG, the fidelity values shown in Table 2 also show good agreement between the mathematical model and the machine, with fidelity values over 90% for most of the test cases and variables. Similarly to the SCIG, the test case Test 2a shows the results of lower fidelity values. However, fidelity values, in general, are lower in the PMSG than in the SCIG. These lower fidelity values are associated with stronger high-frequency fluctuations, as illustrated in Figure 14, where the level of high-frequency fluctuations is compared for the PMSG and the SCIG. Figure 14a illustrates normalised real power values (normalised against rated power), and Figure 14b shows the upper and lower envelopes of the normalized real power signals. The lower envelope for the SCIG and the PMSG in Figure 14b is almost identical, while the upper envelope is considerably higher for the PMSG, which illustrates the larger level of high-frequency fluctuations in the PMSG.   Larger high-frequency fluctuations in the PMSG can also be due to the higher rated rotational speed of the PMSG, which is twice as high as the rated rotational speed of the SCIG. The higher the rotational speed, the higher the frequency, which leads to faster pulses generated by the PWM voltage source converter and, as a consequence, to stronger fluctuations.
Finally, fidelity figures for the DFIG, shown in Table 3, are similar to those obtained for the SCIG, which shows, once again, good agreement between the mathematical model and the machine. Rated power and rotational speed are identical for the SCIG and the DFIG, confirmed by the similar fidelity values. Apart from the dynamics of the machines, for which the effectiveness of the mathematical models has been demonstrated, accurately estimating power losses of the generator is crucial. Therefore, the efficiency of the machines is studied, comparing efficiency values obtained from the real machines and the mathematical models in the three generators, for the test case Test 1c.
Test 1c is the test case that best covers the whole operational range of the generators, randomly varying rotational speed and driving torque, as shown in Figure 10. Although such random variations of the rotational speed and driving torque are rather unusual in normal operations, the coverage of the full range of operational conditions makes Test 1c especially suitable for the study of efficiency. However, such random variations include abrupt spikes in the power and efficiency signals. In addition, because speed and torque input signals vary randomly, the electric generators operate at high rotational speed and low torque at some points during the simulation, which results in significant efficiency drops.
Therefore, Figure 15a-c illustrate the trend lines of the efficiency signals for the SCIG, PMSG and DFIG, respectively, as a function of the normalised rotational speed, providing satisfactory agreement between the curve of the real machines and the curve of the mathematical models. Efficiency signals are fitted using a power trend line as follows, where y f it is the trend line, c 1 , c 2 and c 3 are the coefficients of the power function that are identified to fit the data and x is the variable on which the trend line is based, i.e., normalised rotational speed in this case. The coefficients of the power function for each generator are given in Table 4.

Power Converter Validation
The experiments carried out in the DFIG, since it is grid connected in a B2B configuration, are also used to validate the B2B converter implemented in the mathematical model, as described in Section 2.3, including power losses in the GenSI and GridSI.
The main objective of the GenSI and GridSI is the control of the electric generator and DC-link voltage, respectively. The ability of the mathematical model to accurately reproduce the effect of the controller in the GenSI is illustrated in Figure 16a for the DFIG and Test 1c and has been demonstrated in Section 5.1 for all of the generators and a wide range of operating conditions. Similar results can be obtained in the case of the GridSI, where the control of the DC-link voltage in the mathematical model is almost identical to the DC-link voltage control in the experimental platform.
Fidelity values, obtained by comparing the DC-link voltage values from the experimental platform and the mathematical model, are presented in Table 5, showing an excellent agreement between the experimental and numerical results. Figure 16b illustrates that agreement for Test 1c. However, power losses in the power converters can only be studied if the operation of the power switches in the inverters is considered in the model, which are not included in the mathematical models described in Section 2.3, due to the prohibitive computational requirements.
Therefore, another alternative to evaluate power losses in the power converters is suggested in this paper. Power measurements at the input and output of the B2B power converter are available in the experiments, from where the power losses in the B2B converter can be extracted.
Inverters' efficiency varies as a function of load, with considerable efficiency drops at part-load and overload conditions [45]. However, measurements in the experiments only cover the part-load operation of the inverters, since the rated power of the DFIG is lower than the rated power of the inverters used in the B2B converter (see Tables A3 and A4 in the Appendix A).  Figure 17a shows the efficiency of one inverter in the B2B converter as a function of normalised load, defined as the ratio between the input power of the B2B converter and the rated power of the inverters. The points from the experimental measurements clearly show the trend of the efficiency curve, so a power trend line, described in Equation (25), is used to fit the experimental measurements, as shown in Figure 17a. Using the fitted curve, power losses in the inverters can be calculated without prohibitively increasing the computational requirements of the mathematical model. Table 5 shows the fidelity values of the power losses in the inverters of the B2B converter, obtained by comparing losses measured in the experimental platform to the losses obtained in the mathematical model, and Figure 17b illustrates the power output of the B2B converter for the machine and the model. Fidelity values for all of the test cases show good agreement, particularly good for the test case Test 1c. This is because the efficiency curve is fitted using the specific data from Test 1c.

Conclusions
Mathematical models for three different electric generators (squirrel-cage induction generator, permanent magnet synchronous generator and doubly-fed induction generator) are validated in the present paper against experimental data from three real machines. In addition, the model for a back-to-back power converter is validated in this paper, using the data generated from the experiments in the doubly-fed induction generator connected to the grid in a back-to-back configuration. The mathematical models for the three electric generators and the back-to-back power converter are given in Section 2.
The experimental platform to generate the experimental data is described in Section 3. The validation is carried out comparing results from the mathematical models and the experiments by means of fidelity values based on the moving average normalised root mean square error. Six different test cases are designed for the validation, three of which are based on random signals generated using random-amplitude random-phase sequences, and the other three are based on realistic PTO signals generated using a W2W model with a hydraulic transmissions system, as shown in Section 4. That way, the whole operation range of the electric generators is covered.
The mathematical model of the B2B power converter, presented in Section 2.3, neglects the harmonics generated by the PWM due to the extremely low time step required to accurately model the operations of power switches in the inverters, which prohibitively increases the computational requirements of the mathematical models. Hence, in the mathematical models, voltage signals delivered from the inverters into the electric generator and electricity grid only include the fundamental frequency determined in the controller. Therefore, the present paper suggests using an efficiency curve for inverters to include power losses without increasing computational requirements. Such an efficiency curve is determined by using a power trend line fitted to experimental data, as described in Section 5.2.
Overall, the fidelity values for the three electric generators and the back-to-back power converter, presented in Sections 5.1 and 5.2, respectively, show very satisfactory agreement between the results obtained from the experimental platforms and the mathematical models. Therefore, this paper demonstrates the suitability of the mathematical models described in Sections 2.1 and 2.2, in spite of the neglected iron losses in the generator and the harmonics generated by the PWM.
Author Contributions: Markel Penalba and John V. Ringwood participated in implementing the mathematical models, while José-Antonio Cortajarena designed and constructed the experimental platforms and ran the simulations in those platforms. Markel Penalba wrote the manuscript, and José-Antonio Cortajarena and John V. Ringwood revised it critically for important intellectual content. Finally, all authors gave the final approval of the version to be submitted and any revised version.

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

Appendix A. Experimental Platform Parameters
Appendix A. 1

. Machine Parameters
The parameters of the three machines are given in the following Tables A1-A3 for the SCIG, the PMSG and the DFIG, respectively.