Sub topic 14
RMS of square, triangle, and other waveforms
This chapter assumes you know the RMS definition from earlier in the tutorial. RMS is the square root of the mean of the squared signal over one period. It also assumes basic integration. The sine result Vm/√2 is a special case. Other periodic waveforms give different ratios, and using the sine ratio on them gives wrong answers.
The same recipe for any waveform
The definition does not depend on the shape:
Vrms = √( (1/T) ∫ v(t)² dt ), integrated over one period T.
Square the signal, average it, then take the square root.
Square wave
A symmetric square wave switches between +Vm and −Vm. Its square is always Vm², so the mean square is Vm² and Vrms = Vm. No averaging is needed. The sign is lost when you square, so this wave heats a resistor as much as a DC source of Vm.
Triangle wave
By symmetry, one quarter period describes the whole wave. On that quarter, v(t) = Vm·(4t/T) for 0 ≤ t ≤ T/4.
Mean square = (4/T) ∫₀^(T/4) Vm²·(16t²/T²) dt = (4/T)·Vm²·(16/T²)·(T/4)³/3 = Vm²/3.
So Vrms = Vm/√3 ≈ 0.577 Vm. A triangle wave has smaller RMS than a sine wave of the same peak. It spends less time near its peak.
Half-wave rectified sine
Keep the positive half of a sine and set the negative half to zero. The squared signal is sin² for half the period and 0 for the rest, so the mean square is (Vm²/2)/2 = Vm²/4. Then Vrms = Vm/2.
Summary table
| Waveform (peak Vm) | Vrms | Crest factor Vm/Vrms |
|---|---|---|
| Symmetric square | Vm | 1 |
| Sine | Vm/√2 ≈ 0.707 Vm | 1.414 |
| Triangle | Vm/√3 ≈ 0.577 Vm | 1.732 |
| Half-wave rectified sine | Vm/2 | 2 |
| Rectangular pulse, 0 to Vm, duty cycle D | Vm√D | 1/√D |
The crest factor is the peak value divided by the RMS value. A high crest factor means the signal has tall, narrow peaks. Meters and scopes specify the crest factor they can handle.
Checking the numbers
This script computes each RMS value numerically for Vm = 10 V.
import numpy as np
Vm = 10.0
f = 50.0
N = 10000
# Sample one full period at mid-interval points
t = (np.arange(N) + 0.5) / (f * N)
s = np.sin(2 * np.pi * f * t)
waves = {
"sine": Vm * s,
"square": Vm * np.where(s >= 0, 1.0, -1.0),
"triangle": Vm * (2 / np.pi) * np.arcsin(s),
"half-wave": Vm * np.maximum(s, 0.0),
}
for name, v in waves.items():
rms = np.sqrt(np.mean(v ** 2))
print(f"{name:10s} RMS = {rms:.3f} V")The output is about 7.071 V (sine), 10.000 V (square), 5.774 V (triangle), and 5.000 V (half-wave). These match Vm/√2, Vm, Vm/√3, and Vm/2.
Why this matters for measurement
Many inexpensive meters measure the average of the rectified signal and multiply by 1.1107, the factor that is correct only for a sine wave. On other shapes they misread:
- A square wave reads about 11% high.
- A triangle wave reads about 3.8% low.
- Distorted or pulsed waveforms can be off by much more.
A true-RMS meter computes the mean square directly, so it reads correctly on any waveform within its crest-factor limit.
Exercise
A triangle wave has a peak of 12 V. A meter that averages the rectified signal and is calibrated for sine waves measures it. What does the meter read, and what is the true RMS value?
Show answer
True RMS = 12/√3 ≈ 6.93 V. The average of the rectified triangle is Vm/2 = 6 V. The meter multiplies by 1.1107 and reads about 6.66 V, which is about 3.8% below the true value.
Exercise
A 0 V to 5 V rectangular pulse train has a duty cycle of 36%. What is its RMS value?
Show answer
Vrms = Vm√D = 5 × √0.36 = 5 × 0.6 = 3.0 V.