# Drivetrain simulation OpenFAST and Simulink

**URL:** <https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561>\
**Category:** Wind & Water\
**Created:** [February 27, 2024, 12:01am UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561 "2024-02-27T00:01:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jersson.Leon](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jersson.Leon](https://forums.nlr.gov/u/Jersson.Leon)\
**Post date:** [February 27, 2024, 12:01am UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/1 "2024-02-27T00:01:59Z")

</div>

Dear all,

I want to reproduce the drivetrain simulation in the appendix of the NREL document " Simulation for Wind Turbine Generators—With FAST and MATLAB-Simulink Modules"  
Particularly in the Figure A23 as follows. I have a question: Why the aerodynamic torque has to be sum with opp torque at the entrance of SimDriveline model block?

 ![FigureA23](https://europe1.discourse-cdn.com/nrel/original/2X/f/f922b82599797acde48402259c46dc3e62817f4f.jpeg)

Thank you in advance

---

<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:** [February 27, 2024, 12:25am UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/2 "2024-02-27T00:25:03Z")

</div>

Dear @Jersson.Leon,

In this figure, the SimDriveline model represents a detailed model of the drivetrain, with the aerodynamic torque and generator torque as boundary conditions of the model. In the older version of FAST used in this paper, the aerodynamic torque was not available as a direct output of FAST; rather, the aerodynamic torque was computed by subtracting the drivetrain inertial response from the generator torque. This follows from the fact that the drivetrain will accelerate/decelerate when the aerodynamic and generator torques are not balanced.

FYI: While my name was listed as a co-author of this work, I’m not an expert on the implementation.

Best regards,

---

<div class="post-metadata">

**Author:** ![Jersson.Leon](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jersson.Leon](https://forums.nlr.gov/u/Jersson.Leon)\
**Post date:** [February 27, 2024, 12:32am UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/3 "2024-02-27T00:32:58Z")

</div>

> [@Jason.Jonkman](#):
>
> the aerodynamic torque was not available as a direct output of FAST

Dear [Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman),

Thank you for your response. I am using OpenFAST, from your point of view, is there an update in the simulink model that can be performed?

Besides from your response: can the aerodynamic torque be available as a direct output of FAST?

Here is an image of my simulink Drivetrain model block inside:

 ![simdriveline_model](https://europe1.discourse-cdn.com/nrel/original/2X/c/c0838f8b72837a8e6d9d3ddebfb0ec89661db503.jpeg)

Sincerely,

Jersson.Leon

---

<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:** [February 27, 2024, 12:38am UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/4 "2024-02-27T00:38:19Z")

</div>

Dear @Jersson.Leon,

Yes, the aerodynamic torque is an output that is directly available from OpenFAST; that is, AeroDyn output `RtAeroMxh`. You can use this output directly accessible via `OutData` without the need for the “FAST Output Manager” block.

Best regards

---

<div class="post-metadata">

**Author:** ![Jersson.Leon](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jersson.Leon](https://forums.nlr.gov/u/Jersson.Leon)\
**Post date:** [February 27, 2024, 3:37am UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/5 "2024-02-27T03:37:59Z")

</div>

Dear Jason,

Thank you for your response.

Sincerely,

Jersson.Leon

---

<div class="post-metadata">

**Author:** ![Jersson.Leon](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jersson.Leon](https://forums.nlr.gov/u/Jersson.Leon)\
**Post date:** [March 12, 2024, 11:19am UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/6 "2024-03-12T11:19:27Z")

</div>

Dear [Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)

I am Trying to reproduce de simulation of the gearbox with simscape matlab and I have one question.

1. In the servodyn file I have two put 4(simulink) in the line VSContrl or I can work with option 5 and work with Discon.dll controller?  
 ![servodyn1](https://europe1.discourse-cdn.com/nrel/original/2X/c/c5491e42339c47ac5bbacf4d7205966097a1c828.png)

Thank you for your attention.

Sincerely,

Jersson Leon

---

<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 12, 2024, 12:45pm UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/7 "2024-03-12T12:45:33Z")

</div>

Dear @Jersson.Leon,

I’m not sure I fully understand your question, but if you are asking whether you can select `VSContrl` = 5 when running OpenFAST within Simulink, the answer is “yes”. When `VSContrl` is not set to 4 when running OpenFAST within Simulink, this means that the generator and power inputs to the OpenFAST S-Function will be ignored.

Best regards,

---

<div class="post-metadata">

**Author:** ![Jersson.Leon](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jersson.Leon](https://forums.nlr.gov/u/Jersson.Leon)\
**Post date:** [March 18, 2024, 3:21pm UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/8 "2024-03-18T15:21:37Z")

</div>

Dear [Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)

I am trying to simulate the gearbox with simscape Simulink and I have two questions. Since in your document you said that changing the following parameters:

DrTrDOF=FALSE  
GBRatio=1  
GenIner=0  
The exit variable from FAST that I am using is LSSTipAxa.  
My questions are:

1. Why exactly these three parameters must change: DrTrDOF=FALSE, GBRatio=1 and GenIner=0
2. With the variable “LSSTipAxa” I calculated the aerodynamic torque that serves as input to the gearbox model, then in my Gerabox(simscape) model I calculated the generator speed with the ratio of the gears. Thus, the variable “GenSpeed” measured as the output of FAST doesn’t correspond to the generator speed that I mesure in simscape.

Thank you in advance for your help.

 ![drivetrain_change](https://europe1.discourse-cdn.com/nrel/original/2X/5/5e513b7277bf67fa873ca33a530d43a63e335b23.png)  
 ![simscapemodel](https://europe1.discourse-cdn.com/nrel/original/2X/6/6e6b9ac89ba7cefa1b2b328b0cc19b3da9dd3c7c.jpeg)

---

<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 19, 2024, 2:39pm UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/9 "2024-03-19T14:39:58Z")

</div>

Dear @Jersson.Leon,

Here are my responses based on my limited understanding of the paper you are referring to:

1. These FAST inputs were set because the details of the drivetrain were modeled in SimDriveline instead of FAST. With `DrTrDOF` = FALSE and `GBRatio` = 1, only the rigid-body rotation of the rotor is captured within FAST. `GenIner` = 0 was used because the drivetrain inertia (not including the rotor inertia) is accounted for in SimDriveline instead of within FAST.
2. With `GBRatio` = 1, FAST output `GenSpeed` will actually refer to the rotor speed instead of the generator speed.

Best regards,

---

<div class="post-metadata">

**Author:** ![Yinghan.Liu](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/yinghan.liu/32/5462_2.png) [@Yinghan.Liu](https://forums.nlr.gov/u/Yinghan.Liu)\
**Post date:** [March 20, 2024, 2:05am UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/10 "2024-03-20T02:05:33Z")

</div>

Dear @Jason.Jonkman,

When I try to simulate the drivetrain model in Simscape, the output seems to be wrong. All the outputs donnot change at all. The model is constructed for two-mass model. Could you help me check what is wrong here?

---

<div class="post-metadata">

**Author:** ![Yinghan.Liu](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/yinghan.liu/32/5462_2.png) [@Yinghan.Liu](https://forums.nlr.gov/u/Yinghan.Liu)\
**Post date:** [March 20, 2024, 2:29am UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/11 "2024-03-20T02:29:19Z")

</div>

It seems like the system cannot upload `.slx` file now…

---

<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 20, 2024, 2:10pm UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/12 "2024-03-20T14:10:10Z")

</div>

Dear @Yinghan.Liu,

I have no personal experience with Simscape myself anyway, so, I’m not sure I could help with that anyway.

Best regards,

---

<div class="post-metadata">

**Author:** ![Yinghan.Liu](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/yinghan.liu/32/5462_2.png) [@Yinghan.Liu](https://forums.nlr.gov/u/Yinghan.Liu)\
**Post date:** [April 6, 2024, 2:37am UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/13 "2024-04-06T02:37:39Z")

</div>

Dear @Jason.Jonkman  
I construct a two-mass model for drivetrain of NREL 5MW wind turbine in Simulink. When I input a turbulent wind, the response of my simplified nonlinear model is different from the result from OpenFAST.  
In OpenFAST, I only open the DOFs of GenDOF and DrTrDOF.  
Is that result acceptable? The first graph represents the input wind velocity, the second is the high-speed shaft torque, the third one is the generator angular velocity.

 ![图片](https://europe1.discourse-cdn.com/nrel/original/2X/c/c1e33d02374f5550fd2bc910ff60be73086ec2c9.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:** [April 6, 2024, 2:20pm UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/14 "2024-04-06T14:20:02Z")

</div>

Dear @Yinghan.Liu,

OpenFAST should run properly and generate reasonable results with only `GenDOF` and `DrTrDOF` enabled. But I’m not sure why your models are not matching the two-mass model solution from OpenFAST.

Best regards,

---

<div class="post-metadata">

**Author:** ![Jersson.Leon](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jersson.Leon](https://forums.nlr.gov/u/Jersson.Leon)\
**Post date:** [April 8, 2024, 5:05pm UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/15 "2024-04-08T17:05:57Z")

</div>

Dear [Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)

I want to simulate the Test01\_SIG.mdl in Openfast- Simulink. In the configuration of my servodyn.dat file I have VSContrl=4 and in the elastodyn.dat file I have DrTrDOF= True, GenIner= 534.116 and GBRatio= 97

![siggenerator](https://europe1.discourse-cdn.com/nrel/original/2X/4/46bc7f9d89249887d467d2d4466b6b620147c7f8.png)

I have two questions:

1. why are there two gbratio? one in the line of elastodyn.dat and another in the line of the matlab.m file that has to do with the constant defined in the Simulink  
 ![elastodyngbratio](https://europe1.discourse-cdn.com/nrel/original/2X/5/57ad64d7f4b75339f86ccdb53fe8d48ee70d8a09.png)  

2. are these parameters ok in the elastodyn.dat file?: DrTrDOF= True, GenIner= 534.116 and GBRatio= 97

Thank you in advance

---

<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 10, 2024, 5:37pm UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/16 "2024-04-10T17:37:38Z")

</div>

Dear @Jersson.Leon,

Regarding (1), in the sample _Test01\_SIG.mdl_ Simulink model, the speed of the generator relative to the low-speed shaft is output from the OpenFAST S-Function, rather than the speed of the generator relative to the high-speed shaft. As such, the `GBRatio` is specified within Simulink to convert the generator speed from the low- to high-speed shaft. You wouldn’t need to do this speed conversion in Simulink if you output the generator speed relative to the high-speed shaft.

Regarding (2), I agree with those settings for the NREL 5-MW baseline wind turbine. That said, the sample _Test01\_SIG.mdl_ Simulink model was developed for the AWT-27CR2 wind turbine, so, you’ll have to change the constants in this model to be valid for the NREL 5-MW baseline wind turbine.

Best regards,

---

<div class="post-metadata">

**Author:** ![Yinghan.Liu](https://dub1.discourse-cdn.com/nrel/user_avatar/forums.nlr.gov/yinghan.liu/32/5462_2.png) [@Yinghan.Liu](https://forums.nlr.gov/u/Yinghan.Liu)\
**Post date:** [April 17, 2024, 3:55pm UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/17 "2024-04-17T15:55:41Z")

</div>

Dear @Jason.Jonkman

For gearbox and high-speed shaft in OpenFAST, do we construct them as rigid or not?

Thanks in advance!

---

<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, 6:37pm UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/18 "2024-04-17T18:37:08Z")

</div>

Dear @Yinghan.Liu,

See my response for your related drivetrain question in the following forum topic: [How to apply icedyn to floating turbines in FAST](https://forums.nlr.gov/t/how-to-apply-icedyn-to-floating-turbines-in-fast/2413).

Best regards,

---

<div class="post-metadata">

**Author:** ![Jersson.Leon](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@Jersson.Leon](https://forums.nlr.gov/u/Jersson.Leon)\
**Post date:** [April 19, 2024, 2:52pm UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/19 "2024-04-19T14:52:04Z")

</div>

Dear [Jason.Jonkman](https://forums.nlr.gov/u/Jason.Jonkman)

I did 3 different simulations varying the parameters DrTrDOF, GBRatio, GenInner, and GenDOF. Particularly following are my 3 results of aerodynamic torque and alpharot

 ![simulation1](https://europe1.discourse-cdn.com/nrel/original/2X/a/a7b817bdf32ea9f60d90e55d064cb8969809d58a.png)  
 ![simulation2](https://europe1.discourse-cdn.com/nrel/original/2X/7/7b59b3e0a1712d100a31c624abeecaf1edcd6253.png)  
 ![simulation3](https://europe1.discourse-cdn.com/nrel/original/2X/a/a4964be3875e02723050cb87985dedf771b2768a.png)

My question is what is the effect of DrTrDOF=False GenDOF= False, why the aerodynamic torque remains ok?. Why when put DrTrDOF=False and GenDOF= True the aerodynamic torque descends to 0?.

Thank you very much in advance.  
Sincerely,  
Jersson.Leon

---

<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 19, 2024, 3:16pm UTC](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561/20 "2024-04-19T15:16:28Z")

</div>

Dear @Jersson.Leon,

When the generator and drivetrain DOFs are disabled, the rotor will spin at a constant speed (based on the initial `RotSpeed` you’ve set). If this speed is reasonable for the wind speed you are simulating, the aerodynamic torque should be reasonable.

When the generator DOF is enabled, the rotor will accelerate or decelerate based on the difference between aerodynamic torque and reaction torque from the generator. If the aerodynamic torque is tending toward zero, this implies that the generator torque is also near zero, and my guess is the rotor has accelerated to a high tip speed ratio where the aerodynamic torque drops to zero.

Best regards,

[Next page](https://forums.nlr.gov/t/drivetrain-simulation-openfast-and-simulink/6561.md?page=2)
