## 2 Buck Converter Modeling  
The power converter used as example application is a synchronous buck converter with the topology shown in Figure 1. Two switches \(S1\) and \(S2\) operate alternatively with a switching frequency \(f_{sw}\) and the duty cycle determined by the desired \(v_{out}/v_{s}\) relation, where \(v_{out}=v_{C}\) with an ideal capacitor. The synchronous buck converter was chosen as a simple scenario containing a half-bridge module. The simplicity of the model ensures minimal influence from any external element in the calculation errors. However, the half-bridge module is a basic block that is usually integrated into more complex topologies. Therefore, the conclusions for this particular converter can be extrapolated to other half-bridge-based topologies. The behavior of the buck converter is modeled by applying Kirchhoff's laws and the fundamental relationships between voltage and current of the capacitor of value C and the inductor of value L:  
\[\frac{dv_{C}}{dt} =\frac{i_{C}}{C} \tag{1}\] \[\frac{di_{L}}{dt} =\frac{v_{L}}{L} \tag{2}\]  
Using these relations, assuming known values for the voltage source \(v_{s}\) and the load R, the state variables \(v_{C}\) and \(i_{L}\) can be calculated with a set of Ordinary Differential Equations that change depending on three variables: switch \(S1\) state, switch \(S2\) state, and inductor current. The first operating mode identified occurs when switch \(S1\) is closed and \(S2\) is open, with any value of inductor current. D2 will be reverse-polarized and therefore also acts as an open circuit. The equations that apply are:  
\[\frac{dv_{C}}{dt} =\frac{i_{L}}{C}-\frac{v_{C}}{R\times C} \tag{3}\] \[\frac{di_{L}}{dt} =\frac{v_{s}}{L}-\frac{v_{C}}{L} \tag{4}\]  
The second operating mode occurs when \(S2\) is closed and \(S1\) is open. The term \(v_{s}\) disappears, and the equations are now:  
\[\frac{dv_{C}}{dt} =\frac{i_{L}}{C}-\frac{v_{C}}{R\times C} \tag{5}\] \[\frac{di_{L}}{dt} =-\frac{v_{C}}{L} \tag{6}\]  
Figure 1: Synchronous buck converter with two diodes in antiparallel configuration to allow for the inductor to discharge during deadtimes. In a real-world implementation, the controller cannot change the state of both switches simultaneously, because the switches never change instantaneously the conduction mode, due to the gate charge and discharge times. To prevent any short circuit, the controller should take some time, called deadtime, to command the open state for both switches. The transition time (turn-off or turn-on delay) can take between tens of nanoseconds and microseconds, depending on the design of the driving circuit. Therefore, when a switch is commanded into the closed state, the other switch will be opened for a pre-defined guard time before closing the first switch. Diodes D1 and D2 allow for an inductor current to flow during these guard times. The third mode takes place when the inductor is fully discharged during a deadtime. Then, both switches and diodes behave as open circuits and the equations that apply are:  
\[\frac{dv_{C}}{dt} =-\frac{v_{C}}{R\times C} \tag{7}\] \[\frac{di_{L}}{dt} =0 \tag{8}\]  
Equations (3) and (4) also apply during the deadtime when both \(S1\) and \(S2\) are open and inductor current has negative sign. The current will then flow through diode D1. The second mode modeled by Equations (5) and (6) also applies in the deadtime when both \(S1\) and \(S2\) are open and inductor current has a positive sign, flowing through diode D2. Therefore, in any of the three identified modes, the system state is given by a set of Ordinary Differential Equations, which can be solved numerically. Numerical methods approximate a function \(f(t)\) by replacing the continuous values with a set of values calculated at specific values of \(t\), using the slope of \(f(t)\) at one or more points close to \(t_{n}\) to calculate the next value of \(f(t)\) at \(t_{n+1}\). The curve is then replaced by a set of segments.