# Design of a Power Converter for Solar Energy Storage System
## 2 Circuit Structure and Operation Model
### B2G Mode: Where Power from a Battery Is Supplied to a DC Grid  
Figure 2 shows the circuit diagram of a battery supplying energy to a DC grid with a bidirectional full-bridge converter and a phase-shift PWM control scheme. Four power switches, namely \(S_{1}\), \(S_{2}\), \(S_{3}\), and \(S_{4}\), are driven by a fixed frequency and duty cycle. The phase-shift angle \(\varphi\) of the driving signals between the left arm (\(S_{3}\), \(S_{4}\)) and right arm (\(S_{1}\), \(S_{2}\)) is changed to control the output power. Figure 3 shows the theoretical waveforms of a battery supplying energy to a DC grid at a shift angle of \(118.8^{\circ}\), with the voltage polarity and current flow direction defined as those in Figure 2. After the energy released by the battery storage and supply port is processed by the full-bridge power switches \(S_{1}\)-\(S_{4}\), an electric current flows through the transformer, and the induced energy passes through the intrinsic diodes \(D_{S5}\)-\(D_{S8}\), thus providing DC energy to the DC grid. Although some current passes through the inductors \(L_{1}\) and \(L_{2}\), the average current remains 0.  
Figure 3 shows the theoretical waveform explanation for phase shift angle \(\Phi=118.8^{\circ}\), with Duty D = 0.5. The current flowing into the DC grid end is the rectified waveform of the secondary current \(i_{s}\) of the transformer. The number of turns on the primary side of the transformer is \(N_{p}\), and the number of turns on the secondary side is \(N_{s}\), where the turns ratio is shown in Equation (1).  
\[n=\frac{N_{S}}{N_{P}} \tag{1}\]  
Due to the symmetry control of the PWM for the positive and negative half cycles, let us first discuss the power conversion during the positive half cycle of \(i_{s}\), where the current \(i_{s}\) is positive during \(t_{3}\leq t<t_{5}\) and \(t_{5}\leq t<t_{6}\) However, the time interval between \(t_{5}\) and \(t_{6}\) is very short and can be ignored, which has been confirmed in the actual measured waveform. The voltage drop across the leakage inductance \(L_{lk}\) during this time is shown in Equation (2).  
\[L_{lk}.\frac{di_{s}}{dt}=\left\{\begin{aligned} & nV_{bat}-V_{D_{C}, Grid},& t_{3}\leq t<t_{5}\\ &-V_{DC, Grid},& t_{5}\leq t<t_{6}\end{aligned}\right. \tag{2}\]  
Figure 2: Circuit diagram of B2G mode.  
The variation current of \(i_{S}\), calculated by Equation (2), is shown in Equation (3).  
\[\begin{array}{ll}L_{lk}.\frac{d{i_{S}}}{dt}&=Vs-V_{D_{C},Grid}\\ =>\ \Delta{i_{S}}&=\left(\frac{nV_{bat}-V_{D_{C},Grid}}{L_{lk}}\right)\cdot\Delta t,\Delta t=(t_{5}-t_{3})=\frac{\varphi-T}{2\pi}\\ &=\left(nV_{bat}-V_{D_{C},Grid}\right)\cdot\frac{\varphi-T}{L_{lk}\cdot 2\pi} \end{array} \tag{3}\]  
The maximum peak current of the triangular wave of \(i_{S}\) can be calculated from Equation (3) and is shown in Equation (4), where \(\varphi\) is the phase shift angle, T is the operating period, and \(f_{s}\) is the operating frequency. Ignoring the extremely short \(t_{6}\sim t_{5}\) interval, the average current value \(I_{DC_{C},Grid}\) can be calculated as shown in Equation (5). The average voltage value \(V_{DC_{C},Grid}\) is shown in Equation (6).  
\[I_{s\_max}=\frac{nV_{bat}-V_{D_{C},Grid}}{L_{lk}}.\frac{\varphi}{2\pi f_{s}} \tag{4}\]  
\[I_{DC_{C},Grid}=\frac{I_{s\_max}}{2}=\frac{1}{2}.\frac{nV_{bat}-V_{D_{C},Grid}} {L_{lk}}.\frac{\varphi}{2\pi f_{s}} \tag{5}\]  
\[V_{DC_{C},Grid}=2D\cdot n\cdot V_{bat}\cdot 2\cdot\frac{\varphi}{2\pi} \tag{6}\]  
When Duty D = 0.5, the average power \(P_{DC\ Grid}\) flowing into the DC grid on the secondary side is shown in Equation (7).  
\[P_{DC_{C},Grid}=I_{DC_{C},Grid}V_{DC_{C},Grid}\]  
Figure 3: Theoretical waveforms for B2G mode.  
Substituting Equation (4) and Equation (6) yields:  
\[\begin{split}& P_{DC_{-}Grid}=\frac{\frac{1}{2}\cdot(nV_{bat}-V_{DC_{-}Grid })\cdot\frac{\varphi}{2\pi\lambda_{2}}}{L_{lk}}.nV_{bat}\cdot\frac{\varphi}{\pi} \\ &=\frac{nV_{bat}\cdot(nV_{bat}-V_{DC_{-}Grid})}{L_{lk}\cdot f_{s}}.( \frac{\varphi}{2\pi})^{2},0<\varphi<\pi\end{split} \tag{7}\]