# NREL 5MW Control design - Power deviation

**URL:** <https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905>\
**Category:** Controls\
**Created:** [September 25, 2018, 10:01am UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905 "2018-09-25T10:01:08Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Etienne.Jargot](https://avatars.discourse-cdn.com/v4/letter/e/e9a140/32.png) [@Etienne.Jargot](https://forums.nlr.gov/u/Etienne.Jargot)\
**Post date:** [September 25, 2018, 10:01am UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/1 "2018-09-25T10:01:08Z")

</div>

Hello,

I am currently reproducing the control logic of Servodyn.f90 into IEC 61131-3 programming languages for programmable logic controllers.  
I am a bit lost about my results and I would like to have an external opinion.

As attached, you will find my results for two configurations:

- above rated
- below rated

Below rated operations, the torque controller works well and the rotor power match with the expected rotor power given by the power curve.  
Above rated operations, we can observed a high deviation of the rotor power around the rated power.  
I don’t really know what to think about that, maybe the pitch regulation is to slow, maybe the wind speed is too turbulent or maybe the problem is due to the rotor speed dynamic…

For information, I used a cycle time DT = 30ms.

Feel free to tell me if you need more information.

Thank you in advance.

Etienne JARGOT

 ![Results_NREL5MW_Model_BelowRated.PNG](https://europe1.discourse-cdn.com/nrel/original/2X/b/b5629e348fff87da3bd302bfbd970e07ca1b6e29.png)  
 ![Results_NREL5MW_Model_AboveRated.PNG](https://europe1.discourse-cdn.com/nrel/original/2X/1/1165524f6e51ab1747922f90004b2a4c2233e8c9.png)

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [September 25, 2018, 12:46pm UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/2 "2018-09-25T12:46:26Z")

</div>

Dear Etienne,

Overall, the mean values of the speed, torque, pitch, and power and trends are consistent with those of the NREL 5-MW turbine.

Regarding the large excursions in rotor power, can I ask how you are calculating rotor power? Does you model have the correct rotor/generator inertia, which will impact how quickly the rotor can accelerate/decelerate as a result of torque variations? Have you tried using the same turbulent wind you are using in this model within the FAST model of the NREL 5-MW turbine to see how FAST with the original controller implementation responds to this wind?

Best regards,

---

<div class="post-metadata">

**Author:** ![Etienne.Jargot](https://avatars.discourse-cdn.com/v4/letter/e/e9a140/32.png) [@Etienne.Jargot](https://forums.nlr.gov/u/Etienne.Jargot)\
**Post date:** [September 25, 2018, 1:28pm UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/3 "2018-09-25T13:28:25Z")

</div>

Dear Jason,

Thank you for your answer.

Regarding the large excursions in rotor power, can I ask how you are calculating rotor power?  
RotPwr = 1/2 \* AirDensity\* PI \* Rot\_Radius^2 \* Cp(TSR, Pitch) \* WindSpeed^3  
Considering the limits of the IEC 61131-3 language, the Cp is an approximation made with some coefficients I fitted on the FAST Cp(TSR, Pitch) table.

Does you model have the correct rotor/generator inertia, which will impact how quickly the rotor can accelerate/decelerate as a result of torque variations?   
I based the rotor acceleration on the inertia you gave on previous topics.  
It appears like that in my code:  
RotSpeed = RotSpeed + (RotTrq - GenTrq \* GearboxRatio) / J\_Drive \* DT  
with :

- RotSpeed in rad/s
- GearboxRatio = 97
- J\_Drive = J\_Gen \* GearboxRatio^2 + J\_Rot = 534.116 \* 97^2 + 38,759,228 = 43,784,725.44 kg.m^2
- GenTrq based on the generator torque controller in N.m
- RotTrq in N.m obtained by RotPwr / RotSpeed
- DT the cycle time

Have you tried using the same turbulent wind you are using in this model within the FAST model of the NREL 5-MW turbine to see how FAST with the original controller implementation responds to this wind?  
No I didn’t try to compare directly with FAST results, indeed I should.

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [September 25, 2018, 2:46pm UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/4 "2018-09-25T14:46:22Z")

</div>

Dear Etienne,

OK, thanks for your clarifications.

Your definition of RotPwr equals the definition of the aerodynamic power. The actual electrical power will likely be smoother because the generator torque is calculated from a low-pass filtered generator speed i.e.

ElecPwr = GenTrq_GenSpeed_GenEff

where GenSpeed = RotSpeed\*GearboxRatio for a rigid drivetrain.

Best regards,

---

<div class="post-metadata">

**Author:** ![Etienne.Jargot](https://avatars.discourse-cdn.com/v4/letter/e/e9a140/32.png) [@Etienne.Jargot](https://forums.nlr.gov/u/Etienne.Jargot)\
**Post date:** [September 25, 2018, 3:54pm UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/5 "2018-09-25T15:54:50Z")

</div>

Dear Jason,

Thank you very much.  
You’re right, the electrical power is smoother than the aerodynamic power.

I don’t know if I need to create a new topic about that but I would like to know also how can I model the behavior of the wind turbine below the cut-in speed and above the cut-out speed?  
Especially for the following transitions:

- Above cut-in \> Below cut-in
- Below cut-in \> Above cut-in
- Below cut-out \> Above cut-out
- Above cut-out \> Below cut-out

I guess I have to feather the blade to a blade pitch = 90°?  
I don’t really know how to model the rotor deceleration/acceleration in this case.

Thank you for your time.

Best regards,  
Etienne JARGOT

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [September 25, 2018, 3:59pm UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/6 "2018-09-25T15:59:55Z")

</div>

Dear Etienne,

I’m probably not the best person to answer your question because I have not implemented any normal wind turbine start-up or shut-down logic myself. Hopefully some else on this forum can comment or perhaps you can find documentation of normal wind turbine start-up and shut-down logic in the literature.

Best regards,

---

<div class="post-metadata">

**Author:** ![Etienne.Jargot](https://avatars.discourse-cdn.com/v4/letter/e/e9a140/32.png) [@Etienne.Jargot](https://forums.nlr.gov/u/Etienne.Jargot)\
**Post date:** [September 26, 2018, 9:09am UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/7 "2018-09-26T09:09:28Z")

</div>

Dear Jason,

I’ve already looked in the literature but unfortunately I didn’t find a lot of information about that topic.  
I guess I should take a look again.

Would you have any advice about how to implement a PMSG or DFIG model combined with the NREL 5W wind turbine model ?  
I looked briefly the NREL document #59195 - “Simulation for Wind Turbine Generators—With FAST and MATLAB-Simulink Modules” and other topics on the forum but I am not sure that gives me the level of details I need to build the generator model in basic programming language.

Thanks again for your help.

Best regards,  
Etienne JARGOT

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [September 26, 2018, 12:23pm UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/8 "2018-09-26T12:23:10Z")

</div>

Dear Etienne,

The reference you identify is the one I would have forwarded to you. I can’t think of other references with more detail published by NREL.

Best regards,

---

<div class="post-metadata">

**Author:** ![Etienne.Jargot](https://avatars.discourse-cdn.com/v4/letter/e/e9a140/32.png) [@Etienne.Jargot](https://forums.nlr.gov/u/Etienne.Jargot)\
**Post date:** [September 26, 2018, 12:28pm UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/9 "2018-09-26T12:28:44Z")

</div>

Ok, I think I need to see directly how the Simulink generator block is built.

Thank you, have a good day.

Etienne JARGOT

---

<div class="post-metadata">

**Author:** ![Etienne.Jargot](https://avatars.discourse-cdn.com/v4/letter/e/e9a140/32.png) [@Etienne.Jargot](https://forums.nlr.gov/u/Etienne.Jargot)\
**Post date:** [September 26, 2018, 2:05pm UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/10 "2018-09-26T14:05:34Z")

</div>

Sorry Jason but just to be sure, again about the start-up/shut-down region, you don’t know the behavior of the rotor deceleration/acceleration with the wind speed and the pitch angle in these regions?

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [September 26, 2018, 2:46pm UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/11 "2018-09-26T14:46:13Z")

</div>

Dear Etianne,

A typically utility-scale turbine would start up by pitching the blades to the run position without motoring. A normal shutdown would involve pitching-to-feather without shaft braking. But I’m not familiar with the timing of the events or pitch rates.

Best regards,

---

<div class="post-metadata">

**Author:** ![Etienne.Jargot](https://avatars.discourse-cdn.com/v4/letter/e/e9a140/32.png) [@Etienne.Jargot](https://forums.nlr.gov/u/Etienne.Jargot)\
**Post date:** [September 26, 2018, 3:26pm UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/12 "2018-09-26T15:26:24Z")

</div>

Dear Jason,

I understand you are not in expert on that topic, but I am not sure you understood exactly what I am trying to do.  
I agree about the pitch rates and the timing, I will make some assumptions about that.

But I don’t know how can I model a coherent rotor deceleration when both aerodynamic and generator torque equals to zero for example.  
Because during normal conditions (between cut-in and cut-out), the rotor dynamic is driven by the difference between the aerodynamic torque and the generator torque, so no problem.

I guess it will depend on some parameters such as the air friction and it should seems like an exponential decrease.

Best regards,  
Etienne  
 ![Wind_Spd_ShtDwn_StUp.png](https://europe1.discourse-cdn.com/nrel/original/2X/8/82a93d12d4e1bef8930868dbd612be9a4899c410.png)  
 ![Rot_Spd_ShtDwn_StUp.png](https://europe1.discourse-cdn.com/nrel/original/2X/5/551f93d94af3d3ad5b723f1f1a356a9e4200a282.png)

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [September 26, 2018, 3:57pm UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/13 "2018-09-26T15:57:18Z")

</div>

Dear Etienne,

I’m not really sure I understand your question. I agree that the generator/rotor acceleration/deceleration is driven by the difference in aerodynamic and generator torques. The aerodynamic torque will be nonzero during the transient pitch event. If you can prescribe the generator torque and pitch ramps, FAST can be used to calculate the resulting aerodynamic torque and rotor acceleration/deceleration.

Best regards,

---

<div class="post-metadata">

**Author:** ![Etienne.Jargot](https://avatars.discourse-cdn.com/v4/letter/e/e9a140/32.png) [@Etienne.Jargot](https://forums.nlr.gov/u/Etienne.Jargot)\
**Post date:** [September 27, 2018, 7:30am UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/14 "2018-09-27T07:30:06Z")

</div>

Dear Jason,

I guess I misunderstood the behavior of a wind turbine.  
Is it right when the wind speed drops under the cut in speed and the rotor speed is still high, the TSR is quite high so the Cp and the aerodynamic power becomes negative?

Thank you for your explanations.

Best regards,  
Etienne

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [September 27, 2018, 12:51pm UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/15 "2018-09-27T12:51:14Z")

</div>

Dear Etienne,

Yes, that is correct. The Cp will also go negative when you feather the blades a lot.

Best regards,

---

<div class="post-metadata">

**Author:** ![Etienne.Jargot](https://avatars.discourse-cdn.com/v4/letter/e/e9a140/32.png) [@Etienne.Jargot](https://forums.nlr.gov/u/Etienne.Jargot)\
**Post date:** [September 27, 2018, 1:04pm UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/16 "2018-09-27T13:04:14Z")

</div>

Dear Jason,

Ok thank you, now I understand better.  
And when you said “If you can prescribe the generator torque and pitch ramps…”, you mean that the generator torque will not be zero below cut-in generator speed such as the control logic of Servodyn.f90 or zero above cut-out wind speed?

Best regards,  
Etienne

---

<div class="post-metadata">

**Author:** ![Jason.Jonkman](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/jason.jonkman/32/3086_2.png) [@Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)\
**Post date:** [September 27, 2018, 2:41pm UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/17 "2018-09-27T14:41:46Z")

</div>

Dear Etienne,

I would expect that the generator torque would be zero below cut-in or above cut-out wind speeds. But there is likely some ramp-down of torque when transitioning from operational to idling modes.

Best regards,

---

<div class="post-metadata">

**Author:** ![Etienne.Jargot](https://avatars.discourse-cdn.com/v4/letter/e/e9a140/32.png) [@Etienne.Jargot](https://forums.nlr.gov/u/Etienne.Jargot)\
**Post date:** [September 27, 2018, 3:10pm UTC](https://forums.nlr.gov/t/nrel-5mw-control-design-power-deviation/1905/18 "2018-09-27T15:10:46Z")

</div>

Ok I get it, thank you for your time.  
The information you gave me are very helpful.

Best regards,  
Etienne
