Discussion in 'Homework Help' started by joka2188, Nov 11, 2006.
is there an equation for calculating the dc offset of a square wave?
Can you be a little more specific?
Code ( (Unknown Language)):
(Vmax + Vmin) / 2
thanks 4 dat, much appreciated
That formula assumes equal mark/space ratio.
Last time I looked a square wave had a 50% duty cycle or equal mark space ratio as you so quaintly put it.
I agree that a typical square wave has a 50% duty cycle. I think the case pebe is refering to is important for digital signals where the duty cycle may be anything between 0-100% for a given period. For example:
If the total time period of the digital signal is x
The digital signal is at Vmax for y periods of x
And the digital signal is at Vmin for z periods of x
Where x = y + z
Then the DC offset is calulated by:
(x*Vmax + y*Vmin)/x
This is a general solution of which the one Papabravo gave above is a spcial case where the duty cycle is 50%
When I asked joka2188 for a few more specifics, I was looking for a confirmation that the square-wave in which he was interested had a 50% duty-cycle.
While all answers thus far provided are accurate, the general case that Dave has provided covers all contingencies nicely.