When a synchronous linear motor with a superconducting actuator is driven by an inverter, the presence of harmonic components in the driving current usually leads to superconducting ac loss. This study derives a calculation formula for the total harmonic distortion (THD) of the inverter's output current based on carrier phase shift sine pulsewidth modulation (CPS-SPWM). By determining the dc bus voltage that minimizes the output current THD at different output frequencies, a modulation strategy is proposed to control the dc bus voltage using a boost-buck chopper. The dc bus voltage is adjusted according to the output frequency, effectively reducing the harmonic components of the variable-frequency current. The rated power of the inverter hardware is 4.5 MW, the rated output voltage is 1530 V, and the rated output current is 2333 A. Both simulation and experimental results demonstrate significant improvements in the waveform quality of the output variable-frequency current when the dc bus voltage is changed according to the output frequency, compared to using a constant dc bus voltage. This verifies the feasibility of employing a variable bus voltage modulation strategy to enhance the output current quality. Additionally, this study provides valuable insights for optimizing the quality of variable-frequency current and controlling the dc bus voltage in various fields, such as electromagnetic sleds and electric vehicles.