Digital Signal Processing is Signal Processing in the digital context, where you process Digital Signals.

Foundations

Signals

Signal

A signal is a way of carrying information from one place to another.

The Domain of a signal is almost always time. The Codomain is usually some kind of measure of amplitude, whether it be decibels, voltage, etc. An exception to the rule of thumb are inputs involving both space and time, such as sensor data from a satellite or a waymo or something, where the domain is spatiotemporal rather than just temporal, consisting of coordinates and time, and the codomain is some kind of multidimensional representation of color, usually RGBA, rather than a single scalar.

Levels of Discretization

Analog Signal

Analog Signal

An analog signal is a Continuous wave. It is typically denoted as , where is the function of the wave and is time.

An example of an analog signal is sound; imagine a guitar string vibrating at an 440 Hz A. Not only is the string a continuous wave, but the compression waves it imparts onto the air, the sound, are also continuous waves.

Link to original

Discrete-Time Signal

Discrete-Time Signal

A discrete-time signal is the result of Sampling a subset of the domain of an Analog Signal, creating a new signal where the Domain is discrete, while the Codomain remains Continuous. It is typically denoted as , where is the function of the signal, and is the index.

An example of a discrete-time signal is within the process of digitally recording a guitar. While a microphone can hear any pitch, it can not convey every instant of a sound to a computer. Therefore, a broker responsible for converting the analog signal of the microphone into something the computer can understand is required. A Analog-to-Digital Converter decides on a certain sampling rate at which to note what the microphone hears at that moment so that it can eventually send a finite amount of information to the computer. At a certain stage within the converter, the signal is represented with discrete time, but the codomain is still continuous.

Link to original

Digital Signal

Digital Signal

A digital signal is the result of Quantizing the values of the codomain of a Discrete-Time Signal, creating a new signal where both the Domain and Codomain are discrete. It is typically can be denoted as , where is the function of the signal, and is the index. It can also be denoted as or to distinguish it from its discrete-time counterpart, and to show that it has been quantized.

An example of a digital signal would be the final steps of the Analog-to-Digital Converter before it sends the final digital signal to the computer; it has to represent that signal in binary. Any means of representing all continuous values with finite digits of precision will lead to loss, so regardless of if you choose IEEE 754 Doubles, or some kind of integer, you will be performing some level Quantization to the signal. The result is a signal with both discrete time and amplitude.

Link to original

Signal Transformations

Signals can be scaled, shifted, and flipped. They are subject to all of the typical Linear Transformations that maintain the validity of the Function. That is, not rotations, as they can break the vertical line test.

Signal Parity

Any signal can be uniquely decomposed into the sum of an Even Signal and an Odd Signal, by the Even-Odd Decomposition Property.

Even Signal

An even signal is a signal whose underlying function is an Even Function

Odd Signal

An odd signal is a signal whose underlying function is an Odd Function

Special Signals

Discrete Delta Function

The Kronecker Delta Function but it is a Discrete-Time Signal.

Impulse Representation

Impulse

In Discrete-Time land, an Impulse is a Signal that is a discrete Kronecker Delta Function

Note that for Convolutions, this unit impulse is like the Identity

Similar to the Step Function, you can scale or shift the delta function. Furthermore, you can compose these scaled and shifted delta functions to create ANY given signal.

For example, is a signal that goes: 1, 2, 3.

Link to original

Sifting Property

Sifting Property

You can also use the delta function to “sift” out the output of a signal at a given

This can be used for either constructing or deconstructing a signal.

Link to original

Discrete Step Function

The Heaviside Step Function but it is a Discrete-Time Signal.

Moving between the Step and Delta Functions

Periodicity

A signal is periodic if it repeats its pattern exactly over and over again at regular, predictable intervals.

A discrete signal is periodic iff

This is important because a function in continuous-time can be periodic, but if that period is not an integer, then it is not neccessarily periodic in discrete-time! Alternatively, if a function’s period is an integer, it will be period in both continuous, and discrete-time (assuming step = 1).

Link to original

Sampling

Circular transclusion detected: Computer-Science/Computational-Science/DigitalSignalProcessing/Sampling

Band

Band

band (short for Frequency band) refers to a continuous, defined range of frequencies between an upper and lower limit.

Band Types

Passband

A Frequency Band referring to the range of frequencies that are allowed to pass through a Filter

Link to original

Stopband

A Frequency Band referring to the range of frequencies that a filter attenuates.

Link to original

Transition Band

A Frequency Band referring to the narrow range of frequencies between the Passband and the Stopband, i.e. the transition range.

Link to original

Guard Band

A Frequency Band referring to the range of frequencies in between two active bands left intentionionally vacant, acting as a guard or buffer zone, in order to mitigate cross-talk.

Link to original

Bandwidth

Bandwidth

Bandwidth is the width of a Band, the difference between the upper and lower frequency limits of a signal or channel. You can also think of it as the spread of a Signal’s Frequency Spectrum in the frequency domain.

Shannon’s Channel Capacity Theorem

Shannon's Channel Capacity Theorem

The maximum Data Rate achievable over a channel of Bandwidth with a given Signal-to-Noise Ratio is:

Link to original

Link to original

Link to original

Windowing

Windowing

Windowing is when you multiply a Window Function by a Signal to extract a finite “window” of it.

Window Function

A window function is the function you multiply by the function of the signal to yield a “window” of the signal.

Rectangle Window

When you use rect as the window function, you get an exact subsection of the original signal. However, you also get Spectral Leakage due to the abrupt cutoff of the function. The other window functions solve this by tapering the product to zero by the edges.

Hann Window

Hann window uses a raised cosine shape that tapers smoothly to exactly zero at the edges to reduce Spectral Leakage.

Hamming Window

The Hamming window is a slight modification of the Hann Window optimized to minimize the height of the maximum side-lobe. Instead of tapering all the way to zero, it tapers to a small non-zero value.

Blackman Window

The Blackman Window is the smoother version of the Hann Window, achieving this smoother taper through an additional cosine term.

Link to original

Quantization

Quantization

In Digital Signal Processing, Quantization is the discretization of the Codomain of a Discrete-Time Signal, making a it a true Digital Signal.

Link to original

Transforms

Fourier Transform

Fourier Transform

An approach for computing what frequencies are present in a Wave, in particular the Frequency Spectrum, entirely from its dependence on time. Allows us to transform a function between time an frequency domains. Allows us to quantitivatively define the Frequency Spectrum of a Wave A Gaussian’s transform is another Gaussian.

  • Frequency is conjugate to time
  • Spatial frequency is conjugate to position Anytime the Fourier Transform is involved, so is the Scale Theorem, and the Uncertainty Principle

Equation

  • Where is called the Fourier Transform of , containing equivalent information to that in
  • lives in the time domain
  • lives in the frequency domain

Fourier Transform with respect to space

A spatial fourier transform. Spatial frequency is the conjugate of position .

Derivation from Fourier Series

Let where these values are defined in Even Function and Odd Function and also Fourier Series

Allow t to range from to , to be continuous Frequency , i.e. for a continuous range of frequencies

Fourier Transform of the Complex Conjugate of a Function

Fourier Transform of the Sum of Two Functions

Inverse Equation

Derivation from Fourier Series

Note that the gets factored in for consistency with the above derivation.

Fourier Tranform with respect to space

Notation

If original function lowercase, use above notation

  • for the function
  • for the transform If the original function is uppercase:
  • for the function, arbitrarily
  • For the transform

Examples

See sinc for more info

Theorems

Scale Theorem

Scale Theorem

Fourier Transform of a scaled function

Link to original

Modulation Theorem

Modulation Theorem

Link to original

Shift Theorem

Shift Theorem

The Fourier Transform of a shifted function

Link to original

Convolution Theorem

Convolution Theorem

The convolution theorem states that the Fourier Transform of a Convolution of two functions is equal to the product of their Fourier transforms.

Link to original

2D Fourier Transform

2D Fourier Transform

See Also

Link to original

Link to original

Discrete Fourier Transform

Discrete Fourier Transform

  • where , called the “Nth root of unity”
    • Nth roots of unity is the related concept of the complex unit circle being split up equally into sectors, where integer powers of walk the circle
  • where is the number of samples in the DT signal
  • where is the frequency bin, representing an area of frequencies in the frequency domain centered around , where is the Sampling Frequency
    • the spacing between bins is , called the bin width
  • where is a Complex Number
  • where the input is assumed to be periodic with period

Time Complexity

The Time Complexity of calculating the Discrete Fourier Transform as a Matrix product or by equivalently calculating each Dot Product per without matrices is , where the DFT Matrix is a Square Matrix

Use Cases of DFT

Matrix Discrete Fourier Transform

  • where is called the “DFT Matrix”

Inverse Discrete Fourier Transform

Power Spectrum

Power Spectrum

The power spectrum is the distribution of Signal Power across frequency, computed by taking the squared magnitude of each DFT bin :

It discards phase information and retains only energy per frequency bin. The primary domain for signal detection; bins whose power exceeds the local noise floor are declared detections.

Link to original

FFT Shift

FFT Shift

The FFT Shift post-processes the output frequency graph of the FFT and centers 0 in the middle of the array, rather than at the beginning, making it easier to interpret. By default frequencies of zero are on the left, then positives, then negatives.

Link to original

Link to original

Fast Fourier Transform

Fast Fourier Transform

The Fast Fourier Transform (FFT) is the de facto Algorithm for calculating the Discrete Fourier Transform, that reduces the Time Complexity of the computation to , whereas a regular matrix multiplication is . There are many different implementations of the FFT.

Time Complexity

The Time Complexity of the FFT algorithm is , whereas the naive DFT algorithm is .

The TLDR on the intuition for the time complexity is that we can split up the original DFT into subproblems until we have subproblems that each take to compute. Hence the time complexity is .

  • in the original expression, we iterate to sum, times
  • we iterate to sum, times, and we do that twice
  • the second level of recursion
  • the last level of recursion

Cooley-Tukey FFT

Radix-2 FFT

Radix-2 FFT is a FFT implementation that requires is a power of

Radix-2 Decimation in Time FFT

For DIT, you split by the index (n) by parity. Hence “decimation in time”.

Start with the initial DFT equation

Split the odd and even indices into two different sums

Factor out a from the odd sum

Rewrite the the subproblem DFTs as the odd indices subproblem and the even indices subproblem. Each of these subproblem DFTs are only half the length as the original problem, so while was originally valid beyond for , it must now be within the half range to accomodate and .

In order to calculate the full DFT, we have to get the values of for , which we can do this by shifting the result we just got.

Simplify subproblem DFTs using periodicity rules: period of sample DFT is

Using , where

Therefore now we have the capability of calculating for all relevant using the combination of these two, where the upper range use the bottom and the lower range use the top. The resulting process is called the Butterfly Operation, allowing us to convert an -point DFT problem into two -point DFT problems.

  • in the original expression, we iterate to sum, times
  • we iterate to sum, times, and we do that twice
  • the second level of recursion
  • the last level of recursion

We have already shown the first level of recursion. If we keep on recursing until each subvector is of length 1, then it only cost to calculate that DFT subproblem. It takes recurses to get to the base case.

Radix-2 Decimation in Frequency FFT

For DIF, you split the frequencies (k) by parity. Hence “decimation in frequency”.

Good-Thomas FFT

Also known as the Prime-Factor Algorithm FFT, you break into factors that are strictly coprime, meaning that their GCD = 1. This one isn’t as relevant to computation though, so we just mention it. Radix 2, is the main one for computation because computers love 2.

Link to original

Z Transform

Z Transform

todo

Link to original

Digital Filtering

Filter

A medium through which a Signal propogates that alters its amplitude, frequency, or phase characteristics, in order to pass desired characteristics while attenuating undesired ones.

Basic Filter Types

Low-Pass Filter

Low-Pass Filter

A Filter that only passes low frequencies.

Link to original

High-Pass Filter

High-Pass Filter

A Filter that only passes highest frequencies.

Link to original

Band-Pass Filter

Band-Pass Filter

A Filter that only passes a specific Frequency Band

Link to original

Band-Stop Filter

Band-Stop Filter

A Filter that passes every frequency except for a specific Frequency Band

Link to original

Impulse Response Filters

Impulse Response

Impulse Response

In Digital Signal Processing, Impulse Response is the output of a system when it is subjected to an Impulse.

For example, the impulse response of a reverb filter would continuously fade the volume from the impulse over time. An echo filter would periodically repeat the impulse, while fading the volume over time. A gain filter would have no temporal effect like the aforementioned.

is used to denote the impulse response of a system where

Impulse response is important in DSP because if a system in a Linear Time-Invariant System, then knowing means you know everything about the system, where is the system.

Link to original

Finite Impulse Response Filter

Finite Impulse Response Filter

A Finite Impulse Response Filter is a Linear Time-Invariant System Filter whose Impulse Response eventually becomes zero, or in other words, the duration of response to the Impulse Signal is finite. This property is due to such filters being Feed-Forward.

  • Because FIR Filters are Feed-Forward, they are massively more parallel and belong in CUDA algorithms on the GPU, whereas IIR Filter is inherently iterative and thus is better suited for the CPU

Z Transform

Impulse Response

Link to original

Infinite Impulse Response Filter

Infinite Impulse Response Filter

An Infinite Impulse Response Filter is a Linear Time-Invariant System Filter whose Impulse Response never becomes zero, or in other words, the duration of response to the Impulse Signal is infinite. This property is due to such filters being recursively defined, i.e. having Feedback.

  • Because IIR Filters are Feed-Back
    • They are is inherently iterative and thus better suited for the CPU, rather than GPU which is where FIR belongs
    • Caching becomes even more important
    • They can be Divergent, which can lead to Overflow. Thus, Stability needs to be considered

Z Transform

Divergence

For a system with poles

Impulse Response

Link to original

Link to original

Modulation

Modulation

Modulation is the process of embuing a signal inside a Carrier Wave in order to convey information through that wave.

Analog Modulation

Amplitude Modulation (AM)

Amplitude Modulation

todo

Link to original

Frequency Modulation (FM)

Frequency Modulation

todo

Link to original

Phase Modulation (PM)

Phase Modulation

todo

Link to original

Digital Modulation

Phase Shift Keying (PSK)

Phase Shift Keying

todo

Link to original

Frequency Shift Keying (FSK)

Frequency Shift Keying

todo

Link to original

Quadrature Amplitude Modulation (QAM)

Quadrature Amplitude Modulation

todo

Link to original

Orthogonal Frequency Division Multiplexing (OFDM)

Orthogonal Frequency Division Multiplexing

todo

Link to original

Link to original

Estimation & Modeling

Spectrum Estimation

todo

Parametric Signal Modeling

todo

Kalman Filters

Kalman Filter

todo

Extended Kalman Filter

todo

Miscellaneous

Beamforming

todo

Double Buffering

todo