# Fast Prediction of Characteristics in Wound Rotor Synchronous Condenser Using Subdomain Modeling
## 2 Subdomain Modeling
### Matrix Representation and Solving Electromagnetic Quantities  
Reformulating the above equations into matrix and vector forms makes it possible to obtain analytical solutions using MATLAB R2022b. For instance, in a WRSM model with \(N_{r}=32\) rotor and \(N_{s}=42\) stator slots and harmonic order numbers \(G=H=K=M=5\) and \(N=100\), the result is a column matrix \(\mathbf{X}\) with \(4(N+N_{r}G+N_{r}H+N_{s}K+N_{s}M)=3360\) elements.  
\[\mathbf{X}=\left[\mathbf{A}_{n}^{\mathbf{I}}\mathbf{B}_{n}^{\mathbf{I}}\mathbf{C}_{n}^{\mathbf{I}}\mathbf{D}_{ \mathbf{m}}^{\mathbf{I}}\mathbf{A}_{\mathbf{0}}^{\mathbf{P}}\mathbf{B}_{\mathbf{0}}^{\mathbf{C}}\mathbf{C}_{\mathbf{I }}^{\mathbf{D}}\mathbf{P}_{\mathbf{k}}^{\mathbf{A}}\mathbf{Q}_{\mathbf{0}}^{\mathbf{I}}\mathbf{Q}_{\mathbf{S}}^{ \mathbf{I}}\mathbf{Q}_{\mathbf{S}}^{\mathbf{I}}\mathbf{Q}_{\mathbf{S}}^{\mathbf{I}}\mathbf{C}_{\mathbf{I}}^{\mathbf{I} }\mathbf{D}_{\mathbf{k}}^{\mathbf{I}}\mathbf{A}_{\mathbf{0}}^{\mathbf{I}}\mathbf{B}_{\mathbf{0}}^{\mathbf{I}}\mathbf{C }_{\mathbf{m}}^{\mathbf{I}}\mathbf{D}_{\mathbf{m}}^{\mathbf{I}}\right]^{\mathbf{T}} \tag{22}\]  
After solving the coefficients, flux density at the air gap (radius is \(R_{e}\)) is derived as:  
\[B_{\theta}=-\frac{\partial A^{I}}{\partial r}=-\frac{1}{R_{e}}\sum_{n=1,2}^{ \infty}\left(R_{e}{}^{n}\mathbf{A}_{\mathbf{n}}^{\mathbf{I}}-R_{e}{}^{-n}\mathbf{B}_{\mathbf{n}}^ {\mathbf{I}}\right)sin(n\theta)n+\left(R_{e}{}^{n}\mathbf{C}_{\mathbf{n}}^{\mathbf{I}}-R_{e}{ }^{-n}\mathbf{D}_{\mathbf{n}}^{\mathbf{I}}\right)cos(n\theta)n \tag{23}\]  
\[B_{r}=\frac{1}{R_{e}}\frac{\partial A^{I}}{\partial\theta}=\frac{1}{R_{e}} \sum_{n=1,2}^{\infty}\left(R_{e}{}^{n}\mathbf{A}_{\mathbf{n}}^{\mathbf{I}}+R_{e}{}^{-n}\bm {B}_{\mathbf{n}}^{\mathbf{I}}\right)\cos(n\theta)n-\left(R_{e}{}^{n}\mathbf{C}_{\mathbf{n}}^{ \mathbf{I}}+R_{e}{}^{-n}\mathbf{D}_{\mathbf{n}}^{\mathbf{I}}\right)\sin(n\theta)n \tag{24}\]  
To compute the induced voltage in a three-phase motor with stack length \(L_{stick}\), the flux through each slot cross-section at a given rotor position \(\theta_{0}\) was calculated. Uniform current density across the slot area was assumed, allowing for the flux in the \(j\)-th slot to be determined by integrating the vector potential across the slot area, as given in Equation (15).  
\[\Phi_{j}=T_{pole}\frac{L_{stick}}{A_{slot}}\iint A_{r}^{j}(\theta,z)rdrd\theta \tag{25}\] \[=\frac{L_{stick}}{\frac{R_{e}^{2}-R_{e}^{2}}{2}}\left(A_{\mathbf{0}}^{ j}\frac{R_{e}^{2}-R_{S}^{2}}{2}+\mathbf{B}_{\mathbf{0}}^{j}\left(\ln(R_{6})\frac{R_{S}^{2} }{2}-\ln(R_{5})\frac{R_{S}^{2}}{2}+\frac{R_{S}^{2}-R_{S}^{2}}{4}\right)-J_{0}^ {j}\frac{\mu_{0}\left(R_{6}^{4}-R_{S}^{4}\right)}{16}\right)\]  
The phase flux is calculated as the sum of fluxes in slots associated with each phase. A connecting matrix \([C]\) with the dimensions \(3\times N_{s}\) was used to present the stator winding distribution in the slots, as shown in [13], where indices \(1\) and \(-1\) denote positive and negative, and \(0\) denotes a phase absence in the slot. \(T_{slot}\) represents the phase-winding turns per slot, and the phase fluxes are expressed as:  
\[\begin{bmatrix}\Phi_{A}\\ \Phi_{B}\\ \Phi_{C}\end{bmatrix}_{3\times 1}=T_{slot}[C]_{3\times N_{s}}\left[\Phi_{j} \right]_{N_{k}\times 1} \tag{26}\]  
The induced voltage can be defined at a given rotor speed \(\omega_{m}\) as follows:  
\[\begin{bmatrix}U_{A}\\ U_{B}\\ U_{C}\end{bmatrix}_{3\times 1}=\frac{N_{r}}{2}\omega_{m}\frac{d}{d\theta_{0}} \begin{bmatrix}\Phi_{A}\\ \Phi_{B}\\ \Phi_{C}\end{bmatrix}_{3\times 1} \tag{27}\]  
Notably, without stator current contribution in the no-load condition, the induced voltage becomes BEMF.