# Parametric PSpice Circuit of Energy Saving Lamp Emulating Current Waveform
## Materials and Methods
### Non-Sinusoidal Periodical Electric Quantities  
Considering a circuit operating at steady-state conditions, the non-sinusoidal periodical instantaneous electric quantities, that is the voltage \(v(t)\) and the current \(i(t)\), can be represented by means of the Fourier series in the absence of subharmonics and inter-harmonics [74]:  
\[ \begin{array}{l}v(t)=V_{0}+\sqrt{2}\sum\limits_{k\in\mathbb{N}}V_{h}\sin(h \omega t+\alpha_{k})\\ i(t)=I_{0}+\sqrt{2}\sum\limits_{k\in\mathbb{N}}I_{h}\sin(h\omega t+\beta_{k}) \end{array}  \tag{1}\]  
Key terms are the power system fundamental frequency of the voltage, \(v_{1}(t)\), and current, \(i_{1}(t)\)[74]:  
\[ \begin{array}{l}v_{1}(t)=\sqrt{2}V_{1}\sin(\omega t+\alpha_{1})\\ i_{1}(t)=\sqrt{2}I_{1}\sin(\omega t+\beta_{1})\end{array}  \tag{2}\]  
Grouping the constant term with the harmonics [74]:  
\[ \begin{array}{l}v_{H}(t)=V_{0}+\sqrt{2}\sum\limits_{k\in\mathbb{N}}V_{k}\sin (k\omega t+\alpha_{k})\\ i_{H}(t)=I_{0}+\sqrt{2}\sum\limits_{k\in\mathbb{N}}I_{k}\sin(k\omega t+\beta_{ k})\end{array}  \tag{3}\]  
any non-sinusoidal periodical instantaneous electric quantity can be summarized according the IEEE Std-1459\({}^{\text{TM}}\)[74]:  
\[ \begin{array}{l}v(t)=v_{1}(t)+v_{H}(t)\\ i(t)=i_{1}(t)+i_{H}(t)\end{array}  \tag{4}\]  
Without loss of generality, it can be set:\[\alpha_{k}=\delta_{k}+\frac{\pi}{2} \tag{5}\] \[\beta_{k}=\gamma_{k}+\frac{\pi}{2}\]  
and also \(\delta_{1}=0\). Therefore:  
\[ \begin{array}{c}v_{1}(t)=\sqrt{2}V_{1}\cos(\omega t)\\ v_{k}(t)=\sqrt{2}V_{k}\cos(k\omega t+\delta_{k})\\ i_{1}(t)=\sqrt{2}I_{1}\cos(\omega t+\gamma_{1})\\ i_{k}(t)=\sqrt{2}I_{k}\cos(k\omega t+\gamma_{k})\end{array}  \tag{6}\]  
The instantaneous power related to the fundamental frequency deriving from these equations is:  
\[ \begin{array}{c}P_{1}(t)=v_{1}(t)i_{1}(t)=V_{1}I_{1}\cos(\gamma_{1})[1+\cos (2\omega t)]-V_{1}I_{1}\sin(\gamma_{1})\\ \sin(2\omega t)=P_{1}[1+\cos(2\omega t)]-Q_{1}\sin(2\omega t)\end{array}  \tag{7}\]  
and the fundamental apparent power, \(S_{1}\), is then obtained from the fundamental active power, \(P_{1}\), and the fundamental reactive power, \(Q_{1}\), through the following equation [74]:  
\[S_{1}^{2}=P_{1}^{2}+Q_{1}^{2} \tag{8}\]  
that, in turn, is part of the overall apparent power, \(S\), that includes the harmonics contribution (that is the non-fundamental apparent power) [74]:  
\[S^{2}=S_{1}^{2}+D_{I}^{2}+D_{V}^{2}+S_{H}^{2} \tag{9}\]  
where the current distortion power, \(D_{I}\), the voltage distortion power, \(D_{V}\), and the harmonic apparent power, \(S_{H}\), are obtained from the evaluation of the _rms_ value of \(v_{H}(t)\), that is \(V_{H}\), and \(i_{H}(t)\), that is \(I_{H}\)[74]:  
\[D_{I}^{2}=V_{1}^{2}I_{H}^{2}D_{V}^{2}=I_{1}^{2}V_{H}^{2}S_{H}^{2}=V_{H}^{2}I_{ H}^{2} \tag{10}\]  
The harmonics related to the voltage on the mains are negligible in comparison with the current harmonics, and it is also confirmed by the measurements. Consequently, the term \(v_{H}(t)\) in Equation (4) can be neglected, and then the apparent power is approximated to:  
\[S^{2}=P_{1}^{2}+Q_{1}^{2}+D_{I}^{2} \tag{11}\]  
Therefore, modelling the current harmonics enables to estimate the non-active powers \(QI\) and \(D_{I}\) that involve undesired power losses in the line. It is worth noting that, while the current harmonics pertain to the undesired term \(D_{I}\), the fundamental current affect the active power as well as the useless power \(Q_{I}\). Therefore, it is useful to consider the fundamental current divided into two components [75; 76]:  
\[ \begin{array}{c}i_{1}(t)=i_{P1}(t)+i_{Q1}(t)\\ i_{P1}(t)=\sqrt{2}I_{P1}\cos(\omega t)=\sqrt{2}I_{1}\cos(\gamma_{1})\cos( \omega t)\\ i_{Q1}(t)=\sqrt{2}I_{Q1}\cos(\omega t+\frac{\pi}{2})=\sqrt{2}I_{1}\sin(\gamma _{1})\cos(\omega t+\frac{\pi}{2})\end{array}  \tag{12}\]  
It is easy to prove that:  
\[ \begin{array}{c}v_{1}(t)i_{P1}(t)=V_{1}I_{1}\cos(\gamma_{1})[1+\cos(2\omega t )]=P_{1}[1+\cos(2\omega t)]\\ v_{1}(t)i_{Q1}(t)=V_{1}I_{1}\sin(\gamma_{1})[-\sin(2\omega t)]=-Q_{1}\sin(2 \omega t)\end{array}