TExcelTAD
Home › Signals, Systems & Digital Filters for Engineers › Signal Classes and Operations: Energy, Power, Symmetry and Elementary Signals

Signal Classes and Operations: Energy, Power, Symmetry and Elementary Signals

A data logger hands you two files. One holds the voltage of a strain-gauge amplifier sampled at 1 kSa/s1\ \text{kSa/s} for an hour; the other holds a single 2 ms2\ \text{ms} pulse from a piezo sensor when a hammer hits a beam. Before you filter or transform either record you should be able to say what kind of signal it is, because that decides which number describes its size (rms power or total energy), which transform applies, and which processing makes sense. This lesson gives you the classification an engineer uses, the elementary signals every later lesson is built from, and the operations (shift, reversal, scaling) that turn one into another. The mathematical treatment is in Signals and Signal Operations; here we attach units and code.

The classes

Distinction One side Other side Why it matters
time axis continuous time x(t)x(t) discrete time x[n]x[n], sampled at t=nTst = nT_s Laplace vs z-transform, analog vs digital filters
amplitude analog (any value) digital (quantised to codes) quantisation noise (Quantisation)
repetition periodic, x(t+T0)=x(t)x(t + T_0) = x(t) aperiodic Fourier series lines vs a continuous spectrum
size energy signal, 0<E<∞0 < E < \infty power signal, 0<P<∞0 < P < \infty which figure to quote, which spectrum (ESD or PSD)
predictability deterministic random (noise) exact transforms vs statistical estimates (Spectral Estimation)
symmetry even, x(−t)=x(t)x(-t) = x(t) odd, x(−t)=−x(t)x(-t) = -x(t) real or imaginary Fourier transforms

Energy and power. Engineers measure the size of a signal as the energy or power it would deliver into a 1 Ω1\ \Omega resistor ("normalised"), so a voltage signal has energy in V2⋅s\text{V}^2 \cdot \text{s} and power in V2\text{V}^2:

E=∫−∞∞∣x(t)∣2 dt,P=lim⁡T→∞12T∫−TT∣x(t)∣2 dt,xrms=PE = \int_{-\infty}^{\infty} \lvert x(t) \rvert^2\,dt, \qquad P = \lim_{T \to \infty} \frac{1}{2T} \int_{-T}^{T} \lvert x(t) \rvert^2\,dt, \qquad x_\text{rms} = \sqrt{P}

and in discrete time E=∑n∣x[n]∣2E = \sum_n \lvert x[n] \rvert^2, P=lim⁡N→∞12N+1∑n=−NN∣x[n]∣2P = \lim_{N\to\infty} \frac{1}{2N+1}\sum_{n=-N}^{N} \lvert x[n] \rvert^2. Into a real load RR, divide by RR to get joules or watts. A pulse has finite energy and zero average power; a sine, a DC level or stationary noise has finite power and infinite energy. Some signals are neither (a ramp t u(t)t\,u(t)).

Periodicity in discrete time is stricter. A sampled cosine cos⁡(Ω0n)\cos(\Omega_0 n) with Ω0=2πf0/fs\Omega_0 = 2\pi f_0/f_s (radians per sample) repeats only if f0/fs=k/Nf_0/f_s = k/N is a rational number; the period is then NN samples (in lowest terms), covering kk cycles of the analog sine. A 1.2 kHz1.2\ \text{kHz} tone sampled at 8 kSa/s8\ \text{kSa/s} gives f0/fs=3/20f_0/f_s = 3/20: the samples repeat every 20 samples, which span 3 cycles. cos⁡(0.3n)\cos(0.3 n) never repeats at all, because 0.3/2π0.3/2\pi is irrational.

Even and odd parts. Every signal splits into xe(t)=12[x(t)+x(−t)]x_e(t) = \frac{1}{2}[x(t) + x(-t)] and xo(t)=12[x(t)−x(−t)]x_o(t) = \frac{1}{2}[x(t) - x(-t)], and the energies add: E=Ee+EoE = E_e + E_o.

Elementary signals

delta[n] 0 5 10 1 n u[n] 0 5 10 n 0.8^n u[n] 0 5 10 n cos(0.3 pi n) 0 5 10 n
Signal Continuous time Discrete time Used for
unit impulse δ(t)\delta(t) (area 1, a limit) δ[n]=1\delta[n] = 1 at n=0n = 0, else 0 (an ordinary sequence) impulse response, sampling
unit step u(t)u(t) u[n]u[n] switching on, step response
ramp t u(t)t\,u(t) n u[n]n\,u[n] tracking tests
exponential e−t/τu(t)e^{-t/\tau}u(t) anu[n]a^n u[n], a=e−Ts/τa = e^{-T_s/\tau} first-order responses, IIR filters
sinusoid Acos⁡(2πft+ϕ)A\cos(2\pi f t + \phi) Acos⁡(Ωn+ϕ)A\cos(\Omega n + \phi) frequency response
complex exponential este^{st} znz^n eigenfunctions of LTI systems
rectangular pulse, sinc rect⁡(t/T)\operatorname{rect}(t/T), sinc⁡\operatorname{sinc} windows, ideal filters spectra of pulses

Sampling an elementary continuous signal gives its discrete cousin: e−t/τe^{-t/\tau} sampled every TsT_s is ana^n with a=e−Ts/τa = e^{-T_s/\tau}, which is why a first-order RC becomes a one-pole digital filter. The discrete impulse is not a sampled Dirac delta: δ[n]\delta[n] is simply the sequence 1,0,0,…1, 0, 0, \ldots. The complex exponentials lesson explains why este^{st} and znz^n matter so much.

Operations on the time axis

For y(t)=x(at−b)y(t) = x(at - b) (or y[n]=x[Mn−k]y[n] = x[Mn - k]): shift first by bb, then scale by aa, or rewrite as x(a(t−b/a))x(a(t - b/a)), so the shift seen on the graph is b/ab/a. A negative aa reverses time. In discrete time, x[2n]x[2n] keeps every second sample and throws the others away (decimation, Multirate), and x[n/2]x[n/2] is undefined at odd nn until you decide what to put there (interpolation). Amplitude operations (Ax+cAx + c) act on values only.

Worked example: power of a sensor signal, energy of a pulse

Given: (a) an accelerometer amplifier output v(t)=0.5 V+2 V⋅sin⁡(2π⋅1 kHz⋅t)v(t) = 0.5\ \text{V} + 2\ \text{V}\cdot\sin(2\pi \cdot 1\ \text{kHz} \cdot t), driving a 50 Ω50\ \Omega cable termination; (b) a piezo pulse v(t)=5 V⋅e−t/τu(t)v(t) = 5\ \text{V} \cdot e^{-t/\tau}u(t) with τ=2 ms\tau = 2\ \text{ms}, into the same 50 Ω50\ \Omega.

Find: the class of each, its rms value or energy, and the power or energy in the load.

Solve: (a) is a power signal. The DC and the sine are orthogonal over a period, so their powers add: P=0.52+22/2=2.25 V2P = 0.5^2 + 2^2/2 = 2.25\ \text{V}^2, Vrms=1.5 VV_\text{rms} = 1.5\ \text{V}, and into the load 2.25 V2/50 Ω=45 mW=16.5 dBm2.25\ \text{V}^2/50\ \Omega = 45\ \text{mW} = 16.5\ \text{dBm}. (b) is an energy signal: E=∫0∞25e−2t/τ dt=25 τ/2=0.025 V2⋅sE = \int_0^\infty 25 e^{-2t/\tau}\,dt = 25\,\tau/2 = 0.025\ \text{V}^2\cdot\text{s}, so 0.025/50=0.5 mJ0.025/50 = 0.5\ \text{mJ} in the load; its average power over all time is zero.

Check: the units work (V2/Ω=W\text{V}^2/\Omega = \text{W}, V2⋅s/Ω=J\text{V}^2 \cdot \text{s}/\Omega = \text{J}), and the code below gets the same values from samples.

python · try it yourself
import numpy as np

fs = 100e3                                   # 100 kSa/s, plenty for a 1 kHz tone
t = np.arange(int(0.1 * fs)) / fs            # 0.1 s = exactly 100 periods of 1 kHz
v_a = 0.5 + 2.0 * np.sin(2 * np.pi * 1e3 * t)
P_a = np.mean(v_a**2)                        # normalised power, V^2
print(f"(a) power {P_a:.4f} V^2, rms {np.sqrt(P_a):.4f} V, into 50 Ohm {1e3 * P_a / 50:.2f} mW = {10 * np.log10(P_a / 50 / 1e-3):.2f} dBm")

tau = 2e-3
t_b = np.arange(int(0.05 * fs)) / fs         # 25 tau: the tail is negligible
v_b = 5.0 * np.exp(-t_b / tau)
E_b = np.sum(v_b**2) / fs                    # Riemann sum of the integral, V^2 s
print(f"(b) energy {E_b:.5f} V^2 s (exact {25 * tau / 2:.5f}), into 50 Ohm {1e3 * E_b / 50:.4f} mJ")
print(f"    average power over 1 s: {E_b / 1.0:.4f} V^2, over 100 s: {E_b / 100:.6f} V^2 -> 0")
(a) power 2.2500 V^2, rms 1.5000 V, into 50 Ohm 45.00 mW = 16.53 dBm
(b) energy 0.02513 V^2 s (exact 0.02500), into 50 Ohm 0.5025 mJ
    average power over 1 s: 0.0251 V^2, over 100 s: 0.000251 V^2 -> 0

The sampled energy is 0.5 %0.5\,\% high: a left Riemann sum of e−2t/τe^{-2t/\tau} with step TsT_s equals Ts/(1−e−2Ts/τ)≈τ2(1+Ts/τ)T_s/(1 - e^{-2T_s/\tau}) \approx \frac{\tau}{2}(1 + T_s/\tau), and Ts/τ=10 μs/2 ms=0.005T_s/\tau = 10\ \mu\text{s}/2\ \text{ms} = 0.005. Sampling faster, or the trapezoidal rule (np.trapezoid), shrinks the error. Discrete sums approximate continuous integrals only as well as the sampling allows.

Periodicity and symmetry in code

python · try it yourself
import numpy as np
from fractions import Fraction

# Is a sampled tone periodic, and with what period?
fs = 8000
for f0 in (1000, 1200, 1234.5):
    r = Fraction(f0).limit_denominator(100000) / fs
    print(f"f0 = {f0} Hz at fs = {fs}: f0/fs = {r.numerator}/{r.denominator} -> period {r.denominator} samples, {r.numerator} cycles")

# Even/odd split of x[n] = 0.8^n u[n] and the energy check E = Ee + Eo
n = np.arange(-60, 61)
x = np.where(n >= 0, 0.8 ** np.clip(n, 0, None), 0.0)
xr = x[::-1]                                  # x[-n] (n runs symmetrically)
xe, xo = (x + xr) / 2, (x - xr) / 2
print(f"E = {np.sum(x**2):.4f} (exact 1/(1 - 0.64) = {1 / 0.36:.4f}), Ee = {np.sum(xe**2):.4f}, Eo = {np.sum(xo**2):.4f}")
print("xe[-2..2] =", np.round(xe[58:63], 3), " xo[-2..2] =", np.round(xo[58:63], 3))
f0 = 1000 Hz at fs = 8000: f0/fs = 1/8 -> period 8 samples, 1 cycles
f0 = 1200 Hz at fs = 8000: f0/fs = 3/20 -> period 20 samples, 3 cycles
f0 = 1234.5 Hz at fs = 8000: f0/fs = 2469/16000 -> period 16000 samples, 2469 cycles
E = 2.7778 (exact 1/(1 - 0.64) = 2.7778), Ee = 1.8889, Eo = 0.8889
xe[-2..2] = [0.32 0.4  1.   0.4  0.32]  xo[-2..2] = [-0.32 -0.4   0.    0.4   0.32]

A 1234.5 Hz1234.5\ \text{Hz} tone is "periodic" only with a 2-second period: for practical purposes treat it as not periodic in any analysis record you would take. This matters again for leakage.

Guided lab: rms of a sine with an offset

Hand calculation. A function generator set to a 1 kHz1\ \text{kHz} sine of 1 V1\ \text{V} amplitude (2 Vpp2\ \text{V}_\text{pp}) with a +0.5 V+0.5\ \text{V} offset has P=0.25+0.5=0.75 V2P = 0.25 + 0.5 = 0.75\ \text{V}^2, so a true-rms meter on DC+AC should read 0.866 V0.866\ \text{V}, and on AC coupling 0.707 V0.707\ \text{V}.

Simulation. Change v_a in the first program to 0.5 + 1.0 * np.sin(...) and confirm 0.8660 V0.8660\ \text{V}; then sample only 0.0105 s0.0105\ \text{s} (10.5 periods) and see the estimate wander because the record no longer holds whole periods.

What you would measure. With the generator's output set to high-impedance load mode and a true-rms DMM: about 0.866 V0.866\ \text{V} (DC+AC) and 0.707 V0.707\ \text{V} (AC), each within roughly ±1 %\pm 1\,\% (generator amplitude accuracy plus the meter's AC specification at 1 kHz1\ \text{kHz}; see True RMS). An averaging meter on AC also reads 0.707 V0.707\ \text{V} for a pure sine but would be wrong for other shapes. A scope's rms measurement over a non-integer number of periods differs by a few tenths of a percent, the same effect as in the simulation.

Hazards and safe setup. Only the generator and battery- or USB-powered instruments, signals below 10 V10\ \text{V}; no mains-connected circuit is probed. Keep the scope ground clip on the generator's ground.

Pitfalls

  • Quoting a pulse by its "power": it has energy; quote joules (or V2⋅s\text{V}^2 \cdot \text{s}) and, if needed, its peak.
  • Assuming a sampled sine is periodic in the record because the analog sine is.
  • Reading x(2t−4)x(2t - 4) as "shift by 4": the shift is 4/2=24/2 = 2.
  • Treating δ[n]\delta[n] like a Dirac delta (it has value 1, not infinite height).
  • Forgetting that dBm needs a load resistance (here 50 Ω50\ \Omega) to turn V2\text{V}^2 into watts.

Practice

  1. What is the rms value of v(t)=3+4cos⁡(2π⋅50t) Vv(t) = 3 + 4\cos(2\pi \cdot 50 t)\ \text{V}?
  2. Is x[n]=cos⁡(2π⋅0.35 n)x[n] = \cos(2\pi \cdot 0.35\,n) periodic? With what period?
  3. Find the energy of x[n]=0.5nu[n]x[n] = 0.5^n u[n].
  4. Sketch y(t)=u(−t+2)y(t) = u(-t + 2) and say where the step is.
Answer
  1. P=9+16/2=17 V2P = 9 + 16/2 = 17\ \text{V}^2, Vrms=17=4.12 VV_\text{rms} = \sqrt{17} = 4.12\ \text{V}.
  2. 0.35=7/200.35 = 7/20: periodic with N=20N = 20 samples (7 cycles).
  3. E=1/(1−0.25)=4/3≈1.333E = 1/(1 - 0.25) = 4/3 \approx 1.333.
  4. u(2−t)u(2 - t) is 1 for t<2t < 2 and 0 for t>2t > 2: a step down at t=2t = 2 (a reversed step shifted right by 2).

Test yourself

A stationary noise voltage recorded for an hour is best described as

  1. an energy signal
  2. a power signal
  3. neither
  4. periodic

x[n]=cos⁡(2π⋅0.15 n)x[n] = \cos(2\pi \cdot 0.15\,n) has period

  1. 6.67 samples
  2. 20 samples
  3. it is not periodic
  4. 3 samples

The rms value of 0.5+2sin⁡(ωt)0.5 + 2\sin(\omega t) V is

  1. 2.5 V
  2. 1.5 V
  3. 1.41 V
  4. 2.06 V

y(t)=x(3t−6)y(t) = x(3t - 6) is xx compressed by 3 and shifted right by

  1. 6
  2. 3
  3. 2
  4. 18