This website uses local storage to ensure you get the best experience on our website.

Table of Contents

User-Defined Controllers for Time Domain Simulation

Although Bladed comes supplied with a Bladed Example Controller and built-in logics, both for power production control and for supervisory control, a wide range of different control algorithms are used in practice by different turbine manufacturers. The controller details are important for turbine loads and performance. External routines can be encapsulated in compiled libraries to integrate control logic into dynamic simulation.

Bladed allows a controller to be used for the following tasks (not an exhaustive list):

There are two options for writing a user-defined controller the Swap Array or Controller API. A user-defined controller may be written in language C, C++ and FORTRAN 90, as a 32-bit DLL (dynamic link library). For Linux calculation the user should compile the SO (shared object) in 64 bit. The Bladed engineering code (dtbladed.exe) for Windows has been upgraded to use a more recent Microsoft Visual C++ compiler that uses toolset version 14.3. This is the default C++ toolset version provided in Visual Studio 2022. This upgrade has potential consequences for users as explained below. These changes only affect dtbladed on Windows.

Testing has shown that external controllers built using earlier versions of the C++ toolset (for example, toolset version 12.0 in Visual Studio 2013) continue to work with the upgraded dtbladed release. However, it is recommended that all future controllers be built using the C++ 14.3 toolset to reduce the chance of errors from mixing different runtime library versions. Note that the C++ library version is distinct from the C++ language standard – the user is free to choose any C++ language standard available in their development environment.

Note

The user-defined controller is ignored in the case of Hardware Test simulations. The default Bladed option for power production control is implemented in the Bladed Example Controller. There is no auto-tune facility to determine the PI controller gains.

Using a Controller

To use a controller to complete control functions, select the External Controller option where appropriate on the Control Systems or Yaw Control windows.

To specify your controller, select the External Controller tab on the Supervisory Control window; on the Control Systems window, Define External Controllers... buttons are provided for this in appropriate places.

Global Controller Options

A controller operates on a discrete time step. A Time Step input specifies the minimum time step to be used across all of the controllers. To manage controllers run on different time steps set the Run Controller On... to ensure a controller is called on every \(n\text{th}\) discrete time step.

You may define multiple controllers in a simulation for turbine control, supervisory control functions and so on by adding controller fields under External Controllers. The controller settings must be defined for each controller. Running multiple controllers is useful for example to integrate separate external routines in one simulation such as turbine control, LIDAR signal processing and so on. Combining such controllers in one simulation could enable benefits such as feed-forward control.

The user can pass parameters to all controller using the free field text input both Additional Controller Parameters. These inputs are sent to every controller.

If non-essential controllers should not be called, then use the option Omit Controllers Where Possible.

Controller Inputs

The user should provide the file path or Controller location for each controller that is being used. The relative or absolute location of the external controller DLL must be provided. An absolute file path will be necessary for batch computation particularly when run in cloud compute facilities.

Bladed needs to know the Calling Convention used when interacting with the controller.

To further configure the behaviour of a controller the user can pass a set of input parameters to a specific external controller via Additional Controller Parameters. This allows external routines to be customised without having to re-compile the code. If desired, a file can be written to the calculation working direction containing the parameters in the additional parameters text box using the Pass Parameters By File option.

If running simulation using the Swap Array Controller then the user can Force Legecy DISCON. If selected only the old-style `DISCON`` function will be looked for in the controller, and raise an error if it cannot be found.

There are also some debugging options available to the user:

  • Use Floating Where Possible: If checked this will apply floating point protection when calling the external controllers.

  • Log External Controller: If checked this will output all of the values contained in the external controller interface before and after each external controller call.

  • Log Swap Array (Legacy Support): If checked, the contents of the swap array passed to a legacy controller will be logged in separate results files.

When using a controller, Bladed evidently cannot guarantee that the performance defined by the steady-state control parameters will actually be achieved on average during a dynamic simulation.

Last updated 18-10-2024