# Parametric PSpice Circuit of Energy Saving Lamp Emulating Current Waveform
## Materials and Methods
### PSpice Model for Emulating the Current Drawn from an ESL
On the other hand, in such a case, the term \(b_{P1}\) has to be positive according to Remark 2, that is the current \(i_{bP1}\) must be in phase with the mains voltage. Moreover, its amplitude has to exceed the other in the voltage range of application (\(\pm 10\%\) of \(V_{nom}\)). Similarly, when the linear term, \(b_{P1}\), is negative the current \(i_{bP1}\) is in antiphase with the mains voltage, but the term \(a_{P1}\) is positive (according to Remark 2) and enough to ensure that the overall active current is in phase with the mains voltage in the range of application of the model. It is worth noting that negative values of \(b_{P1}\) highlights a reduction of the active current drawn from the lamp as the mains voltage increases. Therefore, in the PSpice circuit a resistor is adopted when \(i_{bP1}\) is positive (to emulate an increasing current in phase with the mains voltage), otherwise a voltage controlled current source (\(VCCS\)), \(G1\), is considered:  
\[ \begin{array}{ccc}R_{1}=\frac{1}{p_{P1}}&when&b_{P1}>0\\ VCCS\ gain=b_{P1}&when&b_{P1}<0\end{array}  \tag{31}\]  
Finally, no issues arise when both terms are positive. In such a case the independent generator is in phase with the mains voltage and a resistor is adopted to emulate the increasing active current drawn by the lamp as the voltage on the mains increases. When \(I_{Q1}\) is positive, the reactive current leads the mains voltage. In such a case, if the constant term, \(a_{Q1}\), is negative then the related independent current generator lags the mains voltage. Therefore, the term \(b_{Q1}\) has to be positive (according to Remark 2), that is the current \(i_{bQ1}\) must lead the mains voltage. Moreover, its amplitude has to exceed the other in the voltage range of application (\(\pm 10\%\) of \(V_{nom}\)). Similarly, when the linear term, \(b_{Q1}\), is negative, the current \(i_{bQ1}\) lags the mains voltage, but the term \(a_{P1}\) is positive (according to Remark 2) and enough to ensure that the overall reactive current leads the mains voltage in the range of application of the model. It is worth noting that, in this specific case, negative values of \(b_{Q1}\) means a reduction of the reactive current drawn from the lamp as the mains voltage increases. Figures 2 and 3 graphically represent the previous cases. Whatever \(I_{Q1}\), a capacitor may be adopted in the model when \(i_{bQ1}\) leads the mains voltage and an inductor when \(i_{bQ1}\) lags the mains voltage:  
\[ \begin{array}{ccc}C_{1}=\frac{b_{Q1}}{\omega^{\prime}}&when&b_{Q1}>0\\ L_{1}=\frac{1}{\omega\left(-b_{Q1}\right)}&when&b_{Q1}<0\end{array}  \tag{32}\]  
It is worth noting that there is a crucial difference between these components and the others described before (\(L_{k}\) and \(C_{k}\)). More specifically, when \(b_{Q1}\) is positive a capacitor must be used in the PSpice circuit, while when \(b_{k}\) is positive \(L_{k}\) and \(C_{k}\) can be equally used in the PSpice model. On the other hand, once the component (\(L_{k}\) or \(C_{k}\)) is chosen the waveform of the fictitious independent voltage generator cannot be chosen arbitrarily since the value of \(d\) is fixed by the component choice. By using the superposition theorem, it can be noted that the voltage independent generator representing the mains voltage supplies the \"fundamental current circuit\" and also the components (\(L_{k}\), \(C_{k}\)) adopted for emulating the current harmonics. Figure 11 easily makes evident such a consideration. Therefore, undesired reactive currents flow through these components. These currentshave to be eliminated to ensure that the reactive current is given only by the \"fundamental current circuit\". This goal is reached by adding a compensation component (\(L_{C}\) or \(C_{C}\)) which is resonant at the fundamental frequency with the equivalent component (\(C_{EQ}\) or \(L_{EQ}\)) downstream form it:  
\[