Skip to content

Commit 4f5618f

Browse files
committed
Effective saturation parameter
1 parent 3ec4650 commit 4f5618f

8 files changed

Lines changed: 28 additions & 21 deletions

File tree

‎GridKit/Model/PhasorDynamics/Exciter/ESDC1A/Esdc1a.hpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace GridKit
3838
EV, ///< \f$e_V\f$ Algebraic voltage-error summing output [p.u.]
3939
VLL, ///< \f$V_{\mathrm{LL}}\f$ Algebraic input lead-lag output [p.u.]
4040
VHV, ///< \f$V_{\mathrm{HV}}\f$ Algebraic high-value gate output [p.u.]
41-
SE, ///< \f$E_{\mathrm{fd}}'S_E(E_{\mathrm{fd}}')\f$ Scaled-quadratic saturation contribution [p.u.]
41+
SE, ///< \f$s_e\f$ Scaled-quadratic saturation contribution [p.u.]
4242
VFE, ///< \f$V_{\mathrm{FE}}\f$ Algebraic exciter feedback drive [p.u.]
4343
EFD, ///< \f$E_{\mathrm{fd}}\f$ Algebraic field-voltage output [p.u.]
4444
MAXIMUM, ///< Number of ESDC1A internal variables
@@ -166,6 +166,7 @@ namespace GridKit
166166
RealT lim_on_{1};
167167
RealT SA_{0};
168168
RealT SB_{0};
169+
RealT Ke_eff_{Ke_};
169170

170171
IdxT parameter_error_count_{0};
171172

‎GridKit/Model/PhasorDynamics/Exciter/ESDC1A/Esdc1aData.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ namespace GridKit
6969
vc, ///< \f$V_C\f$ Filtered terminal-voltage magnitude [p.u.]
7070
vr, ///< \f$V_R\f$ Voltage-regulator output [p.u.]
7171
vf, ///< \f$V_F\f$ Stabilizing feedback state [p.u.]
72-
se, ///< \f$E_{\mathrm{fd}}'S_E(E_{\mathrm{fd}}')\f$ Scaled-quadratic saturation contribution [p.u.]
72+
se, ///< \f$s_e\f$ Scaled-quadratic saturation contribution [p.u.]
7373
vfe ///< \f$V_{\mathrm{FE}}\f$ Exciter feedback drive [p.u.]
7474
};
7575

‎GridKit/Model/PhasorDynamics/Exciter/ESDC1A/Esdc1aImpl.hpp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ namespace GridKit
351351
const ScalarT xll0 = ev0;
352352
const ScalarT vref0 = ev0 + vc0 - vs0 - uel_on_ * vuel0;
353353

354-
Ke_ = ke0;
354+
Ke_eff_ = ke0;
355355

356356
y[EFDP] = efdp0;
357357
y[VC] = vc0;
@@ -564,7 +564,7 @@ namespace GridKit
564564

565565
const ScalarT ec = std::sqrt(wb[0] * wb[0] + wb[1] * wb[1]);
566566
const ScalarT ev_target = vref + vs + uel_on_ * vuel - vc - vf;
567-
const ScalarT vfe_target = Ke_ * efdp + se;
567+
const ScalarT vfe_target = Ke_eff_ * efdp + se;
568568
const ScalarT efdp_rate = (vr - vfe) / Te_;
569569
const ScalarT limited_efdp_rate = awmin(efdp, efdp_rate, ZERO<RealT>);
570570

@@ -762,6 +762,8 @@ namespace GridKit
762762
template <typename scalar_type, typename index_type>
763763
void Esdc1a<scalar_type, index_type>::setDerivedParameters()
764764
{
765+
Ke_eff_ = Ke_;
766+
765767
// The lags are raised to the floor in place, so a negative value is
766768
// rejected here while the value as read is still available. verify()
767769
// reports the count.

‎GridKit/Model/PhasorDynamics/Exciter/ESDC1A/README.md‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Symbol | Units | Description
166166
$e_V$ | [p.u.] | Voltage-error summing output |
167167
$V_{\mathrm{LL}}$ | [p.u.] | Input lead-lag output |
168168
$V_{\mathrm{HV}}$ | [p.u.] | High-value gate output |
169-
$E_{\mathrm{fd}}'S_E(E_{\mathrm{fd}}')$ | [p.u.] | Scaled-quadratic saturation contribution |
169+
$s_e$ | [p.u.] | Scaled-quadratic saturation contribution | $E_{\mathrm{fd}}'S_E(E_{\mathrm{fd}}')$
170170
$V_{\mathrm{FE}}$ | [p.u.] | Exciter feedback drive |
171171
$E_{\mathrm{fd}}$ | [p.u.] | Field-voltage output | Published through `efd`
172172

@@ -263,12 +263,12 @@ of [Appendix A](#appendix-a-awmin).
263263
& s_{\mathrm{UEL}} = 1
264264
\end{cases} \\
265265
0 &=
266-
-E_{\mathrm{fd}}'S_E(E_{\mathrm{fd}}')
266+
-s_e
267267
+ S_B q\left(E_{\mathrm{fd}}' - S_A\right) \\
268268
0 &=
269269
-V_{\mathrm{FE}}
270-
+ K_E E_{\mathrm{fd}}'
271-
+ E_{\mathrm{fd}}'S_E(E_{\mathrm{fd}}') \\
270+
+ K_E^{\mathrm{eff}} E_{\mathrm{fd}}'
271+
+ s_e \\
272272
0 &=
273273
-E_{\mathrm{fd}}
274274
+ \left(1 + s_{\mathrm{spd}}\omega\right)E_{\mathrm{fd}}'
@@ -315,17 +315,16 @@ routed through the gate:
315315
E_{\mathrm{fd}}'
316316
&\leftarrow
317317
\dfrac{E_{\mathrm{fd}}}{1 + s_{\mathrm{spd}}\omega} \\
318-
E_{\mathrm{fd}}'S_E(E_{\mathrm{fd}}')
318+
s_e
319319
&\leftarrow S_B q\left(E_{\mathrm{fd}}' - S_A\right) \\
320-
K_E
320+
K_E^{\mathrm{eff}}
321321
&\leftarrow
322322
\begin{cases}
323-
\dfrac{V_R^{\max}/10-E_{\mathrm{fd}}'S_E(E_{\mathrm{fd}}')}{E_{\mathrm{fd}}'} & K_E=0 \\
323+
\dfrac{V_R^{\max}/10-s_e}{E_{\mathrm{fd}}'} & K_E=0 \\
324324
K_E & K_E\ne 0
325325
\end{cases} \\
326326
V_{\mathrm{FE}}
327-
&\leftarrow K_E E_{\mathrm{fd}}'
328-
+ E_{\mathrm{fd}}'S_E(E_{\mathrm{fd}}') \\
327+
&\leftarrow K_E^{\mathrm{eff}} E_{\mathrm{fd}}' + s_e \\
329328
V_R
330329
&\leftarrow V_{\mathrm{FE}} \\
331330
V_{\mathrm{HV}}
@@ -386,7 +385,7 @@ Output | Units | Description | Note
386385
`vc` | [p.u.] | Filtered terminal-voltage magnitude | $V_C$
387386
`vr` | [p.u.] | Voltage-regulator output | $V_R$
388387
`vf` | [p.u.] | Stabilizing feedback state | $V_F$
389-
`se` | [p.u.] | Scaled-quadratic saturation contribution | $E_{\mathrm{fd}}'S_E(E_{\mathrm{fd}}')$
388+
`se` | [p.u.] | Scaled-quadratic saturation contribution | $s_e$
390389
`vfe` | [p.u.] | Exciter feedback drive | $V_{\mathrm{FE}}$
391390

392391
## Testing

‎GridKit/Model/PhasorDynamics/Exciter/IEEET1/Ieeet1.hpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ namespace GridKit
146146
RealT Ispdlim_{0.0}; ///< Speed limit flag indicator
147147

148148
// Model Derived parameters
149+
RealT Ke_eff_{Ke_};
150+
149151
// Saturation coefficients derived from E1, E2, Se1, and Se2.
150152
RealT SA_{0};
151153
RealT SB_{0};

‎GridKit/Model/PhasorDynamics/Exciter/IEEET1/Ieeet1Impl.hpp‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,14 @@ namespace GridKit
233233

234234
ScalarT efdp = efd0 / (ONE<RealT> + omega * Ispdlim_);
235235
ScalarT ksat = SB_ * Math::qramp(efdp - SA_);
236+
Ke_eff_ = Ke_;
236237
if (Ke_ == ZERO<RealT>)
237238
{
238-
Ke_ = (Vrmax_ / 10.0 - static_cast<RealT>(ksat)) / static_cast<RealT>(efdp);
239+
Ke_eff_ = (Vrmax_ / 10.0 - static_cast<RealT>(ksat)) / static_cast<RealT>(efdp);
239240
}
240241

241242
ScalarT ve = ksat;
242-
ScalarT vr = Ke_ * efdp + ve;
243+
ScalarT vr = Ke_eff_ * efdp + ve;
243244
ScalarT vtr = vr / Ka_;
244245
ScalarT vf{0};
245246
ScalarT vfx = (Kf_ / Tf_) * efdp;
@@ -351,7 +352,7 @@ namespace GridKit
351352
// Internal Differential Equations
352353
f[0] = -vts_dot + (Ec - vts) / Tr_;
353354
f[1] = -vr_dot + Math::antiwindup(vr, func, Vrmin_, Vrmax_);
354-
f[2] = -efdp_dot + (vr - ve - Ke_ * efdp) / Te_;
355+
f[2] = -efdp_dot + (vr - ve - Ke_eff_ * efdp) / Te_;
355356
f[3] = -vfx_dot + vf / Tf_;
356357

357358
// Internal Algebraic Equations
@@ -467,6 +468,8 @@ namespace GridKit
467468
Ispdlim_ = std::get<RealT>(data.parameters.at(Parameter::Ispdlim));
468469
}
469470

471+
Ke_eff_ = Ke_;
472+
470473
Tr_ = std::max(Tr_, TIME_CONSTANT_MINIMUM);
471474
Ta_ = std::max(Ta_, TIME_CONSTANT_MINIMUM);
472475
Te_ = std::max(Te_, TIME_CONSTANT_MINIMUM);

‎GridKit/Model/PhasorDynamics/Exciter/IEEET1/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ The IEEET1 differential equations, as derived from the model diagram, are:
161161
0 &= -\dot V_R
162162
+ \text{antiwindup}
163163
\left(V_R, f_R; V_R^{\min}, V_R^{\max}\right) \\
164-
0 &= -\dot E_{fd}' + \dfrac{1}{T_E}\left(V_R - V_E - K_E E_{fd}'\right) \\
164+
0 &= -\dot E_{fd}' + \dfrac{1}{T_E}\left(V_R - V_E - K_E^{\mathrm{eff}} E_{fd}'\right) \\
165165
0 &= -\dot V_{fx} + \dfrac{1}{T_F}\left(V_f\right)
166166
\end{aligned}
167167
```
@@ -201,13 +201,13 @@ with the current input values.
201201
E_{C,0} &:= \sqrt{V_r^2 + V_i^2} \\
202202
E_{fd}' &= \dfrac{E_{fd,0}}{1 + I_{\mathrm{spdlim}}\,\omega} \\
203203
k_\text{sat} &= S_B\, q(E_{fd}' - S_A) \\
204-
K_E &\leftarrow
204+
K_E^{\mathrm{eff}} &\leftarrow
205205
\begin{cases}
206206
\dfrac{V_R^{\max}/10-k_\text{sat}}{E_{fd}'} & K_E=0 \\
207207
K_E & K_E\ne 0
208208
\end{cases} \\
209209
V_E &= k_\text{sat} \\
210-
V_R &= K_E\, E_{fd}' + V_E \\
210+
V_R &= K_E^{\mathrm{eff}} E_{fd}' + V_E \\
211211
V_{tr} &= \dfrac{V_R}{K_A} \\
212212
V_{fx} &= \dfrac{K_F}{T_F}\, E_{fd}' \\
213213
V_{ts} &= E_{C,0} \\

‎GridKit/Model/PhasorDynamics/Governor/Tgov1/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ The TGOV1 differential equations, as derived from the model diagram, are
102102
\end{aligned}
103103
```
104104

105-
CommonMath defines the [anti-windup](../../../../CommonMath.md#antiwindup)
105+
CommonMath defines the [Antiwindup](../../../../CommonMath.md#antiwindup)
106106
target and smooth approximation.
107107

108108
### Algebraic Equations

0 commit comments

Comments
 (0)