## 2 Materials and Methods
### Mathematical Expresion of \(g\) as a Function of the Electrical Variables  
Once a set of equations has been obtained with the main electrical variables and time as a function of the variable \(g\), the complementary equations of \(g\), as a function of the current, voltage, power and so on, will be calculated. In this way, the development of analytical equations will be completed, obtaining a set of functions where any variable can be expressed as a function of the others. The variable \(g\) as a function of time has already been found in Equation (19). The calculation of \(g\) as a function of internal voltage is immediate if (20) is used:  
\[g=u-E. \tag{42}\]  
The calculation of \(g\) as a function of the current is straightforward from (22):  
\[g=i\cdot(R_{c}+R). \tag{43}\]  
Similarly, \(g\) can also be obtained as a function of the external voltage by simply using (23):  
\[g=\bigg{(}1+\frac{R}{R_{c}}\bigg{)}\cdot(u_{co}-E). \tag{44}\]  
By means of (24), \(g\) can be expressed as a function of the power dissipated in the internal resistance of the DLSC, \(P_{d}\). \[g=(R_{c}+R)\cdot\sqrt{\frac{P_{d}}{R}}. \tag{45}\]  
As in (45), the value of \(g\) as a function of the power dissipated in the resistance of the voltage source \(R_{c}\), \(P_{dRc}\), has the same form but replaces the value of \(R\) by \(R_{c}\); thus:  
\[g=(R_{c}+R)\cdot\sqrt{\frac{P_{dRc}}{R_{c}}}. \tag{46}\]  
The expression for \(g\) as a function of the power consumed by \(E\), \(p_{E}\), is also directly obtained from (26):  
\[g=(R_{c}+R)\cdot\Big{(}\frac{p_{E}}{E}\Big{)}. \tag{47}\]  
To express \(g\) as a function of the DLSC output power, \(P_{out}\), it is necessary to solve the second-degree equation shown in (27). Of the two possible solutions, the positive one must be chosen both in the charging and discharging cases:  
\[g=\frac{E}{2}\cdot\bigg{(}1+\frac{R}{R_{c}}\bigg{)}\cdot\Bigg{(}-1+\sqrt{1+ \frac{4\cdot R_{c}\cdot P_{out}}{E^{2}}}\bigg{)}. \tag{48}\]The equation of g as a function of the energy dissipated by the source, E, e\({}_{E}\), is obtained in almost the same way, by solving the second-degree equation obtained in (36) and also choosing the positive solution:  
\[\mathrm{g}=-\mathrm{E}-\frac{\mathrm{C}_{0}}{2\cdot\mathrm{k}_{\mathrm{c}}}+ \frac{1}{2}\cdot\sqrt{\left(\frac{\mathrm{C}_{0}}{\mathrm{k}_{\mathrm{c}}}+2 \cdot\left(\mathrm{E}+\mathrm{g}_{0}\right)\right)^{2}-\frac{4\cdot\mathrm{e}_ {\mathrm{E}}}{\mathrm{E}\cdot\mathrm{k}_{\mathrm{c}}}}. \tag{49}\]  
Obtaining expressions of g as a function of e\({}_{\mathrm{dch}}\), e\({}_{\mathrm{stored}}\), e\({}_{\mathrm{d}}\) and e\({}_{\mathrm{dRC}}\) is more complex, since all four are cubic functions of g. They have therefore been omitted from this study, since, in addition, the set of analytical expressions already shown and their combinations allow practically all possible alternatives to be covered. For example, if the value of the internal voltage of the DLSC, u, as a function of the power consumed by the voltage source E, p\({}_{E}\), is to be calculated, it would be sufficient to combine (20), where u(g) is defined, with (47), which presents the equation of g(p\({}_{E}\)).