NREL / ROSCO

A Reference Open Source Controller for Wind Turbines
https://rosco.readthedocs.io/en/latest/
Apache License 2.0
116 stars 93 forks source link

K omega**2 control, definition of K #334

Closed dzalkind closed 1 month ago

dzalkind commented 7 months ago

Discussed in https://github.com/NREL/ROSCO/discussions/330

Originally posted by **lejeunemax** April 5, 2024 I stumbled upon the `vs_rgn2K` value used by ROSCO for the K omega**2 regulation In the `tune_controller` function, it is defined as follows: ``` self.vs_rgn2K = (pi*rho*R**5.0 * turbine.Cp.max * turbine.GBoxEff/100 * turbine.GenEff/100) / \ (2.0 * turbine.Cp.TSR_opt**3 * Ng**3) * self.controller_params['rgn2k_factor'] ``` For `VS_ControlMode == 1`, in Region 2, this value is then used to compute the generator torque and accordingly stored in `avrSWAP[46]` (in python) which, in turn, is used to compute the generated power eg. : `gen_power[i] = gen_speed[i] * gen_torque[i] * self.turbine.GenEff / 100` in `sim_ws_wd_series`. From my understanding, there is therefore an inconsistency between the definition of K and the way it used there. More precisely `LocalVar%GenTq = CntrPar%VS_Rgn2K*LocalVar%GenSpeedF*LocalVar%GenSpeedF` should actually by `LocalVar%GenTq = CntrPar%VS_Rgn2K*LocalVar%GenSpeedF*LocalVar%GenSpeedF/(CntrPar%VS_GenEff/100.0))` as `VS_GenEff` is currently accounted twice in the `gen_power[I]`computation. Also, the definition of the generator torque (coming from the hss) should not depend on the generator efficiency. Curious to know if I am missing something or if this definition is indeed incorrect?
dzalkind commented 7 months ago

Thanks for the suggestion @lejeunemax. We think there is an error here and plan to fix it in a new release.