Implementation of baseline controller in Simulink.

Hi All
I have as part of my master thesis, with focus on non-linear control of onshore wind turbines, decided to do a Simulink implementation of the NREL gain scheduled baseline PI controller described in “Definition of a 5-MW Reference Wind Turbine for Offshore System Development”. Unfortunately I am having some difficulties achieving the same performance as the available .DLL version of the same controller and was hoping someone maybe had an idea why?

The lowpass filter on the generator speed is implemented as a transfer function given as: G(s) = 1 / ( (1/ (0.5*pi) ) * s + 1) with a bode characteristic in accordance with the plot in “Definition of a 5-MW Reference Wind Turbine for Offshore System Development”.

The generator-torque controller is implemented in a MATLAB fcn block, in which a series of if statements choose between the different torque expressions depending on the generator speed. The output of the generator-torque controller as a function of generator speed is shown in one of the attached figures. It is found to be in good keeping with the plot available in the documentation of the baseline controller.

The proportional - and integral gain for the gain scheduled PI controller is calculated from expression (7-18) and (7-19) respectively (gain correction factor is calculated using expression (7-20)). The resulting gains as a function of the varying pitch angle are shown in one of the attached figures. As shown in the figure the calculated gains are identical to the ones presented in “Definition of a 5-MW Reference Wind Turbine for Offshore System Development”. The PI-controller is implemented as a difference equation based on a trapezoid rule. The difference equation is given as: y(k) = y(k-1) + Kp*(e(k) – e(k-1)) + 1/2 * DT * Ki*(e(k) + e(k-1)) with a time step DT of 0.0125.

The performance of my own implementation and the available .DLL is compared at a constant input wind speeds of 5, 13 and 20 m/s. The resulting generator speed and pitch angle for the two controllers are shown in the attached figures. As it can be seen in the plots the performance of my own implementation is identical to that of the .DLL controller for a wind speed below rated (5 m/s). This implies that the generator-torque controller is identical for the two controllers. However when operation above rated is considered it is found that the performance of the .DLL controller is superior to my implementation of the controller, see plots in attached figures. I do not understand this difference in performance, since the gains in my implementation of the controller is identical to the gains presented in the documentation: “Definition of a 5-MW Reference Wind Turbine for Offshore System Development”. It should be noted that the Simulink solver is ode 4 (Runge-Kutta) with a fixed-step size of DT of 0.0125. I hope someone has an idea of what I have done wrong of if the gains presented in the documentation is out of date?

Best Regards