# Openfast individual pitch control time marching analysis using bladed style DLL

**URL:** <https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947>\
**Category:** Controls\
**Created:** [October 7, 2022, 4:09pm UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947 "2022-10-07T16:09:12Z")\
**Posts on this page:** 20\
**Page:** 1

<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:** [October 7, 2022, 4:09pm UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/1 "2022-10-07T16:09:12Z")

</div>

Dear Jason sir,  
I am trying to analyze the effect of individual pitch control on the blade root bending moment for an Onshore wind turbine. I am trying to run the time marching simulation in Openfast V3.2 using the DISCON.dll on Nonlinear **5MW\_Land\_BD\_DLL\_WTurb** turbine. I am planning to switch the **Ptch\_Cntrl** in BLADED INTERFACE section of ServoDyn file of the model first to 0 (collective pitch) and run the simulation to get the plots of BldPitch1,2,3 and blade root moment (1,2,3) and then to 1 (individual pitch control) and get the same plots as before. To see the effect of individual pitch control, I plan to give input wind with wind shear obtained from TurbSim v2. My expected outcome is to observe the three individual pitches with phase difference and a resulting reduction in the blade root bending moments when simulating Openfast in individual pitch control mode (Ptch\_Cntrl=1 ). I would like to know whether I am adopting the correct approach ?

---

<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:** [October 7, 2022, 10:19pm UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/2 "2022-10-07T22:19:32Z")

</div>

Dear @Nitin.Sivakumar,

Sounds reasonable to me.

Please note that TurbSim is useful if you want to generate full-field turbulence for OpenFAST. If shear is all that you are after (with an otherwise steady and uniform inflow), you can use `WindType` = 1 in InflowWind, which doesn’t require TurbSim.

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:** [October 13, 2022, 1:08pm UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/3 "2022-10-13T13:08:42Z")

</div>

Dear Jason sir,

Thanks for the quick reply. Regarding your suggestion on wind shear, I thought I would need to implement turbulent wind with wind shear, so I tried to use TurbSim V2 to generate the full field wind.

Now I am facing a problem wherein I initially used the Turbsim generated wind to run the full simulation for 600 s in Openfast. I had used the **5MW\_Land\_BD\_DLL\_WTurb**  **model , which I gather uses the configuration ElastoDyn with BeamDyn in the**  **ElastoDyn**  **file. When I generated the**  **.out file** **and tried to plot the various parameters, I found that the blade root bending moment (RootMyb(1,2,3) or RootMyc(1,2,3)) are producing a value of**  **zero**  **throughout the simulation. So I found another parameter output from**  **BeamDyn** **namely (B1RootMyr(1,2,3) which is described as “y component of root reaction moment(Nm)”) which was giving the blade root bending moments displaced in phase as I expected. But the order of magnitudes of the parameter is in 10^6 Nm. Then I** used the **5MW\_Land \_DLL\_WTurb**  **model, which uses the configuration ElastoDyn only in the**  **ElastoDyn**  **file . When I generated the**  **.out file**  **with same wind file** **and tried to plot the various parameters, I found that the blade root bending moment (RootMyb(1,2,3) or RootMyc(1,2,3)) are producing value this time, of magnitudes of 5000 to 10000. Which one is the correct ,sir? Is there any expected range of magnitudes of the blade root bending moment for NREL 5 MW models?**

**I am attaching the plots generated by me during both simulations for your referernce (1 case of**  **5MW\_Land\_DLL\_WTurb**  **and 2 cases of**  **5MW\_Land\_BD\_DLL\_WTurb** \*\*).\*\*

**Thanks and Regards**

**Nitin Sivakumar**

 ![5mw_bd_90twr1.png](https://europe1.discourse-cdn.com/nrel/original/2X/c/c0ddad00d7013a55ec8ff36a2142c33de5ac7771.png)

 ![5mw_bd_90twr12.png](https://europe1.discourse-cdn.com/nrel/original/2X/0/01a35184e69a523df9961817d19422eef9864179.png)

 ![allplotfullnlsim_90twr1.png](https://europe1.discourse-cdn.com/nrel/original/2X/0/0ee6a10dac9a2af0f84f856f3191ec97403f1f48.png)

 ![58D7B6FE9C2148DC898030370D1787D6.png](https://europe1.discourse-cdn.com/nrel/original/2X/6/63ebd17f5380165cc097e3376831958e711fd679.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:** [October 13, 2022, 2:44pm UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/4 "2022-10-13T14:44:15Z")

</div>

Dear @Nitin.Sivakumar,

These results are what I would expect them to be. The ElastoDyn blade root loads will be zero if the blade structural dynamics are modeled in BeamDyn instead of ElastoDyn. And the blade root loads output from BeamDyn are in Nm whereas the blade root loads output by ElastoDyn are in kNm, which should differ by a factor of 1000.

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:** [October 13, 2022, 3:15pm UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/5 "2022-10-13T15:15:00Z")

</div>

Dear Jason sir,  
Thank you for enlightening me. I had discussed about my idea to implement the individual pitch control in OpenFast simulation. Regarding that, when I tried switching the parameter Pitch\_Cntrl to 1 , I could not see the effect of IPC on either individual blade pitches ( in the form of phase shift or other difference) or on the blade root moments( reduction in magnitude). I think I might have missed something. Can you instruct me the additional changes( if any) to apply while trying to implement the IPC using the bladed DLL method . Thanks in advance .  
Regards  
Nitin Sivakumar

---

<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:** [October 13, 2022, 3:36pm UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/6 "2022-10-13T15:36:11Z")

</div>

Dear @Nitin.Sivakumar,

What is the origin of the Bladed-style DLL controller that you are using? Is this a controller you have developed yourself or received from a collaborator, or are you using one of the controllers provided by NREL, e.g., ROSCO or the baseline controller for the NREL 5-MW wind turbine?

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:** [October 13, 2022, 3:50pm UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/7 "2022-10-13T15:50:19Z")

</div>

Dear Jason sir,  
I am still in initial learning stage in Fast/ OpenFast . I think I am trying to use the Dll called (discon.dll) provided by NREL, by including it in the '5MW\_Baseline ’ folder to be called from ServoDyn.Is it not a controller usable for simulation or is it limited in functionality to IPC , or I need to get yet another controller. Pardon me If I am wrong.  
Thanks and Regards  
Nitin Sivakumar

---

<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:** [October 13, 2022, 5:22pm UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/8 "2022-10-13T17:22:41Z")

</div>

Dear @Nitin.Sivakumar,

Now I understand the issue. IPC is not implemented in the baseline controller DLL for the NREL 5-MW wind turbine, so, selecting `Ptch_Cntrl` = 1 in ServoDyn will do nothing.

If you want to use IPC, I suggest implementing that yourself or switch to use the ROSCO controller ([GitHub - NREL/ROSCO: A Reference Open Source Controller for Wind Turbines](https://github.com/NREL/ROSCO)).

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:** [October 13, 2022, 5:54pm UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/9 "2022-10-13T17:54:11Z")

</div>

Dear Jason sir,  
Thank you for suggesting me the mistake and guiding me. May I know , in what way the servodyn based ipc routine might work. Would i need to produce a Dll by using ROSCO controller and use that in OpenFast simulation, or simulation can be done at ROSCO itself.  
Thanks and 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:** [October 13, 2022, 6:45pm UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/10 "2022-10-13T18:45:16Z")

</div>

Dear @Nitin.Sivakumar,

ServoDyn is mostly a wrapper for various user-defined control routines, including for Bladed-style DLL controllers. There are only a few simple control options included within ServoDyn. ROSCO, which is implemented in the format of a Bladed-style DLL controller, is where NREL has implemented the main wind turbine control functions.

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:** [November 1, 2022, 8:33am UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/11 "2022-11-01T08:33:02Z")

</div>

Dear Jason sir,  
I tried to implement the Individual pitch control as recommended by you in the ROSCO controller. I used the python code in the examples section (example\_13.py) to tune and generated the DISCON.IN file. I further changed the Kp, Ki values in the DISCON.IN file and used it along with the libdiscon.dll for Openfast simulation.  
I simulated the IPC off condition and IPC on condition separately by different Openfast simulations. Here I was able to get a reduction in blade bending moment variation with the IPC ON as compared to IPC off. The results are attached underneath. But now I am interested to run the IPC ON and IPC off in the same simulation, such that IPC can be switched ON in the middle of a simulation so that the effect of the IPC is evident from a single simulation result.  
Is there any provision to perform such a simulation?  
Thank you in advance  
Regards

 ![PSDcomp](https://europe1.discourse-cdn.com/nrel/original/2X/e/eed28122627b78a757bf2cab48b917014800532c.png)  
 ![BRBMcomp](https://europe1.discourse-cdn.com/nrel/original/2X/c/ca0bc047bd231c17f612bf453f0a76eb9ac25320.png)  
 ![Indpitchcomp](https://europe1.discourse-cdn.com/nrel/original/2X/c/ceae8474fb08255da95340a9d8bbf766388c6a62.png)

---

<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:** [November 1, 2022, 3:13pm UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/12 "2022-11-01T15:13:50Z")

</div>

Hi Nitin,

We have a feature to switch the IPC on for different wind speeds here: [ROSCO/Controllers.f90 at 51629665d22f92770f861daeebcebd47ab32abb1 · NREL/ROSCO · GitHub](https://github.com/NREL/ROSCO/blob/51629665d22f92770f861daeebcebd47ab32abb1/ROSCO/src/Controllers.f90#L402)

To switch the IPC based on time (`LocalVar%Time`), you could create a similar feature to that.

I hope this helps.

Best, Dan

---

<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:** [November 1, 2022, 4:33pm UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/13 "2022-11-01T16:33:36Z")

</div>

Thank you so much. I really appreciate that.

---

<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:** [November 3, 2022, 7:05am UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/14 "2022-11-03T07:05:01Z")

</div>

Dear Daniel sir,  
The ROSCO full installation is giving the error at the step ,“python setup.py install --compile-rosco”, namely " File “C:\Users\PC00\anaconda3\envs\rosco-env\lib\os.py”, line 675, in **getitem**  
raise KeyError(key) from None  
KeyError: ‘FC’ ".  
So I had to use the CMAKE based compilation separately to generate DISCON.IN file. Now , I am facing problem with fully running the example file,“example\_13.py” used for tuning IPC. I am attaching the screenshot image of the anaconda command window for your reference. Please help me to resolve this issue. Thanks in advance  
Best Regards

 ![image](https://europe1.discourse-cdn.com/nrel/original/2X/6/608c400dc800e5b01e1819aca209229e1f392a4e.png)

---

<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:** [November 4, 2022, 2:39am UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/15 "2022-11-04T02:39:26Z")

</div>

Hi sir,  
In a clarification to my previous post,

1. Is the Cmake based compilation equivelant to the process accomplished by the code"python setup.py install --compile-rosco”.  
2.Also I was able to resolve the second problem myself regarding execution of python example code “example \_13.py” as the openfast exe file was misplaced.  
3.Regarding the implementation of switching the IPC in between simulation, I was able to replace the existing function to switch the IPC based on wind speed and implement the time based switching. Results are attached below. But is it not possible to use the both sigma functions together. If yes, how can I introduce some of my variables in the Discon.in , and where are these variables need to be defined in the source code. Thanks in advance.  
Best Regards.

 ![1667529503572](https://europe1.discourse-cdn.com/nrel/original/2X/5/54dafc9797e9ee36fcd5cf69556328f6f699752e.png)

---

<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:** [March 16, 2023, 12:33pm UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/16 "2023-03-16T12:33:12Z")

</div>

Dear Nitin and Daniel,  
Thank you for your continued help and contributions. I am trying IPC control strategy applied to IEA15MW WT to see its effect. I use a lot on download IEA15MW V1.1.3 version of the model ([Releases · IEAWindTask37/IEA-15-240-RWT · GitHub](https://github.com/IEAWindTask37/IEA-15-240-RWT/releases)) and Openfast V3.3.0 version, Set Ptch\_Cntrl=1 and IPC\_ControlMode=1 in ServoDyn.dat and DISCON. in respectively. However, I found in the simulation results that the three blades had the same Angle of paddle change, as shown in the figure below. I wonder if it is because I did not compile and generate this DLL file(libdiscon.dll) by myself. In addition, I would like to ask you to explain in detail how to generate this DLL file. As I am a novice in this field, I am sorry to take up your valuable time.

 ![BldPitch](https://europe1.discourse-cdn.com/nrel/original/2X/b/badc3aced3d2604f43d3939b280962857e05f2fd.jpeg)

---

<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 16, 2023, 1:44pm UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/17 "2023-03-16T13:44:26Z")

</div>

![Screenshot_20230316-223928_Chrome](https://europe1.discourse-cdn.com/nrel/original/2X/5/5f89ac7549c48f140125f3c3be5c8009b6e57aca.png)  
Hi Lie,  
As you can see, I was informed by Dr. Jason, that the baseline controller DLL for NREL 5MW WT doesnt have the IPC functionality. I had tried IPC in the ROSCO platform.I am not sure though about IEA 15MW WT.

---

<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:** [March 17, 2023, 6:09am UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/18 "2023-03-17T06:09:14Z")

</div>

Dear Nitin,  
Thank you for your reply. May I ask which fan model you use ROSCO to study？  
I installed ROSCO according to the steps in the manual and used the same statement as yours to run it. The following error occurred as a result. I am not quite clear about the problem, can you give me some advice or guidance?  
As I understand it so far, there are two ways to implement IPC emulation, one is to generate libdiscon.dll and DISCON.IN files (although I’m still not sure how to do this, is it using Cmake? Can you give me a hint if you know) and then run it in CMD with **openfast.exe EIa-15-240-rwt-umainesemi.fst**. Another option is to run example\_12.py from anaconda powershell. If my understanding is wrong, please point out, thank you！

 ![11111](https://europe1.discourse-cdn.com/nrel/original/2X/d/d70189cbb918dd92912298fe03fd0a110daee473.png)

---

<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 17, 2023, 6:45am UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/19 "2023-03-17T06:45:40Z")

</div>

Dear Lei,  
I don’t understand what you mean by fan model.I had used Rosco 2.6 and openfast 3.30 . I think your understanding about emulating IPC is correct , I had tried the second option though i.e. using example\_13.py and anaconda powershell. I don’t understand the nature of the error which has occurred in your case, but I can suggest that you can verify that you have changed the parameters and input files in the example\_13 python code and also in the yaml input file. Moreover, the openfast executable file must be added to the directory of the python file. Hope it can be of some help.  
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:** [March 17, 2023, 7:12am UTC](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947/20 "2023-03-17T07:12:18Z")

</div>

Dear Nitin,  
Thank you for your reply. Even though I added the exe to the location, I still got the same error message. I think there may be a problem with my ROSCO installation process. I follow the Full ROSCO Installation, enter command as follows：  
**1. Create a conda environment for ROSCO**

conda config --add channels conda-forge

conda create -y --name rosco-env python=3.8

conda activate rosco-env

**2、Clone and Install the ROSCO toolbox with ROSCO**

conda install -c anaconda git

git clone [GitHub - NREL/ROSCO: A Reference Open Source Controller for Wind Turbines](https://github.com/NREL/ROSCO.git)

cd ROSCO

conda install -c anaconda cmake

conda install m2w64-toolchain libpython

conda install -y wisdem

conda env config vars set FC=gfortran

conda activate rosco-env

python setup.py install --compile-rosco

what do you think？

Best Regards  
Lei

[Next page](https://forums.nlr.gov/t/openfast-individual-pitch-control-time-marching-analysis-using-bladed-style-dll/3947.md?page=2)
