## 2 Harmonic Analysis of DC-Link Capacitor Current for One VSI  
The input current of VSIs consists of DC and harmonic components. Since the impedance of the dc-link capacitor is much lower than that of the input source, all the harmonic components come from the dc-link capacitor, while the DC component comes from the input source. Therefore, to analyze the harmonic component of the dc-link capacitor current, the inverter input current must first be analyzed. The input current of the voltage source inverter for a PMSM driver is given by the following equation:  
\[i_{inv}(t)=S_{A}(t)i_{A}(t)+S_{B}(t)i_{B}(t)+S_{C}(t)i_{C}(t) \tag{1}\]  
where \(S_{A}(t)\), \(S_{B}(t)\), and \(S_{C}(t)\) are the switching functions representing the switching state of the three-phase VSI for each leg, and \(i_{A}\), \(i_{B}\), and \(i_{C}\) are the phase currents of the three-phase VSI. A switching function of 1 means that the upper switch is ON and 0 means that it is OFF. \[S_{A,B,C}(t)= \begin{cases}1&\text{\emph{upper switch ON}}\\ 0&\text{\emph{upper switch OFF}}\end{cases}  \tag{2}\]  
As the switching frequency is much higher than the phase frequency of the inverter, and PMSMs are inductive loads, the ripple current of the phase currents is negligible and the phase currents can be expressed as  
\[i_{A}(t)=I_{0}\text{cos}(w_{0}t-\mathcal{O}) \tag{3}\]  
\[i_{B}(t)=I_{0}\text{cos}\left(w_{0}t-\frac{2\pi}{3}-\mathcal{O}\right) \tag{4}\]  
\[i_{C}(t)=I_{0}\text{cos}\left(w_{0}t-\frac{4\pi}{3}-\mathcal{O}\right) \tag{5}\]  
where \(I_{0}\) is the magnitude of the output phase currents, \(w_{0}\) is their angular frequency, and \(\mathcal{O}\) is the phase difference between the output phase voltages and currents, representing the power factor angle. The switching functions change based on the PWM method of the three-phase VSI, and a double integral Fourier series is used to describe them in the time domain [22], as follows:  
\[ \begin{array}{l}S_{J}(t)=\frac{A_{00}}{2}+\sum\limits_{m=1}^{\infty}\left\{A _{0m}cos\left(n\big{[}w_{0}t+\theta_{\ell}\big{]}\right)+B_{0m}sin\left(n \big{[}w_{0}t+\theta_{\ell}\big{]}\right)\right\}\\ \hskip 28.452756 pt+\sum\limits_{m=1}^{\infty}\left\{A_{m0}cos\left(m\big{[}w_{ c}t+\theta_{c}\big{]}+B_{m0}sin\left(m\big{[}w_{c}t+\theta_{c}\big{]}\right) \right)\right.\\ \left.+\sum\limits_{m=1}^{\infty}\sum\limits_{n=-\infty}^{\infty}\left\{A_{mn }cos\left(m\big{[}w_{c}t+\theta_{c}\big{]}+n\big{[}w_{0}t+\theta_{\ell}\big{]} \right)+B_{mn}sin\left(m\big{[}w_{c}t+\theta_{c}\big{]}+n\big{[}w_{0}t+\theta_ {\ell}\big{]}\right)\right\}\\ n\
eq 0\end{array}  \tag{6}\]  
where \(S_{J}(t)\) represents the switch function (\(J=A\), \(B\), and \(C\)) for phases \(A\), \(B\), and \(C\), respectively. \(\theta_{I}\) represents the initial phase of the angular frequency where \(\theta_{A}=0\), \(\theta_{B}=-\frac{2\pi}{3}\), \(\theta_{C}=\frac{2\pi}{3}\). \(w_{c}\) and \(\theta_{c}\) are the switching frequency and the initial phase of the carrier frequency of the three-phase VSI, respectively. The coefficients \(A_{mn}\) and \(B_{mn}\) are the magnitudes of the harmonic components. The carrier index variable \"\(m\)\" and the baseband index value \"\(n\)\" specify the harmonic component of the switching functions. For example, \(m=2\) and \(n=3\) correspond to the third sideband harmonics of the second carrier harmonic component. The frequency of this harmonic component is (\(2w_{c}+3w_{0}\)) rad. The first term on the right in the above equations is the DC offset component. The first summation term of the above equations, where \(m=0\), represents the fundamental component and its baseband harmonic components. The second summation of the aboveequations, where \(n=0\) and \(m\
eq 0\), defines the carrier wave harmonic components which are relative to the switching frequency and multiplies of it. The final summation in the above equations, where \(m\
eq 0\) and \(n\
eq 0\), includes the collection of all possible frequencies generated by adding and subtracting the harmonics of the modulating carrier waveform.