Electronic – How to Calculate the average of a Square Wave

signalvoltagewaveform

I could not figure how to calculate the average of a square wave.

Consider a square wave of +5V from time 0 to 6 sec and -3V from 6 to 10 sec.

On integrating from time 0 to 6 the average: 3.0V

On integrating from time 6 to 10 the average: -1.2V

Thus the total average is : $$3-1.2=1.8V$$

But according to my teacher it results in 4.2V (3 +1.2).

Can anyone explain me the calculation?

Best Answer

The first half is 6 x 5. The second half is 4 x -3. Add the areas together and you get 18. Now divide by the total length of time (10) to get 1.8. Same as you. Your teacher is wrong or you asked them a different question.