Catto / Topic Map · Signals and Systems Level 2
Signals and Systems · 144 h · Topic 13 of 34

Continuous-time and discrete-time signals

The only thing that changes between the two worlds of the course is where the independent variable lives. But that difference has consequences: in discrete time not every sinusoid is periodic, and frequency is confined to an interval.

Discrete time Digital Periodicity Energy Power

01Two independent variables, two worlds

A signal is a function that carries information. The only thing that changes between the two worlds of this subject is the set where the independent variable lives:

\[ x(t),\ t \in \mathbb{R} \qquad\text{versus}\qquad x[n],\ n \in \mathbb{Z} \] Parentheses and \( t \) for continuous time; square brackets and \( n \) for discrete time. The notation is not decorative: it tells you which one is being discussed.

In continuous time the signal has a value at every instant, and between any two instants there is always another. In discrete time the signal is not defined between samples: \( x[2.5] \) does not exist; it is not that it equals zero. It is the most common conceptual mistake when starting out.

02Continuous, discrete, analog, digital

Four words that are used as synonyms and are not. There are two independent axes: time and amplitude, and each one can be continuous or discrete.

Continuous amplitudeQuantized amplitude
Continuous time Analog: the voltage of a microphone The output of a comparator
Discrete time The output of an ideal sample-and-hold Digital: what an A/D converter delivers

Sampling discretizes time; quantizing discretizes amplitude. An A/D converter does both, and that is why they get confused. This subject deals almost always with the bottom-left cell: discrete time and exact amplitude. Quantization, with its noise and its bits, is a matter for Digital Techniques.

03The signals you need to keep in mind

SignalContinuous timeDiscrete time
Unit step\( u(t) \): equals 1 for \( t \ge 0 \)\( u[n] \): equals 1 for \( n \ge 0 \)
Impulse\( \delta(t) \): not a function, a distribution\( \delta[n] \): equals 1 at \( n = 0 \). No mystery
Real exponential\( e^{\sigma t} \)\( a^{n} \)
Complex exponential\( e^{j\omega_0 t} \)\( e^{j\Omega_0 n} \)
Ramp\( t\,u(t) \)\( n\,u[n] \)

The impulse row deserves a clarification. In continuous time, \( \delta(t) \) is an awkward mathematical object: it is zero everywhere, infinite at zero, and its integral equals one. In discrete time there is no problem at all: \( \delta[n] \) is simply the signal that equals 1 at \( n = 0 \) and 0 everywhere else. It is one of the few things that get simpler when you discretize.

Discrete frequency is confined

In continuous time, \( \omega \) can take any value and different frequencies give different signals. In discrete time they do not: since \( e^{j2\pi n} = 1 \) for every integer \( n \), \( \Omega_0 \) and \( \Omega_0 + 2\pi \) produce exactly the same samples. All the information fits in an interval of width \( 2\pi \), and the highest frequency that exists in discrete time is \( \Omega = \pi \), one positive sample and one negative. That is aliasing, seen from the side of the signals.

Lab · the discrete sinusoid and its period

The signal \( \cos(\Omega_0 n) \) with \( \Omega_0 = 2\pi m/N \). Change \( m \) and \( N \) and see when the pattern repeats, and what happens if you add a little to the frequency.

04Periodicity, which is more demanding in discrete time

In continuous time, \( \cos(\omega_0 t) \) is periodic for any \( \omega_0 \): the period is \( 2\pi/\omega_0 \), and there is nothing to check. In discrete time the period has to be an integer number of samples, and that imposes a condition:

\[ \cos(\Omega_0 n) \text{ is periodic} \iff \frac{\Omega_0}{2\pi} = \frac{m}{N} \text{ with } m, N \text{ integers} \] That is, the frequency divided by \( 2\pi \) has to be a rational number. The period is \( N \) samples, once the fraction has been reduced.

With \( \Omega_0 = 1 \) rad per sample, for example, \( 1/(2\pi) \) is irrational and the signal never repeats, even though at first glance it looks like an ordinary sinusoid. The lab shows this by turning on the shift: the samples stop lining up with those of the previous cycle.

This is not a mathematical curiosity. It is the reason why, in a sampling system, you want the signal frequency and the sampling frequency to have a rational relationship when you want to average cycles, and it is what you take advantage of when choosing an integer number of periods in an FFT window so as not to have to apply windowing.

05Energy and power

Two ways of measuring “how much there is” of a signal, and each one suits a different family:

\[ E = \int_{-\infty}^{\infty} |x(t)|^2 dt, \qquad P = \lim_{T\to\infty} \frac{1}{2T}\int_{-T}^{T} |x(t)|^2 dt \]
\[ E = \sum_{n=-\infty}^{\infty} |x[n]|^2, \qquad P = \lim_{N\to\infty} \frac{1}{2N+1}\sum_{n=-N}^{N} |x[n]|^2 \]

A signal that dies out —a pulse, a decaying exponential— has finite energy and zero power: it is called an energy signal. One that goes on forever —a sinusoid, the step— has infinite energy and finite power: a power signal. And there are signals that are neither one nor the other, such as \( t\,u(t) \).

Why power carries a square

The definition comes from the dissipation in a 1 Ω resistor: \( p(t) = v^2/R = v^2 \). That is why the RMS value is \( \sqrt{P} \), and why for a sinusoid of amplitude \( A \) the power is \( A^2/2 \) and the RMS value \( A/\sqrt{2} \). The “power” of a signal is a convenient convention, not necessarily watts.

06In the lab

Exercise 1 · Periods that do not line up

Generate the signal \( \cos(\Omega_0 n) \) with a microcontroller for \( \Omega_0 = \pi/4 \), \( \Omega_0 = 3\pi/8 \) and \( \Omega_0 = 1 \), send it out through a D/A converter and observe on the oscilloscope which ones repeat and which one does not.

Exercise 2 · Two frequencies, the same samples

Sample a 200 Hz sinusoid and a 1200 Hz sinusoid at 1 kHz, and compare the sequences obtained. Check that they are identical and explain it with \( \Omega_0 \) and \( \Omega_0 + 2\pi \).

Exercise 3 · Energy of a pulse

Capture with the oscilloscope the discharge pulse of a capacitor through a resistor, export the samples and compute \( \sum |x[n]|^2 \Delta t \). Compare it with the stored energy \( \frac{1}{2}CV^2 \).

07Common mistakes

  • Believing that \( x[n] \) equals zero between samples. It has no value: it is not defined there.
  • Confusing discrete with digital. Discrete refers to time; digital adds the quantization of the amplitude.
  • Assuming any discrete sinusoid is periodic. \( \Omega_0/2\pi \) has to be rational.
  • Treating \( \delta(t) \) as an ordinary function. It only makes sense inside an integral; \( \delta[n] \), on the other hand, is a normal signal.
  • Looking for energy in a sinusoid. It has infinite energy: you have to talk about power.

08Self-assessment

What is the difference between \( x(t) \) and \( x[n] \)?

The independent variable: real in the first case, integer in the second. Between two samples the discrete signal is not defined.

Is discrete the same as digital?

No. Discrete refers to time; digital also requires the amplitude to be quantized.

Is \( \cos(n) \) periodic?

No: \( 1/(2\pi) \) is irrational, so there is no integer \( N \) that brings the signal back to its value.

What is the highest frequency in discrete time?

\( \Omega = \pi \), which alternates +1 and −1. Beyond that the signals repeat: \( \Omega \) and \( \Omega + 2\pi \) are the same.

Is a sinusoid an energy signal or a power signal?

A power signal: its energy is infinite and its power is \( A^2/2 \).

What is the period of \( \cos(2\pi \cdot 3 n/12) \)?

Reducing \( 3/12 = 1/4 \), the period is \( N = 4 \) samples.

09Further reading

  • Alan V. Oppenheim and Alan S. Willsky. Signals and Systems. 2nd ed. (Spanish edition, “Señales y sistemas”), Prentice Hall, 1998. All of chapter 1: it is the reference for this topic and the five that follow.
  • John G. Proakis and Dimitris G. Manolakis. Digital Signal Processing. 4th ed. (Spanish edition, “Tratamiento digital de señales”), Pearson, 2007. The treatment of the discrete case, with periodicity and the confinement of frequency.
  • Simon Haykin and Barry Van Veen. Signals and Systems. (Spanish edition, “Señales y sistemas”), Limusa Wiley, 2001. Good examples of real instrumentation signals, with energy and power computed.
Development of the topic “Continuous-time and discrete-time signals” of Signals and Systems (Level 2), based on the curriculum of the UTN Electronic Engineering program, 2023 curriculum — Ordinance No. 1849 of the UTN Higher Council. Back to the Topic Map · catto.ar