# Average value of Vout

I have the following circuit:

where Vin is waveform with the frequency of 1kHz and amplitude 10V. The diodes are ideal. I need to find the average value of Vout.

I found that when Vin > 0 then D1 is off, and D2 is on, so Vout = I1R1 = 1V. And when Vin < 0 then D1 is on and D2 is off, so Vout = 1 + Vin. Is this correct?

Now I think I need to use

I tried taking b = 1/f and a = 0 and writing the integral in two parts, one going from 0 to 1/(2f) and second from 1/(2f) to 1/f with. I used the Vout functions I got above in them, respectively, but I get a bad result. How do I do this correctly?

• What result did you get? (Yes, your setup seems okay but you don't show your exact process.) – jonk Nov 6 '17 at 22:27

I found that when Vin > 0 then D1 is off, and D2 is on, so Vout = I1R1 = 1V. And when Vin < 0 then D1 is on and D2 is off, so Vout = 1 + Vin. Is this correct?

Yes, that's correct.

Now I think I need to use $f_{avg}=\frac{1}{b-a}\int_a^bf(x)dx$

$f$ in this sense means function, not frequency. Because this question will give the same answer if the frequency is 1 kHz or 10 kHz, the average will be the same since everything is ideal.

So in order to calculate $f_{avg}$ correctly we need to know what $a$ and $b$ are. I will write it in your way, and in my way.

Find out when the $V_{in}$ is less than 0, because that's the only time we have to care about it as you stated above in the first yellow box.

If we know that the frequency is 1 kHz and a sine wave, then the period time is 1 ms, from 0.5 ms to 1 ms it will be negative. This is $a$ and $b$.

$f_{avg}=\frac{1}{(1-0.5)×10^{-3}}\int_{0.5×10^{-3}}^{1×10^{-3}} 10×\sin(2×\pi×1000×x)dx$

If we continue we get that $f_{avg}=-6.3662$

My way

We want to get a half period of a sine wave, right? Then let's just integrate a half sine and change the sign.

$f_{avg}=-\frac{1}{\pi}\int_{0}^{\pi}10×\sin(x)dx$

In my opinion this one is much easier to calculate, I can even do it in my head.

$f_{avg}=-\frac{1}{\pi}×10[-\cos(x)]_{0}^\pi = -\frac{1}{\pi}×10(1+1) = -10×\frac{2}{\pi} = -6.3662$

Ahh! Now I see where those numbers came from. No wolframalpha here.

We know that half of the time $V_{out}$ will be $1$ V, other half of the time it will be $1-6.3662$.

So the total average for a whole period will be $\frac{1+1-6.3662}{2}= -2.1830$ V.

• Just curious, but did you note the OP writing "amplitude 10V?" – jonk Nov 6 '17 at 22:31
• @jonk Gaaaaaaah! – Harry Svensson Nov 6 '17 at 22:35
• Oh. And I may as well mention something else that's missing. But perhaps I'll wait until you fix things up and if I still see it missing, I'll mention it. – jonk Nov 6 '17 at 22:35
• @jonk Hit me up Spock. – Harry Svensson Nov 6 '17 at 22:39
• Nah. Looking so much better now. You have 3 areas, two of them $1\times\pi$ in area and the third one computed good now as $-20$. So that's $\frac{1\cdot\pi+1\cdot\pi-20}{2\pi}$. And I'm in the same place now. Great! – jonk Nov 6 '17 at 22:46