數位訊號處理 Digital Signal Processing

Mathematics   Yoshio    Jan 2nd, 2026 at 8:00 PM    8    0   

Digital Signal Processing

DSP


Fourier Series Expansion

For a periodic signal with period \(T\)
\(x(t)=\underbrace{a_0}_{DC}+\sum_{n=1}^\infty a_n\cos(n\Omega_0t)+\sum_{n=1}^\infty b_n\sin(n\Omega_0t)\)
\(\Omega_0=\frac{2\pi}T\;(rad/sec)\) fundamental frequency
\(f_0=\frac1T,\;T\rightarrow period\)



\(a_0=\frac1T\int_Tx(t)\operatorname dt\)
\(a_n=\frac2T\int_Tx(t)\cdot\cos(n\Omega_0t)\operatorname dt\)
\(b_n=\frac2T\int_Tx(t)\cdot\sin(n\Omega_0t)\operatorname dt\)

\(a_n=\frac2T\int_Tx(t)\cdot\cos(n\Omega_0t)\operatorname dt=\frac2T\int_T\lbrack a_0+\sum_{k=1}^\infty a_n\cos(k\Omega_0t)+\sum_{k=1}^\infty b_k\sin(k\Omega_0t)\rbrack\cdot\cos(n\Omega_0t)\operatorname dt\)
\(=\frac2T\int_Ta_0\cos(n\Omega_0t)\operatorname dt+\frac2T\int_T\sum_{k=1}^\infty a_n\cos(k\Omega_0t)\cos(n\Omega_0t)\operatorname dt+\frac2T\int_T\sum_{k=1}^\infty b_n\sin(k\Omega_0t)\cos(n\Omega_0t)\operatorname dt\)
\(\int_T\cos(n\Omega_0t)\operatorname dt=0\)
\(\cos(A)\cdot\cos(B)=\frac12\lbrack\cos(A+B)+\cos(A-B)\rbrack\)
\(\sin(A)\cdot\cos(B)=\frac12\lbrack\sin(A+B)+\sin(A-B)\rbrack\)
\({\frac2T\int_T}\sum_{k=1}^\infty a_n\cos(k\Omega_0t)\cos(n\Omega_0t)\operatorname dt=\frac2T\int_Ta_n\cos^2(n\Omega_0t)\operatorname dt,\;when\;k=n\)
\(=\frac2T\int_Ta_n\cdot\frac12\lbrack\cos(2n\Omega_0t)+1\rbrack\operatorname dt\)
\(=\frac2T\int_Ta_n\frac12\operatorname dt=a_n\)
\(\frac2T\int_T\sum_{k=1}^\infty b_n\sin(k\Omega_0t)\cos(n\Omega_0t)\operatorname dt=0\;\because\int_T\sin(\beta\Omega_0t)\operatorname dt=0\)

\(\left\{\begin{array}{l}e^{j\theta}=\cos\theta+j\sin\theta\\e^{-j\theta}=\cos\theta-j\sin\theta\end{array}\right.\)
\(\left\{\begin{array}{l}\cos\theta=\frac{e^{j\theta}+e^{-j\theta}}2\\\sin\theta=\frac{e^{j\theta}-e^{-j\theta}}{2j}\end{array}\right.\)

\(x(t)=a_0+\sum_{n=1}^\infty a_n\cos(n\Omega_0t)+\sum_{n=1}^\infty b_n\sin(n\Omega_0t)\)
\(=a_0+\sum_{n=1}^\infty\frac{a_n}2(e^{jn\Omega_0t}+e^{-jn\Omega_0t})+\sum_{n=1}^\infty\frac{b_n}{2j}(e^{jn\Omega_0t}-e^{-jn\Omega_0t})\)
\(=a_0+\sum_{n=1}^\infty(\frac{a_n}2e^{jn\Omega_0t}+\frac{b_n}{2j}e^{jn\Omega_0t})+\sum_{n=1}^\infty(\frac{a_n}2e^{-jn\Omega_0t}-\frac{b_n}{2j}e^{-jn\Omega_0t})\)
\(=a_0+\sum_{n=1}^\infty(\frac{a_n}2+\frac{b_n}{2j})e^{jn\Omega_0t}+\sum_{n=-\infty}^{-1}(\frac{a_{-n}}2e^{jn\Omega_0t}-\frac{b_{-n}}{2j}e^{jn\Omega_0t})\)
\(=a_0e^{j\cdot0\cdot\Omega_0t}+\sum_{n=1}^\infty\frac12(a_n-jb_n)e^{jn\Omega_0t}+\sum_{n=-\infty}^{-1}\frac12(a_{-n}+jb_{-n})e^{jn\Omega_0t}\)
\(=\sum_{n=-\infty}^\infty X_ne^{jn\Omega_0t},\;F.S.\)

\(X_n=\frac1T\int_Tx(t)e^{-jn\Omega_0t}\operatorname dt\)



Dirac comb

[Ex] impulse train
\(x(t)=\sum_{m=-\infty}^\infty\delta(t-mT)\)
\(=\sum_{k=-\infty}^\infty X_ke^{jk\Omega_0t},\;\Omega_0=\frac{2\pi}T\)
\(X_k=\frac1T\int_T\delta(t-mT)e^{-jk\Omega_0t}\operatorname dt\)
\(\delta(t-mT)=1\;when\;t=mT,\;e^{-jk\Omega_0t}=e^{-jk\cdot\frac{2\pi}T\cdot mT}=e^{-jkm\cdot2\mathrm\pi}=1\)
\(X_k=\frac1T\cdot1=\frac1T,\;k=(-\infty,\infty)\)

\(\sum \limits_{n=-\infty}^{\infty}\delta(t-nT_s) ~~~\underset{\mathcal{F}}\longleftrightarrow ~~~\Omega_s \sum \limits_{n=-\infty}^{\infty}\delta(\Omega-n\Omega_s)\)
where \(\Omega_s = \frac{2\pi}{T_s}\)



\(\displaystyle P(t) = \sum_{n=-\infty}^\infty (-1)^n\delta(t-n\Delta)\)
If \(\displaystyle Q(t) = \sum_{n=-\infty}^\infty \delta(t-2n\Delta)\) is a periodic impulse train of period \(2Δ\), then \(Q(t)−Q(t−Δ)\) is a periodic impulse train of period \(2Δ\) in which the impulses alternate in polarity, that is, it is the \(P(t)\)



[Ex] pulse train
\(x(t)=\sum_{m=-\infty}^\infty\Pi(t-mT)\)
\(=\sum_{k=-\infty}^\infty X_ke^{jk\Omega_0t}\)

\(X_k=\frac1T\int_T\Pi(t-mT)e^{-jk\Omega_0t}\operatorname dt\)
\(=\frac1T\int_{-½}^½1\cdot e^{-jk\Omega_0t}\operatorname dt\)
\(=\frac1T\cdot\left.\frac1{-jk\Omega_0}e^{-jk\Omega_0t}\right|_{-½}^½=\frac1{-jk\cdot2\mathrm\pi}(e^{-½jk\Omega_0}-e^{½jk\Omega_0})\;\because\Omega_0=\frac{2\mathrm\pi}T\)
\(=\frac1{-jk\cdot2\mathrm\pi}(e^{-\cancel½jk\frac{\cancel2\mathrm\pi}T}-e^{\cancel½jk\frac{\cancel2\mathrm\pi}T})\)
\(=\frac1{2T}\frac1{-jk{\frac{\mathrm\pi}T}}(e^{-jk\frac{\mathrm\pi}T}-e^{jk\frac{\mathrm\pi}T})\)
\(=\frac1{2T}\frac1{-jk\frac{\mathrm\pi}T}\lbrack-2j\sin(k\frac{\mathrm\pi}T)\rbrack=\frac1T\cdot\frac1{\frac{\mathrm{kπ}}T}\sin(\frac{\mathrm{kπ}}T)\)
\(=\frac1T{sinc}(\frac kT)\)




For an aperiodic signal \(x(t)=\lim_{T\rightarrow\infty}x_T(t+T)\)

\(x(t)=\lim_{T\rightarrow\infty}\sum_{k=-\infty}^\infty X_ke^{jk\Omega_0t}=\sum_{k=-\infty}^\infty X_ke^{jk\frac{2\mathrm\pi}Tt}\)

Fourier Transform (FT)

\(x(t)=\frac1{2\mathrm\pi}\int_{-\infty}^\infty X(j\Omega)e^{j\Omega t}d\Omega\)

\(X(j\Omega)=\int_{-\infty}^\infty x(t)e^{-j\Omega t}dt\)




Intuitive Guide to Convolution

Convolution

Convolution is usually introduced with its formal definition:
\((f*g)(t):=\int _{-\infty }^{\infty }f(\tau )g(t-\tau )\,d\tau\)







Intuition For Convolution

Let's say the disease mutates and requires a multi-day treatment. You create a new plan: Plan: [3 2 1]

That means 3 units of the cure on the first day, 2 on the second, and 1 on the third. Ok. Given the same patient schedule [1 2 3 4 5], what's our medicine usage each day?

Uh... shoot. It's not a quick multiplication:

  • On Monday, 1 patient comes in. It's her first day, so she gets 3 units.
  • On Tuesday, the Monday gal gets 2 units (her second day), but two new patients arrive, who get 3 each (2 * 3 = 6). The total is 2 + (2 * 3) = 8 units.
  • On Wednesday, it's trickier: The Monday gal finishes (1 unit, her last day), the Tuesday people get 2 units (2 * 2), and there are 3 new Wednesday people... argh.

The patients are overlapping and it's hard to track. How can we organize this calculation?

An idea: imagine flipping the patient list, so the first patient is on the right:

           Start of line
 5 4 3 2 1

Next, imagine we have 3 separate rooms where we apply the proper dose:

 Rooms     3 2 1  

On your first day, you walk into the first room and get 3 units of medicine. The next day, you walk into room #2 and get 2 units. On the last day, you walk into room #3 and get 1 unit. There's no rooms afterwards, and your treatment is done.

To calculate the total medicine usage, line up the patients and walk them through the rooms:

 Monday
 ----------------------------
 Rooms                  3 2 1                                      
 Patients       5 4 3 2 1

 Usage                  3

On Monday (our first day), we have a single patient in the first room. She gets 3 units, for a total usage of 3. Makes sense, right?

On Tuesday, everyone takes a step forward:

 Tuesday
 ----------------------------
 Rooms                  3 2 1              
 Patients ->      5 4 3 2 1

 Usage                  6 2      = 8

The first patient is now in the second room, and there's 2 new patients in the first room. We multiply each room's dose by the patient count, then combine.

Every day we just walk the list forward:

 Wednesday
 ----------------------------
 Rooms                  3 2 1              
 Patients ->        5 4 3 2 1

 Usage                  9 4 1    = 14


 Thursday
 -----------------------------
 Rooms                  3 2 1              
 Patients ->          5 4 3 2 1

 Usage                 12 6 2    = 20


 Friday
 -----------------------------
 Rooms                  3 2 1              
 Patients ->            5 4 3 2 1

 Usage                 15 8 3    = 26

Whoa! It's intricate, but we figured it out, right? We can find the usage for any day by reversing the list, sliding it to the desired day, and combining the doses.

The total day-by-day usage looks like this (don't forget Sat and Sun, since some patients began on Friday):

Plan      *  Patient List   = Total Daily Usage
[3 2 1]   *  [1 2 3 4 5]    = [3 8 14 20 26 14 5]
              M T W T F        M T W  T  F  S  S

This calculation is the convolution of the plan and patient list. It's a fancy multiplication between a list of input numbers and a "program".



The integral of the convolution

When all treatments are finished, what was the total medicine usage? This is the integral of the convolution. (A few minutes ago, that phrase would have you jumping out of a window.)

But it's a simple calculation. Our plan gives each patient sum([3 2 1]) = 6 units of medicine. And we have sum([1 2 3 4 5]) = 15 patients. The total usage is just 6 x 15 = 90 units.

Wow, that was easy: the usage for the entire convolution is just the product of the subtotals!

\[\int (f * g) = \int f \cdot \int g\]

I hope this clicks intuitively. Note that this trick works for convolution, but not integrals in general. For example:

\[\int (x \cdot x) \ne \int x \cdot \int x\]

If we separate \(x \cdot x\) into two integrals we get:

  • \( \int (x \cdot x) = \int x^2 = \frac{1}{3} x^3 \)
  • \(\int x \cdot \int x = \frac{1}{2}x^2 \cdot \frac{1}{2}x^2 = \frac{1}{4}x^4\)

and those aren't the same. (Calculus would be much easier if we could split integrals like this.) It's strange, but \(\int (f * g)\) is probably easier to solve than \(\int (fg)\).


Application: COVID Ventilator Usage

Let's use convolution to estimate ventilator usage for incoming patients.

  • Set \(f(x)\) as the percent of patients needing ventilators. For example, [.05 .03 .01] means 5% of patients need ventilators the first week, 3% the second week, and 1% the third week.
  • Set \(g(x)\) as the weekly incoming patients, in thousands.
  • The convolution \(c(t) = f * g\), shows how many ventilators are needed each week (in thousands). \(c(5)\) is how many ventilators are needed 5 weeks from now.

Let's try it out:

  • F = [.05, .03, .01] is the ventilator use percentage by week
  • G = [10, 20, 30, 20, 10, 10, 10], is the incoming hospitalized patients. It starts at 10k per week, rises to 30k, then decays to 10k.

With these numbers, we expect a max ventilator use of 2.2k in 2 weeks:




Blurring / unblurring images

An image blur is essentially a convolution of your image with some "blurring kernel":

\[\text{blurred} = \text{image} * \text{blur}\]

Can we undo the blur? Yep! With our friend the Convolution Theorem, we can do:

\(\text{blurred} = \text{image} * \text{blur}\)
\(\mathscr{F} \lbrace \text{blurred} \rbrace = \mathscr{F} \lbrace \text{image} * \text{blur} \rbrace\)
\(\mathscr{F} \lbrace \text{blurred} \rbrace = \mathscr{F} \lbrace \text{image} \rbrace \mathscr{F} \lbrace \text{blur} \rbrace\)
\(\frac{ \mathscr{F} \lbrace \text{blurred} \rbrace }{\mathscr{F} \lbrace \text{blur} \rbrace} = \mathscr{F} \lbrace \text{image} \rbrace\)
\(\mathscr{F}^{-1} \lbrace \frac{ \mathscr{F} \lbrace \text{blurred} \rbrace }{\mathscr{F} \lbrace \text{blur} \rbrace} \rbrace = \text{image}\)


Convolution Examples







Time domain Typical Signals





\({sinc}^2(t)={\lbrack\frac{\sin(\pi t)}{\pi t}\rbrack}^2\)




Discrete Convolution

The Convolution Sum or Superposition Sum Representation of LTI Systems

The convolution allows us to find the output signal from any LTI processor in response to any input signal. We can find the output signal \(y(n)\) from an LTI processor by convolving its input signal \(x(n)\) with a second function representing the impulse response \(h(n)\) of the processor. The convolution sum or superposition sum of the sequences \(x(n)\) and \(h(n)\) can be represented by
\[y\lbrack n\rbrack=x\lbrack n\rbrack\ast h\lbrack n\rbrack=\sum_{k=-\infty}^{+\infty}x\lbrack k\rbrack h\lbrack n-k\rbrack=\sum_{k=-\infty}^{+\infty}x\lbrack n-k\rbrack h\lbrack k\rbrack\]
If an input signal, \(x[n]\), has a length of \(L\) samples and the impulse response (filter kernel), \(h[n]\), has a length of \(M\) samples, the resulting output signal, \(y[n]\), will have a length of \(N\) samples, calculated as:
\[N=L+M-1\]

Properties of Convolution

1. Commutativilty
\(x(n)\ast h(n)=h(n)\ast x(n)\)
\(\sum_{k=-\infty}^{+\infty}x\lbrack k\rbrack h\lbrack n-k\rbrack=\sum_{k=-\infty}^{+\infty}h\lbrack k\rbrack x\lbrack n-k\rbrack\)

2. Associativity (Cascaded Connection)
\((x(n)\ast h(n))\ast g(n)=x(n)\ast(h(n)\ast g(n))\)
\(y(n)=\left\{\begin{array}{l}x(n)\ast\lbrack h_1(n)\ast h_2(n)\rbrack\\x(n)\ast\lbrack h_2(n)\ast h_1(n)\rbrack\\x(n)\ast h_1(n)\ast h_2(n)\end{array}\right.\)

3. Distributivity (Parallel Connection)
\(x(n)\ast\lbrack h(n)\ast g(n)\rbrack=x(n)\ast h(n)+(x(n)\ast g(n)\)


Convolution Method

Graphical Method





\((f * g)[n] = \sum_{m=-\inf}^{\inf} f[m]g[n-m]\)

For example assuming \(a\) is the function \(f\) and \(b\) is the convolution function \(g\)



To solve this we can use the equation first we flip the function \(b\) vertically, due to the \(−m\) that appears in the equation. Then we will calculate the summation for each value of \(n\). Whilst changing \(n\), the original function does not move, however the convolution function is shifted accordingly. Starting at \(n=0\),
\(c[0] = \sum_m a[m]b[0-m] = 0 * 0.25 + 0 * 0.5 + 1 * 1 + 0.5 * 0 + 1 * 0 + 1 * 0 = 1\)
\(c[1] = \sum_m a[m]b[1-m] = 0 * 0.25 + 1 * 0.5 + 0.5 * 1 + 1 * 0 + 1 * 0 = 1\)
\(c[2] = \sum_m a[m]b[2-m] = 1 * 0.25 + 0.5 * 0.5 + 1 * 1 + 1 * 0 + 1 * 0 = 1.5\)
\(c[3] = \sum_m a[m]b[3-m] = 1 * 0 + 0.5 * 0.25 + 1 * 0.5 + 1 * 1 = 1.625\)
\(c[4] = \sum_m a[m]b[4-m] = 1 * 0 + 0.5 * 0 + 1 * 0.25 + 1 * 0.5 + 0 * 1 = 0.75\)
\(c[5] = \sum_m a[m]b[5-m] = 1 * 0 + 0.5 * 0 + 1 * 0 + 1 * 0.25 + 0 * 0.5 * 0 * 1 = 0.25\)
As you can see that is exactly what we get on the plot \(c[n]\). So we shifted around the function \(b[n]\) over the function \(a[n]\).




Table Lookup Method

\(x\lbrack n\rbrack=\{1,\;½,\;⅓\},\;h\lbrack n\rbrack=\{1,\;2\}\)

\(\begin{array}{ccccc}&&&x\lbrack n\rbrack&\\&&1&½&⅓\\&1&1&½&⅓\\h\lbrack n\rbrack&2&2&1&⅔\\&1&2½&1⅓&⅔\\&y\lbrack0\rbrack&y\lbrack1\rbrack&y\lbrack2\rbrack&y\lbrack3\rbrack\end{array}\)




Matrix by Vector Method


The convolution operation can be constructed as a matrix multiplication, where one of the inputs is converted into a Toeplitz matrix. For example, the convolution of \(\displaystyle h\) and \(\displaystyle x\) can be formulated as:
\[\displaystyle y=h\ast x={\begin{bmatrix}h_{1}&0&\cdots &0&0\\h_{2}&h_{1}&&\vdots &\vdots \\h_{3}&h_{2}&\cdots &0&0\\\vdots &h_{3}&\cdots &h_{1}&0\\h_{m-1}&\vdots &\ddots &h_{2}&h_{1}\\h_{m}&h_{m-1}&&\vdots &h_{2}\\0&h_{m}&\ddots &h_{m-2}&\vdots \\0&0&\cdots &h_{m-1}&h_{m-2}\\\vdots &\vdots &&h_{m}&h_{m-1}\\0&0&0&\cdots &h_{m}\end{bmatrix}}{\begin{bmatrix}x_{1}\\x_{2}\\x_{3}\\\vdots \\x_{n}\end{bmatrix}}\]
\[\displaystyle y^{T}={\begin{bmatrix}h_{1}&h_{2}&h_{3}&\cdots &h_{m-1}&h_{m}\end{bmatrix}}{\begin{bmatrix}x_{1}&x_{2}&x_{3}&\cdots &x_{n}&0&0&0&\cdots &0\\0&x_{1}&x_{2}&x_{3}&\cdots &x_{n}&0&0&\cdots &0\\0&0&x_{1}&x_{2}&x_{3}&\ldots &x_{n}&0&\cdots &0\\\vdots &&\vdots &\vdots &\vdots &&\vdots &\vdots &&\vdots \\0&\cdots &0&0&x_{1}&\cdots &x_{n-2}&x_{n-1}&x_{n}&0\\0&\cdots &0&0&0&x_{1}&\cdots &x_{n-2}&x_{n-1}&x_{n}\end{bmatrix}}\]



Echo Method

Let:
Signal \(x[n]=a\delta [n-n_{1}]\) (A delta at \(n_{1}\) with amplitude \(a\))
Signal \(h[n]=b\delta [n-n_{2}]\) (A delta at \(n_{2}\) with amplitude \(b\))
The convolution \(y[n]=x[n]*h[n]\) is:
\(y\lbrack n\rbrack=(ab)\delta\lbrack n-(n_1+n_2)\rbrack\)


If 𝑥[𝑛] or ℎ[𝑛] is pretty short we can represent \(𝑥[𝑛]\) or \(ℎ[𝑛]\) with a linear combination of discrete impulses:

\(\operatorname{𝑥}\lbrack\operatorname{𝑛}\rbrack=1,\;\;\;\;\;0\;\leq\operatorname{𝑛}\leq4\)
\(\operatorname{𝑥}\lbrack\operatorname{𝑛}\rbrack\;=\operatorname{𝛿}\lbrack\operatorname{𝑛}\rbrack\;+\operatorname{𝛿}\lbrack\operatorname{𝑛}-1\rbrack\;+\operatorname{𝛿}\lbrack\operatorname{𝑛}-2\rbrack\;+\operatorname{𝛿}\lbrack\operatorname{𝑛}-3\rbrack\;+\operatorname{𝛿}\lbrack\operatorname{𝑛}-4\rbrack\)

\(h\lbrack\operatorname{𝑛}\rbrack=1,\;\;\;-2\;\leq\operatorname{𝑛}\leq2\)
\(h\lbrack\operatorname{𝑛}\rbrack=\operatorname{𝛿}\lbrack\operatorname{𝑛}+2\rbrack\;+\operatorname{𝛿}\lbrack\operatorname{𝑛}+1\rbrack\;+\operatorname{𝛿}\lbrack\operatorname{𝑛}\rbrack\;+\operatorname{𝛿}\lbrack\operatorname{𝑛}-1\rbrack\;+\operatorname{𝛿}\lbrack\operatorname{𝑛}-2\rbrack\)

\(\operatorname{𝑦}\lbrack\operatorname{𝑛}\rbrack=\operatorname{𝛿}\lbrack\operatorname{𝑛}+2\rbrack+2\operatorname{𝛿}\lbrack\operatorname{𝑛}+1\rbrack+3\operatorname{𝛿}\lbrack\operatorname{𝑛}\rbrack+4\operatorname{𝛿}\lbrack\operatorname{𝑛}-1\rbrack+5\operatorname{𝛿}\lbrack\operatorname{𝑛}-2\rbrack+4\operatorname{𝛿}\lbrack\operatorname{𝑛}-3\rbrack+3\operatorname{𝛿}\lbrack\operatorname{𝑛}-4\rbrack+2\operatorname{𝛿}\lbrack\operatorname{𝑛}-5\rbrack+\operatorname{𝛿}\lbrack\operatorname{𝑛}-6\rbrack\)


\(\left\{\begin{array}{l}\delta\lbrack n\rbrack\ast x\lbrack n\rbrack=x\lbrack n\rbrack\\\delta\lbrack n-n_0\rbrack\ast x\lbrack n\rbrack={\left.x\lbrack n\rbrack\right|}_{n=n_0}\end{array}\right.\)

\(x\lbrack n\rbrack=\{1,\;½,\;⅓\},\;h\lbrack n\rbrack=\{1,\;2\}\)

\(y\lbrack n\rbrack=x\lbrack n\rbrack\ast h\lbrack n\rbrack=(\delta\lbrack n\rbrack+½\delta\lbrack n-1\rbrack+⅓\delta\lbrack n-2\rbrack)\ast(\delta\lbrack n\rbrack+2\delta\lbrack n-1\rbrack)\)
\(=\delta\lbrack n\rbrack\ast\delta\lbrack n\rbrack+2\delta\lbrack n\rbrack\ast\delta\lbrack n-1\rbrack+½\delta\lbrack n-1\rbrack\ast\delta\lbrack n\rbrack+2\cdot½\delta\lbrack n-1\rbrack\ast\delta\lbrack n-1\rbrack+⅓\delta\lbrack n-2\rbrack\ast\delta\lbrack n\rbrack+2\cdot⅓\delta\lbrack n-2\rbrack\ast\delta\lbrack n-1\rbrack\)
\(=\delta\lbrack n\rbrack+2\delta\lbrack n-1\rbrack+½\delta\lbrack n-1\rbrack+\delta\lbrack n-2\rbrack+⅓\delta\lbrack n-2\rbrack+⅔\delta\lbrack n-3\rbrack\)
\(=\delta\lbrack n\rbrack+2½\delta\lbrack n-1\rbrack+1⅓\delta\lbrack n-2\rbrack+⅔\delta\lbrack n-3\rbrack\)


[Ex] \((\delta\lbrack n\rbrack+\delta\lbrack n-2\rbrack+\delta\lbrack n-10000\rbrack+2\delta\lbrack n-10005\rbrack)\ast(\delta\lbrack n-1\rbrack+\delta\lbrack n-1000\rbrack)\)
\(=\delta\lbrack n-1\rbrack+\delta\lbrack n-1000\rbrack+\delta\lbrack n-3\rbrack+\delta\lbrack n-1002\rbrack+\delta\lbrack n-10001\rbrack+\delta\lbrack n-11000\rbrack+2\delta\lbrack n-10006\rbrack+2\delta\lbrack n-11005\rbrack\)
\(=\delta\lbrack n-1\rbrack+\delta\lbrack n-3\rbrack+\delta\lbrack n-1000\rbrack+\delta\lbrack n-1002\rbrack+\delta\lbrack n-10001\rbrack+2\delta\lbrack n-10006\rbrack+\delta\lbrack n-11000\rbrack+2\delta\lbrack n-11005\rbrack\)


Unit Step Signal

[Ex] \(y\lbrack n\rbrack=(u\lbrack n\rbrack-u\lbrack n-2\rbrack)\ast(u\lbrack n+1\rbrack-u\lbrack n-1\rbrack)\)
\(=(\delta\lbrack n\rbrack+\delta\lbrack n-1\rbrack)\ast(\delta\lbrack n+1\rbrack+\delta\lbrack n\rbrack)\)
\(=\delta\lbrack n+1\rbrack+\delta\lbrack n\rbrack+\delta\lbrack n\rbrack+\delta\lbrack n-1\rbrack\)
\(=\delta\lbrack n+1\rbrack+2\delta\lbrack n\rbrack+\delta\lbrack n-1\rbrack\)

2D Convolution

Spatial Convolution

The kernel is flipped horizontally and vertically before the sliding multiplication.

\(f(x,y)\ast g(x,y)=\int_{\tau_2=-\infty}^{+\infty}\int_{\tau_1=-\infty}^{+\infty}f(\tau_1,\tau_2)\cdot g(x-\tau_1,y-\tau_2)\operatorname d\tau_1\operatorname d\tau_2\)

\(f\lbrack x,y\rbrack\ast g\lbrack x,y\rbrack=\sum_{n_2=-\infty}^{+\infty}\sum_{n_1=-\infty}^{+\infty}f\lbrack n_1,n_2\rbrack\cdot g\lbrack x-n_1,y-n_2\rbrack\)

\(y\lbrack m,n\rbrack=x\lbrack m,n\rbrack\ast h\lbrack m,n\rbrack=\sum_{j=-\infty}^{+\infty}\sum_{i=-\infty}^{+\infty}x\lbrack i,j\rbrack\cdot h\lbrack m-i,n-j\rbrack\)






















Discrete-time Fourier Transform (DTFT)

DTFT
Discrete-time Fourier Transform (DTFT)

The discrete signals coverted to its continuous time domain frequencies.

\(X(e^{j\omega})=\sum_{n=-\infty}^\infty x\lbrack n\rbrack e^{-j\omega n}\)

compared to analog signals
\(X(j\Omega)=\int_{-\infty}^\infty x(t)e^{-j\Omega t}\operatorname dt\)


Typical Usage (Oppenheim-Schafer convention)

\(\Omega \) (Capital Omega): Used for continuous-time frequency, usually measured in radians per second (\(rad/s\)). \(\Omega =2\pi f\)
\(\omega \) (Lowercase omega): Used for discrete-time frequency (DTFT), usually measured in radians per sample.

\(\left\{\begin{array}{lc}DTFT&X(e^{j\omega})=\sum_{n=-\infty}^\infty x\lbrack n\rbrack e^{-j\omega n}\\IDTFT&x\lbrack n\rbrack=\frac1{2\pi}\int_{-\pi}^\pi{X(e^{j\omega n})}\operatorname d\omega\end{array}\right.,\;\omega:digital,\;\omega\in(-\pi,\;\pi)\)

\(e^{j\omega n}=e^{j(\omega+2\pi k)n}\)

\(x\lbrack n\rbrack=\delta\lbrack n\rbrack\xrightarrow{DTFT}X(e^{j\omega})=\sum_{n=-\infty}^\infty\delta\lbrack n\rbrack e^{-j\omega n}=1\)

\(x\lbrack n\rbrack=a^nu\lbrack n\rbrack\xrightarrow{DTFT}X(e^{j\omega})=\sum_{n=-\infty}^\infty a^nu\lbrack n\rbrack e^{-j\omega n}=\sum_{n=0}^\infty a^ne^{-j\omega n}=\sum_{n=0}^\infty{(ae^{-j\omega})}^n\)
\(=\frac1{1-ae^{-j\omega}},\;\left|ae^{-j\omega}\right|<1\Rightarrow\left|a\right|<1\)

Fourier Series Expansion & Discrete time Signals

Fourier Series Expansion

\(x(t)=\sum_{k=-\infty}^{+\infty}X_ke^{jk\Omega_0t}\)
\(X_k=\frac1T\int_Tx(t)e^{-jk\Omega_0t}\operatorname dt\)

Fourier Transform

\(x(t)=\frac1{2\pi}\int_{-\infty}^{+\infty}X(j\Omega)e^{j\Omega t}\operatorname d\Omega\)
\(X(j\Omega)=\int_{-\infty}^{+\infty}x(t)e^{-j\Omega t}\operatorname dt\)

Laplace Transform

\(x(t)=\frac1{2\pi i}\lim_{T\rightarrow\infty}\int_{\gamma-iT}^{r+iT}X(s)e^{st}\operatorname ds\)
\(X(s)=\int_{-\infty}^{+\infty}x(t)e^{-st}\operatorname dt\)

the inverse Laplace transform \(f(t)=\mathcal{L}^{-1}\{F(s)\}\) and the Laplace transform \(F(s)=\mathcal{L}\{f(t)\}\) are fundamentally linked by the same Region of Convergence (ROC) in the \(s\)-plane.



(I) \(x(t)=\delta(t)\xrightarrow{\mathcal L}\int_{-\infty}^{+\infty}\delta(t)e^{-st}\operatorname dt=1\)

(II) \(x(t)=u(t)\xrightarrow{\mathcal L}\int_{-\infty}^{+\infty}u(t)e^{-st}\operatorname dt=\int_0^{+\infty}1\cdot e^{-st}\operatorname dt\)
\(=\left.\frac1{-s}e^{-st}\right|_0^\infty=\frac1{-s}(e^{-\infty}-e^0)=\frac1s\)

(III) \(x(t)=e^{at}u(t)\xrightarrow{\mathcal L}\int_{-\infty}^{+\infty}e^{at}u(t)e^{-st}\operatorname dt=\int_0^{+\infty}e^{at}e^{-st}\operatorname dt\)
\(=\int_0^{+\infty}e^{-(s-a)t}\operatorname dt=\left.\frac1{-(s-a)}e^{-(s-a)t}\right|_0^\infty=\frac1{-(s-a)}(e^{-\infty}-e^0)=\frac1{s-a}\)


Discrete-time Signals




\(analog\;x_a(t)\;\xrightarrow{sampling}x\lbrack n\rbrack=x_a(nT),\;sequence\)


Typical Signals

unit impulse
\(\delta\lbrack n\rbrack=\left\{\begin{array}{lc}1&if\;n=0\\0&if\;n\neq0\end{array}\right.\)

unit step
\(u\lbrack n\rbrack=\left\{\begin{array}{lc}1&if\;n\geq0\\0&otherwise\end{array}\right.\)
\(=\sum_{m=0}^\infty\delta\lbrack n-m\rbrack\)
\(=\sum_{m=-\infty}^n\delta\lbrack m\rbrack=\left\{\begin{array}{lc}1&if\;n\geq0\\0&otherwise\end{array}\right.\)



\(\delta[n]=u[n]-u[n-1]\)




Sinusoidal Sequence

\(x\lbrack n\rbrack=A\cos(\omega_0n+\theta)\) is NOT necessary periodic

\(x\lbrack n\rbrack=x\lbrack n+N\rbrack,\;n\nmid\pi\)




Discrete-time Fourier transform (DTFT)

yahoo

a4

ABCD

a5

ABCD

a6

good material : https://www.scribd.com/document/644301294/1-b-pdf

a7

ABCD

a8

ABCD

Statistics

Normal Distribution

In statistics, a normal distribution or Gaussian distribution is a type of continuous probability distribution for a real-valued random variable. The general form of its probability density function is

\(\frac1{\sigma\sqrt{2\pi}}e^{-\frac12\left(\frac{x-\mu}\sigma\right)^2}\)

The parameter \(\mu\) is the mean or expectation of the distribution (and also its median and mode), while the parameter \(\sigma\) is its standard deviation. The variance of the distribution is \(\sigma ^{2}\). A random variable with a Gaussian distribution is said to be normally distributed, and is called a normal deviate.


\(\Delta \)\(\Sigma \) modulator

Delta-sigma modulation

Delta-sigma ADC basics



  • The number \(0\), the additive identity.
  • The number \(1\), the multiplicative identity.
  • The \(\pi\) The number \(\pi\) \((\pi = 3.1415...)\), the fundamental circle constant.
  • The number \(e\) \((e = 2.718...)\), also known as Euler's number, which occurs widely in mathematical analysis.
  • The number \(i\), the imaginary unit of the complex numbers.

Mathematical Constant \(e\)

Euler's formula illustrated in the complex plane

Trigonometric function Equation
\(\large Sine\) \(\large \sin(\theta)\;=\;\;\frac{opposite}{hypotenuse}\)
\(\large Cosine\) \(\large \cos(\theta)\;=\;\frac{adjacent}{hypotenuse}\)
\(\large Tangent\) \(\large \tan(\theta)\;=\;\frac{opposite}{adjacent}\)
\(\large Cosecant\) \(\large \csc(\theta)\;=\;\;\frac{hypotenuse}{opposite}\)
\(\large Secant\) \(\large \sec(\theta)\;=\;\frac{hypotenuse}{adjacent}\)
\(\large Cotangent\) \(\large \cot(\theta)\;=\;\frac{adjacent}{opposite}\)

a6

Types of Linear Phase FIR Filters

\(\begin{array}{cc}Type&Classification\\I&Even-order,\;symmetric\\II&Odd-order,\;symmetric\\III&Even-order,\;antisymmetric\\IV&Odd-order,\;antisymmetric\end{array}\)

Third-order Low-Pass Butterworth filter
Bessel Low-Pass filter
Chebyshev filter