DSP Formulas
DSP Formulas
DSP Formulas
An example:
Common Transforms
Common Fourier Transforms
FIR Filters
𝛼⁄
Passband ripple → 10 20 −1
−𝛼⁄
Stopband attenuation → 10 20
Weird questions:
From SS15:
From SS18: unit sample response for bandpass filter is:
• Hamming window is always better than Hanning and Bartlett window because it provides an even lower PAE for
the same cost.
• When PAE is -50, go for Blackman instead of Hamming.
• The filter designed using a Kaiser window will be shorter, as its length is directly adapted to both the required
resolution and the PAE. Therefore, a Kaiser window exploits the given tolerances better than any other
windowing approach. For the standard window types there is a fixed relationship between N and delta ω which
is not adapted to the required PAE. --------------- A Kaiser window adapts the window shape parameter beta such
that the stop-band attenuation is met exactly. A fixed window shape, e.g. Bartlett or Hamming, tends to provide
a too large stop-band attenuation which results in a longer filter. ------------------- When using the windowing
method, one has to use a certain window with a fixed PAE. Sometimes, this tends to “overshoot” the
specifications and results in a too long order. When the Kaiser method for FIR filter design is employed, the
window shape is flexible which results in a generally smaller order.
IIR Filters
−𝛿⁄
Passband ripple → 1 − 𝛼 = 10 20
−𝛿⁄
Stopband attenuation → 𝛼 = 10 20
2 𝑤 𝑤
Bilinear Transformation: Ω = 𝑇 tan( 2 ), Impulse Invariance: Ω = 𝑇
𝑑 𝑑
1 1
For lowpass filter: (Hc(jΩ))2 = 1+(Ω/Ω 2𝑁 , For highpass filter, (Hc(jΩ))2 = 1+(Ω 2𝑁
𝑐) 𝑐 /Ω)
1
2−1
(1−𝛼𝑝 )
𝛿 /10 log( )
10 𝑝 −1 1
log( ) −1
10𝛿𝑠 /10 − 1 𝛼𝑠 2
General Derived Formula: 𝑁 = Ω𝑝 𝑂𝑅 𝑁 = Ω𝑝 ,
2log( ) 2log( )
Ω𝑠 Ω𝑠
Ω𝑠 Ω𝑠
Ω𝑐 = 2𝑁
OR Ω𝑐 = 2𝑁 1
(for stopband specification to be met exactly)
√10 𝛿𝑠⁄10 − 1 √𝛼 2 − 1
𝑠
Ω𝑝
Ω𝑐 = 2𝑁 1
(for passband specification to be met exactly)
√(1−𝛼 )2 − 1
𝑝
To find H(s) from H(jΩ), substitute jΩ as s in (Hc(jΩ))2, and convert it to the form H(-s).H(s), from which you can get H(s).
Weird questions:
RC Circuit: SS09
Use SS12 for given coefficients formula for H(z) with bilinear transformation
From SS11:
From SS11:
• Advantage of pole-zero placing: We do not need an analog prototype filter. Analog prototype filter are
generally low-pass filters and have to be transformed to a band stop filter. Especially multiband filter
design becomes really hard.
• Disadvantage of pole-zero placing: We have only control of the center frequency and the stopband
width. Contrary to the bilinear transform with an analog prototype, we cannot control the passband
stop-band attenuation.
• Td is a design parameter that has no effect on the resulting filter. It states the analog frequencies in the
pre-warping phase and is canceled out when moving back to the digital domain.
Non-parametric spectrum estimation
Variance = second order central moment = E[X2] – mean2
Second order moment function rXX (n1, n2) = E[X(n1)X(n2)*]
Variance σ2 = E[X2] – μ2
Welch Estimator:
D = (100 - overlap)% * M
L = 1 + (N – M)/D
Rounding up and down are both okay.
White noise process: SOMF rxx(k) = σx2δ(k) (and the covariance also for zero mean)
Periodogram:
Stationarity Conditions:
• The single realization can be partitioned into L non-overlapping segments of lengths M. Then, the periodogram
can be calculated for each segment and averaged subsequently. This is the idea underlying Bartlett’s methods.
Note that unless the observed process is white, the segments are not independent, so that Bartlett’s method
only yields an approximation of the averaged periodogram CXX(ejw). Welch’s method is based on the same idea,
but additionally allows the segments to overlap, which further increases the dependencies between segments,
but also increases their number and hence the averaging effect.
• In order for X(n) to be stationary, the expected value E [X(n)] needs to be independent of n and the covariance
function cXX(n,m) needs to be a function of the difference n − m only.
• The FFT is an efficient algorithm to return the finite Fourier transform of an observed signal, which is complex-
valued, while the periodogram returns real-valued numbers that are estimates of the distribution of power with
frequency of the observed signal.
• When we use a modified periodogram with a window instead of the usual periodogram, we reduce the
influence of the neighboring peaks, but the resolution is also decreased. Variance is reduced. See WS16 non-
parametric part e for details.
• In Welch Estimator, reducing the frequency masking is achieved by using a window with a smaller side lobe level
• When we use a Bartlett estimator instead of a periodogram, we reduce the variance, but, especially for low
segment lengths, we reduce the frequency resolution. See WS16 non-parametric part e for details.
• If the process has a non-zero mean, the periodogram is biased for w = 0
• Welch’s method is normalized in order to achieve an asymptotically unbiased estimator
• Covariance of a complex valued process is also complex
(cross terms cXV and cVX are also present but vanish due to uncorrelation)
In such a scenario:
cZX = cZV + cZW = cZW
cVX = cVV + cVW = cVV
cWZ(l) = h(n)*cZZ(l), cZW(l) = h(n)*czz(-l)
For Chi-square distribution, see pg53 of Manuscript for table. E[Y] = n, var[Y] = 2.n, where n is the degrees of freedom.
An AR Process is a good choice if the true spectrum has pronounced peaks at few distinct frequencies, and results in a
linear system of equations in the unknowns. An AR(p) process yields p+1 Yule Walker equations.