Sub topic 14
Direct and alternating signals
This chapter assumes you know that current is the rate of charge flow, that voltage is energy per unit charge, and that power is P = VI. It also assumes you can read a graph of a quantity against time.
Signals as functions of time
A signal is a voltage or current described as a function of time. Everything so far in this tutorial used constant values, such as a 12 V source driving a steady current. Real circuits also carry quantities that change. The most useful way to sort them is by whether the sign (direction or polarity) reverses.
- Direct current (DC) keeps one polarity. The value is usually constant, as with a battery, but a DC signal may also vary in size without changing sign.
- Alternating current (AC) reverses polarity periodically. The current direction flips back and forth, and the voltage polarity flips with it.
A sign change is not a physical oddity. It means the actual direction of current is opposite to the reference arrow you assigned, which is the same sign-convention idea you used with the passive sign convention.
Describing a sinusoid
The most common AC signal is the sine wave:
v(t) = V_peak · sin(2πft)
- Peak value V_peak is the largest instantaneous voltage.
- Period T is the time for one full cycle, in seconds.
- Frequency f = 1/T is the number of cycles per second, in hertz (Hz).
Mains power is about 50 Hz or 60 Hz depending on the country, so one cycle lasts 20 ms or about 16.7 ms.
Why the average is not enough
Over one full cycle, a sine wave spends as much time positive as negative, so its average is zero. Yet an AC source clearly delivers power to a heater. Power depends on v², which is never negative, so the useful measure is the average of the squared signal.
The root-mean-square (RMS) value is the square root of the mean of v(t)² over a cycle. For a sine wave:
Vrms = Vpeak / √2 ≈ 0.707 · V_peak
The RMS value is the DC voltage that would deliver the same average power to a resistor. A "120 V" outlet is quoted as RMS, so its peak is about 170 V.
import math
V_PEAK = 170.0
N = 100_000 # samples across exactly one cycle
samples = [V_PEAK * math.sin(2 * math.pi * k / N) for k in range(N)]
mean = sum(samples) / N
rms = math.sqrt(sum(v * v for v in samples) / N)
print(f"Average: {abs(mean):.3f} V")
print(f"RMS (numeric): {rms:.2f} V")
print(f"RMS (formula): {V_PEAK / math.sqrt(2):.2f} V")
resistance_ohm = 60.0
print(f"Average power in {resistance_ohm:.0f} ohm: {rms**2 / resistance_ohm:.1f} W")The average prints as 0.000 V, while the RMS value is about 120.21 V. The heating power is Vrms²/R, about 240 W.
Common errors
- Using the peak value in P = V²/R. This overstates average power by a factor of 2. Use RMS.
- Assuming a meter reads the peak. Most meters display RMS, and many are accurate only for sine waves.
- Treating "DC" as "constant". A signal that stays positive but varies is still DC in the polarity sense. It can be split into a constant average plus a varying part.
- Dropping the reference. AC voltages need a reference polarity just like DC ones. The sign at a given instant is only meaningful relative to that reference.
Exercise
A sinusoidal voltage has a peak of 311 V. (a) What is its RMS value? (b) What average power does it deliver to a 100 ohm resistor?
Show answer
(a) Vrms = 311 / √2 ≈ 220 V. (b) P = Vrms² / R = 220² / 100 ≈ 484 W. Using the peak value instead would wrongly give about 967 W.
Exercise
A signal repeats every 25 ms. What is its frequency, and why is its average value zero if it is a symmetric sine wave?
Show answer
f = 1/T = 1/0.025 s = 40 Hz. The positive half cycle and the negative half cycle have equal area, so they cancel over one full period and the average is zero.