So I am connecting a full-wave rectifier to a half-bridge inverter as shown in the circuit below. I added a smoothing capacitor of 0.47 Farad to get a smooth DC output voltage (see the first graph), so why is the output voltage across the DC-link capacitors (C1 and C2) alternating (see the second and third graph)? As you can see in the fourth graph this also affects the waveform of the output voltage of the inverter.
Edit 1: Changing the capacitance of the DC-link capacitors C1 and C2 to 40,000 micro-farad fixed the issue (See waveform below). Isn't there a formula I can use to determine this capacitance?