In my understanding a series capacitor (with some resistance) works as a DC block, essentially forming a high-pass filter, blocking DC. Under this assumption, a unipolar square wave of amplitude V passed through a series C and resistor would result in a bipolar square wave of amplitudes +-V/2.
This works OK under linear loads. However, in simulations with switched loads, I'm observing that this is not occurring. See following circuit and simulation result
Voltage signal clearly has a DC value. It is a square wave with levels .5 and -4.5. This is not expected under the assumption that "capacitor blocks DC". However it is seen that current waveform has almost no DC (spikes are +80 mA and -60 mA, average value is 8 uA)
If we add a parallel resistor to allow current to flow through the capacitor when voltage is negative, current waveform is no longer a series of impulses but a "square" wave.
Again, voltage HAS a DC component, while current doesn't (~200 uA average value)
What I conclude from this, is that a series capacitor works as DC block FOR CURRENT. Voltage waveform will be whatever is needed to sustain the 0-DC current waveform. In the case of linear loads this results in voltages with 0-DC, under switched loads (like this case) not necessarily. Is this correct? Or is the effect that I'm observing in this simulations something else?
As a theoretical basis, an ampere-second balance for a capacitor in steady state is presented in Fundamentals of Power Electronics, in an analogous manner to the volt-second balance in an inductor