Discrete-time Signal Processing
Chapter 1. Signal and System
Q1: What are the signals and systems?
A signal is a function of variable \(t\), usually called time, or variables, such as spatial variable \(x\), \(y\) and \(z\). What's important is HOW TO TRANSPORT THE SIGNALS.
We can easily think of an equation \[u_t + cu_x = 0\] called transport equation, which means that as time goes by, the wave will move with the velocity \(c\) along the \(x\). This partial differential equation suggests that there is a way to transport the signal along the \(x\). So if something satisfies this equation, we will get a system with the inputs, signals we want to transport, which will output the signals transported.
Be careful the PDE describes how the signals changes, but not the system. The system in the PDE is the structure of the PDE. In fact, the structure refers to the operations that hit on the inputs.
Generally speaking, if there are an input(inputs) and an output(outputs), the overall relationship between the input(s) and output(s) is the system. Obviously, existing at least one method, we use systems to process signals.
Q2: How to process signals with systems?
To be honest, a system is defined by signals, i.e. inputs and outputs. Thus, it is of importance to study the details of signals. Therefore, the first step to process a signal is to understand what a signal is with more details. And we focus on discrete signals.
Q2.1. What do discrete signals like?
Glancing at the definition of a signal, we find that a signal is just a function, and for discrete signals, they are discrete time functions (we only study the one-dimension case, with variable \(t\)), i.e. sequences. Mathematically, the sequence is just one type of functions.
The sequence is represented as: \[x = \{x[n]\}, \ -\infty The other way in representing a sequence is to use an analogue signal, i.e. \[x[n] =
x_a(nT)\] The quantity \(T\) is called the sampling period. Basic Signals Four Basic Operations
Q2.2. What can we do with the signals?
Q2.3. What do discrete systems like?
Just input discrete signals and output the discrete signals.
- The Ideal Delay System: \(y[n] = x[n-n_d]\)
- Moving Average System: \(y[n] = \frac{1}{M_1+M_2+1}\sum_{k=-M_1}^{M_2}x[n-k]\)
- A Memoryless System: \(y[n]=(x[n])^2\)
- The Accumulator System: \(y[n] = \sum_{k=-\infty}^{n}x[k]\)
Q2.4. What does the LTI system like?
Two representations of a system:
- Explicit Formula: \(y[n] = f\{x[n]\}\)
- Implicit Formula: \(f\{y[n]\} = g\{x[n]\}\)
Important for LTI:
- Explicit: \(y[n] = x[n]*h[n]\) (Convolution)
- Implicit: LCCDE (Linear Constant Coefficient Difference Equations)
To summarize: Linearity, time invariance, and causality of the system will depend on the auxiliary conditions.
Q2.6. How do we use Matlab to simplify our workflow?
1. Stop Writing Math, Start Using Built-ins
y = conv(x, h) % Convolution
fft(x) % Frequency content
y = filter(b,a,x)% Filter application
2. Visualizing without "Plot" Scripts
fvtool(b, a): Filter Visualization Toolpspectrum(x, fs, 'spectogram'): Spectrogram
3. Stream Processing (System Objects)
reader = dsp.AudioFileReader('song.wav');
deviceWriter = audioDeviceWriter;
while ~isDone(reader)
audio = reader();
processed = audio * 0.5;
deviceWriter(processed);
end
Chapter 2. Transforms
Q3. How do we use the transforms?
In mathematics, a transform is a function that maps a set or function to another set or function, often in a different domain or space. The goal is typically to simplify analysis.
Q3.2. What is the Fourier transform?
The Fourier transform breaks down a signal into its constituent frequencies. It provides a "recipe" for a complex wave detailing amplitude and phase.
Representation of sequences:
\[x[n] = \frac{1}{2\pi}\int_{-\pi}^\pi X(e^{j\omega})e^{j\omega n}d\omega\] where \[X(e^{j\omega}) = \sum_{n = -\infty}^{\infty}x[n]e^{-j\omega n}\]Q3.5. The properties of the Fourier Transform
Notation used in this table:
- Time Domain: \(f(t)\) and \(g(t)\)
- Frequency Domain (Angular): \(F(\omega)\) and \(G(\omega)\)
- Definition: \(F(\omega) = \int_{-\infty}^{\infty} f(t)e^{-j\omega t} dt\)
- Inverse: \(f(t) = \frac{1}{2\pi} \int_{-\infty}^{\infty} F(\omega)e^{j\omega t} d\omega\)
| Property | Time Domain \(f(t)\) | Frequency Domain \(F(\omega)\) |
|---|---|---|
| Linearity | \(a f(t) + b g(t)\) | \(a F(\omega) + b G(\omega)\) |
| Time Shifting | \(f(t - t_0)\) | \(e^{-j\omega t_0} F(\omega)\) |
| Frequency Shifting (Modulation) | \(e^{j\omega_0 t} f(t)\) | \(F(\omega - \omega_0)\) |
| Time Scaling | \(f(at)\) | \(\frac{1}{|a|} F\left(\frac{\omega}{a}\right)\) |
| Time Reversal | \(f(-t)\) | \(F(-\omega)\) |
| Duality (Symmetry) | \(F(t)\) | \(2\pi f(-\omega)\) |
| Time Differentiation | \(\frac{d^n}{dt^n} f(t)\) | \((j\omega)^n F(\omega)\) |
| Frequency Differentiation | \(t^n f(t)\) | \(j^n \frac{d^n}{d\omega^n} F(\omega)\) |
| Integration | \(\int_{-\infty}^{t} f(\tau) d\tau\) | \(\frac{1}{j\omega} F(\omega) + \pi F(0)\delta(\omega)\) |
| Convolution | \(f(t) * g(t)\) | \(F(\omega) G(\omega)\) |
| Multiplication | \(f(t) g(t)\) | \(\frac{1}{2\pi} [F(\omega) * G(\omega)]\) |
| Conjugation | \(f^*(t)\) | \(F^*(-\omega)\) |
| Parseval's Theorem (Energy) | \(\int_{-\infty}^{\infty} |f(t)|^2 dt\) | \(\frac{1}{2\pi} \int_{-\infty}^{\infty} |F(\omega)|^2 d\omega\) |
Symmetry Properties (for Real-Valued Signals)
If \(f(t)\) is a real-valued signal (\(f(t) \in \mathbb{R}\)):
| Condition on \(f(t)\) | Property of \(F(\omega)\) |
|---|---|
| Real | \(F(\omega) = F^*(-\omega)\) (Conjugate Symmetric) |
| Real and Even | \(F(\omega)\) is Real and Even |
| Real and Odd | \(F(\omega)\) is Imaginary and Odd |
A Note on Conventions
The table above uses the Angular Frequency (\(\omega\)) convention. If you are using standard frequency \(f\) (in Hertz), where \(\omega = 2\pi f\), the scaling factors change slightly:
- scaling: The \(1/|a|\) factor remains.
- duality: The \(2\pi\) factor disappears.
- multiplication: The \(1/2\pi\) factor disappears.
- Parseval: The \(1/2\pi\) factor disappears.