Applying wind signal as input to the simulink

Dear all,

I am doing research on designing Control strategies of wind turbine using Fast 8 in Simulink/Matlab environment.

1- I have implemented the controller but I want to apply a wind signal as an input (step winds signals) to check the controllers’ performance in different regions. Could you help me where and how I can apply the wind input signals?

2- How do I know on which wind turbine I am working? Because there are 26 different tests and the Run_OpenLoop.mfile executes all tests. Afterwards, I run the openLoop in simulink; however, I still don’t know which wind turbine I am working on. It seems Fast has different wind turbine models calculated by different tests and based on my research I should decide on a test number. For instance, since I want to work on control of 5 MW variable speed offshore wind turbines accepting different types of wind signals, I should choose test 23. My understanding is correct? If it is correct, how I can specify in Simulink that on which test I want to work on?

Thanks
Best Regards,
Sina

Dear Sina,

Here are my answers to your questions:

  1. In the Simulink-FAST v8 interface, wind inflow is specified within the FAST model, not within Simulink. As in all FAST models, wind inflow is specified in the InflowWind module–see the InflowWind documentation here: wind.nrel.gov/nwtc/docs/InflowWind_Manual.pdf.

  2. You don’t need to run Run_OpenLoop.m. When you run the Simulink-FAST v8 interface you must ensure that 2 variables are set beforehand: FAST_InputFileName and TMax. You can define these by a script (which is what is set in Run_OpenLoop.m) or simply in the MATLAB workspace. The Run_OpenLoop.m script could also be easily modified to run only one of the example tests. See the section titled, “FAST v8 Interface to Simulink” in the FAST v8 ReadMe file for more information: wind.nrel.gov/nwtc/docs/README_FAST8.pdf.

Best regards,

Dear Dr. Jonkamn,

Thanks for your prompt response and mentioning those useful documents. I created a uniform wind using a text file (.wnd) without the help of any software (just put “.wnd” at the end of the text file!). Then, I defined WindType=2 (that is for uniform wind) and replaced “Wind/90m_12mps_twr.bts” with the name of my file in the “NRELOffshrBsline5MW_InflowWind_12mps” file. However, when I run the Simulink, I encounter an error like this:

Error reported by S-function ‘FAST_SFunc’ in ‘OpenLoop10182018/FAST Nonlinear Wind Turbine/S-Function’:
FAST_InitializeAll:InflowWind_Init:Uniform_ValidateInput: Cannot find uniform wind input file: ‘…..\CertTest\5MW_Baseline/Step-Wind.wnd’

Now there are two questions.

1- It seems I should place my file in the place “Wind/90m_12mps_twr.bts” is located so that Matlab can find my file. Nevertheless, I don’t know the mentioned file’s location. May I know where is the mentioned file to tackle with this error?

2-It also seems I should have created a file with “.wnd” extension by use of Turbsim not by hand! Is it correct? Is it possible to create a uniform wind (step winds) without using a software? If it is possible what will be the format of the uniform wind?

Thanks

Best Regards,
Sina

Dear Sina,

Yes, you can create uniform wind files by hand (without software). From the error message you are receiving, it sounds like you have not located the correct path when you specify this file in the FileName within the InflowWind module input file. Did you name your file “Step-Wind.wnd” and place the file in ‘…..\CertTest\5MW_Baseline/Step-Wind.wnd’? I not change, FileName to the name, including path, of the uniform wind file you created.

Best regards,

Dear Dr. Jonkman,

Thanks again for your prompt response and precious help. Yes, my file’s name is “Step-Wind.wnd” and I located it in the address you mentioned but the problem was tha the file didn’t show its real nature in Windows’ folders until I placed it in my Matlab files. In Matlab environment it showed “Step-Wind.wnd.txt”! That is why it couldn’t be found. Hence, I remove the .txt extension in Matlab I placed in the appropriate address and it worked! Nonetheless, I encountered another problem. The wind is not changed during the simulation. Its value is 17 (m/s) all the time!

Best Regards,
Sina
Capture.PNG

Dear Sina,

It sounds like your are running FAST correctly and your uniform wind file looks good to me. Are you running a simulation longer than 20 s? From your file, the wind should step from 17 to 18 m/s between 20.05 and 20.1 s into the simulation.

Best regards,

Dear Dr. Jonkman,

Thanks again for your help. Yes. The problem is that I simulate longer than 20 sec. After this time all signals are equal to a fixed value! Like this:

It sounds TMax is equal to 20 sec and after this time the simulation is not valid. Could you tell me the file’s name that TMax is located to increase this value?

Thanks

Best Regards,
Sina

Dear Sina,

TMax is defined in the FAST primary input (*.fst) file.

Best regards,

Dear Dr. Jonkman,

Thanks for replying with celerity. All *.fst files are related to all tests. Which test I should change TMax in it? In other words, how do I know the simulink runs which test number? Should I define the number of the test for Matlab?

Thanks

Best Regards,
Sina

Dear Sina,

When running FAST v8 interfaced to Simulink, the TMax specified in MATLAB will be used in place of the TMax set in the primary FAST input file. Which of the 26 different FAST models in the CertTest directory do you want to run? E.g. Test18 is a model of the land-based NREL 5-MW turbine. If you are running Run_OpenLoop.m, you can choose which of these models to run e.g. set iTest = 18. In this case, TMax is set within the Run_OpenLoop.m script.

Best regards,

Dear Dr. Jonkman,

Thanks again for your prompt response. I am doing research on fault tolerant control of Pitch and Torque control of wind turbines. Could you tell me which model (test) is a 5 MW offshore variable speed wind turbine that is appropriate for my research?

Thanks

Best Regards,
Sina

Dear Sina,

When you say “offshore”, what type of support structure do you have in mind? Test18 is a model of an offshore 5-MW wind turbine, but installed on land. Tests 19-25 are for the same turbine installed atop various offshore support-structure configurations, including monopile, tripod, jacket, and various floating configurations.

Best regards,

Dear Dr. Jonkman,

Thanks for your reply. I want to work on a three-blade offshore wind turbine model that has a realistic nonlinear model to work on pitch and torque control and accepts wind turbulences, and I can apply realistic fault scenarios such as faults in actuators, generator and converters. Which model meets these features the most?

Thanks

Best Regards,
Sina

Dear Sina,

I gather that you do not need a specific support structure. Thus, I’d recommend that you use the NREL 5-MW turbine installed on land (Test18.fst), which meets the needs you’ve laid out.

Bets regards,

Dear Dr. Jonkman,
Thanks for clarifying the issue. I have encountered a problem. I implemented the pitch and torque controller mentioned in the document (using nrel.gov/docs/fy08osti/42437.pdf ) for 5MW offshore wind turbine but I encountered a problem by weird simulation results. For instance, based on table (please see the bellow picture) located in 38060, I considered a pitch angle of zero and entered a the wind input of 11.4 m/s in the 40th seconds of the simulation.

As mentioned in the document, the translational generator speed for region 2.5 to 3 is 1161.93 rpm and the rated generator speed is 1173.7 rpm. Does the generator speed begins the region 2.5 by the speed of 1161.93 rpm?
I implemented the torque and pitch control like this (for the torque controller I changed the values of document 42437 to be compatible for a 5MW WT and for the pitch controller I exactly used the PI gains mentioned in 38060):

Here are my results:


The problem is that based on the controllers, the wind turbine was supposed to work in region 3, but the generator speed is decreasing to a very low value (from region 2 to region 1!) and the generator power is in the maximum level (5MW)! And the most uncanny part of that is when the generator power goes to 10MW between 0.012 to 0.025 sec and afterwards, it goes to 5MW. In region 2, it was supposed to have a pitch of zero to capture the maximum power, while based on the figure above, the blade pitch is decreasing more and more!
Thanks

Best Regards,
Sina

Dear Sina,

In the NREL 5-MW baseline controller, the torque will be computed in Region 2.5 if the generator speed is between the lower (1136.498 rpm) and upper (1161.963 rpm) limits of Region 2.5 and if the blade-pitch angle is less than 1 degree.

I have not reviewed your Simulink implementation in detail, but Leonardo.Lopez uploaded his Simulink implementation of the baseline controller for the NREL 5-MW turbine in the Mar 03, 2017 post in the following forum topic: Baseline NREL 5MW controller on simulink - #13 by Jason.Jonkman.

Best regards,

Dear Dr. Jonkman,

Thanks a lot for mentioning the forum. I implemented the baseline control and enter a fixed wind speed of 15 m/s and got these results:


The Fast document for 5 MW offshore windturbines (nrel.gov/docs/fy09osti/38060.pdf), mentions that if wind speed is 15 m/s, the pitch angle should be around 11 deg, while mine is around 17! I also think the generator speed and power should be much higher with this wind speed!
Moreover, when I enter a fixed wind speed of 20 m/s, at the beginning of the simulation I encounter such an error in Matlab:

An error occurred while running the simulation and the simulation was terminated
Caused by:
Error reported by S-function ‘FAST_SFunc’ in ‘PI_Control10312018_Offshore/FAST Nonlinear Wind Turbine/S-Function’:
FAST_Solution:FAST_AdvanceStates:AD_UpdateStates:SetInputs:TwrInfl:getLocalTowerProps:Tower strike.
TwrInfl:getLocalTowerProps:Tower strike.
TwrInfl:getLocalTowerProps:Tower strike.
AD_UpdateStates:SetInputs:TwrInfl:getLocalTowerProps:Tower strike.
TwrInfl:getLocalTowerProps:Tower strike.
TwrInfl:getLocalTowerProps:Tower strike.
FAST_Solution:CalcOutputs_And_SolveForInputs:SolveOption2:AD_CalcOutput:SetInputs:TwrInfl:getLocalTowerProps:Tower strike.
TwrInfl:getLocalTowerProps:Tower strike.
TwrInfl:getLocalTowerProps:Tower strike.
AD_CalcOutput:BEMT_CalcOutput(node 19, blade 2):Compute_UA_AirfoilCoefs:UA_CalcOutput:Mach number exceeds 1.0. Equations cannot be evaluated.

Thanks

Best Regards,
Sina

Dear Sina,

If you are not getting the correct rotor speed and blade-pitch angle (as well generator power etc.) response to steady wind, then I would guess that there is a problem with your controller implementation.

My guess is your tower-strike error is caused by the use of improper initial conditions. To reduce start-up transients (and errors such as tower strike), normally we recommend that at a minimum, the initial conditions of rotor speed and blade-pitch angle be set to their steady-state values for the given wind speed being simulated.

Best regards,

Dear Dr. Jonkman,

Thanks for the reply. Actually, I checked the controller several times, it is completely matched with the simulink figures located on that forum you stated!

Regarding the error, the problem is that even when I run test 24 (only the open loop), the matlab gives me this error:

Error using Run_OpenLoop (line 30)
Error reported by S-function ‘FAST_SFunc’ in ‘OpenLoop/FAST Nonlinear Wind Turbine/S-Function’:
FAST_Solution:FAST_AdvanceStates:AD_UpdateStates:SetInputs:TwrInfl:getLocalTowerProps:Tower strike.
TwrInfl:getLocalTowerProps:Tower strike.
TwrInfl:getLocalTowerProps:Tower strike.
AD_UpdateStates:SetInputs:TwrInfl:getLocalTowerProps:Tower strike.
FAST_Solution:CalcOutputs_And_SolveForInputs:SolveOption2:AD_CalcOutput:SetInputs:TwrInfl:getLocalTowerProps:Tower strike.
TwrInfl:getLocalTowerProps:Tower strike.
TwrInfl:getLocalTowerProps:Tower strike.
AD_CalcOutput:BEMT_CalcOutput(node 19, blade 3):Compute_UA_AirfoilCoefs:UA_CalcOutput:Mach number exceeds 1.0. Equations cannot be
evaluated.

That is the same as the error I mentioned previously. Previously I didn’t get such an error and could run the test completely!

Thanks

Best Regards,
Sina

Dear Sina,

What modifications did you make to Test24 to run it OpenLoop? If you are disabled all control, I could imagine you’d get a tower-strike error because the blades won’t pitch to shed load when the turbulent wind speed increases.

I don’t really understand enough about what you are doing to offer more advice.

Best regards,