# dc offset

Discussion in 'Homework Help' started by joka2188, Nov 11, 2006.

1. ### joka2188 Thread Starter New Member

Nov 10, 2006
9
0
is there an equation for calculating the dc offset of a square wave?

2. ### hgmjr Moderator

Jan 28, 2005
9,030
214
Can you be a little more specific?

hgmjr

3. ### Papabravo Expert

Feb 24, 2006
10,340
1,850
Code ( (Unknown Language)):
1.
2. (Vmax + Vmin) / 2
3.

4. ### joka2188 Thread Starter New Member

Nov 10, 2006
9
0
thanks 4 dat, much appreciated

5. ### pebe AAC Fanatic!

Oct 11, 2004
628
3
That formula assumes equal mark/space ratio.

6. ### Papabravo Expert

Feb 24, 2006
10,340
1,850
Last time I looked a square wave had a 50% duty cycle or equal mark space ratio as you so quaintly put it.

7. ### Dave Retired Moderator

Nov 17, 2003
6,960
145
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%

Dave

8. ### hgmjr Moderator

Jan 28, 2005
9,030
214
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.

hgmjr