Summary Dig Filt
Summary Dig Filt
Summary Dig Filt
Z-transforms
X ( z) =
For us the xn are usually samples from a signal. Remember that terms in the series must approach zero as n tends to . This defines the region of convergence. Most often we use Geometric Progression formulae to do n the sums which can then be expressed as: ao a 1 a Finite number of terms: sum = ao 1 a
N
n
n =
xn z
| a |< 1
Z-transforms - Continued
Regions of convergence in the z-plane
Of the form |z| > some value (defines a region outside a circle) Time, n sec when the signal is zero for - < n < n0 and then has values for n0 +1 < n < +
Imag (z)
Real (z)
Of the form |z| < some value (defines a region inside a circle) Time, n sec when the signal has values for - < n < n0 and then is zero for n0 +1 < n < +
Imag (z)
Real (z)
n 1 1 xn = z X ( z ) dz = residues 2 j
Contour of integration inside region of convergence Residues only at poles inside contour of integration SIMPLE POLE at z = zo, residue is: n 1 lim z zo ( z zo) z X ( z ) M POLES at z = zo, residue is: lim z zo
m n 1 1 d ( z zo) z X ( z ) ( m 1 ) ( m 1)! dz ( m 1)
______________________________________________________________________________________________
In both cases, use the region of convergence to tell you whether you want to land up with a signal decaying away to zero for:
positive time, xn = 0 for n < no negative time, yn = for n > no or both, split into two parts a positive and a negative time part.
hn H(z)
2
Yn Y(z)
NB
H ( z) =
bo + b1z 1 + a1z
+ b2 z
+ a2 z
+ ....... bNB z
Y ( z) = NA X ( z)
+ ....... b1z + bo + 1 2 M Y ( z) b1z + b2 z + ....... bM z = X ( z) This is a Finite Impulse Response (FIR) Filter. Difference equation is:
yn = b M xn + M + b M +1xn + M 1 + ....... b1xn +1 + bo xn + b1xn 1 + b2 xn 2 + ....... bM xn M Note that this 2M+1 length filter is non-causal, and yn depends on future as well as past values of xn.
H ( z ) = b M z
+M
+ b M +1z
+ M 1
+1
Note that the response is a convolution of xn with the impulse response hn = bn:
yn =
k =M
bk xn k =
n+ M m=n M
bn m xm
Fastest way to implement this, unless M is very small, is through convolution via FFTs, not forgetting to zero pad appropriately.
We split the transfer function into causal and acausal parts: H(z) = H c(z) . Hac(z) where:
Hc ( z) = bo + b1z 1 + a1z
1
+ ...... + .....
H ac ( z ) =
co + c1z 1 + d1z
+1
+ ...... + .....
+1
H ( z) =
bo + b1z 1 + a1z
+ b2 z
+ a2 z
NB z = exp( j 2f )
NA
and hence this can be done efficiently in MATLAB by using: Hfreq=fft{b,N}./fft{a,N} Make N very large (and a power of 2 for efficiency) to get a finely resolved spectrum.
DFT {bo , b1, b2 ,....bNB ,0,0,0....0 N 1} H ( z) = DFT {1, a1, a2 ,......., a NA ,0,0,....0 N 1}
Band limit putting H(f) = 0 for |f| > fs/2. Inverse Fourier Transform (analytically) to obtain h(t). Sample and scale to obtain expressions for h(n). Window to have finite sequence M n M and evaluate to obtain coefficients: bj for j = -M,-M+1,.-1,0,1,M. A window that zero smoothly at M is desirable.
1.0 Normalized Frequency: 1.0 corresponds to fs/2. Can weight the importance of error in each band. E.g., w=[0.9 0.1 0.9]
Differentiators etc.
Differentiator: H(f) = j 2 f
Amplifies high frequency noise. Digital filter will have a sharp transition at fs/2. Often a good idea to combine this with a low-pass filter also to smooth function at fs/2. Amplifies low frequency noise. Digital filter will have a sharp transition at 0 Hz. Often a good idea to combine this with a high-pass filter also to smooth function at 0. Digital filter has sharp transition regions at f=0 & fs/2. Good idea to smooth function in these regions.
Stability conserved, entire left half plane maps into unit circle.
Form H(s)
E.g., N=3, H(s) = 1/[ (1-s/s1) (1-s/s2) (1-s/s3) ]
s = ( 2 / ).( 1 z
) /( 1 + z
You can combine a low- and high-pass in parallel to produce a band-stop (notch) filter.
H = HLP + HHP Or, you can use mappings to create analog Butterworth band-pass and band-stop filters in the first stage of the design. (Similar to the high-pass mapping in the first bullet, but more complicated.) See Oppenheim and Schafer or most any other Digital Filtering book.