3. ROSCO Toolbox Structure¶
Here, we give an overview of the structure of the ROSCO toolbox and how the code is implemented.
3.1. File Structure¶
The primary tools of the ROSCO toolbox are separated into several folders. They include the following:
3.1.1. ROSCO_toolbox¶
The source code for the ROSCO toolbox generic tuning implementations lives here.
turbine.py
loads a wind turbine model from OpenFAST input files.
controller.py
contains the generic controller tuning scripts
utilities.py
has most of the input/output file management scripts
control_interface.py
enables a python interface to the ROSCO controller
sim.py
is a simple 1-DOF model simulatorofTools is a folder containing a large set of tools to handle OpenFAST input files - this is primarily used to run large simulation sets and to handle reading and processing of OpenFAST input and output files.
3.1.2. Examples¶
A number of examples are included to showcase the numerous capabilities of the ROSCO toolbox; they are described in the Standard ROSCO Workflow.
3.1.3. Matlab_Toolbox¶
A simulink implementation of the ROSCO controller is included in the Matlab Toolbox. Some requisite MATLAB utility scripts are also included.
3.1.4. ROSCO_testing¶
Testing scripts for the ROSCO toolbox are held here and showcased with run_testing.py
. These can be used to compare different controller tunings or different controllers all together.
3.1.5. Test_Cases¶
Example OpenFAST models consistent with the latest release of OpenFAST are provided here for simple testing and simulation cases.
3.1.6. Tune_Cases¶
Some example tuning scripts and tuning input files are provided here. The code found in tune_ROSCO.py
can be modified by the user to easily enable tuning of their own wind turbine model.
3.2. The ROSCO Toolbox Tuning File¶
A yaml formatted input file is used for the standard ROSCO toolbox tuning process. This file contains the necessary inputs for the ROSCO toolbox to load an OpenFAST input file deck and tune the ROSCO controller. It contains the following inputs:
Primary Section |
Variable |
Required |
Type |
Description |
---|---|---|---|---|
|
|
Yes |
String |
Name of the primary (*.fst) OpenFAST input file |
|
Yes |
String |
Main OpenFAST model directory, where the *.fst lives |
|
|
No |
String |
Filename for rotor performance text file. If this is not specified, and an existing rotor performance file cannot be found, cc-blade will be run |
|
|
|
Yes |
Float |
Rotor inertia [kg m^2], (Available in Elastodyn .sum file) |
|
Yes |
Float |
Rated rotor speed of the turbine [rad/s] |
|
|
Yes |
Float |
Cut-in wind speed [m/s] |
|
|
Yes |
Float |
Cut-out wind speed [m/s] |
|
|
Yes |
Float |
Maximum blade pitch rate [rad/s] |
|
|
Yes |
Float |
Maximum generator torque rate [Nm/s] |
|
|
Yes |
Float |
Rated Power [W]. |
|
|
Yes |
Float |
Blade edgewise first natural frequency [rad/s]. Set this even if you are using stiff blades. It becomes the generator speed LPF bandwidth. |
|
|
No |
Float |
Desired below-rated operation tip speed ratio [-]. If this is not specified, the Cp-maximizing TSR from the Cp surface is used. |
|
|
No |
Float |
Tower first fore-aft natural frequency [rad/s]. Required for floating wind turbine control. |
|
|
No |
Float |
Platform first fore-aft natural frequency [rad/s]. Required for floating wind turbine control. |
|
|
|
Yes |
Int |
0: write no debug files, 1: write standard output .dbg-file, 2: write standard output .dbg-file and complete avrSWAP-array .dbg2-file |
|
Yes |
Int |
Type of Low pass filter for the generator speed feedback signal [rad/s]. 1: first-order low-pass filter, 2: second-order low-pass filter. |
|
|
Yes |
Int |
Notch filter on generator speed and/or tower fore-aft motion, used for floating wind turbine control. 0: disable, 1: generator speed, 2: tower-top fore-aft motion, 3: generator speed and tower-top fore-aft motion |
|
|
Yes |
Int |
Turn Individual Pitch Control (IPC) for fatigue load reductions (pitch contribution). 0: off, 1: 1P reductions, 2: 1P+2P reductions. |
|
|
Yes |
Int |
Generator torque control mode. 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 power above rated. |
|
|
Yes |
Int |
Blade pitch control mode. 0: No pitch control, fix to fine pitch, 1: active PI blade pitch control |
|
|
Yes |
Int |
Yaw control mode. 0: no yaw control, 1: yaw rate control, 2: yaw-by-IPC |
|
|
Yes |
Int |
Setpoint Smoother mode. 0: no set point smoothing, 1: set point smoothing |
|
|
Yes |
Int |
Wind speed estimator mode. 0: One-second low pass filtered hub height wind speed, 1: Immersion and Invariance Estimator (Ortega et al.), 2: Extended Kalman filter |
|
|
Yes |
Int |
Pitch saturation mode. 0: no pitch saturation, 1: peak shaving, 2: Cp-maximizing pitch saturation, 3: peak shaving and Cp-maximizing pitch saturation |
|
|
Yes |
Int |
Shutdown mode. 0: no shutdown procedure, 1: pitch to max pitch at shutdown. |
|
|
Yes |
Int |
Floating feedback mode. 0: no nacelle rotational velocity feedback, 1: nacelle rotational velocity feedback |
|
|
Yes |
Int |
Flap control mode. 0: no flap control, 1: steady state flap angle, 2: Proportional flap control |
|
|
Yes |
Float |
Pitch controller desired damping ratio [-] |
|
|
Yes |
Float |
Pitch controller desired natural frequency [rad/s] |
|
|
Yes |
Float |
Torque controller desired damping ratio [-] |
|
|
Yes |
Float |
Torque controller desired natural frequency [rad/s] |
|
|
No |
Float |
Flap controller desired damping ratio [-]. Required if |
|
|
No |
Float |
Flap controller desired natural frequency [rad/s]. Required if |
|
|
No |
Float |
Maximum blade pitch angle [rad]. Default is 1.57 rad (90 degrees). |
|
|
No |
Float |
Minimum blade pitch angle [rad]. Default is 0 degrees. |
|
|
No |
Float |
Minimum rotor speed [rad/s]. Default is 0 rad/s. |
|
|
No |
Float |
First order low-pass filter cornering frequency for setpoint smoother [rad/s]. Default is .6283 rad/s. |
|
|
No |
Float |
Torque controller set point smoother gain bias percentage [\(\leq\) 1]. Default is 1. |
|
|
No |
Float |
Pitch controller set point smoother gain bias percentage [\(\leq\) 1]. Default is 0.001. |
|
|
No |
Float |
Percent peak shaving [\(\leq\) 1]. Default is 0.8. |
|
|
No |
Float |
Maximum blade pitch angle to initiate shutdown [rad]. Default is the blade pitch angle at |
|
|
No |
Float |
Cutoff Frequency for first order low-pass filter for blade pitch angle [rad/s]. Default is 0.41888 rad/s. |
|
|
No |
Float |
Maximum (and minimum) flap pitch angle [rad]. Default is 0.1745 rad (10 degrees). |