• Sonuç bulunamadı

Design Steps

N/A
N/A
Protected

Academic year: 2021

Share "Design Steps"

Copied!
15
0
0

Yükleniyor.... (view fulltext now)

Tam metin

(1)

Design FIR Filters

1. Window Method

2. Optimal equiripple Mehtod 3. Frequency Samling Method

Design Steps

1. Filter Specification

2. Coefficient Calculations

3. Realisation

(2)

Summary of ideal impulse responses for standard frequency selective filters

Filter type hD (n), n 0 hD (0) Lowpass c c c nw nw f sin( ) 2

2

f

c Highpass c c c

nw

nw

f

sin(

)

2

1

2

f

c Bandpass 1 1 1 2 2 2

)

sin(

2

)

sin(

2

nw

nw

f

nw

nw

f

2

(

f

2

f

1

)

Bandstop 2 2 2 1 1 1 ) sin( 2 ) sin( 2 nw nw f nw nw f 1 2( ) 1 2 f f  

(3)

Summary of important features of common window functions

Name of Window function Normalized transition width(HZ) Passband ripple (db) Main lobe relative to side lobe(dB) Stopband attenuation(dB) (maximum) Window function

2

/

)

1

(

|

|

),

(

n

n

N

w

Rectangular

0.9 / N

0.7416

13

21

1

Hanning

3.1 / N

0.056

31

44

0.5 cos

      N n  2 Hamming

3.3 /N

0.0194

41

53

0,54+0.46 cos

      N n  2 Blackman

5.5 /N

0.0017

57

75

0.42+0.5 cos

     1 2 N n

+0.08 cos

      1 4 N nKaiser 2.93/N(4.54)

0.0274

50

 

    0 2 / 1 2 o I 1 N / n 2 1 I ) 76 . 6 ( / 32 . 4 N

0.00275

70

) 96 . 8 ( / 71 . 5 N  

0.000275

90

(4)

Prof. Dr. Fahreddin Sadıkoğlu 4

Summary of important features of common window functions

Name of

Window

function

Normalized

transition

width(HZ)

Passband

ripple

(db)

Main lobe

relative to

side

lobe(dB)

Stopband

attenuation(dB)

(maximum)

Window function

2

/

)

1

(

|

|

),

(

n

n

N

w

Rectangular

0.9 / N

0.7416

13

21

1

Hanning

3.1 / N

0.056

31

44

0.5 cos

      N n  2

Hamming

3.3 /N

0.0194

41

53

0,54+0.46 cos

     N n  2

Blackman

5.5 /N

0.0017

57

75

0.42+0.5 cos

      1 2 N n

+0.08 cos

      1 4 N n

Kaiser

.2

93

/

N

(

.4

54

)

0.0274

50

 

 

    0 2 / 1 2 o I 1 N / n 2 1 I

)

76

.

6

(

/

32

.

4

N

0.00275

70

) 96 . 8 ( / 71 . 5 N 

0.000275

90

(5)

fp=1.5;

df=0.5;

as=50;

ft=8;

df1=df/ft;

N=3.3/df1;

N=ceil(N)

n=0:(N-1)/2;

fc1=(fp+(df/2))/ft

w=2*pi*fc1;

hd=2*fc1*sinc(2*fc1*n);

whm=0.54+0.46*cos(2*pi*n/53);

ht=hd.*whm;

[h f]=freqz(ht,1,512,ft);

g=20*log10(abs(h));

plot(f,g)

xlabel('frequency, Hz')

ylabel('Gain,dB')

Design FIR Using Hamming Window

[n' ht']

stem (n,ht,'fill') xlabel('n')

(6)

Impulse Responce of FIR

n h(n) 0 0.4375 1 0.31119 2 0.060122 3 -0.085682 4 -0.053414 5 0.032593 6 0.043546 7 -0.007545 8 -0.032156 9 -0.0052583 10 0.020964 11 0.010631 12 -0.011402 13 -0.011271 n h(n) 14 0.0043431 15 0.0092669 16 6.6969e-018 17 -0.0062837 18 -0.0019926 19 0.0034847 20 0.0023627 21 -0.0014684 22 -0.0019238 23 0.00032138 24 0.001327 25 0.00021674 26 -0.000914 h(0)=h(52) h(1)=h(51) h(2)=h(50) ... h(25)=h(27) h(26)=h(26)

0

5

10

15

20

25

30

-0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

n

h(n)

0 0.4375 1.0000 0.4375 1.0000 0.3122 0.9968 0.3112 2.0000 0.0609 0.9871 0.0601 3.0000 -0.0882 0.9712 -0.0857 4.0000 -0.0563 0.9492 -0.0534 5.0000 0.0354 0.9215 0.0326 6.0000 0.0490 0.8885 0.0435 7.0000 -0.0089 0.8505 -0.0075 8.0000 -0.0398 0.8082 -0.0322 9.0000 -0.0069 0.7621 -0.0053 10.0000 0.0294 0.7129 0.0210 11.0000 0.0161 0.6613 0.0106 12.0000 -0.0188 0.6079 -0.0114 13.0000 -0.0204 0.5536 -0.0113 14.0000 0.0087 0.4992 0.0043 15.0000 0.0208 0.4452 0.0093 16.0000 0.0000 0.3927 0.0000 17.0000 -0.0184 0.3422 -0.0063 18.0000 -0.0068 0.2944 -0.0020 19.0000 0.0139 0.2502 0.0035 20.0000 0.0113 0.2099 0.0024 21.0000 -0.0084 0.1744 -0.0015 22.0000 -0.0134 0.1439 -0.0019 23.0000 0.0027 0.1190 0.0003 24.0000 0.0133 0.1001 0.0013 25.0000 0.0025 0.0873 0.0002 26.0000 -0.0113 0.0808 -0.0009 n hd whm ht n hd whm ht h(0)=h(52); h(1)=h(51);.... h(25)=h(27);

(7)

0

1

2

3

4

-14

-12

-10

-8

-6

-4

-2

0

Frequency, Hz

G

a

in

,d

B

Frequency Responce of FIR

Without Window

(8)

Z-1 Z-1 Z-1 Z-1 x(n) x(n-1) x(n-2) x(n-i) x(n-52)

+

Y(n) h(1)=0.31119 h(0)=0.4375 h(2)=0.060122 h(52)=h(0)=0.4375

Realization of FIR

(9)

0 10 20 30 40 50 0 0.5 1

Blackman

0 10 20 30 40 50 0 0.2 0.4 0.6 0.8 1

Hanning

0 10 20 30 40 50 0 0.2 0.4 0.6 0.8 1 Kaiser Beta=5 Beta=2 0 10 20 30 40 50 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Hamming

(10)

fp=1; fs=4.3; ft=10; df1=(fs-fp)/ft; N=3.3/df1; N=ceil(N) fc=fp+(fs-fp)/2 fcn=fc/(0.5*ft); wr=boxcar(N); hd=fir1(N-1,fcn,wr); whm=hanning(N); ht=fir1(N-1,fcn,whm); [h f]=freqz(ht,1,512,ft); g=20*log10(abs(h)); plot(f,g) xlabel('frequency, Hz') ylabel('Gain,dB')

(11)

n wr whn hd ht

1.0000 1.0000 0.0794 0.0641 0.0053 2.0000 1.0000 0.2923 -0.0388 -0.0117 3.0000 1.0000 0.5712 -0.1052 -0.0622 4.0000 1.0000 0.8274 0.1235 0.1058 5.0000 1.0000 0.9797 0.4564 0.4629 6.0000 1.0000 0.9797 0.4564 0.4629 7.0000 1.0000 0.8274 0.1235 0.1058 8.0000 1.0000 0.5712 -0.1052 -0.0622 9.0000 1.0000 0.2923 -0.0388 -0.0117 10.0000 1.0000 0.0794 0.0641 0.0053

(12)

Wr window Whn window

0

1

2

3

4

5

-80

-70

-60

-50

-40

-30

-20

-10

0

10

Frequency, Hz G ain,d B Wr Whn

(13)

Wr window Whn window K window; beta=1 K window; beta=10 K window; beta=5

0

1

2

3

4

5

-100

-80

-60

-40

-20

0

20

Frequency, Hz

Gain,dB

Wr Whn Wb Wk Beta=10 Beta=1 Beta=5

(14)

0

1

2

3

4

5

-100

-80

-60

-40

-20

0

20

frequency, Hz

Gain

,dB

Beta = 1 Beta = 5 Beta = 10

(15)

Design PB Remez filter

0 500 1000 1500 2000 2500 f, Hz I (H(w) I LSB TB PB TB HSB f1=0; f2=500; f3=1000; f4=1500; f5=2000; f6=5000; ft=10000; N=41; w1=f1/(0.5*ft); w2=f2/(0.5*ft); w3=f3/(0.5*ft); w4=f4/(0.5*ft); w5=f5/(0.5*ft); w6=f6/(0.5*ft); F=[w1 w2 w3 w4 w5 w6]; M=[0 0 1 1 0 0]; h=remez(N-1,F,M); [H f]=freqz(h,1,512,ft); mag=20*log10(abs(H)); plot(f,mag); xlabel('Frequency (Hz)') ylabel('Gain (dB)')

Referanslar

Benzer Belgeler

Türkiye’den Rusya’ya tekstil ihracatı yapan işletmelerden elde edilen veriye uygulanan bağımsız örneklem t testleri farklılaşma stratejisi- ni benimseyen işletmelerin

Adams, Güneş Sistemi dışında giderek artan bir sık- lıkla keşfedilen gezegenlerin hayli eliptik yörüngelerde döndüklerini vurgulayarak, "demek ki tipik bir

In other papers, Cajueiro and Tabak [24,25] study the dynamics of Brazilian interest rates for different maturities and re- vealed that the strong long memory has decreased over

When the economic, cultural and religious concerns that are presented in this paper are considered, it could be argued that the facilitation of physical access to higher

İhtisâb Kanunnâmesi, Narh Defte- ri ve terekelerden alınan örneklerle ortaya konan kumaş çeşitleri, bunların zengin kesimin miras bıraktığı mallar içindeki yeri ve buna

Öyle ki bu bölümde en çok yer kaplayan edebi metin olan “Tramvayda Gelirken” tam da bu kurgusu dolayısıyla Nazım Hikmet’in (ö. 1963)Memleketimden İnsan Manzaraları ile

tabakalı konglomeralar, düzlemsel ve teknem- si çapraz tabakalı konglomeralar ve pelesipod kavkı parçaları içeren paralel laminalı kumtaş- larından, 81-120 m

One-dimensional systems with finite range or rapidly decreasing interaction naturally do not exhibit phase transitions at all finite temperature values [ 1–3 ]: in the absence of