## 2 Analysis and Design of the Active Phase Shifter Circuit
### Amplitude Fluctuation Mitigation Technique  
As analyzed earlier, in the ideal case, the 256 states form a perfect circle, which allows for optimal phase shifting accuracy and amplitude fluctuation performance. However, the relationship between current and gain is non-linear, which distorts the resulting circle and ultimately degrades both phase shifting accuracy and amplitude fluctuation performance. The simulated results for phase shifting gain fluctuation, obtained earlier, are shown in Figure 10. From the figure, it can be observed that the gain fluctuation is \(\pm\)1 dB, indicating poor gain consistency. This paper proposes an innovative solution by improving the bias current generation circuit of the VGA to mitigate the aforementioned impact. Multiple bias current states are introduced to increase the number of phase states at the output. This approach enhances the margin of selectable phase states, ensuring that the selected 64-phase states are distributed more uniformly, forming a nearly ideal circle. As a result, the phase shifting accuracy is improved, and the amplitude fluctuations are reduced. The specific design approach is as follows: Figure 11 shows the reference current generation circuit. Prior to the improvement, it could only output a fixed reference current \(I_{\text{B}}\). In the improved design, two additional mirror current paths are added to supplement the output current, with the replication ratio adjustable to ensure that the newly introduced currents remain within a reasonable range. In this design, the base reference current is set to 5 \(\mu\)A, the first supplementary current is 0.5 \(\mu\)A, and the second supplementary current is 1 \(\mu\)A. The supplementary current paths are controlled by switches driven by two-bit control codes, which allow for three selectable current values: 5 \(\mu\)A, 5.5 \(\mu\)A, and 6 \(\mu\)A. The PTAT (positive temperature coefficient of absolute temperature) current generated by the reference current generation circuit flows into the gate voltage control circuit. By using a current replication technique in a certain proportion, six branch currents for the gate voltage control circuit are generated. Each branch is controlled by switches, ensuring that the current flows into only one of the I/Q control paths. This logic guarantees that the sum of the tail currents for the two sets of Gilbert cells remains constant. By altering the control code of the PTAT current, the sum of the tail currents for the two sets of Gilbert cells can be adjusted, thereby altering the gain of the differential amplifiers. This approach approximates the creation of three scaled circles, expanding the state points from 256 to 768. The increased number of selectable states allows the final 64-phase states to be more closely aligned with a perfect circle. Using the middle circle, which is controlled by a 5.5 \(\mu\)  
Figure 10: Gain fluctuation of the 64-phase states. current, as a reference, when the gain at a point on this circle is too low, a replacement can be found in the outer circle. Conversely, if the gain is too high, the inner circle can be used for replacements. This method helps maintain consistent gain, significantly improving phase shifting accuracy and reducing amplitude fluctuations. Electromagnetic simulation tools were used to verify the proposed method of improving gain fluctuation by altering the tail current. Figure 12 shows the constellation diagram after increasing the number of state points by modifying the tail current. From the results, it is evident that the constellation diagram exhibits distinct circular groupings. After processing the results, the best 64-phase states are distributed within the three circles of state points. The gain fluctuation after reselecting the 64-phase states is shown in Figure 13, where the fluctuation is largely confined within a \(\pm\)0.5 dB range.