# Gain Scheduling

**URL:** <https://forums.nlr.gov/t/gain-scheduling/286>\
**Category:** Computer-Aided Engineering Software Tools\
**Created:** [August 16, 2010, 10:58am UTC](https://forums.nlr.gov/t/gain-scheduling/286 "2010-08-16T10:58:56Z")\
**Posts on this page:** 17\
**Page:** 3

<div class="post-metadata">

**Author:** ![Daniel.Zalkind](https://avatars.discourse-cdn.com/v4/letter/d/5daacb/32.png) [@Daniel.Zalkind](https://forums.nlr.gov/u/Daniel.Zalkind)\
**Post date:** [July 10, 2023, 3:17pm UTC](https://forums.nlr.gov/t/gain-scheduling/286/41 "2023-07-10T15:17:31Z")

</div>

Hi Lei,

`omega_pc` is the pitch controller closed-loop bandwidth. It’s a measure of the response of the pitch control to generator speed error.

`PA_CornerFreq` is the pitch actuator’s natural frequency. It measures how quickly the pitch angle responds to the commanded pitch control. You can think of it as a realistic delay in the system.

More information on all inputs can be found here: [6. ROSCO\_Toolbox tuning .yaml - ROSCO 2.8.0 documentation](https://rosco.readthedocs.io/en/latest/source/toolbox_input.html)

Best, Dan

---

<div class="post-metadata">

**Author:** ![Lei.Xue](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/lei.xue/32/5339_2.png) [@Lei.Xue](https://forums.nlr.gov/u/Lei.Xue)\
**Post date:** [January 3, 2024, 5:41am UTC](https://forums.nlr.gov/t/gain-scheduling/286/42 "2024-01-03T05:41:32Z")

</div>

Dear Jason,

I think I did exactly what you suggested and linearized it with OpenFASTv3.5.0. However, the result I got is not completely consistent with Table 7-1, I would like to know if there is a mistake in my linearization, or is this result due to the difference of versions?  
My folder is attached below via the Google Drive link. I would appreciate it if you had the time to look into the problem  
 ![image](https://europe1.discourse-cdn.com/nrel/original/2X/b/bcd092d35b45248df32d1b16756473c85aa25d76.png)

 ![image](https://europe1.discourse-cdn.com/nrel/original/2X/f/f9c28772ef81ee67e4c76d40e8542ac9f46a7ced.png)  
[https://drive.google.com/drive/folders/1A6bfLDTzLOQKAFahLsG0DqvnL0JT08aN?usp=drive\_link](https://drive.google.com/drive/folders/1A6bfLDTzLOQKAFahLsG0DqvnL0JT08aN?usp=drive_link)

Best regards  
Lei

---

<div class="post-metadata">

**Author:** ![Lei.Xue](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/lei.xue/32/5339_2.png) [@Lei.Xue](https://forums.nlr.gov/u/Lei.Xue)\
**Post date:** [January 3, 2024, 10:34am UTC](https://forums.nlr.gov/t/gain-scheduling/286/43 "2024-01-03T10:34:51Z")

</div>

Another problem is that when I calculated Kp according to formulas 7-18, 7-19, 7-20, I found that the value of I\_Drivetrain I used was wrong. But this number is based on previous discussions on the forum ([Question about PI control - #14 by Jason.Jonkman](https://forums.nlr.gov/t/question-about-pi-control/1655/14)). Could you help me point out my mistake? Attached here are my two calculations, and it looks like the I\_Drivetrain number should be something close to 72900.

 ![image](https://europe1.discourse-cdn.com/nrel/original/2X/8/8cce6bef6b9b61dc6d4d396c09244854977d82ca.png)  
 ![image](https://europe1.discourse-cdn.com/nrel/original/2X/8/81168f420e0b772d2aeca649a28bcb10652792b2.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:** [January 3, 2024, 2:43pm UTC](https://forums.nlr.gov/t/gain-scheduling/286/44 "2024-01-03T14:43:05Z")

</div>

Dear @Lei.Xue,

Your results look very close to those published in the NREL 5-MW baseline wind turbine specifications report. I would guess the small differences are the result of different versions of the software.

The value of I\_Drivetrain = 4.37e7 kg\*m^2 is closer to the value used in the report. However, your equation for Kp\_0 is not correct. The omega\_Phin should not be squared and the factor of 1000 is not needed.

Best regards,

---

<div class="post-metadata">

**Author:** ![Lei.Xue](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/lei.xue/32/5339_2.png) [@Lei.Xue](https://forums.nlr.gov/u/Lei.Xue)\
**Post date:** [January 4, 2024, 5:49am UTC](https://forums.nlr.gov/t/gain-scheduling/286/45 "2024-01-04T05:49:15Z")

</div>

Dear Jason,

Thank you very much. I was so careless. Now I have get the right value for NREL 5.0 MW Baseline Wind Turbine (Onshore).  
But I also want to know how you got the Proportional Gain and Integral Gain for the OC4-DeepCwind semisubmersible FOWT. I guess you just changed the reference value of the natural frequency. Did you use a value closer to 0.0319Hz?As I tried shown in the picture. Is that correct? How was this value determined？Since I only saw 0.037Hz and 0.034Hz.  
Thank you again for your work and time.

 ![image](https://europe1.discourse-cdn.com/nrel/original/2X/b/b75888c14a3ff185180c3dc261c8fb9d5b00d2c0.png)  
 ![image](https://europe1.discourse-cdn.com/nrel/original/2X/1/13ce653647c9f4910501486bd43e031b5d0f547b.png)

Best regards,  
Lei

---

<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:** [January 4, 2024, 4:37pm UTC](https://forums.nlr.gov/t/gain-scheduling/286/46 "2024-01-04T16:37:22Z")

</div>

Dear @Lei.Xue,

Yes, that is correct. What you call Omega\_Phin was changed from 0.6 rad/s in the baseline controller of the NREL 5-MW baselind wind turbine to 0.2 rad/s (0.03183 Hz) for the baseline controller for the OC3-Hywind and OC4-DeepCwind semisubmersible models.

Best regards,

---

<div class="post-metadata">

**Author:** ![Nitin.Sivakumar](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@Nitin.Sivakumar](https://forums.nlr.gov/u/Nitin.Sivakumar)\
**Post date:** [March 7, 2024, 9:46am UTC](https://forums.nlr.gov/t/gain-scheduling/286/47 "2024-03-07T09:46:59Z")

</div>

Dear forum members,  
For controller design, I am interested in getting the partial derivative of aerodynamic torque w.r.t rotor speed and the partial derivative of aerodynamic torque w.r.t wind speed. How can I get that for any of the NREL OpenFast models?

---

<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:** [March 7, 2024, 1:28pm UTC](https://forums.nlr.gov/t/gain-scheduling/286/48 "2024-03-07T13:28:39Z")

</div>

Dear @Nitin.Sivakumar,

These derivatives can be obtained through the OpenFAST linearization functionality. You should include the aerodynamic torque (AeroDyn output `RtAeroMxh`) in the AeroDyn `OutList` and ensure that the generator or drivetrain DOFs are enabled in OpenFAST. I would use `FrozenWake` = TRUE in AeroDyn with `WakeMod` = `AFAeroMod` = 1. Then linearize OpenFAST with `LinInputs` = `LinOutputs` = 1. The derivative of aerodynamic torque with respect to rotor speed will then be included in the C matrix and the derivative of aerodynamic torque with respect to wind speed will be included in the D matrix.

Best regards,

---

<div class="post-metadata">

**Author:** ![Nitin.Sivakumar](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@Nitin.Sivakumar](https://forums.nlr.gov/u/Nitin.Sivakumar)\
**Post date:** [March 8, 2024, 1:24am UTC](https://forums.nlr.gov/t/gain-scheduling/286/49 "2024-03-08T01:24:53Z")

</div>

Dear Jason sir,  
To get the derivative of aerodynamic torque with respect to rotor speed, I understand that I need to compare the C matrix element which matches between the output **RtAeroMxh** and the state **ED First time derivative of Variable speed generator DOF (internal DOF index = DOF\_GeAz), rad/s**.And I need to compare the D matrix element which matches between the output **RtAeroMxh** and the input **IfW Extended input: horizontal wind speed (steady/uniform wind), m/s**. Is my understanding correct? Another question is whether this partial derivative calculation method applies to all wind speeds in below and above-rated conditions. Also I am facing difficulty to linearize the model at certain wind speeds with the GenDOF mode ON, do I have to change any setting for such cases?

---

<div class="post-metadata">

**Author:** ![Nitin.Sivakumar](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@Nitin.Sivakumar](https://forums.nlr.gov/u/Nitin.Sivakumar)\
**Post date:** [March 8, 2024, 6:49am UTC](https://forums.nlr.gov/t/gain-scheduling/286/50 "2024-03-08T06:49:37Z")

</div>

Dear Jason sir,  
Assuming that my understanding was correct as per my previous post, I have tried to calculate the values of the partial derivative of aerodynamic torque with respect to rotor speed and wind speed which I get for wind speeds ranging from 11 to 25 m/s obtained by the procedure mentioned by you, in standard units as output by OpenFast. The openfast model used was 5MW\_OC4Semi\_Linear. Does this seems correct?

 ![image](https://europe1.discourse-cdn.com/nrel/original/2X/1/158844e8fcada8789a6159f6e7d643c47069408e.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:** [March 8, 2024, 2:11pm UTC](https://forums.nlr.gov/t/gain-scheduling/286/51 "2024-03-08T14:11:00Z")

</div>

Dear @Nitin.Sivakumar,

Yes, your understanding is correct.

I don’t recall computing the partial derivative of aerodynamic torque with respect to rotor speed myself before for the NREL 5-MW baseline wind turbine rotor, but your partial derivatives of aerodynamic torque with respect to wind speed are in the ballpark of what I would expect.

Regarding the steady state solution with `GenDOF` = TRUE, I would suggest using `TrimCase` = 2 with fixed pitch (= 0deg for the NREL 5-MW baseline wind turbine) for operational wind speeds below rated and `TrimCase` = 3 with fixed generator torque (= the rated torque of 43093.55 Nm for the NREL 5-MW baseline wind turbine) for operational wind speeds above rated. Is that what you’ve done?

Best regards,

---

<div class="post-metadata">

**Author:** ![Nitin.Sivakumar](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@Nitin.Sivakumar](https://forums.nlr.gov/u/Nitin.Sivakumar)\
**Post date:** [March 8, 2024, 4:44pm UTC](https://forums.nlr.gov/t/gain-scheduling/286/52 "2024-03-08T16:44:39Z")

</div>

Dear Jason sir,  
I have only tried above-rated wind conditions, for that I used Trimcase 3 and constant torque of 43093.55 Nm. I wonder about the values of partial derivatives of torque to rotor speed, can it have values as high as these?  
Best regards

---

<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:** [March 8, 2024, 5:23pm UTC](https://forums.nlr.gov/t/gain-scheduling/286/53 "2024-03-08T17:23:57Z")

</div>

Dear @Nitin.Sivakumar,

Again, I haven’t computed these partial derivatives myself before.

But in Region 2, the torque-speed curve of the generator has a slope of roughly 10000 Nm/ (200 rpm) = 50 Nm/rpm = 500 Nm/(rad/s) on the high-speed shaft side, which (multipling by `GBRatio`^2) is about 5e6 Nm/rpm on the low-speed shaft side, so, your numbers are a similar order of magnitude.

Best regards,

---

<div class="post-metadata">

**Author:** ![Nitin.Sivakumar](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@Nitin.Sivakumar](https://forums.nlr.gov/u/Nitin.Sivakumar)\
**Post date:** [March 9, 2024, 11:55am UTC](https://forums.nlr.gov/t/gain-scheduling/286/54 "2024-03-09T11:55:28Z")

</div>

Dear Jason sir,  
I tried finding the partial derivatives for speed range from 3 to 11 m/s using trim case 2, attaching the table for confirmation of values as per your last post.  
 ![image](https://europe1.discourse-cdn.com/nrel/original/2X/a/a3133995c6c65c32765d9f9f2f00d5af8d9c946c.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:** [March 11, 2024, 4:54pm UTC](https://forums.nlr.gov/t/gain-scheduling/286/55 "2024-03-11T16:54:48Z")

</div>

Dear @Nitin.Sivakumar,

Again, your values in the ballpark of what I would expect without specific values to compare to.

Best regards,

---

<div class="post-metadata">

**Author:** ![Nitin.Sivakumar](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@Nitin.Sivakumar](https://forums.nlr.gov/u/Nitin.Sivakumar)\
**Post date:** [April 16, 2024, 3:23am UTC](https://forums.nlr.gov/t/gain-scheduling/286/56 "2024-04-16T03:23:50Z")

</div>

Dear Jason sir,  
For calculating the partial derivative of power wrt to pitch angle in an older post you mentioned, [quote=“Jason.Jonkman, post:2, topic:286”]  
Set BlPitch(K) in the primary input file to the proper pitch angle associated with each wind speed for all blades (K=1,2,3). I.e., set BlPitch to 23.47deg at 25m/s.  
[/quote]  
I wonder whether this configuration is required for calculating partial derivative of aerodynamic torque wrt rotor speed? When I redid my linearization with this configuration, I got all values in above rated winds as +ve instead of the results I showed earlier. Thanks in advance.  
Best regards

---

<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:** [April 17, 2024, 2:51pm UTC](https://forums.nlr.gov/t/gain-scheduling/286/57 "2024-04-17T14:51:30Z")

</div>

Dear @Nitin.Sivakumar,

I’m not sure what you mean by “+ve”, but I would say in general that the linearized solution is only valid for small perturbations around an operating point, so, it is always useful to define a reasonable operating point when making use of a linearized model.

Best regards,

[Previous page](https://forums.nlr.gov/t/gain-scheduling/286.md?page=2)
