Variable-speed generator-torque controller and PI collective blade-pitch controller of the NREL offshore 5 MW baseline turbine, as written by J. Jonkman (NREL/NWTC) for the IEA Annex XXIII OC3 studies (DISCON).
Ported from Incompact3d's acl_controller.f90. The torque law has five
regions (1, 1 1/2, 2, 2 1/2 and 3) on the low-pass filtered generator
speed; the pitch controller is a gain-scheduled PI on the speed error,
with pitch-angle and pitch-rate limits. The pitch gains and limits are
those of the NREL 5 MW turbine; the torque parameters come from the
turbine input file.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | max_ctrl_blades | = | 3 |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=dp), | public | :: | corner_freq | = | 0._dp |
speed filter corner frequency [rad/s] |
|
| real(kind=dp), | public | :: | pc_dt | = | 0._dp |
pitch controller interval [s] |
|
| real(kind=dp), | public | :: | pc_ki | = | 0._dp |
integral gain at rated pitch [-] |
|
| real(kind=dp), | public | :: | pc_kk | = | 0._dp |
pitch where dP/dpitch doubles [rad] |
|
| real(kind=dp), | public | :: | pc_kp | = | 0._dp |
proportional gain at rated pitch [s] |
|
| real(kind=dp), | public | :: | pc_max_pit | = | 0._dp |
maximum pitch [rad] |
|
| real(kind=dp), | public | :: | pc_max_rat | = | 0._dp |
maximum pitch rate [rad/s] |
|
| real(kind=dp), | public | :: | pc_min_pit | = | 0._dp |
minimum pitch [rad] |
|
| real(kind=dp), | public | :: | pc_ref_spd | = | 0._dp |
reference generator speed [rad/s] |
|
| real(kind=dp), | public | :: | vs_ct_in_sp | = | 0._dp |
cut-in generator speed [rad/s] |
|
| real(kind=dp), | public | :: | vs_dt | = | 0._dp |
torque controller interval [s] |
|
| real(kind=dp), | public | :: | vs_max_rat | = | 0._dp |
maximum torque rate [N m/s] |
|
| real(kind=dp), | public | :: | vs_max_tq | = | 0._dp |
maximum generator torque [N m] |
|
| real(kind=dp), | public | :: | vs_rgn2_k | = | 0._dp |
region 2 torque constant |
|
| real(kind=dp), | public | :: | vs_rgn2_sp | = | 0._dp |
region 1 1/2 to 2 speed [rad/s] |
|
| real(kind=dp), | public | :: | vs_rgn3_mp | = | 0._dp |
pitch above which region 3 applies |
|
| real(kind=dp), | public | :: | vs_rt_gn_sp | = | 0._dp |
rated generator speed [rad/s] |
|
| real(kind=dp), | public | :: | vs_rt_pwr | = | 0._dp |
rated power [W] |
|
| real(kind=dp), | public | :: | vs_sl_pc | = | 0._dp |
region 2 1/2 slip [%] |
|
| real(kind=dp), | public | :: | gear_box_ratio | = | 0._dp | ||
| real(kind=dp), | public | :: | i_generator | = | 0._dp |
generator moment of inertia |
|
| real(kind=dp), | public | :: | bl_pitch(max_ctrl_blades) | = | 0._dp | ||
| real(kind=dp), | public | :: | gen_speed | = | 0._dp | ||
| real(kind=dp), | public | :: | gen_speed_f | = | 0._dp | ||
| real(kind=dp), | public | :: | gen_trq | = | 0._dp | ||
| real(kind=dp), | public | :: | gk | = | 0._dp | ||
| real(kind=dp), | public | :: | int_spd_err | = | 0._dp | ||
| real(kind=dp), | public | :: | last_gen_trq | = | 0._dp | ||
| real(kind=dp), | public | :: | last_time | = | 0._dp | ||
| real(kind=dp), | public | :: | last_time_pc | = | 0._dp | ||
| real(kind=dp), | public | :: | last_time_vs | = | 0._dp | ||
| real(kind=dp), | public | :: | pit_com(max_ctrl_blades) | = | 0._dp | ||
| real(kind=dp), | public | :: | vs_slope15 | = | 0._dp | ||
| real(kind=dp), | public | :: | vs_slope25 | = | 0._dp | ||
| real(kind=dp), | public | :: | vs_sy_sp | = | 0._dp | ||
| real(kind=dp), | public | :: | vs_tr_gn_sp | = | 0._dp | ||
| integer, | public | :: | status | = | 0 |
0 on the first call, then > 0 |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(controller_t), | intent(inout) | :: | ctrl | |||
| real(kind=dp), | intent(in) | :: | generator_inertia | |||
| real(kind=dp), | intent(in) | :: | gb_ratio | |||
| real(kind=dp), | intent(in) | :: | rated_gen_speed | |||
| real(kind=dp), | intent(in) | :: | rated_limit_gen_torque | |||
| real(kind=dp), | intent(in) | :: | cut_in_gen_speed | |||
| real(kind=dp), | intent(in) | :: | region2_start_gen_speed | |||
| real(kind=dp), | intent(in) | :: | kgen | |||
| real(kind=dp), | intent(in) | :: | rated_power | |||
| real(kind=dp), | intent(in) | :: | maximum_torque |
Advance the controller to time given the rotor speed [rad/s]. The
commanded generator torque is left in gen_trq and the commanded blade
pitch angles in pit_com.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(controller_t), | intent(inout) | :: | ctrl | |||
| real(kind=dp), | intent(in) | :: | time | |||
| integer, | intent(in) | :: | n_blades | |||
| real(kind=dp), | intent(in) | :: | rot_speed |