Openfast individual pitch control time marching analysis using bladed style DLL

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 ?

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,

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

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

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

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,

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

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).

Best regards,

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

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,

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



Hi Nitin,

We have a feature to switch the IPC on for different wind speeds here: ROSCO/Controllers.f90 at 51629665d22f92770f861daeebcebd47ab32abb1 · NREL/ROSCO · GitHub

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

I hope this helps.

Best, Dan

Thank you so much. I really appreciate that.

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

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.

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) 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.


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.

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!

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

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

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