## 4 Simulation and Hardware-in-the-Loop Results
### Real-Time and Hardware-in-Loop Results  
To validate the response and the performance of the proposed approach with the designed controllers, hardware-in-the-loop (HIL) was implemented, as shown in Figure 16. The HIL study provides a real-time benchmark to test the proposed method and the designed controllers. The WT system is modeled and compiled inside an Opal-RT real time simulator. Then, C-code was generated for the controller of the machine side converter, and was implemented inside a Texas Instruments (TI) Digital signal processor (DSP), (TI TMS230F28335).  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Losses** & **MPPT** & **Controlling \(\omega_{r}\) Only** & **Proposed Approach** \\ \hline Resistive losses (kW) & 12.577 & 13.238 & 7.063 \\ Conduction losses (kW) & 12.77 & 12.87 & 8.13 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Power losses for different scenarios.  
Figure 16: Hardware-in-the-loop implementation.  
Figure 15: Pitch angle (short-term simulation).  
The controller (DSP) receives the rotor speed and the machine's current as an analog signal (fixed-sample) from Opal-RT. Then, the controller processes the signals and generates pulse width modulation (PWM) pulses to control the switches of the converter. The sampling frequency of the DSP is selected to be 9 kHz. The s-domain PI controllers were discretized using the backward Euler conversion method. The inner loop (current) controller is ensured to be faster than the outer loop (speed) controller.  
In this study, the controller and proposed method was tested with the wind speed profile shown in Figure 17. Like the simulation studies, two different approaches for de-loading were implemented, using the same wind profile for comparison. A baseline of MPPT was tested first, and the maximum power was achieved. Then, the de-loading was implemented using the proposed method summarized in Figure 3, using the optimal pitch angle and rotor speed set. Then, de-loading was achieved using rotor speed only. A fixed reserve power of 0.3 MW was set for both approaches.  
For consistency, the same wind speed and time frame were used for all scenarios. First, the controller received the reference to perform the MPPT. Then, the same controller was fed with a rotor reference to de-load the WT system. Finally, the reference generated by the proposed method was used to obtain the reference set points (rotor speed and pitch angle).  
The results obtained from real time simulator and HIL are demonstrated in Figures 18-20. For the proposed experimental method, the three-phase current for machine is shown in Figure 18. The rotor speed (measured and reference) and \(q\)-axis current for all cases are shown in Figure 19. It is clear that the proposed method reduces the q-axis current. As a result, the power loss is decreased. The rotor speed in the plot is in (rad/s), and the gain is 1. For instant, the rotor speed at the first 5-s time slot was 2.3 (rad/s) for the MPPT case. The rotor speed that resulted from the proposed method is 2.2 (rad/s), whereas, the rotor speed is 1.6 (rad/s) when the pitch angle is kept at 0.  
The gain for the q-axis current is 2000. Therefore, the current at the MPPT case is 3400 A for the first 5-s time slot. For the proposed and fixed pitch angle methods, the currents are 2600 A and 3600 A, respectively. Figure 20 shows the power generated from the WT system. Both approaches provide the required reserve power, as can be seen from the plot. The proposed method involves a pitch angle controller, as shown in Figure 20b.  
Figure 17: Wind profile (hardware-in-the-loop).