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 from rosco_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 libraries

  • ROSCO_Helpers.f90 contains subroutines for file I/O and other helpful routines, borrowed heavily from NWTC.IO in OpenFAST

  • ROSCO_IO.f90 is procedurally generated using the rosco_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.

Detailed and up-to-date documentation of the DISCON inputs can be found in the ROSCO_Toolbox tuning .yaml page in controller_params -> DISCON.