Generalized Concept and MATLAB Code for Modeling and Analyzing Wideband 90° Stub-Loaded Phase Shifters with Simulation and Experimental Verifications

In the design of phase shifters, the modeling equations are too complicated and require some approximations to be derived correctly by hand. In response to this problem, this paper presents a generalized concept, algorithm, and MATLAB code that provide the exact modeling equations of the transmission parameters and the scattering parameters of any 90° wideband stub-loaded phase shifter. The proposed code gives the modeling equations in term of variables for any number of stubs and characteristic impedance value by utilizing the symbol-based analysis of the MATLAB code. It also illustrates the results as a function of normalized frequency relative to the center frequency fo, and can be and can be tailored to any user-defined frequency range. As a matter of comparison, a three-stub wideband 90° stub-loaded phase shifter is simulated using CST Microwave Studio and experimentally fabricated on Rogers RT5880 dielectric substrate with dimensions of 30 × 40 × 0.8 mm3. The comparison reveals the accuracy of the proposed computerized modeling with −10 dB impedance bandwidth equal to 90% (0.55fo–1.45fo), (90°∓5°) phase difference bandwidth equal to 100% (0.5fo–1.5fo), and negligible insertion loss. The novelty of this work is that the proposed code provides the exact modeling equations of the stub-loaded phase shifter for any number of stubs regardless the complexity of the mathematical derivations.


Introduction 90
• microwave phase shifters are devices that are widely used in variety of industrial applications.These phase shifters are commonly used in 5G and 6G beamforming systems [1][2][3][4].The 90 • phase shifters are also indispensable in exciting narrowband circularly polarized antennas [5] and broadband circularly polarized antennas [6,7].In addition to these well-known applications, the utilization of the 90 • microwave phase shifter extends to the design of balanced mixers, modulators, beam scanning, and so on.Most of the mentioned applications are broadband, so the phase shifter that is used in these kinds of systems should perfectly cover the bandwidth of these devices.Therefore, many researchers have oriented their focus toward the design of planar wideband phase shifters for their low dispersive propagation properties [8,9].However, for each design procedure the mathematical model is presented to provide a mathematical verification that support the outcomes of each design.An ultra-wideband phase shifter was designed in [8] using a slot coupling doublelayer structure, and it was analyzed using the conventional coupled-line analysis.In [10], wideband phase shifting was achieved using multi-mode resonator with cascade line sections, and the conventional transmission matrix analysis was used in deriving the scattering parameters with some approximations.A stub-loaded multi-mode resonator was coupled with the input and output lines of a phase shifter to provide filtered phase shifting with reduced out-of-band interference.A balanced wideband phase shifter was proposed in [11], and it was analyzed using the conventional differential and common mode analysis.The design in [12] is a 90 • sub-loaded phase shifter with three pen circuit stubs.The design applied some approximations in driving the transmission and scattering parameters of the proposed system.Even and odd mode analysis [13,14] was applied on a simple and compact coupled-line phase shifter to study the phase linearity of the structure.In [15], a cascade wideband phase shifter and a band stop network were combined to form dualband phase shifter.The design was modeled using the cascade analysis of the transmission matrices of each design.Slot lines were used in [16] to design a quasi-Schiffman phase shifter.A reconfigurable phase shifter was designed in [17] with the aid of two PIN diodes.Some phase shifters were attached directly to the antenna to provide a radiation with inherent phase shifting [18].The authors in [19] considered the strong coupling phenomena between the phase shifters and the nearby components.
All the aforementioned research either avoids the mathematical modeling or uses the conventional mathematical derivations with some approximations to simplify the analysis.In this work, a generalized algorithm and MATLAB code are proposed to derive the exact modeling equations of N-stub wideband 90 • stub-loaded phase shifter with high accuracy.The proposed modeling equations are deal with the characteristic impedances, electrical length, and the normalized frequency, and can be specified for any numerical values.The rest of the paper is organized as follows: Section 2 explains the basic concept that should be followed in generating wideband phase shifting, while Section 3 gives the general modeling steps of the stub-loaded phase shifter.In Section 4, the generalized algorithm and the MATLAB code that are proposed in this paper are demonstrated and discussed in detail.A parametric study for the proposed model for different characteristic impedance values and different numbers of stubs is presented in Section 5. Section 6 compares the outcomes of the proposed modeling equations with simulated and measured results of three-stub wideband 90 • phase shifter.Finally, Section 7 summarizes the whole paper in a brief conclusion.

Concept of Wideband Differential Phase Shifting
The differential phase shifter is a four-port network with two input ports and two output ports.Figure 1 shows the phase shifter as a four-port network, considering that Port 1 and 3 are the input ports, while Port 2 and 4 are the output ports.The reference line is a conventional transmission line, whereas the main line is designed to provide a specific phase shift between the signals of Port 2 and Port 4 over a wide range of frequencies with almost equal amplitudes.From a mathematical point of view, the difference between the phase angle of the transmission coefficient S 21 and that of the transmission coefficient S 43 should be fixed over a wide range of frequencies, such as: As given in [20], the transmission parameter of the lossless transmission line (reference line) is given by: S 43 = e −jθ re f (2) Sensors 2023, 23, 7773 where θ re f represents the electrical length of the reference line, l re f denotes the length of the reference line, β represents the phase constant of the reference line, λ is the wavelength, f represents the frequency, and c is the speed of the line in free space (3 × 10 8 m/s).By substituting (3) and ( 4) into (2), the phase angle of the transmission coefficient can be given as in (5): As given in [20], the transmission parameter of the lossless transmission line ence line) is given by: Where   represents the electrical length of the reference line,   denotes the of the reference line,  represents the phase constant of the reference line,  is th length,  represents the frequency, and  is the speed of the line in free space m/s).By substituting (3) and ( 4) into (2), the phase angle of the transmission coe can be given as in (5): It is clear that the phase shift of the reference line is a linear equation with re the frequency.On the other hand, the main line is a two-port network that results plex transmission parameter  21 , with phase angle given by (6): Figure 2 demonstrates the hypothetical phase of the main line (∠ 21 ) and th thetical phase of the reference line (∠ 43 ) as a function of the normalized frequency where   represents the center frequency of the phase shifter.It is known that the tangent function has two saturation regions and a quasi-linear region in the mi them.Therefore, two main considerations can be taken into account to obtain wi constant differential phase shift: a.The linear region of the phase of the main line (∠ 21 ) should be as wide as p with respect to the frequency.It is clear that the phase shift of the reference line is a linear equation with respect to the frequency.On the other hand, the main line is a two-port network that results a complex transmission parameter S 21 ,with phase angle given by ( 6): Figure 2 demonstrates the hypothetical phase of the main line (∠S 21 ) and the hypothetical phase of the reference line (∠S 43 ) as a function of the normalized frequency ( f / f o ), where f o represents the center frequency of the phase shifter.It is known that the inverse tangent function has two saturation regions and a quasi-linear region in the middle of them.Therefore, two main considerations can be taken into account to obtain wideband constant differential phase shift: a.
The linear region of the phase of the main line (∠S 21 ) should be as wide as possible with respect to the frequency.b.
The linear region of ∠S 21 should be parallel with the phase of the reference line (∠S 43 ) to provide constant phase difference along the frequency range of the linear region.

Analysis of Stub-Loaded Wideband Phase Shifter
Notably, the phase response of the stub-loaded transmission line has a wideband linear region.Consequently, it can be used as a main line in the wideband phase shifter, as mentioned in the previous section.The general structure of the stub-loaded phase shifter with  parallel stubs is illustrated in Figure 3. the stub-loaded line has a bandpass characteristics with almost linear phase within its pass band [20].Each stub is short

Analysis of Stub-Loaded Wideband Phase Shifter
Notably, the phase response of the stub-loaded transmission line has a wideband linear region.Consequently, it can be used as a main line in the wideband phase shifter, as mentioned in the previous section.The general structure of the stub-loaded phase shifter with N parallel stubs is illustrated in Figure 3. the stub-loaded line has a bandpass characteristics with almost linear phase within its pass band [20].Each stub is short circuited to the ground plane with the aid of metal vias.

Analysis of Stub-Loaded Wideband Phase Shifter
Notably, the phase response of the stub-loaded transmission line has a wideband linear region.Consequently, it can be used as a main line in the wideband phase shifter, as mentioned in the previous section.The general structure of the stub-loaded phase shifter with  parallel stubs is illustrated in Figure 3. the stub-loaded line has a bandpass characteristics with almost linear phase within its pass band [20].Each stub is short circuited to the ground plane with the aid of metal vias.The length of the stub   and the length of the line section between every two consecutive stubs   are selected to be equal (1/4) to the guided wavelength   of the center frequency (  ).The characteristic impedance of the reference line and the main line is   , while the characteristic impedance of the parallel stubs is   .The transmission matrices of the line sections   and the short circuit stub   are given by [20]: sin( 1 )    sin( 1 ) cos( 1 ) ] where  1 and  2 are the electrical length of the line sections and the stub, respectively.It is clear that the general structure of the stub-loaded line consists of () parallel stubs and ( − 1) line sections connected in cascade.Therefore, the overall transmission matrix  of the stub-loaded line can be found by multiplying the  transmission matrices of the stubs by the ( − 1) transmission matrices of the line sections, alternately, as follows: The length of the stub l Stub and the length of the line section between every two consecutive stubs l Line are selected to be equal (1/4) to the guided wavelength λ go of the center frequency ( f o ).The characteristic impedance of the reference line and the main line is Z o , while the characteristic impedance of the parallel stubs is Z p .The transmission matrices of the line sections T Line and the short circuit stub T Stub are given by [20]: T Stub = 1 0 where θ 1 and θ 2 are the electrical length of the line sections and the stub, respectively.It is clear that the general structure of the stub-loaded line consists of (N) parallel stubs and (N − 1) line sections connected in cascade.Therefore, the overall transmission matrix T of the stub-loaded line can be found by multiplying the N transmission matrices of the stubs by the (N − 1) transmission matrices of the line sections, alternately, as follows: After deriving the overall transmission matrix, the scattering matrix of the stub-loaded line can easily be obtained.Since the stub-loaded line is a symmetric and reciprocal two port network, the scattering parameters can be found as follows [20]: The above derivation requires very intensive mathematics and accurate analysis to obtain the correct equations for the reflection coefficient S 11 and the transmission coefficient S 21 , so we have proposed a MATLAB code that accurately derives the above equations.In addition, the code can also be specified for any design constraints selected by the user.

General Code for Modelling 90 • Stub-Loaded Phase Shifter
The download link of the MATLAB code presented in this section is given in Appendix A at the end of the paper.This code is composed of two parts.The first part deals with deriving the transmission matrix and the scattering matrix of the stub-loaded line after selecting its number of stubs.On the other hand, the second part of the MATLAB code demonstrates the scattering parameters and the resulting differential phase shifting as a function of the normalized frequency ( f / f o ) for certain values of Z o and Z p .

Part 1: Deriving the T and S Matrices
This part of the proposed MATLAB code starts with selecting the number of stubs (N) of the stub-loaded line.The symbol-based analysis in MATLAB is achieved by using the MATLAB function "syms", which holds Z o , Z p , θ 1 , and θ 2 .The algorithm that is then used to obtain the T and S matrices is given below: 1.
Enter the value of the number of steps N, then the symbols Z o , Z p , θ 1 , and θ 2 are defined using the "syms" MATLAB function.

2.
Write the equations of T Line and T Stub , given in ( 7) and ( 8).

3.
Initialize the transmission matrix of the stub-loaded filter by T = T Stub .4.
Multiply the previous value of T by (T Line × T Stub ). 5.
Repeat Step (4) (N − 1) times to obtain a multiplication of N times T Stub by (N − 1) times T Line , alternately, as given in (9).6.
Use the MATLAB functions "expand" and "simpli f y" for simplifying the results and finding some simple trigonometric identities.7.
Apply (10) and ( 11) to find the reflection and transmission parameters of the S-matrix.
As an example for the above steps, the code is executed for N = 3.The ABCD parameters of the T-Matrix for N = 3 resulted from the MATLAB code are: It is clear that the Equations (12a)-(12d) are too complicated and very eligible for mistakes using derivation by hand.In addition, increasing the number of stubs results in more complicated equations.For this reason, many researchers have used some approximations to simplify the derivation, but some tolerance in the outcomes of the model still appears.However, the proposed code gives the exact modeling equations since the derivation is computerized in this work.

Part 2: Specified Variable Results
After executing its first part, the code asks the user to inter certain values for Z o and Z p .Before delving in the proposed algorithm, it is important to write the arbitrary electrical length (θ) in term of the normalized frequency ( f / f o ) and the normalized length of an arbitrary line (l norm = l/λ o ), where l is the line length and λ o is the wavelength of the center frequency f o .By substituting (4) into the electrical length (θ = βl), then putting (l = l norm λ o ), and substituting the well-known formula (λ o = c/ f o ), the electrical length can be re-written in terms of the normalized frequency: This equation is valid for calculating θ 1 , θ 2 , and θ re f in term of the normalized lengths l Line−norm , l Stub−norm , and l re f −norm , respectively.One should note that it is important to use the MATLAB function "phase" and not the function "angle" in calculating the phase angle of any parameter, because the function "angle" results in phase angle wrapped between −180 • and 180 • .
The algorithm that describes the second part of the proposed code is as follows: 1.
Enter values for Z o and Z p , so that the best impedance bandwidth and phase difference bandwidth is achieved.

2.
Set the variable normalized frequency to any range (say 0 to 2 with 0.01 step size).

3.
Set the normalized lengths of the stub and the line sections to 0.25 which is corresponding to quarter wavelength line at the center frequency.4.
In the resulted S 11 and S 21 , use the MATLAB function "subs" at each value of the normalized frequency to substitute the values of Z o and Z p .In addition, substitute the value of θ 1 , θ 2 with the aid of (12). 5.
Find the magnitude of S 11 and S 21 in dB, as well as the phase of S 21 in degrees using the MATLAB function "phase".6.
The normalized length of the reference line is equal to the length of (N − 1) line section plus 0.25 to provide 90 • phase delay at f o with respect to the main line.
Find the phase of transmission coefficient S 43 of the reference line, which is equal to The phase difference at the output ports is equal to (∠S 21 − ∠S 43 ).
As mentioned earlier, the MATLAB code consisting of the two parts followed by some figure demonstrations is given in Appendix A.

Parametric Study for the Proposed Modelling
It is important to make a parametric study for the proposed model to find the suitable value of the stub characteristic impedance that results in as wide an impedance bandwidth as possible and as wide a phase difference bandwidth as possible.Figure 4 illustrates the modeled magnitude of the reflection coefficient, the magnitude of the transmission coefficient, and phase difference of three-stub (N = 3) wideband 90 • stub-loaded phase shifter for different stub characteristic impedance values and Z o = 50 Ω.It is found that at Z p = 100 Ω, the −10 dB impedance bandwidth covers the normalized frequency range 0.55 f o -1.45 f o (90%), and (90 • ∓ 5 • ) phase difference bandwidth equal to 100% covering the range 0.5 f o -1.5 f o .The impedance bandwidth at this value of impedance is perfectly covered by the phase difference bandwidth with constant transmission coefficient close to zero dB, which verifies the negligible insertion loss of the proposed main line within the operational band.

Parametric Study for the Proposed Modelling
It is important to make a parametric study for the proposed model to find the suitable value of the stub characteristic impedance that results in as wide an impedance bandwidth as possible and as wide a phase difference bandwidth as possible.Figure 4 illustrates the modeled magnitude of the reflection coefficient, the magnitude of the transmission coefficient, and phase difference of three-stub ( = 3) wideband 90° stub-loaded phase shifter for different stub characteristic impedance values and   = 50 Ω.It is found that at   = 100 Ω, the −10 dB impedance bandwidth covers the normalized frequency range 0.55  − 1.45  (90%), and (90  ∓ 5  ) phase difference bandwidth equal to 100% covering the range 0.5  − 1.5  .The impedance bandwidth at this value of impedance is perfectly covered by the phase difference bandwidth with constant transmission coefficient close to zero dB, which verifies the negligible insertion loss of the proposed main line within the operational band.Using the same parametric study, the convenient stub characteristic impedance that results in the widest impedance bandwidth and widest phase difference bandwidth for  = 2, 4, and 5 are equal to 60 Ω, 130 Ω, and 160 Ω , respectively.Figure 5 exhibits the modeled magnitude of the reflection coefficient, the magnitude of the transmission coefficient, and the phase difference of the stub-loaded wideband 90° phase shifter for different stub characteristic impedance values and  = 50 Ω and different number of stubs.Using the same parametric study, the convenient stub characteristic impedance that results in the widest impedance bandwidth and widest phase difference bandwidth for N = 2, 4, and 5 are equal to 60 Ω, 130 Ω, and 160 Ω, respectively.Figure 5 exhibits the modeled magnitude of the reflection coefficient, the magnitude of the transmission coefficient, and the phase difference of the stub-loaded wideband 90 • phase shifter for different stub characteristic impedance values and Z o = 50 Ω and different number of stubs.Using the same parametric study, the convenient stub characteristic impedance that results in the widest impedance bandwidth and widest phase difference bandwidth for  = 2, 4, and 5 are equal to 60 Ω, 130 Ω, and 160 Ω , respectively.Figure 5 exhibits the modeled magnitude of the reflection coefficient, the magnitude of the transmission coefficient, and the phase difference of the stub-loaded wideband 90° phase shifter for different stub characteristic impedance values and   = 50 Ω and different number of stubs.It is clear that increasing the number of stubs results in a noticeable improvement in the −10 dB impedance bandwidth and the flatness of the pass-band of the stub-loaded line (main line).However, the improvement in the (90 o ∓ 5 o ) phase difference bandwidth is insensible.It is known that the width of the microstrip line decreases as the characteristic impedance increases.Since increasing the number of stubs requires higher characteristic It is clear that increasing the number of stubs results in a noticeable improvement in the −10 dB impedance bandwidth and the flatness of the pass-band of the stub-loaded line (main line).However, the improvement in the (90 • ∓ 5 • ) phase difference bandwidth is insensible.It is known that the width of the microstrip line decreases as the characteristic impedance increases.Since increasing the number of stubs requires higher characteristic impedance to provide (90 • ∓ 5 • ) wider phase difference bandwidth, (N = 3) is selected in this work to be compared with the standard CST Microwave Studio results and the experimental results.In other words, three-stub 90 • stub-loaded phase shifter is used to verify the precision of this modeling because it results in reasonable stub width that can easily be fabricated by any PCB engraving machine.In addition, a large number of stubs requires larger dimensions than the smaller number of stubs.
To fortify the claim of providing wideband phase shifting presented in Section 2, the modeled phase response of S 21 of the 90 • stub-loaded phase shifter with N = 3 along with the phase response of S 43 is illustrated in Figure 6.The linear region of the phase of the S 21 can clearly be seen in this figure, and it is parallel to the phase of the S 43 with phase difference approximately equal to 90 • at each frequency component.impedance to provide (90 o ∓ 5 o ) wider phase difference bandwidth, ( = 3) is selected in this work to be compared with the standard CST Microwave Studio results and the experimental results.In other words, three-stub 90° stub-loaded phase shifter is used to verify the precision of this modeling because it results in reasonable stub width that can easily be fabricated by any PCB engraving machine.In addition, a large number of stubs requires larger dimensions than the smaller number of stubs.
To fortify the claim of providing wideband phase shifting presented in Section 2, the modeled phase response of  21 of the 90° stub-loaded phase shifter with  = 3 along with the phase response of  43 is illustrated in Figure 6.The linear region of the phase of the  21 can clearly be seen in this figure, and it is parallel to the phase of the  43 with phase difference approximately equal to 90° at each frequency component.

Simulation and Experimental Verification Example
In this section, the proposed model is compared with its CST microwave studio equivalent, as well as the fabrication version of the design to verify the accuracy of the proposed MATLAB-based modeling equations.Figure 7a illustrates the dimensions of the CST simulated design, whereas Figure 7b exhibits the prototype of the proposed design.The center frequency of the design is selected to be   = 5.5 GHz.The dielectric substrate

Simulation and Experimental Verification Example
In this section, the proposed model is compared with its CST microwave studio equivalent, as well as the fabrication version of the design to verify the accuracy of the proposed MATLAB-based modeling equations.Figure 7a illustrates the dimensions of the CST simulated design, whereas Figure 7b exhibits the prototype of the proposed design.The center frequency of the design is selected to be f o = 5.5 GHz.The dielectric substrate of the proposed structure is Rogers RT5880, whose dielectric constant ε r = 2.2, height h = 0.8 mm, with a loss tangent of 0.0009.The length of the stubs and the line sections are equal to a quarter of the guided wavelength (λ go ), corresponding to the center frequency f o , which is equal to: where λ o represents the freespace wavelength of the center frequency and ε re is the effective dielectric constant that can be calculated from the well-known empirical equations given in [21,22].The width of each transmission line is also calculated in term of ε re using the formulas in [21,22].It is worth mentioning that the measurements were acquired using Agilent N5242A Vector Network Analyzer at the University of Bradford/Faculty of Engineering and Informatics.   1 lists the −10 dB impedance bandwidth, the insertion loss, the (90 o ∓ 5 o ) phase difference bandwidth of the modeled equations, and the standard simulation and measured results.The small deviation between the measured and simulation results is due to the imperfect SMA and vias soldering, the small approximations in calculating the dimensions of each piece of transmission line, and the irregular variation of the dielectric constant along the frequency.
One important thing should be noted.This work does not consider the strong coupling effect in the modeling of the proposed phase shifter.The strong coupling effect is deeply explained in [19].As a future work, the proposed MATLAB code will consider the influence of the strong coupling to fortify the knowledge of this work.Figure 8 demonstrates a comparison between the outcomes of the proposed MATLABbased modeling equations and the verification simulated and measured results for f o = 5.5 GHz.It is clear that the results of the modeled equations accurately aligned with the simulated and measured results.The −10 dB bandwidth is found to be about 90% (3.1-8 GHz) and (90 • ∓ 5 • ) the phase difference bandwidth equal to 100% (2.8-8.3GHz).Table 1 lists the −10 dB impedance bandwidth, the insertion loss, the (90 • ∓ 5 • ) phase difference bandwidth of the modeled equations, and the standard simulation and measured results.The small deviation between the measured and simulation results is due to the imperfect SMA and vias soldering, the small approximations in calculating the dimensions of each piece of transmission line, and the irregular variation of the dielectric constant along the frequency.
One important thing should be noted.This work does not consider the strong coupling effect in the modeling of the proposed phase shifter.The strong coupling effect is deeply explained in [19].As a future work, the proposed MATLAB code will consider the influence of the strong coupling to fortify the knowledge of this work.It is important to note that the simulated and measure phase angle of any scattering parameter (∠) are wrapped within the range [−180°-180°].Therefore, they should be unwrapped before calculating the phase difference by constructing the complex values of the scattering parameter ( = || ∠ ) and then calculating the phase of the resulted complex variable using the MATAB function "ℎ".In [23], a coefficient called (The Effective Circular Polarization Percentage with Respect to the Antenna Bandwidth) is proposed to quantify the extension of the circular polarization over the antenna impedance bandwidth.This coefficient can be utilized in this work to quantify the extension of the (90 o ∓ 5 o ) phase difference bandwidth over the −10 dB impedance bandwidth.This coefficient can be renamed to (The Effective Phase Difference Bandwidth Percentage with Respect to the Impedance Bandwidth (%)): In this work, the % = 100% since the (90 o ∓ 5 o ) phase difference bandwidth entirely covers the −10 dB impedance bandwidth.
It is worth mentioning that like the other microwave phase shifters, the proposed phase shifter has the properties of the microwave band-pass filter.One of the important characteristics of the filters is that its pass band should be accompanied with a linear phase response [24][25][26][27][28], and the proposed phase shifter meets this condition properly.
Table 2 gives a comparison between the proposed stub-loaded phase shifter and some other important designs.The dimensions of each design are normalized to the wavelength (  ) corresponding to the first resonant frequency.It is clear that this work has a balance between the dimensions and the phase difference BW, as well as the presence of the computer-based modeling method.It is important to note that the simulated and measure phase angle of any scattering parameter (∠S) are wrapped within the range [−180 • -180 • ].Therefore, they should be unwrapped before calculating the phase difference by constructing the complex values of the scattering parameter (S = |S|e j∠S ) and then calculating the phase of the resulted complex variable using the MATAB function "phase".In [23], a coefficient called (The Effective Circular Polarization Percentage with Respect to the Antenna Bandwidth) is proposed to quantify the extension of the circular polarization over the antenna impedance bandwidth.This coefficient can be utilized in this work to quantify the extension of the (90 • ∓ 5 • ) phase difference bandwidth over the −10 dB impedance bandwidth.This coefficient can be renamed to (The Effective Phase Difference Bandwidth Percentage with Respect to the Impedance Bandwidth (EPDBW%)): EPDBW% = (−10 dBBW) ∩ (PhaseDi f f erenceBW) −10 dBBW × 100% (16) In this work, the EPDBW% = 100% since the (90 • ∓ 5 • ) phase difference bandwidth entirely covers the −10 dB impedance bandwidth.
It is worth mentioning that like the other microwave phase shifters, the proposed phase shifter has the properties of the microwave band-pass filter.One of the important characteristics of the filters is that its pass band should be accompanied with a linear phase response [24][25][26][27][28], and the proposed phase shifter meets this condition properly.
Table 2 gives a comparison between the proposed stub-loaded phase shifter and some other important designs.The dimensions of each design are normalized to the wavelength (λ o ) corresponding to the first resonant frequency.It is clear that this work has a balance between the dimensions and the phase difference BW, as well as the presence of the computer-based modeling method.

Conclusions
The inaccuracy in the conventional modeling phase shifters has been solved in this work by proposing a new MATLAB code that gives the exact modeling equations.The proposed code provides computer-based modeling for the 90 • stub-loaded phase shifter.The model is applied on two-, three-, four-, and five-stub phase shifters.The results of the modeling equations of the three-stub wideband 90 • stub-loaded phase shifter is compared with the CST microwave studio results and experimental results to verify the accuracy of the proposed model.It was found that the results of the proposed model almost perfectly coincide with the simulation and experimental results with −10 dB bandwidth equal to 90% (3.1-8 GHz), (90 • ∓ 5 • ) phase difference bandwidth equal to 100% (2.8-8.3GHz), and insertion loss within 0.1 dB.It is clear that the novelty of this work resides in providing the exact modeling equations for any arbitrary stub-loaded phase shifter directly, without delving in the mathematical derivations manually.As a future work, the proposed MATLAB code will be developed to consider the strong coupling effect of the designed phase shifter.

Figure 1 .
Figure 1.Differential phase shifter as a four-port network.

Figure 2 .
Figure 2. Hypothetical phases of the main line (∠ 21 ) and the reference line.

Figure 2 .
Figure 2. Hypothetical phases of the main line (∠S 21 ) and the reference line.

Figure 2 .
Figure 2. Hypothetical phases of the main line (∠ 21 ) and the reference line.

Figure 3 .
Figure 3. Design steps of the proposed wide-slot antenna.

Figure 3 .
Figure 3. Design steps of the proposed wide-slot antenna.

Figure 4 .
Figure 4.The modeled (a) reflection coefficient magnitude; (b) transmission coefficient magnitude; and (c) phase difference between the output ports for N = 3, Z o = 50 Ω, and different values of Z p .

Figure 4 .
Figure 4.The modeled (a) reflection coefficient magnitude; (b) transmission coefficient magnitude; and (c) phase difference between the output ports for N = 3, Z o = 50 Ω, and different values of Z p .

Figure 4 .
Figure 4.The modeled (a) reflection coefficient magnitude; (b) transmission coefficient magnitude; and (c) phase difference between the output ports for N = 3, Z o = 50 Ω, and different values of Z p .

Figure 5 .
Figure 5.The modeled (a) reflection coefficient magnitude; (b) transmission coefficient magnitude; and (c) phase difference between the output ports for   = 50 Ω and different values of  and   .

Figure 5 .
Figure 5.The modeled (a) reflection coefficient magnitude; (b) transmission coefficient magnitude; and (c) phase difference between the output ports for Z o = 50 Ω and different values of N and Z p .

Figure 6 .
Figure 6.Phase responses of the main and the reference lines for N = 3 stub-loaded 90° phase shifter.

Figure 6 .
Figure 6.Phase responses of the main and the reference lines for N = 3 stub-loaded 90 • phase shifter.

Figure 8
Figure 8 demonstrates a comparison between the outcomes of the proposed MATLAB-based modeling equations and the verification simulated and measured results for   = 5.5 GHz.It is clear that the results of the modeled equations accurately aligned with the simulated and measured results.The −10 dB bandwidth is found to be about 90% ( 3.1 − 8 GHz ) and (90 o ∓ 5 o ) the phase difference bandwidth equal to 100% ( 2.8 − 8.3 GHz).Table1lists the −10 dB impedance bandwidth, the insertion loss, the (90 o ∓ 5 o ) phase difference bandwidth of the modeled equations, and the standard simulation and measured results.The small deviation between the measured and simulation results is due to the imperfect SMA and vias soldering, the small approximations in calculating the dimensions of each piece of transmission line, and the irregular variation of the dielectric constant along the frequency.One important thing should be noted.This work does not consider the strong coupling effect in the modeling of the proposed phase shifter.The strong coupling effect is deeply explained in[19].As a future work, the proposed MATLAB code will consider the influence of the strong coupling to fortify the knowledge of this work.

Figure 8 .
Figure 8.Comparison between the modeled, simulated, and measured (a) reflection coefficient magnitude; (b) transmission coefficient magnitude; and (c) phase difference between the output ports.

Figure 8 .
Figure 8.Comparison between the modeled, simulated, and measured (a) reflection coefficient magnitude; (b) transmission coefficient magnitude; and (c) phase difference between the output ports.

Table 1 .
Comparison between the modeled equation outcomes with the CST microwave studio results and the measured results.

Table 1 .
Comparison between the modeled equation outcomes with the CST microwave studio results and the measured results.

Table 2 .
Comparison between the proposed phase shifter and other important designs, where   corresponds to the first resonant frequency.

Table 2 .
Comparison between the proposed phase shifter and other important designs, where λ o corresponds to the first resonant frequency.