2. Standard ROSCO Workflow#
This page outlines methods for reading turbine models, generating the control parameters of a DISCON.IN
: file, and running aeroelastic simulations to test controllers.
A set of example scripts demonstrate the functionality of the ROSCO toolbox and controller.
2.1. Reading Turbine Models#
Control parameters depend on the turbine model.
The ROSCO_toolbox uses OpenFAST inputs and an additional .yaml
formatted file to set up a turbine
object in python.
Several OpenFAST inputs are located in Test_Cases/.
The controller tuning .yaml
are located in Tune_Cases/.
A detailed description of the ROSCO control inputs and tuning .yaml
are provided in The DISCON.IN file and ROSCO_Toolbox tuning .yaml, respectively.
01_turbine_model.py
loads an OpenFAST turbine model and displays a summary of its information
ROSCO requires the power and thrust coefficients for tuning control inputs and running the extended Kalman filter wind speed estimator.
02_ccblade.py
runs cc-blade, a blade element momentum solver from WISDEM, to generate a \(C_p\) surface.
The Cp_Cq_Ct.txt
(or similar) file contains the rotor performance tables that are necessary to run the ROSCO controller.
This file can be located wherever you desire, just be sure to point to it properly with the PerfFileName
parameter in DISCON.IN
.
2.2. Tuning Controllers and Generating DISCON.IN#
The ROSCO turbine
object, which contains turbine information required for controller tuning, along with control parameters in the tuning yaml and the \(C_p\) surface are used to generate control parameters and DISCON.IN
files.
To tune the PI gains of the torque control, set omega_vs
and zeta_vs
in the yaml.
Similarly, set omega_pc
and zeta_pc
to tune the PI pitch controller; gain scheduling is automatically handled using turbine information.
Generally omega_*
increases the responsiveness of the controller, reducing generator speed variations, but an also increases loading on the turbine.
zeta_*
changes the damping of the controller and is generally less important of a tuning parameter, but could also help with loading.
The default parameters in Tune_Cases/ are known to work well with the turbines in this repository.
03_tune_controller.py
loads a turbine and tunes the PI control gains04_simple_sim.py
tunes a controller and runs a simple simualtion (not using OpenFAST)05_openfast_sim.py
loads a turbine, tunes a controller, and runs an OpenFAST simulation
Each of these examples generates a DISCON.IN
file, which is an input to libdiscon.*.
When running the controller in OpenFAST, DISCON.IN
must be appropriately named using the DLL_FileName
parameter in ServoDyn.
OpenFAST can be installed from source or in a conda environment using:
conda install -c conda-forge openfast
ROSCO can implement peak shaving (or thrust clipping) by changing the minimum pitch angle based on the estimated wind speed:
06_peak_shaving.py
loads a turbine and tunes a controller with peak shaving.
By setting the ps_percent
value in the tuning yaml, the minimum pitch versus wind speed table changes and is updated in the DISCON.IN
file.
ROSCO also contains a method for distributed aerodynamic control (e.g., via trailing edge flaps):
09_distributed_aero.py
tunes a controller for distributed aerodynamic control
The ROSCO toolbox also contains methods for working with OpenFAST linear models
* 10_linear_params.py
exports a file of the parameters used for the simplified linear models used to tune ROSCO
* 11_robust_tuning.py
shows how linear models generated using OpenFAST can be used to tune controllers with robust stability properties.
* 12_tune_ipc.py
shows the tuning procedure for IPC
2.3. Running OpenFAST Simulations#
To run an aeroelastic simulation with ROSCO, the ROSCO input (DISCON.IN
) must point to a properly formatted Cp_Cq_Ct.txt
file using the PerfFileName
parameter.
If called from OpenFAST, the main OpenFAST input points to the ServoDyn input, which points to the DISCON.IN
file and the libdiscon.*
dynamic library.
For example in Test_Cases/NREL-5MW:
NREL-5MW.fst
has"NRELOffshrBsline5MW_Onshore_ServoDyn.dat"
as theServoFile
inputNRELOffshrBsline5MW_Onshore_ServoDyn.dat
has"../../ROSCO/build/libdiscon.dylib"
as theDLL_FileName
input and"DISCON.IN"
as theDLL_InFile
input. Note that these file paths are relative to the path of the main fast input (NREL-5MW.fst
)DISCON.IN
has"Cp_Ct_Cq.NREL5MW.txt"
as thePerfFileName
input
The ROSCO_toolbox has methods for running OpenFAST (and other) binary executables using system calls, as well as post-processing tools in ofTools/.
Several example scripts are set up to quickly simulate ROSCO with OpenFAST:
05_openfast_sim.py
loads a turbine, tunes a controller, and runs an OpenFAST simulation07_openfast_outputs.py
loads the OpenFAST output files and plots the results08_run_turbsim.py
runs TurbSim, for generating turbulent wind inputs14_open_loop_control.py
runs an OpenFAST simulation with ROSCO providing open loop control inputs
2.4. Testing ROSCO#
The ROSCO_toolbox also contains tools for testing ROSCO in IEC design load cases (DLCs), located in ROSCO_testing/.
The script run_Testing.py
allows the user to set up their own set of tests.
By setting testtype
, the user can run a variety of tests:
lite
, which runs DLC 1.1 simulations at 5 wind speed from cut-in to cut-out, in 330 second simulationsheavy
, which runs DLC 1.3 from cut-in to cut-out in 2 m/s steps and 2 seeds for each, in 630 seconds, as well as DLC 1.4 simulationsbinary-comp
, where the user can comparelibdiscon.*
dynamic libraries (compiled ROSCO source code), with either a lite or heavy set of simulationsdiscon-comp
, where the user can compareDISCON.IN
controller tunings (and the complied ROSCO source is constant)
Setting the turbine2test
allows the user to test either the IEA-15MW with the UMaine floating semisubmersible or the NREL-5MW reference onshore turbine.