Problem with DISCON subroutine

Good evening,

I’m trying to make a model for a synchronous generator with gearbox ratio equal to one (with permanent magnets) using the DISCON subroutine and I’m having a few problems.

For this task, I’m using the “Test26” files that are attached in FAST v8.15 just changing the RotSpeed to 12.2 (the rated rotational speed that I want to have), the GBRatio to 1 and the GenIner from 534.116 to 200000 (due to the greater mass of this kind of generator) in the ElastoDyn Input File. Moreover, in the DISCON subroutine file I have changed the following values:

PC_RefSpd = 123.9254 → 1.27758 (value for 12.2 rpm)

VS_CtInSp = 70.16224 → 0.723322
VS_MaxRat = 15000.0 → 1455000.0 (is just a order of magnitude)
VS_MaxTq = 47402.91 → 4560396.2
VS_Rgn2K = 2.332287 → 2128615.4
VS_Rgn2Sp = 91.21091 → 0.940319

VS_RtGnSp = 122.6861 → 1.27758

The other inputs of DISCON file remain unchanged.

After compiling, the main problem is that the solution appears to fail between the 150 and the 200 seconds of simulation (more or less), giving the following message:

“Timestep: 158 of 300 seconds. Estimated final completion at 00:20:11.
Warning: Turning off Unsteady Aerodynamics due to high angle-of-attack. BladeNode = 7, Blade = 3
Warning: Turning off Unsteady Aerodynamics due to high angle-of-attack. BladeNode = 6, Blade = 3 […]”

On the other hand, the system seems to become unstable when I decrease the VS_Slpc value (that should be zero).

I’ve attached a phew graphics in this post with the results obtained just to show the problems after changes. The graphics shows the WindVelocity, PwrGen, RotSpeed and PitchAngle in this order.

You can see how the power for some values in the range 150-200 sec become negative.

For all of this, I would like to know if someone has tryed to use the DISCON subroutine for generators with GBRatio = 1 before and, if it ran ok, what am I doing wrong?

Thank you in advance,
Marcos

Dear Marcos,

I’ve not tried this myself, but overall your approach sounds reasonable. I’ve never heard of others having problems with setting the GBRatio to unity.

While most of your controller-constant conversions make sense, I do question whether the generator inertia (GenIner) was scaled correctly. GenIner scales with GBRatio^2, so, I would expect a value at least one order of magnitude more than you’ve stated. With a much smaller GenIner, perhaps you’ve introduced a very high natural frequency in the drivetrain-torsion DOF that would require a much smaller time step and/or numerical instability problems if the time step has not been reduced. Perhaps that is the problem?

Best regards,

Thank you for answering.

I’ve tried to solve it firstly increasing the GenIner and secondly decreasing the time step without any result. I don’t know what I’m doing wrong. As you have said, I’ve looking in this forum about people with the same problem to see how they solved it but appears that I’m the only one with it. I’ll keep on trying.

Best regards,
Marcos

Dear Marcos,

I know this thread is over a year old but I have been working on a direct-drive version of the 5MW turbine by NREL.
Initially I made similar changes as you and got the same problems (negative power). I identified that the pitching was too slow and have adjusted the pitch gains wrt. the gbratio. This has fixed the problem and the output of both the geared and direct-drive turbine are very similar as expected.

I have made a very detailed description of all the changes I made to the original 5MW turbine to convert it to a direct-drive configuration in:
emd.dk/files/5MW_DirectDriv … pe2018.pdf

Best regards,
René Slot

Dear Jason,

I am learning how to use FORTRAN with the DLL DISCON controller in OpenFAST. I set YCMode to 5 and TYCOn to 0. I implemented this simple yaw controller below in the DISCON.f90 file, but I have a question regarding the time step DT. Indeed, I don’t know which one to take between VS_DT, avrSWAP(3), ElapTime, or something else.

Trying one of them, I have the feeling that the controller is not called every time step DT, but there is a time lag. Knowing that the wind direction is 40° and as you can see in the Figure below, the points where there is a red arrow should be below or above their previous points:

  • If the previous point (at t=t0-1) is above 40°, the YawRate (at t=t0) becomes negative and the actual point (at t=t0) should be below the previous one.
  • If the previous point (at t=t0-1) is below40°, the YawRate (at t=t0) becomes positive and the actual point (at t=t0) should be above the previous one.

So my questions are: Is the DISCON.dll file is called every time step? If so, how can we get the time step DT? And if there is a time-lag, does it mean that the Subroutine UserYawCont() is faster than the DLL controller since it is called every time step DT?


REAL(4)                      :: YawError
REAL(4)                      :: YawRate
REAL(4)                      :: MyDT

!xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
!MyDT=VS_DT
!MyDT=avrSWAP(3)   
MyDT=ElapTime
!IF ( ( Time*OnePlusEps - LastTimeVS ) >= VS_DT )  THEN
    YawError=avrSWAP(24)
    IF (Time>=60) THEN
        IF ( YawError >0 ) THEN
            YawRate=0.0873 !5 deg/s
            avrSWAP(48) = YawRate
            avrSWAP(41)=YawRate*MyDT+avrSWAP(37)
        ELSE IF ( YawError <0 ) THEN
            YawRate=-0.0873 !5 deg/s
            avrSWAP(48) = YawRate
            avrSWAP(41)=YawRate*MyDT+avrSWAP(37)
        ELSE
            avrSWAP(41)  = avrSWAP(37)
            avrSWAP(48) = 0.0
        END IF
    END IF
!END IF
!xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Sorry for the inconvenience

Kindest regards

Younes

Dear Younes,

The Bladed-style DLL (DISCON) will be called by OpenFAST at every DLL_DT seconds, where DLL_DT is specified in the ServoDyn input file. Note that DLL_DT must be an integer multiple of ServoDyn’s DT. The value of avrSWAP(3) is set to DLL_DT and passed to the DISCON DLL.

UserYawCont() is called multiple times per time step, during both OpenFAST’s update sates and calculate outputs calls.

Best regards,

Dear Jason,

Okay, I understand. I put the DT in ServoDyn as “default” (it gives the same thing when I change it to DT=0.005s as in the input file .fst).
I put the same code in UserYawCont() and in the DISCON.dll, and surprisingly the results are a bit different as you can see below. I don’t know where this anomaly comes from. Do you have any idea ?

Kindest regards

Younes

Dear Younes,

I would guess the differences are related to how UserYawCont() is called multiple times per time step whereas the DISCON.dll is only called once, but the exact effect will depend on the control logic you’ve implemented. I’m sure you could change the DISCON source code to get a smoother response.

Best regards,

Dear Jason,

I understand now the difference. Thank you so much for the help.

Kindest regards

Younes