I have a comparator circuit and I need to find the mean value of the output square wave. I have calculated it like this:
\$Vmean=1/T*integral(U*dt)\$ from 0 to T and I got \$Vmean=-0.7896V\$
Can someone please check if that is correct?
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It only takes a minute to sign up.
Sign up to join this communityI have a comparator circuit and I need to find the mean value of the output square wave. I have calculated it like this:
\$Vmean=1/T*integral(U*dt)\$ from 0 to T and I got \$Vmean=-0.7896V\$
Can someone please check if that is correct?
You can check it yourself in the LTspice simulation:
Zoom the waveform to the region of interest (make sure you are seeing a whole number of periods).
Then move the mouse to the label of the trace (V(n002) or V(004) in your case), hold down the control key and left mouse click.
The pop-up window will show the average and RMS value.
Since it's a square wave you can just use the duty cycle times the Max value.
I've used Mathematica to construct a function:
Finding:
$$\overline{\text{V}}_{\space\text{square}}=\frac{1}{\text{T}}\int_0^\text{T}\text{V}_{\space\text{square}}\left(t\right)\space\text{d}t=-\frac{19}{3}\approx-6.33333\space\text{V}\tag1$$
And the RMS value:
$$\text{V}_{\space\text{square}\space\text{RMS}}=\sqrt{\frac{1}{\text{T}}\int_0^\text{T}\text{V}_{\space\text{square}}^2\left(t\right)\space\text{d}t}=\sqrt{\frac{313}{3}}\approx10.2144\space\text{V}\tag2$$