From 1287580e0818023e8840f15fb49384457220db5d Mon Sep 17 00:00:00 2001 From: Slaven Peles Date: Fri, 30 May 2025 16:56:33 -0400 Subject: [PATCH 1/3] Creat README file for classical generator model. --- .../SynchronousMachine/GenClassical/README.md | 135 ++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 src/Model/PhasorDynamics/SynchronousMachine/GenClassical/README.md diff --git a/src/Model/PhasorDynamics/SynchronousMachine/GenClassical/README.md b/src/Model/PhasorDynamics/SynchronousMachine/GenClassical/README.md new file mode 100644 index 000000000..e590eabb6 --- /dev/null +++ b/src/Model/PhasorDynamics/SynchronousMachine/GenClassical/README.md @@ -0,0 +1,135 @@ +# Classical Generator + +An electrical machine model with two differential variables (i.e. second order +model) is often called classical generator model. While its predicitve ability +is limited, it is useful for studies of grid network properties. Mathematically, +it is equivalent to a driven damped pendulum model. + +## Model Parameters + +Symbol | Units | Description | Note +------------|---------|---------------------------------|---------------------- +$\omega_0$ | [rad/s] | synchronous frequency | +$H$ | [s] | rotor inertia | +$D$ | [p.u.] | damping coefficient | +$R_a$ | [p.u.] | winding resistance | +$X_{dp}$ | [p.u.] | machine reactance parameter | + +### Model Derived Parameters + +- $g = \dfrac{R_a}{\sqrt{R_a^2 + X_{dp}^2}}$ +- $b = \dfrac{-X_{dp}}{\sqrt{R_a^2 + X_{dp}^2}}$ + +
+ +## Model Variables + +### Internal Variables + +#### Differential + +Symbol | Units | Description | Note +------------|---------|---------------------|---------------------- +$\delta$ | [rad] | machine power angle | +$\omega$ | [p.u] | machine speed | Optionally read by a governor or a stabilizer component + +#### Algebraic + +Symbol | Units | Description | Note +--------|--------|-------------------------------------|------------- +$T_{e}$ | [p.u.] | electrical torque | +$I_r$ | [p.u.] | machine real injection current | read by bus +$I_i$ | [p.u.] | machine imaginary injection current | read by bus + +Note: All three can be expressed as function called by model equations. We add +these as variables as they are needed for outputs. + +
+ +### External Variables + +External variables enter component model equations but are owned by other +components. The other components also provide equations needed to have a +balanced system of equations. + +#### Differential + +None. + +#### Algebraic + +Symbol | Units | Description | Note +-------|---------|-------------------------------|---------------------- +$V_r$ | [p.u.] | machine bus real voltage | owned by a bus object +$V_i$ | [p.u.] | machine bus imaginary voltage | owned by a bus object +$P_m$ | [p.u.] | mechanical power input | owned by governor, constant if no governor is connected to the machine +$E_p$ | [p.u.] | field winding voltage | owned by exciter, constant if no exciter is connected to the machine + +
+ + +## Model Equations + +### Differential Equations + +```math +\begin{aligned} +\dot{\delta} &= (\omega - 1) \cdot \omega_0 \\ +\dot{\omega} &= \frac{1}{2H}\left( \frac{P_{m} - D(\omega - 1)}{\omega} - T_{e}\right) +\end{aligned} +``` + +### Algebraic Equations + +```math +\begin{aligned} + 0 &= T_{e} - \frac{1}{\omega}\left( g E_p^2 - E_p \left[(gV_r - bV_i)\cos\delta + (bV_r + gV_i)\sin\delta \right]\right)\\ + 0 &= I_r + gV_r - bV_i - E_p(g \cos\delta - b \sin\delta) \\ + 0 &= I_i + gV_r + bV_i - E_p(b \cos\delta + g \sin\delta) +\end{aligned} +``` +As noted earlier, all three algebraic equations can be expressed as functions +and substituted directly in the component and bus equations, respectively. We +use redundant variables for modeling convenience. + +
+ +## Initialization + +To initialize the model, given bus voltages $V_r$, $V_i$, and initial generator +injection active and reactive power, $P$ and $Q$, we take following steps to +initialize the system: + +First compute injection currents from initial power injection power and bus +voltages: +```math +\begin{aligned} +I_r &= \frac{PV_r + QV_i}{V_r^2 + V_i^2} \\ +I_i &= \frac{PV_i - QV_r}{V_r^2 + V_i^2} +\end{aligned} +``` + +Next compute field winding voltage and machine angle: +```math +\begin{aligned} +E_r &= \frac{ g(I_r + gV_r - bV_i) + b (I_i + bV_r + gV_i) }{g^2 + b^2} \\ +E_i &= \frac{ -b(I_r + gV_r - bV_i) + g (I_i + bV_r + gV_i) }{g^2 + b^2} \\ +E_p &= \sqrt{E_r^2 + E_i^2} \\ +\delta &= \arctan \dfrac{E_i}{E_r} +\end{aligned} +``` + +Set machine speed to the synchronous speed: +```math +\omega = 1 +``` + +Now, we can compute electrical torque and set mechanical +```math +\begin{aligned} +T_{elec} &= gE_p^2 - E_p \left[ (gV_r - bV_i ) \cos\delta + (bV_r + gV_i )\sin\delta \right] \\ +P_{mech} &= T_{elec} +\end{aligned} +``` + +With this, we initialize the machine at a steady state. From ea6d3a5455b99bbed55f599fd1d5c3060b5c4fb7 Mon Sep 17 00:00:00 2001 From: pelesh Date: Mon, 2 Jun 2025 17:24:46 -0400 Subject: [PATCH 2/3] Update README.md [skip ci] Fix error in derived machine parameters --- .../PhasorDynamics/SynchronousMachine/GenClassical/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Model/PhasorDynamics/SynchronousMachine/GenClassical/README.md b/src/Model/PhasorDynamics/SynchronousMachine/GenClassical/README.md index e590eabb6..f1b6344aa 100644 --- a/src/Model/PhasorDynamics/SynchronousMachine/GenClassical/README.md +++ b/src/Model/PhasorDynamics/SynchronousMachine/GenClassical/README.md @@ -17,8 +17,8 @@ $X_{dp}$ | [p.u.] | machine reactance parameter | ### Model Derived Parameters -- $g = \dfrac{R_a}{\sqrt{R_a^2 + X_{dp}^2}}$ -- $b = \dfrac{-X_{dp}}{\sqrt{R_a^2 + X_{dp}^2}}$ +- $g = \dfrac{R_a}{R_a^2 + X_{dp}^2}$ +- $b = \dfrac{-X_{dp}}{R_a^2 + X_{dp}^2}$
From 487ef2fde659f78276633df1ea3bbf95ad93d6a5 Mon Sep 17 00:00:00 2001 From: Slaven Peles Date: Tue, 3 Jun 2025 11:13:34 -0400 Subject: [PATCH 3/3] Minor fix in the text [skip ci] --- .../PhasorDynamics/SynchronousMachine/GenClassical/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Model/PhasorDynamics/SynchronousMachine/GenClassical/README.md b/src/Model/PhasorDynamics/SynchronousMachine/GenClassical/README.md index f1b6344aa..aa1dbe490 100644 --- a/src/Model/PhasorDynamics/SynchronousMachine/GenClassical/README.md +++ b/src/Model/PhasorDynamics/SynchronousMachine/GenClassical/README.md @@ -124,7 +124,8 @@ Set machine speed to the synchronous speed: \omega = 1 ``` -Now, we can compute electrical torque and set mechanical +Now, we can compute electrical torque and set mechanical torque to be equal +to the electrical. ```math \begin{aligned} T_{elec} &= gE_p^2 - E_p \left[ (gV_r - bV_i ) \cos\delta + (bV_r + gV_i )\sin\delta \right] \\