Applying wind signal as input to the simulink

This forum if for discussing controls. Questions about how to implement controls in FAST are more appropriate to the CAE Tools forum.

Moderator: Bonnie.Jonkman

Sina.Ameli
Posts: 75
Joined: Mon Oct 15, 2018 11:23 am
Organization: FSU
Location: Florida

Applying wind signal as input to the simulink

Postby Sina.Ameli » Fri Oct 19, 2018 10:31 am

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

Jason.Jonkman
Posts: 5082
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Applying wind signal as input to the simulink

Postby Jason.Jonkman » Fri Oct 19, 2018 1:11 pm

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: https://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: https://wind.nrel.gov/nwtc/docs/README_FAST8.pdf.

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Sina.Ameli
Posts: 75
Joined: Mon Oct 15, 2018 11:23 am
Organization: FSU
Location: Florida

Re: Applying wind signal as input to the simulink

Postby Sina.Ameli » Sun Oct 21, 2018 9:52 pm

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

Jason.Jonkman
Posts: 5082
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Applying wind signal as input to the simulink

Postby Jason.Jonkman » Mon Oct 22, 2018 6:39 am

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,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Sina.Ameli
Posts: 75
Joined: Mon Oct 15, 2018 11:23 am
Organization: FSU
Location: Florida

Re: Applying wind signal as input to the simulink

Postby Sina.Ameli » Mon Oct 22, 2018 8:10 am

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
Attachments
Capture.PNG
Capture.PNG (5.53 KiB) Viewed 4016 times
Last edited by Sina.Ameli on Mon Oct 22, 2018 9:06 am, edited 4 times in total.

Jason.Jonkman
Posts: 5082
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Applying wind signal as input to the simulink

Postby Jason.Jonkman » Mon Oct 22, 2018 8:51 am

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,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Sina.Ameli
Posts: 75
Joined: Mon Oct 15, 2018 11:23 am
Organization: FSU
Location: Florida

Re: Applying wind signal as input to the simulink

Postby Sina.Ameli » Mon Oct 22, 2018 3:40 pm

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:
Capture.PNG
Capture.PNG (45.6 KiB) Viewed 3999 times


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

Jason.Jonkman
Posts: 5082
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Applying wind signal as input to the simulink

Postby Jason.Jonkman » Mon Oct 22, 2018 4:23 pm

Dear Sina,

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

Best regards,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Sina.Ameli
Posts: 75
Joined: Mon Oct 15, 2018 11:23 am
Organization: FSU
Location: Florida

Re: Applying wind signal as input to the simulink

Postby Sina.Ameli » Tue Oct 23, 2018 8:40 am

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

Jason.Jonkman
Posts: 5082
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Applying wind signal as input to the simulink

Postby Jason.Jonkman » Tue Oct 23, 2018 10:30 am

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,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Sina.Ameli
Posts: 75
Joined: Mon Oct 15, 2018 11:23 am
Organization: FSU
Location: Florida

Re: Applying wind signal as input to the simulink

Postby Sina.Ameli » Tue Oct 23, 2018 11:16 am

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

Jason.Jonkman
Posts: 5082
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Applying wind signal as input to the simulink

Postby Jason.Jonkman » Tue Oct 23, 2018 11:20 am

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,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Sina.Ameli
Posts: 75
Joined: Mon Oct 15, 2018 11:23 am
Organization: FSU
Location: Florida

Re: Applying wind signal as input to the simulink

Postby Sina.Ameli » Tue Oct 23, 2018 11:56 am

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

Jason.Jonkman
Posts: 5082
Joined: Thu Nov 03, 2005 4:38 pm
Location: Boulder, CO
Contact:

Re: Applying wind signal as input to the simulink

Postby Jason.Jonkman » Tue Oct 23, 2018 12:02 pm

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,
Jason Jonkman, Ph.D.
Senior Engineer | National Wind Technology Center (NWTC)

National Renewable Energy Laboratory (NREL)
15013 Denver West Parkway | Golden, CO 80401
+1 (303) 384 – 7026 | Fax: +1 (303) 384 – 6901
nwtc.nrel.gov

Sina.Ameli
Posts: 75
Joined: Mon Oct 15, 2018 11:23 am
Organization: FSU
Location: Florida

Re: Applying wind signal as input to the simulink

Postby Sina.Ameli » Wed Oct 24, 2018 1:56 pm

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 https://www.nrel.gov/docs/fy09osti/38060.pdf and https://www.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):
TrqCntrl.PNG
TrqCntrl.PNG (54.26 KiB) Viewed 3920 times


Here are my results:
GenSpeed.PNG
GenSpeed.PNG (38.67 KiB) Viewed 3920 times

BldPitch.PNG
BldPitch.PNG (37 KiB) Viewed 3920 times


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


Return to “Controls”

Who is online

Users browsing this forum: No registered users and 1 guest