Sub topic 14
Direct and Alternating Signals
This chapter assumes you know current, voltage, reference polarity, Ohm's law, and P = VI from the earlier chapters. It also assumes basic trigonometry (the sine function) and that you can read a time-axis plot. It covers how a voltage or current varies with time. That variation decides which simplifications you can use and which numbers a meter shows.
Signals as functions of time
A signal is a voltage or current described as a function of time, written v(t) or i(t). The value at one moment is the instantaneous value. Every earlier relation still holds at each instant: v(t) = R·i(t) for a resistor and p(t) = v(t)·i(t) for power.
Two families matter at this stage:
- Direct current (DC): the signal keeps one polarity (or direction) and, in the ideal case, one constant value. A battery driving a lamp is the standard example.
- Alternating current (AC): the signal reverses polarity (or direction) periodically. Mains power is the standard example.
The names say "current", but engineers apply them to voltage too. "DC voltage" and "AC voltage" are normal usage.
Direct signals
An ideal DC signal does not change: v(t) = V for all t. Three consequences follow.
- Its average equals its instantaneous value.
- Its polarity never flips, so the reference polarity you chose either matches reality or is reversed for the whole analysis.
- Ohm's law and P = VI can be applied once, with no time dependence.
Real DC sources are only approximately constant. A battery voltage sags as it discharges, and a power supply has a small ripple on its output. A signal that never changes sign but varies in size, such as a rectified supply, is still called DC in the sense of "one direction". It is also called pulsating or unidirectional DC.
Alternating signals
The most common AC signal is the sinusoid:
v(t) = Vp · sin(2πft + φ)
| Parameter | Symbol | Meaning | Unit |
|---|---|---|---|
| Peak amplitude | Vp | Largest instantaneous value | volt (V) |
| Peak-to-peak | Vpp = 2Vp | Maximum minus minimum | volt (V) |
| Frequency | f | Cycles per second | hertz (Hz) |
| Period | T = 1/f | Time for one cycle | second (s) |
| Phase | φ | Shift of the waveform in time | radian or degree |
At 50 Hz the period is 20 ms, so the voltage completes 50 full cycles each second. At 60 Hz the period is about 16.7 ms.
What a negative value means
Recall that a voltage has a reference polarity: the plus and minus marks you draw. For an AC source, v(t) is positive during one half-cycle and negative during the other. A negative value does not mean the source is broken. It means the real polarity is opposite to the marks you drew, during that interval.
The same applies to current. With a reference arrow drawn through a resistor, i(t) > 0 means charge flows along the arrow, and i(t) < 0 means it flows against it. Current in an AC circuit reverses direction every half-cycle, so the carriers move back and forth about a mean position rather than travelling around the loop.
Describing size: average, peak, and RMS
One number has to stand for a signal that keeps changing. Three candidates exist, and they answer different questions.
- Average (mean) value: the signal's integral over a period, divided by the period. For a pure sinusoid it is 0, because the positive and negative halves cancel. This is the DC component of the signal.
- Peak value: the largest instantaneous magnitude. It matters for insulation limits and component ratings.
- RMS (root mean square) value: square the signal, average the squares over a period, then take the square root. It answers the question "what DC value would deliver the same average power to a resistor?"
The power reasoning is short. A resistor dissipates p(t) = v(t)²/R. Its average power is the mean of v² divided by R. A DC source of value Vrms gives V²rms/R, so the two match when Vrms² equals the mean of v². For a sinusoid with zero offset:
Vrms = Vp / √2 ≈ 0.707 · Vp
A "230 V" mains supply is quoted as RMS. Its peak is 230 × 1.414 ≈ 325 V. For a 46 Ω heater, the average power is 230² / 46 = 1150 W.
Computing the statistics
The program below samples one full period of three signals and computes the mean and RMS of each. It uses only the standard library.
import math
N = 1000 # samples per period
def stats(samples):
mean = sum(samples) / len(samples)
rms = math.sqrt(sum(v * v for v in samples) / len(samples))
return round(mean, 6) + 0.0, rms # +0.0 turns -0.0 into 0.0
peak = 230.0 * math.sqrt(2) # a 230 V RMS mains sine
signals = {
"5 V DC": [5.0] * N,
"230 V RMS sine": [peak * math.sin(2 * math.pi * k / N) for k in range(N)],
"2 V offset + 3 V peak sine": [
2.0 + 3.0 * math.sin(2 * math.pi * k / N) for k in range(N)
],
}
for name, samples in signals.items():
mean, rms = stats(samples)
print(f"{name:28s} mean = {mean:8.3f} V rms = {rms:8.3f} V")Expected results: the DC signal has mean 5 and RMS 5. The mains sine has mean 0 and RMS 230. The offset sine has mean 2 and RMS about 2.915. The last result follows from RMS² = (DC value)² + (AC part RMS)² = 2² + (3/√2)² = 8.5.
Signals with both DC and AC parts
Many real signals are a sum: v(t) = VDC + vac(t). A transistor amplifier output is a typical case, where a steady bias voltage carries a small signal. The mean of the sum is V_DC, because the AC part averages to zero. The RMS combines the two parts as shown above, in squares and not in plain addition.
A signal like this can have a positive value at every instant and still be partly AC. "Alternating" describes the varying component. Whether the polarity reverses depends on the offset.
Kirchhoff's laws and Ohm's law with AC
Kirchhoff's current law and voltage law apply at every instant, for any waveform. At a node, i₁(t) + i₂(t) + i₃(t) = 0 at each moment, and around a loop the instantaneous voltages sum to zero. Ohm's law applies instantaneously to a resistor too.
The caution is with magnitudes. RMS and peak values add only when the signals are in phase. If two series sinusoids are shifted in phase (φ differs), the RMS of the sum is not the sum of the RMS values. A resistor-only circuit keeps all voltages and currents in phase, so for it simple RMS calculations work. Capacitors and inductors introduce phase shifts and need the methods of later AC analysis.
Measuring DC and AC
A meter set to "DC" reports the mean of the input. A meter set to "AC" is more subtle:
- An average-responding meter rectifies the input, measures its mean, and scales it by the sine factor. It reads correctly only for sine waves.
- A true-RMS meter computes the RMS of whatever waveform it sees. Use it for square waves, distorted mains, or switched supplies.
The connection rules from the measurement chapter do not change. An ammeter goes in series, and a voltmeter goes in parallel across the element.
Common errors
- Treating the average of an AC signal as its size. The mean of a pure sine is zero, which says nothing about the power it delivers. Use RMS for power.
- Using Vp in P = V²/R. Use RMS. With the peak, the answer is twice too large for a sine.
- Using the 0.707 factor for non-sinusoids. See the warning above.
- Reading a negative sign as a fault. It reflects the chosen reference direction.
- Confusing AC with "changing". A signal with a positive offset can vary over time and still never reverse. It has an AC component, but its direction stays the same.
- Adding RMS values of out-of-phase sources directly. Add instantaneous values, then take the RMS.
Exercise
A resistor of 100 Ω is connected to a source v(t) = 20 sin(2π · 60 · t) volts. Find the RMS voltage, the average power in the resistor, and the period of the signal.
Show answer
Vp = 20 V, so Vrms = 20/√2 ≈ 14.14 V. The average power is Vrms²/R = (14.14)²/100 = 200/100 = 2.0 W. The period is T = 1/f = 1/60 ≈ 16.7 ms.
Exercise
A signal is v(t) = 4 + 3 sin(ωt) volts. Does its polarity ever reverse? What are its mean and RMS values?
Show answer
The minimum is 4 − 3 = 1 V, so the voltage is always positive and the polarity never reverses. The mean is 4 V. The RMS is √(4² + 3²/2) = √(16 + 4.5) = √20.5 ≈ 4.53 V.
Exercise
A technician measures a 10 V peak square wave (alternating between +10 V and −10 V) with an average-responding AC meter that is calibrated for sine waves. Will the meter read the correct RMS value? What is the true RMS?
Show answer
No. The true RMS of the square wave is 10 V, because v² is 100 V² at every instant. An average-responding meter rectifies the wave, gets a mean of 10 V, and multiplies by the sine factor of about 1.11, so it reads about 11.1 V, which is roughly 11% too high.