## 2 Mathematical Foundation of Generalized Algorithm
### Formulation of Equivalent Circuit Model  
According to [20], the rectangular enclosure with a volume of \(a\times b\times d\) m\({}^{3}\) and a rectangular aperture (with an area of \(w\times l\) m\({}^{2}\)) in the front wall (Figure 1a) are replaced by the equivalent circuit, shown in Figure 1b. In this circuit, a plane wave with frequency \(f\), exciting the enclosure, is represented by a voltage source \(V_{0}\) and electrical resistance \(Z_{0}\) equal to the free-space impedance (\(120\pi\)\(\Omega\)). This representation assumes that the plane wave is incident normal to the enclosure front wall, and the \(E\)-field vector is perpendicular to the length \(l\) of the aperture, giving a worst-case SE. The enclosure is replaced by segments of a rectangular waveguide with characteristic impedance \(Z_{g}\) and propagation constant \(k_{g}\). The front wall with the aperture is represented by the \(Z_{ap}\) impedance. To calculate the SE, the equivalent circuit is transformed with respect to the observation point \(p\), using [PERSON]'s theorem and the transmission line theory. As a result, the SE values are determined from the current \(i_{p}\) or voltage \(V_{p}\) in the equivalent circuit obtained after the transformation. Next, let us look at the SE calculation procedure using the model from [20] in more detail. According to [20], in the first calculation step, the \(Z_{ap}\) impedance of the enclosure front wall is determined. It is assumed that the wall is replaced by two short-circuited segments of a coplanar stripline, each with a length of \(l/2\) (i.e., half of the aperture width). The \(Z_{ap}\) value is calculated as the product of the correction factor \(l/a\) (where \(a\) is the width of the front wall) and the total input impedance of two segments connected in parallel:  
\[Z_{ap}=j\frac{1}{2}\frac{l}{a}Z_{0s}\tan\left(k_{0}\frac{l}{2}\right), \tag{1}\]  
Figure 1: Rectangular enclosure with aperture excited by a plane wave (**a**), equivalent circuit for calculating SE (**b**). where; \(j\) is the imaginary unit, \(k_{0}=2\pi/\lambda\) is the free-space wavenumber, \(\lambda\) is the wavelength of the excitation source, and \(Z_{0s}\) is the characteristic impedance of coplanar stripline, which can be calculated as:  
\[Z_{0s}=120\pi^{2}\left[\ln\left(2\frac{1+\sqrt[4]{1-\left(w_{\varepsilon}/b \right)^{2}}}{1-\sqrt[4]{1-\left(w_{\varepsilon}/b\right)^{2}}}\right)\right]^ {-1}, \tag{2}\]  
where; \(b\) is the height of the enclosure, and \(w_{\varepsilon}\) is the effective height of the aperture, defined as:  
\[w_{\varepsilon}=w-\frac{5t}{4\pi}\left(1+\ln\frac{4\pi w}{t}\right), \tag{3}\]  
where; \(w\) is the height of the aperture, and \(t\) is the enclosure thickness. Next, before transforming the equivalent circuit, the \(Z_{S}\) and \(k_{S}\) values are calculated for the rectangular waveguide segments replacing the enclosure. In [20], it is assumed that a dominant mode (\(TE_{10}\)) is propagated in the enclosure, so \(Z_{S}\) and \(k_{S}\) are calculated as:  
\[Z_{S}=Z_{0}/\sqrt{1-\left(\frac{\lambda}{2a}\right)^{2}}, \tag{4}\]  
\[k_{S}=k_{0}\sqrt{1-\left(\frac{\lambda}{2a}\right)^{2}}. \tag{5}\]  
Once \(Z_{ap}\), \(Z_{g}\), and \(k_{S}\) have been calculated, the procedure of the equivalent circuit transformation begins. First, the voltage source is transformed to point \(q\) in the circuit (see Figure 1b). For this purpose, \(V_{0}\) and \(Z_{0}\) are combined with \(Z_{ap}\) as:  
\[V_{1}=V_{0}Z_{ap}/\left(Z_{0}+Z_{ap}\right), \tag{6}\]  
\[Z_{1}=Z_{0}Z_{ap}/\left(Z_{0}+Z_{ap}\right). \tag{7}\]  
As a result of (4) and (5), the equivalent circuit takes the form shown in Figure 2a. The resulting excitation source is further transformed from point \(q\) to the observation point \(p\). This gives the values of voltage \(V_{2}\) and impedance \(Z_{2}\). At the same time, the load impedance \(Z_{3}\) of the equivalent circuit is calculated, which is the input impedance of the short-circuited segment of the waveguide behind the observation point \(p\).