DSP Notes

Page Contents

References

None

To Read

https://www.maths.ox.ac.uk/system/files/attachments/complex%20%281%29.pdf
https://ocw.mit.edu/courses/mathematics/18-03sc-differential-equations-fall-2011/unit-i-first-order-differential-equations/complex-arithmetic-and-exponentials/MIT18_03SCF11_s6_5text.pdf
https://www.pearsonschoolsandfecolleges.co.uk/Secondary/Mathematics/16plus/EdexcelModularMathematicsforASandALevel/Resources/FurtherPureMathematics2/03%20Ch%2003_018-065.pdf
http://faculty.uml.edu/cbyrne/SP1text.pdf
http://www-math.mit.edu/~gs/papers/newsigproc.pdf
http://www.ling.upenn.edu/courses/ling525/Moore1978Part1.pdf
http://www.ling.upenn.edu/courses/ling525/Moore1978Part2.pdf
http://greenteapress.com/thinkdsp/thinkdsp.pdf
http://web.eecs.umich.edu/~aey/eecs206/lectures/phasor.pdf
https://www.gaussianwaves.com/2015/11/interpreting-fft-results-complex-dft-frequency-bins-and-fftshift/ << AWESOME
https://math.stackexchange.com/questions/9416/extracting-exact-frequencies-from-fft-output
https://dsp.stackexchange.com/questions/38577/fft-starting-at-zero

An Intro To Digital Signals

What Is A Digital Signal?

picture of sinc function
Digital means:
  • Discrete time
  • Discrete amplitude

Analogue and digital signals can carry the same information under certain conditions. Answered by Harry Nyquist and Claude Shannon. When the sampling frequency is at least double the maximum frequency in the signal being sampled, the sampling theoroem holds: x(t)=n=x[n]sinc(tnTsTs) We can build the continuous time signal from the discrete time sequence. Take copies of the sinc() function at each sample location scaled by the amplitude of the sample and sum them to get back the original function. The conditions under which you can do this are determined by the Fourier transform. Once we know the "speed" of the signal we can choose a sampling interval that will allow the above theorem to work - this is the Nyquist rate.

Discrete time signal is a sequence of complex numbers denoted x[n] where the square brackets are used to indicate its discrete nature. The index n just provides an ordering for samples which are taken at a steady interval, the sampling period. The sequence is two-sided in that it goes from minus infinity to plus infinity.

The delta signal: δ[n]. TODO INSERT GRAPH

The unit step signal: u[n]. TODO INSERT GRAPH

The exponential signal: x[n]=|n|nu[n],|a|<1. TODO INSERT GRAPH. E.g. describes newtons law of cooling or capacitor discharge.

The sinusoidal signal: sin(ω0n+θ). Angles in radians.

There are 4 signal classes:

  • finite length - only N samples. Range of index is 0 to N-1.
  • infinite length - index N ranges over entire range of integers. abstract. good for theorems. They have infinite energy.
  • periodic - data repeats every N samples. Represent with a tild on top. Same info as a finite-length of length N. They have infinite energy.
  • finite support - infinite length with on a finite number of non zero samples. Eg unit step.

Elementary Operations On Digital Signals

Elementary operations include scaling, sum, product and shift. These can be applied to any discrete signal.

  • Scale: y[n]=αx[n], αC.
  • Sum: y[n]=x[n]+z[n].
  • Product: y[n]=x[n]z[n].
  • Shift: y[n]=x[nk], kZ.

Shift-by-k can be applied to infinite signals, but when applying to discrete time signals we need to state what happens when we go beyond the index range N, i.e., how we embed it into an infinite length sequence. Can embed into a finite-support sequence by putting zeros on the left and right. Or we could use a periodic extension, whereby the shift becomes circular. The periodic extension is the natural way to interpret the shift of a finite-length signal.

Energy And Power

Energy of signal defined by the following. Ex=n=|x[n]|2

Power is the rate of energy production defined as follows. Px=limN12N+1n=NN|x[n]|2 It is like the overage energy over one period or energy per unit time.

Analog To Digital And Back Again

Analog signals are sampled at regular intervals to produce digital signals. The time between samples is called the sampling period and is detoted Ts.

If xa(t) is our analog signal, that we sample with period Ts, then our sampled signal x[n] is related to the anlog by: x[n]=xa(nTs) The sampling period is just Fs=1/Ts.

There is thus the following relationship between discrete samples and anlalog time: t=nTs=nFs

Therefore, if a signal has a period of M samples then this period is MTs seconds long, which means that the original signal in the analog world had a frequency of f=1MTsHz.

For example, a typical sampling frequency for audio is Ts=48000Hz and therefore the sampling period is Ts20.8μS.

In this case, if we know that there are 110 samples in the signal's period, i.e. M=110, we can say that the frequency of the signal is f440Hz.

Discrete Time Sinusoids Not Always Periodic

A discrete complex exponential is only period if the frequency is a rational number (any number that's a fraction p/q of two integers) of 2π.

I.e., to be periodic the frequency must satisfy: ω=MN2π m,nN To be periodic recall that x[n]=x[n+N]. This means that: ej(ωn+θ)=ej(w(n+N)+θ)=ej(ωn+ωN+θ)=ejωnejωNejθejωnejθ=ejωnejωNejθ The only way this can be true is if ejωN, which can only be true if ωN=2Mπ and thus if ω=2πMN.

The fundamental frequency is the smallest value of N for which x[n]=x[n+N] is true.

Aliasing

Discrete time sinusoids whos frequencies are separated by an integer multiple of 2π are identical, as shown in the reasoning above.

This gives rise to something called aliasing, where any discrete time sinusoid has multiple equivalends, or aliases, separated by integer multiples of

DFT/FFT

Where has 3Blue1Brown been all my life?!

binResolution=fsample# FFT points binStartFreq(n)=nbinResolution=nfsample# FFT points

http://www.tedknowlton.com/resume/FFT_Bin_Interp.html
https://electronics.stackexchange.com/questions/12407/what-is-the-relation-between-fft-length-and-frequency-resolution