4. ROSCO Structure: Controller
Here, we give an overview of the structure of the ROSCO controller and how the code is implemented.
4.1. ROSCO File Structure
The primary functions of the ROSCO toolbox are separated into several files. They include the following:
DISCON.f90
is the primary driver function.ReadSetParameters.f90
primarily handles file I/O and the Bladed Interface.ROSCO_Types.f90
allocates variables in memory; it is procedurally generated fromrosco_registry
Constants.f90
establishes some global constants.Controllers.f90
contains the primary controller algorithms (e.g. blade pitch control)ControllerBlocks.f90
contains additional control features that are not necessarily primary controllers (e.g. wind speed estimator)Filters.f90
contains the various filter implementations.Functions.f90
contains various functions used in the controller.ExtControl.f90
contains subroutines for calling external dynamic librariesROSCO_Helpers.f90
contains subroutines for file I/O and other helpful routines, borrowed heavily from NWTC.IO in OpenFASTROSCO_IO.f90
is procedurally generated using therosco_registry
for writing debug and checkpoint files
4.2. The DISCON.IN file
A standard file structure is used as an input to the ROSCO controller.
This is, generically, dubbed the DISCON.IN file, though it can be renamed (In OpenFAST, this file is pointed to by DLL_InFile
in the ServoDyn file.
Examples of the DISCON.IN file are found in each of the Test Cases in the ROSCO toolbox, and in the parameter_files
folder of ROSCO.
Primary Section |
Variable |
Type |
Description |
---|---|---|---|
DEBUG |
|
Int |
0: write no debug files, 1: write standard output .dbg-file, 2: write standard output .dbg-file and complete avrSWAP-array .dbg2-file |
CONTROLLER FLAGS |
|
Int |
Filter type for generator speed feedback signal. 1: first-order low-pass filter, 2: second-order low-pass filter. |
|
Int |
Notch filter on the measured generator speed and/or tower fore-aft motion (used for floating). 0: disable, 1: generator speed, 2: tower-top fore-aft motion, 3: generator speed and tower-top fore-aft motion. |
|
|
Int |
Individual Pitch Control (IPC) type for fatigue load reductions (pitch contribution). 0: off, 1: 1P reductions, 2: 1P+2P reductions. |
|
|
Int |
Generator torque control mode type. 0: \(k\omega^2\) below rated, constant torque above rated, 1: \(k\omega^2\) below rated, constant power above rated, 2: TSR tracking PI control below rated, constant torque above rated, 3: TSR tracking PI control below rated, constant torque above rated |
|
|
Int |
Blade pitch control mode. 0: No pitch, fix to fine pitch, 1: active PI blade pitch control. |
|
|
Int |
Yaw control mode. 0: no yaw control, 1: yaw rate control, 2: yaw-by-IPC. |
|
|
Int |
Setpoint Smoother mode. 0: no set point smoothing, 1: use set point smoothing. |
|
|
Int |
Wind speed estimator mode. 0: One-second low pass filtered hub height wind speed, 1: Immersion and Invariance Estimator, 2: Extended Kalman Filter. |
|
|
Int |
Pitch saturation mode. 0: no pitch saturation, 1: implement pitch saturation |
|
|
Int |
Shutdown mode. 0: no shutdown procedure, 1: shutdown triggered by max blade pitch. |
|
|
Int |
Floating feedback mode. 0: no nacelle velocity feedback, 1: nacelle velocity feedback (parallel compensation). |
|
|
Int |
Flap control mode. 0: no flap control, 1: steady state flap angle, 2: PI flap control. |
|
FILTERS |
|
Float |
Corner frequency (-3dB point) in the generator speed low-pass filter, [rad/s] |
|
Float |
Damping coefficient in the generator speed low-pass filter, [-]. Only used only when F_FilterType = 2 |
|
|
Float |
Natural frequency of the notch filter, [rad/s] |
|
|
Float Float |
Notch damping values of numerator and denominator - determines the width and depth of the notch, [-] |
|
|
Float |
Corner frequency (-3dB point) in the first order low pass ..filter for the set point smoother, [rad/s]. |
|
|
Float Float |
Corner frequency and damping ratio for the second order low pass filter of the tower-top fore-aft motion for floating feedback control [rad/s, -]. |
|
|
Float |
Corner frequency (-3dB point) in the first order low pass filter for the wind speed estimate [rad/s]. |
|
|
Float |
Natural frequency of first-order high-pass filter for nacelle fore-aft motion [rad/s].. |
|
|
Float Float |
Corner frequency and damping ratio in the second order low pass filter of the blade root bending moment for flap control [rad/s, -]. |
|
BLADE PITCH CONTROL |
|
Int |
Number of gain-scheduling table entries |
|
Float array, length = |
Gain-schedule table: pitch angles [rad]. |
|
|
Float array, length = |
Gain-schedule table: pitch controller proportional gains [s]. |
|
|
Float array, length = |
Gain-schedule table: pitch controller integral gains [-]. |
|
|
Float array, length = |
Gain-schedule table: pitch controller derivative gains [\(s^2\)]. Currently unused! |
|
|
Float array, length = |
Gain-schedule table: transfer function gains [\(s^2\)]. Currently unused! |
|
|
Float |
Maximum physical pitch limit, [rad]. |
|
|
Float |
Minimum physical pitch limit, [rad]. |
|
|
Float |
Maximum pitch rate (in absolute value) of pitch controller, [rad/s]. |
|
|
Float |
Minimum pitch rate (in absolute value) in pitch controller, [rad/s]. |
|
|
Float |
Desired (reference) HSS speed for pitch controller, [rad/s]. |
|
|
Float |
Below-rated pitch angle set-point, [rad] |
|
|
Float |
Angle above lowest |
|
INDIVIDUAL PITCH CONTROL |
|
Float |
Integrator saturation point (maximum signal amplitude contribution to pitch from IPC), [rad] |
|
Float Float |
Integral gain for the individual pitch controller: first parameter for 1P reductions, second for 2P reductions, [-, -]. |
|
|
Float Float |
Phase offset added to the azimuth angle for the individual pitch controller: first parameter for 1P reductions, second for 2P reductions, [rad]. |
|
|
Float |
Corner frequency of the first-order actuators model, used to induce a phase lag in the IPC signal [rad/s]. 0: Disable. |
|
VS TORQUE CONTROL |
|
Float |
Generator efficiency from mechanical power -> electrical power, [should match the efficiency defined in the generator properties!], [%] |
|
Float |
Above rated generator torque PI control saturation limit, [Nm]. |
|
|
Float |
Maximum generator torque rate (in absolute value) [Nm/s]. |
|
|
Float |
Maximum generator torque (HSS), [Nm]. |
|
|
Float |
Minimum generator torque (HSS) [Nm]. |
|
|
Float |
Cut-in speed towards optimal mode gain path, [rad/s]. Used if |
|
|
Float |
Generator torque constant in Region 2 (HSS side), [N-m/(rad/s)^2]. Used if |
|
|
Float |
Rated power [W] |
|
|
Float |
Rated torque, [Nm]. |
|
|
Float |
Rated generator speed used by torque controller [rad/s]. |
|
|
Int |
Number of generator PI torque controller gains. Only 1 is currently supported. |
|
|
Float |
Proportional gain for generator PI torque controller [1/(rad/s) Nm]. (Used in the transition 2.5 region if |
|
|
Float |
Integral gain for generator PI torque controller [1/rad Nm]. (Only used in the transition 2.5 region if |
|
|
Float |
Region 2 tip-speed-ratio [rad]. Generally, the power maximizing TSR. Can use non-optimal TSR for low axial induction rotors. |
|
SETPOINT SMOOTHER |
|
Float |
Variable speed torque controller setpoint smoother gain, [-]. |
|
Float |
Collective pitch controller setpoint smoother gain, [-]. |
|
WIND SPEED ESTIMATOR |
|
Float |
Blade length (distance from hub center to blade tip), [m] |
|
Int |
Number of parameters in the Cp array |
|
|
Float Float Float Float |
Parameters that define the parameterized CP(lambda) function |
|
|
Float |
Adaption gain for the I&I wind speed estimator algorithm [m/rad] |
|
|
Float |
Gearbox ratio [>=1], [-] |
|
|
Float |
Total drivetrain inertia, including blades, hub and casted generator inertia to LSS, [kg m^2] |
|
|
Float |
Air density, [kg m^-3] |
|
|
String |
File containing rotor performance tables (Cp,Ct,Cq) |
|
|
Int Int |
Size of rotor performance tables in |
|
|
Int |
Number of first-order system poles used in the Extended Kalman Filter |
|
|
Float array, length = |
Wind speeds for first-order system poles lookup table [m/s] |
|
|
Float array, length = |
First order system poles [1/s] |
|
YAW CONTROL |
|
Float |
Yaw error threshold. Turbine begins to yaw when it passes this. [rad^2 s] |
|
Float |
Integrator saturation (maximum signal amplitude contribution to pitch from yaw-by-IPC), [rad] |
|
|
Int |
Number of controller gains for yaw-by-IPC |
|
|
Float array, length = |
Yaw-by-IPC proportional controller gains Kp [s] |
|
|
Float array, length = |
Yaw-by-IPC integral controller gain Ki [-] |
|
|
Float |
Low-pass filter corner frequency for the Yaw-by-IPC controller to filtering the yaw alignment error, [rad/s]. |
|
|
Float |
Low-pass filter damping factor for the Yaw-by-IPC controller to filtering the yaw alignment error, [-]. |
|
|
Float |
Yaw alignment error set point, [rad]. |
|
|
Float |
Corner frequency fast low pass filter, [rad/s]. |
|
|
Float |
Corner frequency slow low pass filter, [rad/s]. |
|
|
Float |
Yaw rate, [rad/s]. |
|
TOWER FORE-AFT DAMPING |
|
Float |
Integral gain for the fore-aft tower damper controller [rad*s/m]. -1 = off |
|
Float |
Corner frequency (-3dB point) in the high-pass filter on the fore-aft acceleration signal [rad/s] |
|
|
Float |
Integrator saturation (maximum signal amplitude contribution to pitch from FA damper), [rad] |
|
MINIMUM PITCH SATURATION |
|
Int |
Number of values in minimum blade pitch lookup table. |
|
Float array, length = |
Wind speeds corresponding to minimum blade pitch angles [m/s] |
|
|
Float array, length = |
Minimum blade pitch angles [rad] |
|
SHUTDOWN |
|
Float |
Maximum blade pitch angle to initiate shutdown, [rad] |
|
Float |
Cutoff Frequency for first order low-pass filter for blade pitch angle, [rad/s] |
|
FLOATING |
|
Float |
Nacelle velocity proportional feedback gain [s] |
FLAP ACTUATION |
|
Float |
Initial or steady state flap angle [rad] |
|
Float |
Trailing edge flap control proportional gain [s] |
|
|
Float |
Trailing edge flap control integral gain [s] |
|
|
Float |
Maximum (and minimum) flap angle [rad] |