nrel_5mw_controller¶
This is the documentation of nrel_5mw_controller, an implementation of the NREL 5MW wind turbine controller in Python. It was originally written for Rick Lupton’s PhD thesis and this paper.
Contents¶
License¶
The MIT License (MIT)
Copyright (c) 2019 Rick Lupton
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Contributors¶
- Rick Lupton <mail@ricklupton.name>
nrel_5mw_controller¶
nrel_5mw_controller package¶
Submodules¶
nrel_5mw_controller.combined_controller module¶
Combined controller, including both torque and pitch control.
-
class
nrel_5mw_controller.combined_controller.
CombinedController
(torque_params, pitch_params, torque_timestep, pitch_timestep=None, const_power_min_pitch=0)[source]¶ Bases:
object
Controller combining both torque and pitch control.
Parameters: - torque_params (dict) – passed to the
TorqueController
- pitch_params (dict) – passed to the
PitchController
- torque_timestep (float) – timestep for the torque controller
- pitch_timestep (float, optional) – timestep for the pitch controller.
Defaults to the same as
torque_timestep
. - const_power_min_pitch (float, optional) – The minimum pitch angle to start forcing constant power mode for the torque controller. Default 0.
-
classmethod
from_yaml
(filename)[source]¶ Read controller params from ‘controller’ section of YAML file
-
pitch_demand
¶ The current pitch demand from the pitch controller.
-
step
(time, measured_speed, measured_pitch)[source]¶ Step both controllers forwards in time.
This is the main method of the controller class.
Parameters:
-
torque_demand
¶ The current torque demand from the torque controller.
- torque_params (dict) – passed to the
nrel_5mw_controller.pitch_controller module¶
Implementation of the pitch controller for the NREL 5MW wind turbine controller.
-
class
nrel_5mw_controller.pitch_controller.
PitchController
(timestep, params)[source]¶ Bases:
object
Time-stepping pitch controller for the NREL 5MW wind turbine.
It expects the following parameters:
proportional gain
: Proportional gain of the PI controllerintegral gain
: Integral gain of the PI controllerpitch schedule doubled angle
: This is the angle at which the pitch controller gain is halved.pitch angle min
: Minimum pitch angle limitpitch angle max
: Maximum pitch angle limitpitch rate limit
: Maximum pitch rate limit (up or down)rated speed
: The generator speed setpoint for the controllerspeed filter corner freq
: The frequency of the generator speed filter.
-
classmethod
from_yaml
(filename)[source]¶ Read controller params from ‘controller’ section of YAML file
nrel_5mw_controller.torque_controller module¶
Implementation of the NREL 5MW wind turbine torque controller.
-
class
nrel_5mw_controller.torque_controller.
TorqueController
(timestep, params)[source]¶ Bases:
object
Time-stepping torque controller for the NREL 5MW wind turbine.
It expects the following parameters:
rated speed
: The generator speed setpoint for the controllerrated power
: The generator power setpoint for the controller, for constant power modeslip percent
: Generator slip rate, to calculate the synchronous speedopt constant
: the k coefficient for the optimal speed control regionspeed filter corner freq
: The frequency of the generator speed filter.cut in speed
: cut in generator speedopt min speed
: minimum generator speed for optimal control (linear ramp between cut in speed and this speed)torque max
: maximum generator torquetorque rate limit
: Maximum torque rate limit (up or down)
Optional parameters:
constant torque
: control for this constant torque above rated, instead of constant power.
-
classmethod
from_yaml
(filename)[source]¶ Read controller params from ‘controller’ section of YAML file
nrel_5mw_controller.util module¶
Utility functions.