Summary of Fundamentals of Digital Signal Processing Systems

Fundamentals of Digital Signal Processing Systems

Introduction

Digital Signal Processing (DSP) studies how discrete-time signals are transformed by systems. This material focuses on practical analysis and implementation of discrete-time systems, showing how to compute responses, simulate systems in MATLAB®/Python, and assess stability and impulse responses. Examples illustrate implementation details and typical behaviors of common discrete-time systems.

Definition: A unit impulse response $g[n]$ is the output of a system when the input is the discrete-time unit impulse $\delta[n]$.

Implementation workflow for discrete-time systems

Follow these stages when implementing and simulating a discrete-time system:

  1. Initial phase (setup)

    • Choose index range $n$ and length $N$.
    • Define input sequence $x[n]$ (e.g., specific samples or an impulse).
    • Initialize temporary variables and internal states (delays), e.g., $x_1$, $x_2$, or previous output $y_1$.
    • Preallocate output vector $y[n]$ for efficiency.
  2. Calculating cycle (iteration)

    • Loop over indices $n$ and compute $y[n]$ from current $x[n]$ and stored states.
    • Update states after computing each output sample.
  3. Post-processing

    • Plot or list $g[n]$, $x[n]$, and $y[n]$.
    • Analyze behavior (decay, oscillation, growth).

Practical example structure (pseudo-code)

  • MATLAB style setup:

$$N = 10;\quad n = 0:N;$$ $$x = zeros(1, N+1);\quad x(1) = 2;\quad x(2) = 1;\quad x(3) = 0.5;$$ $$x_1 = 0;\quad x_2 = 0;\quad y = zeros(1, N+1);$$ for loop over indices: $$y(i) = x_1 + 2 x_2$$ update states: $$x_2 = x_1;\quad x_1 = x(i);$$

  • Python (NumPy) equivalent uses zero-based indexing:

$$N = 10;\quad n = \text{np.arange}(0, N+1);\quad x = \text{np.zeros}(N+1)$$ $$x[0] = 2;\quad x[1] = 1;\quad x[2] = 0.5;\quad x_1 = 0;\quad x_2 = 0;\quad y = \text{np.zeros}(N+1)$$ Loop: $$y[i] = x_1 + 2 x_2$$ $$x_2 = x_1;\quad x_1 = x[i]$$

Definition: State variables are internal memory elements (delays) that store previous samples needed to compute current output.

Example: First system (finite-duration response)

  • Set up input samples limited to early indices (e.g., $x[0]=2$, $x[1]=1$, $x[2]=0.5$) and zero elsewhere.
  • Use two delay states $x_1, x_2$ and compute outputs as linear combinations of states.
  • Because the input is nonzero for only a few samples and the system uses a finite number of delays without feedback, the output becomes zero after a finite number of samples.
💡 Věděli jste?Did you know that finite-duration outputs often simplify convolution computations because only a finite number of terms contribute at each output index?

Example: System with feedback (exponential impulse response)

Consider a system with a feedback coefficient $a$ and a unit gain path from input to output. The difference equation used in the implementation is:

$$y[n] = x[n] + a,y[n-1]$$

Implementation steps:

  • Initialize $y_1 = 0$ to represent $y[n-1]$ at the start.
  • For a unit impulse $x[n] = \delta[n]$ (i.e., $x[0]=1$, zeros elsewhere), iterate to obtain the impulse response.

Impulse response for $x[n]=\delta[n]$ gives the geometric sequence:

$$g[0] = 1$$ $$g[1] = a$$ $$g[2] = a^2$$ $$g[n] = a^n$$

When $|a|<1$, the sequence decays; when $|a|>1$, it grows and the system is unstable.

💡 Věděli jste?Fun fact: Repeated feedback with coefficient $a$ produces the impulse response $g[n]=a^n$ for $n\ge 0$, which is the discrete-time analogue of an exponential response in continuous time.

Unstable variant example

  • If $a = 2$, the impulse response is $g[n] = 2^n$, which grows without bound as $n$ increases.
  • Although the input impulse $\delta[n]$ is bounded, the output becomes unbounded, demonstrating instability.

Definition: A system is BIBO stable if every bounded input produces a bounded output.

BIBO stability criterion (practical check)

  • For linear time-invariant-like systems with impulse response $g[n]$, a sufficient condition for BIBO stability is that the impulse response is absolutely summable:

$$\sum_{n=-\infty}^{

Zaregistruj se pro celé shrnutí
FlashcardsKnowledge testSummaryPodcastMindmap
Start for free

Already have an account? Sign in

DSP LTI Systems Overview

Klíčové pojmy: Preallocate arrays and initialize states before looping, Update state variables only after computing current output, Unit impulse response $g[n]$ is output to $\delta[n]$, For $y[n]=x[n]+a\,y[n-1]$, impulse response $g[n]=a^n$ for $n\ge0$, System is BIBO stable if impulse response is absolutely summable, Stability condition for single-pole feedback: $|a|<1$, Map indexing carefully between MATLAB (1-based) and Python (0-based), Finite-memory systems produce outputs that become zero after finite time, Test implementations with $\delta[n]$, step $u[n]$, and short sequences, Unbounded impulse response implies instability, Preallocation avoids performance penalties in MATLAB/Python, Compare behaviors by inspecting $g[n]$, $x[n]$, and $y[n]$

## Introduction Digital Signal Processing (DSP) studies how discrete-time signals are transformed by systems. This material focuses on practical analysis and implementation of discrete-time systems, showing how to compute responses, simulate systems in MATLAB®/Python, and assess stability and impulse responses. Examples illustrate implementation details and typical behaviors of common discrete-time systems. > Definition: A unit impulse response $g[n]$ is the output of a system when the input is the discrete-time unit impulse $\delta[n]$. ## Implementation workflow for discrete-time systems Follow these stages when implementing and simulating a discrete-time system: 1. Initial phase (setup) - Choose index range $n$ and length $N$. - Define input sequence $x[n]$ (e.g., specific samples or an impulse). - Initialize temporary variables and internal states (delays), e.g., $x_1$, $x_2$, or previous output $y_1$. - Preallocate output vector $y[n]$ for efficiency. 2. Calculating cycle (iteration) - Loop over indices $n$ and compute $y[n]$ from current $x[n]$ and stored states. - Update states after computing each output sample. 3. Post-processing - Plot or list $g[n]$, $x[n]$, and $y[n]$. - Analyze behavior (decay, oscillation, growth). ### Practical example structure (pseudo-code) - MATLAB style setup: $$N = 10;\quad n = 0:N;$$ $$x = zeros(1, N+1);\quad x(1) = 2;\quad x(2) = 1;\quad x(3) = 0.5;$$ $$x_1 = 0;\quad x_2 = 0;\quad y = zeros(1, N+1);$$ for loop over indices: $$y(i) = x_1 + 2 x_2$$ update states: $$x_2 = x_1;\quad x_1 = x(i);$$ - Python (NumPy) equivalent uses zero-based indexing: $$N = 10;\quad n = \text{np.arange}(0, N+1);\quad x = \text{np.zeros}(N+1)$$ $$x[0] = 2;\quad x[1] = 1;\quad x[2] = 0.5;\quad x_1 = 0;\quad x_2 = 0;\quad y = \text{np.zeros}(N+1)$$ Loop: $$y[i] = x_1 + 2 x_2$$ $$x_2 = x_1;\quad x_1 = x[i]$$ > Definition: State variables are internal memory elements (delays) that store previous samples needed to compute current output. ## Example: First system (finite-duration response) - Set up input samples limited to early indices (e.g., $x[0]=2$, $x[1]=1$, $x[2]=0.5$) and zero elsewhere. - Use two delay states $x_1, x_2$ and compute outputs as linear combinations of states. - Because the input is nonzero for only a few samples and the system uses a finite number of delays without feedback, the output becomes zero after a finite number of samples. Did you know that finite-duration outputs often simplify convolution computations because only a finite number of terms contribute at each output index? ## Example: System with feedback (exponential impulse response) Consider a system with a feedback coefficient $a$ and a unit gain path from input to output. The difference equation used in the implementation is: $$y[n] = x[n] + a\,y[n-1]$$ Implementation steps: - Initialize $y_1 = 0$ to represent $y[n-1]$ at the start. - For a unit impulse $x[n] = \delta[n]$ (i.e., $x[0]=1$, zeros elsewhere), iterate to obtain the impulse response. Impulse response for $x[n]=\delta[n]$ gives the geometric sequence: $$g[0] = 1$$ $$g[1] = a$$ $$g[2] = a^2$$ $$g[n] = a^n$$ When $|a|<1$, the sequence decays; when $|a|>1$, it grows and the system is unstable. Fun fact: Repeated feedback with coefficient $a$ produces the impulse response $g[n]=a^n$ for $n\ge 0$, which is the discrete-time analogue of an exponential response in continuous time. ## Unstable variant example - If $a = 2$, the impulse response is $g[n] = 2^n$, which grows without bound as $n$ increases. - Although the input impulse $\delta[n]$ is bounded, the output becomes unbounded, demonstrating instability. > Definition: A system is BIBO stable if every bounded input produces a bounded output. ## BIBO stability criterion (practical check) - For linear time-invariant-like systems with impulse response $g[n]$, a sufficient condition for BIBO stability is that the impulse response is absolutely summable: $$\sum_{n=-\infty}^{