diff --git a/GridKit/Model/PhasorDynamics/Wind/README.md b/GridKit/Model/PhasorDynamics/Wind/README.md new file mode 100644 index 000000000..a5f5e9cdb --- /dev/null +++ b/GridKit/Model/PhasorDynamics/Wind/README.md @@ -0,0 +1,15 @@ +# **Wind Models** + +## Introduction + +Wind models represent wind-turbine generator and converter components in the +phasor dynamics model. + +## Types + +The GridKit wind documentation includes: + +- Wind Turbine Generator Aerodynamic Model WTGARA (See [WTGARA](WTGARA/README.md)) +- Wind Turbine Generator Pitch-Control Model WTGPTA (See [WTGPTA](WTGPTA/README.md)) +- Wind Turbine Generator Drive-Train Model WTGTA (See [WTGTA](WTGTA/README.md)) +- Wind Turbine Generator Torque-Control Model WTGTRQA (See [WTGTRQA](WTGTRQA/README.md)) diff --git a/GridKit/Model/PhasorDynamics/Wind/WTGARA/README.md b/GridKit/Model/PhasorDynamics/Wind/WTGARA/README.md new file mode 100644 index 000000000..4c91f4c12 --- /dev/null +++ b/GridKit/Model/PhasorDynamics/Wind/WTGARA/README.md @@ -0,0 +1,139 @@ +# **Wind Turbine Generator Aerodynamic Model (WTGARA)** + +WTGARA is a WECC wind-turbine generator aerodynamic model. In GridKit it is +represented as a signal-control model that computes mechanical power from +blade-pitch angle feedback. + +## Notes + +- WTGARA corresponds to the source model `WTGAR_A`. +- The equivalent PTI source model name is `WTARA1`. +- When used with WTGTA, connect WTGARA `pm` to WTGTA `pm`. +- Mechanical-power signal output is on system base. +- Internal aerodynamic power quantities are on component base. + +## Block Diagram + +Standard WTGARA aerodynamic model. + +![](../../../../../docs/Figures/PhasorDynamics/Wind/WTGARA/diagram.png) + +Figure 1: WTGARA block diagram. Figure courtesy of [PowerWorld](https://www.powerworld.com/WebHelp/) + +## Model Parameters + +Symbol | Units | JSON | Description | Typical Value | Note +------------------------------------|--------------|---------|---------------------------------------------------------|---------------|------ +$S^\mathrm{base}$ | [MVA] | `mva` | WTGARA component power base | 100.0 | Required positive value; source label: `MVABase` +$K_a$ | [p.u./deg^2] | `Ka` | Aerodynamic gain factor | - | Block name: `Ka` +$P_{\text{m},0}$ | [p.u.] | `Pm0` | Prior mechanical power | - | System base; block name: `Pm0` +$\theta_0$ | [deg] | `Theta` | Prior initial blade pitch angle | - | Block name: `Theta` + +### Parameter Validation + +Invalid WTGARA parameter sets are rejected by the following checks. + +```math +\begin{aligned} + S^\mathrm{base} + &> 0 +\end{aligned} +``` + +### Model Derived Parameters + +```math +\begin{aligned} + k_{\mathrm{base}} + &= \dfrac{S^\mathrm{sys}}{S^\mathrm{base}} +\end{aligned} +``` + +## Model Variables + +### Internal Variables + +#### Differential + +None. + +#### Algebraic + +Symbol | Units | Description | Note +------------------------------------|--------|-------------------------------------|------ +$P_\text{m}$ | [p.u.] | Mechanical-power output | System base; signal port `pm` + +### External Variables + +#### Differential + +None. + +#### Algebraic + +Symbol | Units | Type | Description | Note +------------------------------------|--------|---------|-------------------------------------|------ +$\theta$ | [deg] | Unknown | Blade-pitch angle | Signal port `theta` + +## Model Equations + +### Differential Equations + +None. + +### Algebraic Equations + +```math +\begin{aligned} + 0 &= + -k_{\mathrm{base}}\left(P_\text{m} - P_{\text{m},0}\right) + - K_a\theta\left(\theta - \theta_0\right) +\end{aligned} +``` + +## Initialization + +### External Priors + +```math +\begin{aligned} + P_\text{m} + &\leftarrow \text{mechanical-power start on system base} +\end{aligned} +``` + +### Internal Initialization + +None. + +### External Solved + +```math +\begin{aligned} + \theta + &\leftarrow + \begin{cases} + \dfrac{1}{2} + \left[ + \theta_0 + + \sqrt{ + \theta_0^2 + - \dfrac{4k_{\mathrm{base}}}{K_a} + \left(P_\text{m} - P_{\text{m},0}\right) + } + \right] & K_a\ne 0 \\ + \theta_0 & K_a = 0 + \end{cases} +\end{aligned} +``` + +Initialization requires $\theta_0\ge 0$, a nonnegative pitch radicand when +$K_a\ne 0$, and $P_\text{m} = P_{\text{m},0}$ when +$K_a=0$. + +## Monitorable Outputs + +Output | Units | Description | Note +----------------|--------|-------------------------------------|------ +`pm` | [p.u.] | Mechanical-power output | $P_\text{m}$ (system base) +`dtheta` | [deg] | Pitch-angle deviation | $\theta-\theta_0$ diff --git a/GridKit/Model/PhasorDynamics/Wind/WTGPTA/README.md b/GridKit/Model/PhasorDynamics/Wind/WTGPTA/README.md new file mode 100644 index 000000000..60d813a56 --- /dev/null +++ b/GridKit/Model/PhasorDynamics/Wind/WTGPTA/README.md @@ -0,0 +1,233 @@ +# **Wind Turbine Generator Pitch-Control Model (WTGPTA)** + +WTGPTA is a WECC wind-turbine generator pitch-control model. In GridKit it is +represented as a signal-control model that computes a blade-pitch angle from +rotor-speed and active-power command feedback. + +## Notes + +- WTGPTA corresponds to the source model `WTGPT_A`. +- The equivalent `WTPTA1` source model names $K_{\mathrm{ip}}$ and + $K_{\mathrm{pp}}$ as `Kiw` and `Kpw`. +- Signal ports and active-power commands are on system base. +- Pitch-control states and outputs are in degrees. + +## Block Diagram + +Standard WTGPTA pitch-control model. + +![](../../../../../docs/Figures/PhasorDynamics/Wind/WTGPTA/diagram.png) + +Figure 1: WTGPTA block diagram. Figure courtesy of [PowerWorld](https://www.powerworld.com/WebHelp/) + +## Model Parameters + +Symbol | Units | JSON | Description | Typical Value | Note +------------------------------------|---------------|-------------|---------------------------------------------------------|---------------|------ +$S^\mathrm{base}$ | [MVA] | `mva` | WTGPTA component power base | 100.0 | Required positive value; source label: `MVABase` +$T_\theta$ | [sec] | `Tp` | Blade-pitch response time constant | - | State 1 in Fig. 1 +$K_{\mathrm{pp}}$ | [deg/p.u.] | `Kpp` | Speed-control proportional gain | - | `WTPTA1` source label: `Kpw` +$K_{\mathrm{ip}}$ | [deg/p.u./s] | `Kip` | Speed-control integral gain | - | State 2 path; `WTPTA1` source label: `Kiw` +$K_{\mathrm{pc}}$ | [deg/p.u.] | `Kpc` | Pitch-compensator proportional gain | - | Block name: `Kpc` +$K_{\mathrm{ic}}$ | [deg/p.u./s] | `Kic` | Pitch-compensator integral gain | - | State 3 path +$\theta^{\min}$ | [deg] | `ThetaMin` | Minimum pitch angle | - | Block name: `ThetaMin` +$\theta^{\max}$ | [deg] | `ThetaMax` | Maximum pitch angle | - | Block name: `ThetaMax` +$R_\theta^{\min}$ | [deg/s] | `RThetaMin` | Minimum pitch-rate limit | - | Block name: `RThetaMin` +$R_\theta^{\max}$ | [deg/s] | `RThetaMax` | Maximum pitch-rate limit | - | Block name: `RThetaMax` +$K_{\mathrm{cc}}$ | [-] | `Kcc` | Cross-coupling gain from active-power error to speed-error path | - | Block name: `Kcc` + +### Parameter Validation + +Invalid WTGPTA parameter sets are rejected by the following checks. Let $\epsilon_T=10^{-3}$. + +```math +\begin{aligned} + T_\theta + &\leftarrow \max\!\left(T_\theta, \epsilon_T\right) \\ + S^\mathrm{base} + &> 0 \\ + \theta^{\min} + &\le \theta^{\max} \\ + R_\theta^{\min} + &\le 0 \le R_\theta^{\max} +\end{aligned} +``` + +### Model Derived Parameters + +```math +\begin{aligned} + k_{\mathrm{base}} + &= \dfrac{S^\mathrm{sys}}{S^\mathrm{base}} +\end{aligned} +``` + +## Model Variables + +### Internal Variables + +#### Differential + +Symbol | Units | Description | Note +------------------------------------|-------|-------------------------------------|------ +$\theta$ | [deg] | Blade-pitch angle | State 1 in Fig. 1 +$x_\omega^\mathrm{I}$ | [deg] | Speed-control integral state | State 2 in Fig. 1; source label: `PitchControl` +$x_P^\mathrm{I}$ | [deg] | Pitch-compensator integral state | State 3 in Fig. 1; source label: `PitchComp` + +#### Algebraic + +Symbol | Units | Description | Note +------------------------------------|----------|-------------------------------------|------ +$e_\omega$ | [p.u.] | Speed-control error | +$e_P$ | [p.u.] | Active-power command error | Component base +$\theta_\omega$ | [deg] | Limited speed-control pitch command | +$\theta_P$ | [deg] | Limited active-power pitch-compensator command | +$\theta^\mathrm{cmd}$ | [deg] | Combined pitch command before blade response | +$r_\theta$ | [deg/s] | Rate-limited pitch derivative target | + +### External Variables + +#### Differential +None. + +#### Algebraic + +Symbol | Units | Type | Description | Note +-------------------------------------|--------|---------|-----------------------------------|------ +$\omega_t$ | [p.u.] | Unknown | Turbine rotor speed | Signal port `omegat` +$P^\mathrm{ord}$ | [p.u.] | Unknown | Active-power order feedback | Signal port `pord`; system base +$\omega^\mathrm{ref}$ | [p.u.] | Known | Rotor-speed reference | Optional signal port `wref` +$P^\mathrm{ref}$ | [p.u.] | Known | Active-power reference | Optional signal port `pref`; system base + +## Model Equations + +### Differential Equations + +```math +\begin{aligned} + 0 &= + -\dot{\theta} + + \text{antiwindup} + \left(\theta, r_\theta;\, \theta^{\min}, \theta^{\max}\right) \\ + 0 &= + -\dot{x}_\omega^\mathrm{I} + + \text{antiwindup} + \left(x_\omega^\mathrm{I}, K_{\mathrm{ip}}e_\omega;\, + \theta^{\min}, \theta^{\max}\right) \\ + 0 &= + -\dot{x}_P^\mathrm{I} + + \text{antiwindup} + \left(x_P^\mathrm{I}, K_{\mathrm{ic}}e_P;\, + \theta^{\min}, \theta^{\max}\right) +\end{aligned} +``` + +CommonMath defines the [Anti-Windup](../../../../CommonMath.md#anti-windup-indicator) +target and smooth approximation. + +### Algebraic Equations + +```math +\begin{aligned} + 0 &= + -e_P + + k_{\mathrm{base}} + \left(P^\mathrm{ord} - P^\mathrm{ref}\right) \\ + 0 &= + -e_\omega + + \omega_t + - \omega^\mathrm{ref} + + K_{\mathrm{cc}}e_P \\ + 0 &= + -\theta_\omega + + \text{clamp} + \left(K_{\mathrm{pp}}e_\omega + x_\omega^\mathrm{I};\, + \theta^{\min}, \theta^{\max}\right) \\ + 0 &= + -\theta_P + + \text{clamp} + \left(K_{\mathrm{pc}}e_P + x_P^\mathrm{I};\, + \theta^{\min}, \theta^{\max}\right) \\ + 0 &= + -\theta^\mathrm{cmd} + + \theta_\omega + + \theta_P \\ + 0 &= + -r_\theta + + \text{clamp} + \left( + \dfrac{\theta^\mathrm{cmd} - \theta}{T_\theta};\, + R_\theta^{\min},\, + R_\theta^{\max} + \right) +\end{aligned} +``` + +CommonMath defines [clamp](../../../../CommonMath.md#derived-functions). + +## Initialization + +### External Priors + +```math +\begin{aligned} + \theta + &\leftarrow \text{blade-pitch angle start} \\ + \omega^\mathrm{ref} + &\leftarrow \text{rotor-speed reference start} \\ + P^\mathrm{ref} + &\leftarrow \text{active-power reference start on system base} +\end{aligned} +``` + +### Internal Initialization + +Initialization is performed by evaluating the steady-state residuals in +dependency order. Let subscript $0$ denote initial values and set all internal +derivatives to zero: + +```math +\begin{aligned} + e_{P,0} + &= 0 \\ + e_{\omega,0} + &= 0 \\ + x_{P,0}^\mathrm{I} + &= 0 \\ + \theta_{P,0} + &= 0 \\ + x_{\omega,0}^\mathrm{I} + &= \theta_0 \\ + \theta_{\omega,0} + &= \theta_0 \\ + \theta_0^\mathrm{cmd} + &= \theta_0 \\ + r_{\theta,0} + &= 0 +\end{aligned} +``` + +### External Solved + +```math +\begin{aligned} + \omega_t + &\leftarrow \omega_0^\mathrm{ref} \\ + P^\mathrm{ord} + &\leftarrow P_0^\mathrm{ref} +\end{aligned} +``` + +Initialization rejects pitch starts outside +$[\theta^{\min},\theta^{\max}]$ and nonzero WTGPTA antiwindup rates. + +## Monitorable Outputs + +Output | Units | Description | Note +----------------|---------|-------------------------------------|------ +`theta` | [deg] | Blade-pitch angle | $\theta$ +`theta_cmd` | [deg] | Combined pitch command before blade response | $\theta^\mathrm{cmd}$ +`theta_speed` | [deg] | Limited speed-control pitch command | $\theta_\omega$ +`theta_power` | [deg] | Limited active-power pitch-compensator command | $\theta_P$ +`eomega` | [p.u.] | Speed-control error | $e_\omega$ +`ep` | [p.u.] | Active-power command error | $e_P$ (component base) diff --git a/GridKit/Model/PhasorDynamics/Wind/WTGTA/README.md b/GridKit/Model/PhasorDynamics/Wind/WTGTA/README.md new file mode 100644 index 000000000..084e743f4 --- /dev/null +++ b/GridKit/Model/PhasorDynamics/Wind/WTGTA/README.md @@ -0,0 +1,203 @@ +# **Wind Turbine Generator Drive-Train Model (WTGTA)** + +WTGTA is a WECC wind-turbine generator two-mass drive-train model. In GridKit it +is represented as a signal-control model that computes turbine and generator +speed states from mechanical and electrical power feedback. + +## Notes + +- WTGTA corresponds to the source model `WTGT_A`. +- When used with WTGARA, connect WTGARA `pm` to WTGTA `pm`. +- When used with WTGPTA, connect WTGTA `omegat` to WTGPTA `omegat`. +- When used with WTGTRQA, connect WTGTA `omegag` to WTGTRQA `omegag`. +- Power signal inputs are on system base. +- Internal torque quantities are on component base. +- $\omega_g$ is an internal model variable and does not necessarily represent a + physical generator speed measurement. + +## Block Diagram + +Standard WTGTA drive-train model. + +![](../../../../../docs/Figures/PhasorDynamics/Wind/WTGTA/diagram.png) + +Figure 1: WTGTA block diagram. Figure courtesy of [PowerWorld](https://www.powerworld.com/WebHelp/) + +## Model Parameters + +Symbol | Units | JSON | Description | Typical Value | Note +------------------------------------|--------------|-----------|---------------------------------------------------------|---------------|------ +$H_t$ | [MW sec/MVA] | `Ht` | Turbine inertia | - | State 1 path +$H_g$ | [MW sec/MVA] | `Hg` | Generator inertia | - | State 3 path +$D^\mathrm{shaft}$ | [p.u.] | `DShaft` | Shaft damping coefficient | - | Block name: `Dshaft` +$K^\mathrm{shaft}$ | [p.u.] | `KShaft` | Shaft spring constant | - | Block name: `Kshaft` +$S^\mathrm{base}$ | [MVA] | `mva` | WTGTA component power base | 100.0 | Required positive value; source label: `MWCap` +$\omega_0$ | [p.u.] | `W0` | Initial speed | - | Diagram label: `W0` + +### Parameter Validation + +Invalid WTGTA parameter sets are rejected by the following checks. + +```math +\begin{aligned} + H_t, H_g + &> 0 \\ + D^\mathrm{shaft} + &\ge 0 \\ + K^\mathrm{shaft} + &> 0 \\ + S^\mathrm{base} + &> 0 \\ + \omega_0 + &> 0 +\end{aligned} +``` + +### Model Derived Parameters + +```math +\begin{aligned} + k_{\mathrm{base}} + &= \dfrac{S^\mathrm{sys}}{S^\mathrm{base}} \\ + \omega_s + &= 2\pi f_{\mathrm{nom}} +\end{aligned} +``` + +Here $f_{\mathrm{nom}}$ is the nominal system frequency. + +## Model Variables + +### Internal Variables + +#### Differential + +Symbol | Units | Description | Note +------------------------------------|-------|-------------------------------------|------ +$\omega_t$ | [p.u.] | Turbine speed output | State 1 in Fig. 1; signal port `omegat` +$\delta^\mathrm{shaft}$ | [rad] | Shaft angle | State 2 in Fig. 1 +$\omega_g$ | [p.u.] | Generator speed output | State 3 in Fig. 1; signal port `omegag` +$\delta_g$ | [rad] | Generator delta angle | State 4 in Fig. 1 + +#### Algebraic + +Symbol | Units | Description | Note +------------------------------------|--------|-------------------------------------|------ +$T_m$ | [p.u.] | Mechanical torque | Component base +$T_e$ | [p.u.] | Electrical torque | Component base +$T_{\mathrm{d}}$ | [p.u.] | Shaft damping torque | Component base +$T_{\mathrm{s}}$ | [p.u.] | Shaft spring torque | Component base + +### External Variables + +#### Differential + +None. + +#### Algebraic + +Symbol | Units | Type | Description | Note +------------------------------------|--------|-------|-------------------------------------|------ +$P_\text{m}$ | [p.u.] | Known | Mechanical power | Signal port `pm`; system base +$P_e$ | [p.u.] | Known | Electrical active-power feedback | Signal port `pelec`; system base + +## Model Equations + +### Differential Equations + +```math +\begin{aligned} + 0 &= + -\dot{\omega}_t + + \dfrac{1}{2H_t} + \left(T_m - T_{\mathrm{s}} - T_{\mathrm{d}}\right) \\ + 0 &= + -\dot{\delta}^\mathrm{shaft} + + \omega_s\left(\omega_t - \omega_g\right) \\ + 0 &= + -\dot{\omega}_g + + \dfrac{1}{2H_g} + \left(T_{\mathrm{s}} + T_{\mathrm{d}} - T_e\right) \\ + 0 &= + -\dot{\delta}_g + + \omega_s\left(\omega_g - \omega_0\right) +\end{aligned} +``` + +### Algebraic Equations + +```math +\begin{aligned} + 0 &= + -\omega_t T_m + + k_{\mathrm{base}}P_\text{m} \\ + 0 &= + -\omega_g T_e + + k_{\mathrm{base}}P_e \\ + 0 &= + -T_{\mathrm{d}} + + D^\mathrm{shaft}\left(\omega_t - \omega_g\right) \\ + 0 &= + -\omega_s T_{\mathrm{s}} + + K^\mathrm{shaft}\delta^\mathrm{shaft} +\end{aligned} +``` + +## Initialization + +### External Priors + +```math +\begin{aligned} + \omega_t, \omega_g + &\leftarrow \text{initial speeds} +\end{aligned} +``` + +### Internal Initialization + +Initialization is performed by evaluating the steady-state residuals in +dependency order. Let subscript $0$ denote initial values and set all internal +derivatives to zero: + +```math +\begin{aligned} + T_{\mathrm{d},0} + &= D^\mathrm{shaft}\left(\omega_{t,0} - \omega_{g,0}\right) \\ + T_{\mathrm{s},0} + &= 0 \\ + T_{m,0} + &= T_{\mathrm{s},0} + T_{\mathrm{d},0} \\ + T_{e,0} + &= T_{\mathrm{s},0} + T_{\mathrm{d},0} \\ + \delta_0^\mathrm{shaft} + &= 0 \\ + \delta_{g,0} + &= 0 +\end{aligned} +``` + +### External Solved + +```math +\begin{aligned} + P_\text{m} + &\leftarrow \dfrac{\omega_{t,0}T_{m,0}}{k_{\mathrm{base}}} \\ + P_e + &\leftarrow \dfrac{\omega_{g,0}T_{e,0}}{k_{\mathrm{base}}} +\end{aligned} +``` + +Initialization rejects starts with $\omega_{t,0}\ne \omega_{g,0}$ or +$\omega_{g,0}\ne \omega_0$. + +## Monitorable Outputs + +Output | Units | Description | Note +------------------|--------|-------------------------------------|------ +`omegat` | [p.u.] | Turbine speed | $\omega_t$ +`omegag` | [p.u.] | Generator speed | $\omega_g$ +`shaft_angle` | [rad] | Shaft angle | $\delta^\mathrm{shaft}$ +`gen_delta_angle` | [rad] | Generator delta angle | $\delta_g$ +`tm` | [p.u.] | Mechanical torque | $T_m$ (component base) +`te` | [p.u.] | Electrical torque | $T_e$ (component base) diff --git a/GridKit/Model/PhasorDynamics/Wind/WTGTRQA/README.md b/GridKit/Model/PhasorDynamics/Wind/WTGTRQA/README.md new file mode 100644 index 000000000..3d7210165 --- /dev/null +++ b/GridKit/Model/PhasorDynamics/Wind/WTGTRQA/README.md @@ -0,0 +1,275 @@ +# **Wind Turbine Generator Torque-Control Model (WTGTRQA)** + +WTGTRQA is a WECC wind-turbine generator torque-control model. In GridKit it is +represented as a signal-control model that computes speed and active-power +references for downstream wind-turbine controls. + +## Notes + +- WTGTRQA corresponds to the source model `WTGTRQ_A`. +- The equivalent PTI source model name is `WTTQA1`. +- When used with REECA, connect WTGTRQA `pref` to REECA `pref`. +- When used with WTGPTA, connect WTGTRQA `wref` to WTGPTA `wref`. +- Active-power signal ports are on system base. +- Internal measured power and torque-controller quantities are on component base. + +## Block Diagram + +Standard WTGTRQA wind-turbine generator torque-control model. + +![](../../../../../docs/Figures/PhasorDynamics/Wind/WTGTRQA/diagram.png) + +Figure 1: WTGTRQA block diagram. Figure courtesy of [PowerWorld](https://www.powerworld.com/WebHelp/) + +## Model Parameters + +Symbol | Units | JSON | Description | Typical Value | Note +------------------------------------|----------|-----------|---------------------------------------------------------|---------------|------ +$S^\mathrm{base}$ | [MVA] | `mva` | WTGTRQA component power base | 100.0 | Required positive value; source label: `MVABase` +$s_T$ | [index] | `Flag` | Torque-controller mode flag | - | 0 = torque control, 1 = speed control, 2 = torque control with $P^\mathrm{ref}_0$ upper torque limit +$K_{\mathrm{ip}}$ | [p.u./s] | `Kip` | Integral gain | - | State 3 path +$K_{\mathrm{pp}}$ | [p.u.] | `Kpp` | Proportional gain | - | Block name: `Kpp` +$T_p$ | [sec] | `Tp` | Electrical-power measurement lag time constant | - | State 2 in Fig. 1 +$T_{\omega}^{\mathrm{ref}}$ | [sec] | `Twref` | Speed-reference lag time constant | - | State 1 in Fig. 1 +$T_e^{\max}$ | [p.u.] | `Temax` | Maximum torque limit | - | Block name: `Temax` +$T_e^{\min}$ | [p.u.] | `Temin` | Minimum torque limit | - | Block name: `Temin` +$P_1$ | [p.u.] | `P1` | Power point 1 for speed-reference curve | - | Component base +$\omega_1$ | [p.u.] | `Speed1` | Speed point 1 for speed-reference curve | - | +$P_2$ | [p.u.] | `P2` | Power point 2 for speed-reference curve | - | Component base +$\omega_2$ | [p.u.] | `Speed2` | Speed point 2 for speed-reference curve | - | +$P_3$ | [p.u.] | `P3` | Power point 3 for speed-reference curve | - | Component base +$\omega_3$ | [p.u.] | `Speed3` | Speed point 3 for speed-reference curve | - | +$P_4$ | [p.u.] | `P4` | Power point 4 for speed-reference curve | - | Component base +$\omega_4$ | [p.u.] | `Speed4` | Speed point 4 for speed-reference curve | - | + +### Parameter Validation + +Invalid WTGTRQA parameter sets are rejected by the following checks. Let $\epsilon_T=10^{-3}$. + +```math +\begin{aligned} + T &\leftarrow \max\!\left(T, \epsilon_T\right) + \quad T\in\{T_p,T_{\omega}^{\mathrm{ref}}\} \\ + S^\mathrm{base} + &> 0 \\ + s_T + &\in \{0,1,2\} \\ + T_e^{\min} + &\le 0 \le T_e^{\max} \\ + 0 + &\le P_1 < P_2 < P_3 < P_4 \\ + \omega_1,\omega_2,\omega_3,\omega_4 + &> 0 +\end{aligned} +``` + +### Model Derived Parameters + +```math +\begin{aligned} + k_{\mathrm{base}} + &= \dfrac{S^\mathrm{sys}}{S^\mathrm{base}} \\ + \omega^\mathrm{sch}(P) + &= \omega_1 + + \text{linseg}\left(P;\, P_1, P_2, \omega_2-\omega_1\right) + + \text{linseg}\left(P;\, P_2, P_3, \omega_3-\omega_2\right) + + \text{linseg}\left(P;\, P_3, P_4, \omega_4-\omega_3\right) +\end{aligned} +``` + +CommonMath defines [linseg](../../../../CommonMath.md#derived-functions). + +## Model Variables + +### Internal Variables + +#### Differential + +Symbol | Units | Description | Note +------------------------------------|--------|-------------------------------------|------ +$\omega^\mathrm{ref}$ | [p.u.] | Filtered speed reference | State 1 in Fig. 1; signal port `wref` +$P^\mathrm{meas}$ | [p.u.] | Filtered electrical active power | State 2 in Fig. 1; component base +$x_T^\mathrm{I}$ | [p.u.] | Torque-control integral state | State 3 in Fig. 1; component base + +#### Algebraic + +Symbol | Units | Description | Note +------------------------------------|--------|-------------------------------------|------ +$\omega^\mathrm{cmd}$ | [p.u.] | Scheduled speed reference | From $\omega^\mathrm{sch}(P^\mathrm{meas})$ +$e_P$ | [p.u.] | Active-power reference error | Component base +$e_\omega$ | [p.u.] | Speed-control error | +$e_T$ | [p.u.] | Selected torque-controller error | +$T_e^{\max,\mathrm{eff}}$ | [p.u.] | Effective maximum torque limit | +$T_e^\mathrm{raw}$ | [p.u.] | Unlimited torque command | +$T_e^\mathrm{cmd}$ | [p.u.] | Limited torque command | +$P^\mathrm{ref}$ | [p.u.] | Active-power reference output | System base; signal port `pref` + +### External Variables + +#### Differential + +None. + +#### Algebraic + +Symbol | Units | Type | Description | Note +------------------------------------|----------|---------|-------------------------------------|------ +$P_e$ | [p.u.] | Known | Electrical active-power feedback | Signal port `pelec`; system base +$\omega_g$ | [p.u.] | Known | Generator speed from drive-train model | Signal port `omegag` +$s_{\mathrm{frz}}$ | [binary] | Known | Voltage-dip freeze signal | 1 freezes $x_T^\mathrm{I}$ +$P^\mathrm{ref}_0$ | [p.u.] | Known | Active-power reference input | Optional signal port `pref0`; system base + +## Model Equations + +### Differential Equations + +```math +\begin{aligned} + 0 &= + -\dot{\omega}^\mathrm{ref} + + \dfrac{1}{T_{\omega}^{\mathrm{ref}}} + \left(\omega^\mathrm{cmd} - \omega^\mathrm{ref}\right) \\ + 0 &= + -\dot{P}^\mathrm{meas} + + \dfrac{1}{T_p} + \left(k_{\mathrm{base}}P_e - P^\mathrm{meas}\right) \\ + 0 &= + -\dot{x}_T^\mathrm{I} + + \left(1-s_{\mathrm{frz}}\right) + \text{antiwindup} + \left( + T_e^\mathrm{raw}, K_{\mathrm{ip}}e_T;\, + T_e^{\min}, T_e^{\max,\mathrm{eff}} + \right) +\end{aligned} +``` + +CommonMath defines the [Anti-Windup](../../../../CommonMath.md#anti-windup-indicator) +target and smooth approximation. + +### Algebraic Equations + +```math +\begin{aligned} + 0 &= + -\omega^\mathrm{cmd} + + \omega^\mathrm{sch}\left(P^\mathrm{meas}\right) \\ + 0 &= + -e_P + + k_{\mathrm{base}}P^\mathrm{ref}_0 + - P^\mathrm{meas} \\ + 0 &= + -e_\omega + + \omega_g + - \omega^\mathrm{ref} \\ + 0 &= + -e_T + + \begin{cases} + \dfrac{e_P}{\omega_g} + & s_T\in\{0,2\} \\ + e_\omega + & s_T = 1 + \end{cases} \\ + 0 &= + -T_e^{\max,\mathrm{eff}} + + \begin{cases} + T_e^{\max} + & s_T\in\{0,1\} \\ + \dfrac{k_{\mathrm{base}}P^\mathrm{ref}_0}{\omega_g} + & s_T = 2 + \end{cases} \\ + 0 &= + -T_e^\mathrm{raw} + + K_{\mathrm{pp}}e_T + + x_T^\mathrm{I} \\ + 0 &= + -T_e^\mathrm{cmd} + + \text{clamp} + \left(T_e^\mathrm{raw};\, T_e^{\min}, T_e^{\max,\mathrm{eff}}\right) \\ + 0 &= + -k_{\mathrm{base}}P^\mathrm{ref} + + \omega_g T_e^\mathrm{cmd} +\end{aligned} +``` + +CommonMath defines [clamp](../../../../CommonMath.md#derived-functions). + +## Initialization + +### External Priors + +```math +\begin{aligned} + P^\mathrm{ref} + &\leftarrow \text{active-power reference start} \\ + s_{\mathrm{frz}} + &\leftarrow \text{voltage-dip freeze signal} +\end{aligned} +``` + +### Internal Initialization + +Initialization is performed by evaluating the steady-state residuals in +dependency order. Let subscript $0$ denote initial values and set all internal +derivatives to zero: + +```math +\begin{aligned} + P_0^\mathrm{meas} + &= k_{\mathrm{base}}P^\mathrm{ref}_0 \\ + \omega_0^\mathrm{cmd} + &= \omega^\mathrm{sch}\left(P_0^\mathrm{meas}\right) \\ + \omega_0^\mathrm{ref} + &= \omega_0^\mathrm{cmd} \\ + e_{\omega,0} + &= 0 \\ + e_{P,0} + &= 0 \\ + e_{T,0} + &= + \begin{cases} + \dfrac{e_{P,0}}{\omega_0^\mathrm{ref}} + & s_T\in\{0,2\} \\ + e_{\omega,0} + & s_T = 1 + \end{cases} \\ + T_{e,0}^{\max,\mathrm{eff}} + &= + \begin{cases} + T_e^{\max} + & s_T\in\{0,1\} \\ + \dfrac{k_{\mathrm{base}}P^\mathrm{ref}_0}{\omega_0^\mathrm{ref}} + & s_T = 2 + \end{cases} \\ + T_{e,0}^\mathrm{cmd} + &= \dfrac{k_{\mathrm{base}}P^\mathrm{ref}_0}{\omega_0^\mathrm{ref}} \\ + x_{T,0}^\mathrm{I} + &= T_{e,0}^\mathrm{cmd} - K_{\mathrm{pp}}e_{T,0} \\ + T_{e,0}^\mathrm{raw} + &= K_{\mathrm{pp}}e_{T,0} + x_{T,0}^\mathrm{I} +\end{aligned} +``` + +### External Solved + +```math +\begin{aligned} + \omega_g + &\leftarrow \omega_0^\mathrm{ref} \\ + P_e + &\leftarrow P^\mathrm{ref}_0 +\end{aligned} +``` + +Initialization rejects nonpositive solved generator-speed starts, initialized +torque commands outside their limits, and nonzero WTGTRQA antiwindup rates. + +## Monitorable Outputs + +Output | Units | Description | Note +----------------|--------|-------------------------------------|------ +`pref` | [p.u.] | Active-power reference output | $P^\mathrm{ref}$ (system base) +`pmeas` | [p.u.] | Filtered electrical active power | $P^\mathrm{meas}$ (component base) +`wref` | [p.u.] | Filtered speed reference | $\omega^\mathrm{ref}$ +`tecmd` | [p.u.] | Limited torque command | $T_e^\mathrm{cmd}$ (component base) +`et` | [p.u.] | Selected torque-controller error | $e_T$ diff --git a/docs/Figures/PhasorDynamics/Wind/WTGARA/diagram.png b/docs/Figures/PhasorDynamics/Wind/WTGARA/diagram.png new file mode 100644 index 000000000..9e6a7ec14 Binary files /dev/null and b/docs/Figures/PhasorDynamics/Wind/WTGARA/diagram.png differ diff --git a/docs/Figures/PhasorDynamics/Wind/WTGPTA/diagram.png b/docs/Figures/PhasorDynamics/Wind/WTGPTA/diagram.png new file mode 100644 index 000000000..caaff9ae8 Binary files /dev/null and b/docs/Figures/PhasorDynamics/Wind/WTGPTA/diagram.png differ diff --git a/docs/Figures/PhasorDynamics/Wind/WTGTA/diagram.png b/docs/Figures/PhasorDynamics/Wind/WTGTA/diagram.png new file mode 100644 index 000000000..ae9d07b50 Binary files /dev/null and b/docs/Figures/PhasorDynamics/Wind/WTGTA/diagram.png differ diff --git a/docs/Figures/PhasorDynamics/Wind/WTGTRQA/diagram.png b/docs/Figures/PhasorDynamics/Wind/WTGTRQA/diagram.png new file mode 100644 index 000000000..ade611587 Binary files /dev/null and b/docs/Figures/PhasorDynamics/Wind/WTGTRQA/diagram.png differ diff --git a/docs/GridKit/Model/PhasorDynamics/README.md b/docs/GridKit/Model/PhasorDynamics/README.md index e5209139a..439e0749e 100644 --- a/docs/GridKit/Model/PhasorDynamics/README.md +++ b/docs/GridKit/Model/PhasorDynamics/README.md @@ -17,6 +17,7 @@ Load SignalNode Stabilizer SynchronousMachine +Wind ``` ```{include} ../../../../GridKit/Model/PhasorDynamics/README.md diff --git a/docs/GridKit/Model/PhasorDynamics/Wind/README.md b/docs/GridKit/Model/PhasorDynamics/Wind/README.md new file mode 100644 index 000000000..db5383683 --- /dev/null +++ b/docs/GridKit/Model/PhasorDynamics/Wind/README.md @@ -0,0 +1,17 @@ +# Wind + +```{toctree} +:maxdepth: 4 +:titlesonly: +:hidden: + +WTGARA +WTGPTA +WTGTA +WTGTRQA +``` + +```{include} ../../../../../GridKit/Model/PhasorDynamics/Wind/README.md +:start-line: 1 +:relative-images: +``` diff --git a/docs/GridKit/Model/PhasorDynamics/Wind/WTGARA/README.md b/docs/GridKit/Model/PhasorDynamics/Wind/WTGARA/README.md new file mode 100644 index 000000000..e0bca6c5b --- /dev/null +++ b/docs/GridKit/Model/PhasorDynamics/Wind/WTGARA/README.md @@ -0,0 +1,6 @@ +# WTGARA + +```{include} ../../../../../../GridKit/Model/PhasorDynamics/Wind/WTGARA/README.md +:start-line: 1 +:relative-images: +``` diff --git a/docs/GridKit/Model/PhasorDynamics/Wind/WTGPTA/README.md b/docs/GridKit/Model/PhasorDynamics/Wind/WTGPTA/README.md new file mode 100644 index 000000000..1b3320f87 --- /dev/null +++ b/docs/GridKit/Model/PhasorDynamics/Wind/WTGPTA/README.md @@ -0,0 +1,6 @@ +# WTGPTA + +```{include} ../../../../../../GridKit/Model/PhasorDynamics/Wind/WTGPTA/README.md +:start-line: 1 +:relative-images: +``` diff --git a/docs/GridKit/Model/PhasorDynamics/Wind/WTGTA/README.md b/docs/GridKit/Model/PhasorDynamics/Wind/WTGTA/README.md new file mode 100644 index 000000000..31d28f7b7 --- /dev/null +++ b/docs/GridKit/Model/PhasorDynamics/Wind/WTGTA/README.md @@ -0,0 +1,6 @@ +# WTGTA + +```{include} ../../../../../../GridKit/Model/PhasorDynamics/Wind/WTGTA/README.md +:start-line: 1 +:relative-images: +``` diff --git a/docs/GridKit/Model/PhasorDynamics/Wind/WTGTRQA/README.md b/docs/GridKit/Model/PhasorDynamics/Wind/WTGTRQA/README.md new file mode 100644 index 000000000..a39c323c4 --- /dev/null +++ b/docs/GridKit/Model/PhasorDynamics/Wind/WTGTRQA/README.md @@ -0,0 +1,6 @@ +# WTGTRQA + +```{include} ../../../../../../GridKit/Model/PhasorDynamics/Wind/WTGTRQA/README.md +:start-line: 1 +:relative-images: +```