• Sonuç bulunamadı

Group Delay Reduction Methods in FIR Digital Filters

N/A
N/A
Protected

Academic year: 2021

Share "Group Delay Reduction Methods in FIR Digital Filters"

Copied!
69
0
0

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

Tam metin

(1)

Group Delay Reduction Methods in FIR Digital

Filters

Hala Haseeb Al-Ani

Submitted to the

Institute of Graduate Studies and Research

In partial fulfillment of the requirements for the Degree of

`

Master of Science

in

Computer Engineering

Eastern Mediterranean University

October 2013

(2)

Approval of the Institute of Graduate Studies and Research

Prof. Dr. Elvan Yılmaz Director

I certify that this thesis satisfies the requirements as a thesis for the degree of Master of Science in Computer Engineering.

Prof. Dr. Işık Aybay

Chair, Department of Computer Engineering

We certify that we have read this thesis and that in our opinion it is fully adequate in scope and quality as a thesis for the degree of Master of Science in Computer

Engineering.

Prof. Dr. Hasan Kömürcügil Supervisor

Examining Committee 1. Prof. Dr. Hakan Altınçay

2. Prof. Dr. Hasan Kömürcügil

(3)

iii

ABSTRACT

Linear-phase finite impulse response (FIR) filters are widely used in digital signal processing applications because of their various advantages. These advantages include the absence of phase distortion, unrestricted stability, and lower filter-coefficient sensitivity. The most important shortcoming of linear-phase FIR filter is that the overall group delay is (N-1)/2 where N is the length of the filter. This quantity becomes large for higher order filters in communication applications.

Many algorithms have been proposed to reduce this delay and its distortion. Typically, block convolution techniques such as overlap-add method (OAM) and overlap-save method (OSM) are used for a long input sequence. Yet, with respect to input, by using these methods, the output sequence has a finite group delay.

In this thesis, the performance of enhanced modified overlap and save method is investigated. First, the impulse response is made causal and then it is shifted left (circular) by an amount of for odd and for even. Finally, the samples to be excluded from the final convolution are defined. It is expected that this results in a reduction in the causal delay and also in the group delay. Simulations are carried out by MATLAB. The performance of the method is compared with the results obtained from the OSM based filter.

(4)

iv

ÖZ

Doğrusal fazlı sonlu dürtü cevaplı (FIR) süzgeçler çok çeşitli avantajlarından dolayı, sayısal sinyal işleme uygulamalarında yaygın olarak kullanılmaktadırlar. Bu avantajlar, faz bozunumu içermeyen, sınırsız kararlılık ve süzgeç katsayılarına olan az duyarlılık olarak sıralanabilir. Ancak, doğrusal fazlı FIR süzgeçlerinin en önemli dezavantajı ise toplam grup gecikmesinin (N-1)/2 olarak ortaya çıkmasıdır. Buradaki N, süzgeçteki katsayı sayısını temsil etmektedir. Haberleşme uygulamalarında, toplam gecikmenin miktarı süzgeç katsayılarının sayıları ile doğru orantılı olarak artmaktadır.

Bu gecikmeyi ve ondan dolayı oluşan bozunumu azaltmak için birçok algoritma önerilmiştir. Tipik olarak, uzun giriş dizileri için blok konvolüsyon olarak bilinen üstüste binik toplama metodu (OAM) ve üstüste binik saklama metodu (OSM) kullanılır. Bu metodlar kullanıldığında, çıkış dizisinin girişe göre sonlu bir grup gecikmesi vardır.

Bu tezde, iyileştirilip modifiye edilmiş üstüste binik saklama metodunun performansı incelemiştir. İlk olarak, süzgeçin dürtü cevabı nedensel yapılmıştır ve bu dürtü cevabı daha sonra, N tek olduğu zaman (N-1)/2 kadar sola, çift olduğu zaman ise N/2 kadar yine sola kaydırılmıştır.

(5)

v

beklenmektedir. Benzetim çalışmaları MATLAB ortamında yapılarak, bu metodun performansı, OSM metodundan elde edilen sonuçlarla karşılaştırılmıştır.

Anahtar kelimeler: Dürtü Cevabı, FIR Süzgeç, Doğrusal Fazlı FIR Süzgeç, Grup

(6)

vi

(7)

vii

ACKNOWLEDGMENT

I sincerely acknowledge all the help and support that I was given by Prof. Dr. Hasan Kömürcügil whose knowledge, guidance, and effort made this research go on and see the light.

(8)

viii

TABLE OF CONTENTS

ABSTRACT ... iii ÖZ ... iv DEDICATION ... .ةفّرعم ريغ ةيعجرملا ةراشلإا !أطخ ACKNOWLEDGMENT ... vii LIST OF TABLES ... ix LIST OF FIGURES ... x 1INTRODUCTION ... 1 2 FIR FILTERS ... 5

2.1 Structures of FIR Systems ... 5

2.1.1 Direct Form ... 5

2.1.2 Cascade Form ... 6

2.1.3 Linear Phase Filters ... 6

2.1.4 Frequency Sampling ... 8

2.2 Linear Phase Response ... 10

2.3 Types of Linear Phase FIR Filters ... 11

2.4 Properties of Linear Phase FIR Filters... 16

3 GROUP DELAY REDUCTION METHODS ... 20

3.1 General Overview ... 20

(9)

ix

3.3 Zero Delay MOSM (ZDMOSM) ... 24

3.4 Reduced Delay MOSM (RDMOSM) ... 26

3.5 Enhanced RDMOSM (ERDMOSM) ... 28

4 COMPUTER SIMULATIONS ... 34

4.1 Simulation Study 1: Sine Wave ... 35

4.2 Simulation Study 2: Random Wave ... 40

5 CONCLUSIONS ... 47

REFERENCES ... 49

APPENDIX ... 52

Appendix A1: Simulation of Sine Wave ... 53

(10)

x

LIST OF TABLE

(11)

xi

LIST OF FIGURES

Figure 1: Direct Form Structure ... 5

Figure 2: An FIR Filter Implemented as a Cascade of Second-order Systems ... 6

Figure 3: Direct from Implementations for Linear Phase Filters. (a) Type I, III (b) Type II, IV ... 7

Figure 4: Frequency Sampling Filter Structure ... 9

Figure 5: Unit Impulse Responses of the Type I FIR Linear Phase Filters... 12

Figure 6: Unit Impulse Responses of the Type II FIR Linear Phase FIR Filters ... 14

Figure 7: Unit Impulse Responses of the Type III FIR Linear Phase FIR Filters ... 15

Figure 8: Unit Impulse Responses of the Type IV FIR Linear Phase FIR Filters ... 16

Figure 9: Magnitude Responses of the Four Types of Linear Phases FIR Filter ... 17

Figure 10: Linear Phase Responses of Type I FIR Filter ... 19

Figure 11: Linear Phase IR h(n) ... 21

Figure 12: Circularly Shifted Linear Phase IR h1(n) ... 21

Figure 13: Frequency Response of h1(n) after zero padding: (a) magnitude response of h1(n), (b) magnitude response of h2(n), (c) phase response of h1(n), (d) phase response of h2(n). ... 23

Figure 14: Principle of the ZDMOSM ... 25

Figure 15: Zero Group Delay Filtering using the ZDMOSM ... 26

Figure 16: Evolution of the Ripples Amplitude ... 27

Figure 17: The use of RDMOSM to Reduce Group Delay Filtering ... 27

Figure 18: Reduced Group Delay Filtering using ERDMOSM1 ... 30

Figure 19: Reduced Group Delay Filtering using ERDMOSM2 ... 30

(12)

xii

Figure 22: Impulse Response of FIR Filter Lowpass Equiripple Filter & Actual

Impulse Response and Zero Phase h1(n) ... 35

Figure 23: Comparison Between the Linear Convolution and OSM method ... 36

Figure 24: Comparison between ZDMOSM and OSM methods ... 37

Figure 25: Comparison between RDMOSM and OSM methods ... 38

Figure 26: Comparison between ERDMOSM1 and OSM methods ... 39

Figure 27: Comparison between ERDMOSM2 and OSM methods ... 40

Figure 28: Impulse Response (blue and solid), the Equiripple Linear-phase Filters (red and dash) same Filter after Zero Padding and Circular Left Shifting ... 41

Figure 29: Comparison between OSM method and the Linear Convolution ... 42

Figure 30: Comparison between ZDMOSM and OSM methods ... 43

Figure 31: Comparison between RDMOSM and OSM methods. ... 44

Figure 32: Comparison between ERDMOSM1 and OSM methods. ... 45

(13)

1

Chapter 1

INTRODUCTION

Finite impulse response (FIR) filter is defined as the digital filter that performs mathematical operations on a piece of discrete-time signal in order to change some of its characteristics in a desired manner. Linear-phase FIR filters are preferred in digital signal processing applications because of their various advantages. These advantages include unconditional stability, absence of any phase distortion and lower filter-coefficient sensitivity.

The linear-phase FIR filter also has a main disadvantage which is the overall group delay in specific applications, where N represents the filter length. It is obvious that this amount becomes larger when high order filters are considered. Also, such a large amount of group delay leads to untolerable echoes of the transmitted signals in communication applications. There are a lot of important applications of linear phase filters, in which the high group delay caused by linear phase is important (for instance in electrocardiography where the delay could modify the QRS complex location [1], in two-way speech communication systems calling for a low round-trip delay).

(14)

2

A recent category of maximally nonsymmetrical flat FIR lowpass filter has been improved as in [3] to improve the performance of the filter design. In comparative manner, this improvement gives a constant of group delay, unlike the symmetric filter with no collapse of frequency response magnitude. A robust non-iterative algorithm has been proposed in [4] to design optimal minimum-phase digital FIR filters with arbitrary magnitude responses based on discrete Hilbert transform (DHT). When the DHT is extended to the complex case, the minimum-phase filters require less memory and less arithmetic calculations than linear-phase filters for satisfying the same constraints on delay and magnitude response. Here, by that algorithm, the magnitude spectrum of the truncated minimum-phase sequence is different from the actual magnitude spectrum. As a result, it is interesting to calculate the minimum delayed outcome response without making any change in the impulse response (IR) of the filter. It looks like unattainable according to the most common filtering algorithms, for instance overlap add method (OAM), and overlap save method (OSM) mentioned in [5] and this technique is utilized by the following convolution equation:

(1-1)

Here x(n) represents the input signal which will be filtered, h(n) represents the filter impulse response, y(n) represents filtered signal, and N is the filter length.

(15)

3

near-equiripple FIR filter having variable fractional delay [7]. On the other hand, the design of arbitrary variable fractional-delay FIR filters has been achieved which is based on the complex version of WLS [8].

(16)

4

(17)

5

Chapter 2

FIR FILTERS

2.1 Structures of FIR Systems

A polynomial system function in for a basic FIR filter is:

(z)

(2-1)

the transfer function of the FIR filter is , the impulse response is h(n), a delay of one sample time denoted by , N represents the filter length (number of coefficients) and n represents discrete time. For an input , the output is as follows:

y(n)

(2-2)

Equation (2-2) is identified as the convolution sum equation. Computation of this sum requires additions and multiplications for every n value.

2.1.1 Direct Form

The realization of equation (2-2) by using a tapped delay line method is shown in Fig. 1.

Figure 1: Direct Form Structure

(18)

6

Each output sample needs additions, multiplications, and delays. Otherwise, in the case of any similarity in the unit sample response, it is possible to reduce the multiplications number.

2.1.2 Cascade Form

For a basic FIR filter, the transfer function could be factored into first-order factors,

(z)

(2-3)

where for are the zeros of . The complex roots of happen in complex conjugated pairs if is real and these conjugated pairs can be combined to form second-order factors with real coefficients,

(z) A

(2-4)

the structure of equation (2-4) is illustrated in Figure 2.

Figure 2: An FIR Filter Implemented as a Cascade of Second-order Systems

2.1.3 Linear Phase Filters

Impulse responses of linear phase filters are either symmetric or anti-symmetric

(19)

7 (2-6)

respectively. This symmetry could be exploited to make the network structure simpler. For instance, if is symmetric, and N is even (type I filter),

(

Consequently, making the sums before multiplying by reduces the multiplications number. The out coming structure is in Fig. 3 (a). While, if N is odd and symmetric (type II filter), the resulting structure is shown in Fig. 3(b). There are similar anti-symmetric structures (type III and IV) linear phase filters.

Figure 3: Direct Form Implementations for Linear Phase Filters. (a) Type I, III (b) Type II, IV + for type I

- for type III

(20)

8

2.1.4 Frequency Sampling

A filter is parameterized after the implementation of frequency sampling structure in terms of its discrete Fourier transform (DFT) coefficients. Particularly, if is the of an FIR filter with for , then the unit sample response of the filter written as:

(2-8)

The transfer function can be written as

(2-9)

Computing the sum over gives

(2-10)

which corresponds to an FIR filter cascade with one-pole parallel network filters:

(2-11)

(21)

9 (2-12) where (2-13) (2-14)

On the other hand, when is odd, same definition results can be obtained.

Figure 4: Frequency Sampling Filter Structure

(22)

10

2.2 Linear Phase Response

Linear phase response is one of the most important properties of FIR filters. When an input signal is applied to filter, it appears at the output of the filter with modifications done in amplitude and/or phase. The extent of this modification depends on the amplitude and phase characteristics of the filter. The phase delay or group delay of the filter gives important information about how the filter makes this modification in the phase of the signal. The phase delay of the filter is defined as the amount of time delay each frequency component of the input signal suffers in going through the filter. On the other hand, the group delay is the average time delay the composite signal suffers at each frequency. Mathematically, the phase delay can be defined as the negative of the phase angle divided by frequency and the group delay is defined as the negative of the derivative of the phase with respect to frequency.

If a filter has nonlinear phase characteristics, it causes a phase distortion in the signal passing through it. Such a distortion is undesired in many applications such as music, data transmission, video, and biomedicine. Therefore, the filters having linear phase characteristics are widely used in these applications. A linear shift-invariant system has a linear phase response if it is written in the following form

(2-15)

where α can be a real number which defines the group delay,

(2-16)

A system has a generalized linear phase when the frequency response gets the form

(2-17)

(23)

11

(2-18)

The frequency response is

(2-19)

Thus, this system has generalized linear phase, with α = N / 2 and β = 0.

For a causal system with a rational transfer function to own linear phase, the impulse response have to be finite in length. An FIR filter that has a real-valued impulse response of length N + 1, has generalized linear phase if its impulse response is symmetric,

(2-20)

In this case, α = N / 2 and β 0 or π. Another sufficient condition is that h(n) be antisymmetric [12]

(2-21)

which corresponds to case through which α = N/2 and β π/2 or 3π/2.

2.3 Types of Linear Phase FIR Filters

Let us consider the special types of FIR filters where the coefficients of the transfer function

(2-22)

are supposed to be symmetric or anti-symmetric. Since the order of the polynomial in both of these two types can be either odd or even, there are four types of filters with diverse properties, which will be explained next [13].

(24)

12

In general, coefficients can be expressed in some other forms. Let us assume that the order is even. The transfer function in equation (2-22) can be expanded as:

(2-23) For type I filter with order, as shown in Fig. 5, it is noted that . Applying these relationships in the equation above, we get

(2-24)

This can also be shown as in the following form

(2-25)

The frequency response of equation (2-25) is given by

(2-26)

0 1 2

)

(25)

13

In this formula, the term is a real-valued function; however it can be negative or positive at any specific frequency, therefore while transforming from a positive value to a negative one, the angle of the phase changes by radians . The angle of the phase is a linear function of ω, and the group delay is the same as three samples. Remember that the group delay is three samples on the normalized frequency basis, but the real the group delay is seconds, where denotes the sampling period.

In general, can be expressed in some other forms

(2-27)

and now in a more compact form:

(2-28)

The whole the group delay is constant in the general case, for a type I .

(26)

14

(2-29)

and due to symmetry

(2-30) Now, if we consider symmetric coefficients with N odd, the impulse response is shown in Figure 6.

The frequency response is in the type II filter for general case can be written as

(2-31)

which demonstrates a linear phase and a constant group delay samples.

(27)

15

Type III. The coefficients are anti-symmetric , and the order

N is even. Figure 7 shows that and = 0 to preserve anti-symmetry for these samples:

(2-32)

This can also be shown as in the following form

(2-33)

Here if we place , and , we

get the frequency response in the general case as

(2-34)

and it has a linear phase and the group delay τ = N/2 samples.

(28)

16

Type IV. Coefficients are anti-symmetric [ , and the order N is

odd. As in Figure 8, in which . Its transfer function can be written as

(2-35)

The frequency response of the transfer function of the type IV linear phase filter is usually given by

(2-36)

Figure 8: Unit Impulse Responses of the Type IV FIR of Linear Phase FIR Filters

2.4 Properties of Linear Phase FIR Filters

(29)

17

a result a constant group delay. Theoretically, [14] confirmed that an FIR filter with a constant group delay is required to have symmetric or anti-symmetric coefficients. These properties are practical in designing a FIR filters and their applications. The magnitude response of standard FIR filters with linear phase have been calculated to observe some extra properties of these four filter types [13] as shown in Figure 9.

Figure 9: Magnitude Responses of the Four Types of Linear Phases FIR Filter

(30)

18

Type III filters have zero magnitude at as well as at π , thus they are appropriate for the design of bandpass filters nevertheless it is not appropriate for lowpass and bandstop filters. Whereas, type IV filters have zero magnitude at ω = 0 and a non-zero at π . They are not appropriate for the design of lowpass and bandstop filters however they can be used for bandpass and highpass filters.

(31)

19

(32)

20

Chapter 3

GROUP DELAY REDUCTION METHODS

3.1 General Overview

Fast Fourier Transform (FFT) based circular convolution is used by Overlap-Save Method (OSM) to construct equivalent results as in the linear convolution. After that, the aliasing that occurs because of the circular convolution could be eliminated only following zero padding after the last nonzero impulse response (IR) sample. The convolution length for two signals having size and is . Therefore, for an IR with size , the minimum number of added zeros is M − 1. For a considered piece period of signal with duration , unwanted samples are to be deleted. While the OSM is in use, these samples are first on the circular convolution result provided by OSM result will provide a group delay equal to odd and for N even if is a linear phase IR. Nevertheless, it is seen that Discrete Fourier Transform (DFT) of a samples series relies on its layout and the phase can be reduced for a certain layout [11]. To prove that, consider a linear phase IR of length , denoted (Figure 11). Its DFT is given by:

(33)

21

Figure 11: Linear Phase IR h(n)

Figure 12: Circularly Shifted Linear Phase IR h1(n)

with , . During the calculation of the DFT, it is

assumed that the samples series are periodic, and are positioned on a circle whose origin synchronizes with the first sample of . The sort of being , its phase is given by

(3-2)

(34)

22

(3-3)

Equation (3-3) may be written also as below

(3-4)

The relation in equation (3-4), according to the DFT characteristics, lastly can be written as follows:

(3-5)

Equation (3-5) demonstrates that the phase of compared to that of , is given by

(3-6)

(35)

23

Figure 13: Frequency Response of h1(n) after zero padding: (a) magnitude response

of h1(n), (b) magnitude response of h2(n), (c) phase response of h1(n), (d) phase

response of h2(n).

3.2 Modified Overlap and Save Method (MOSM)

In this section, a new algorithm is presented for filtering with the use of the FFT based circular convolution and the OSM. The idea here is to make it easier to realize the zero group delay in the filtering. Here, no zero padding occurs after the zero phase IR which means that it is possible to maintain its spectral properties [16]. Let be the circular convolution result of and , its DFT will be written as

(3-7)

(36)

24

(3-8)

This formula demonstrates that the result obtained with the zero phase IR is circularly shifted of samples to the left like . As a result, samples of the N − 1 to be deleted should be suppressed by each of the two extremities of the circular convolution result. Next, it seems that after the first samples of are deleted by the they will be unsuitable to the use of the zero phase filters. Thus, we name the whose idea is to delete samples on both sides of the circular convolution result extremities. It can be noticed that this convolution result rotation does not modify the group delay produced by the filter, thus the offers the same results like the other conventional filtering techniques. In order to reduce the group delay, the redefinition of the samples to be retained is required.

3.3 Zero Delay MOSM (ZDMOSM)

(37)

25

(38)

26

Figure 15: Zero Group Delay Filtering using the ZDMOSM

3.4

Reduced Delay MOSM (RDMOSM)

Here method cannot be applied since it would need altering the acquisition time during the processing, which is not easy. Next, when starting filtering as in the case of the OSM, zero samples are taken into consideration. In general, the deleted samples present some ripples. These ripples, when emerging on the filtered signal can create an awkward effect (for example in audio filtering). But, their amplitude reduces slowly from left to right as seen in Fig. 16. In the real time processing, the decrease of the group delay might be considered by deleting, following circular convolution with the zero phase filter, rather than samples each sides as explained in the , however on the left end and only on the right end of the result. This method maintains at the right end of the samples which usually should have been deleted, according to the OSM. Whereas, of the samples carrying the group delay is deleted, this reduces the group delay into a half. This method is named as the reduced delay

output sequence in ZDMOSM

(39)

27

MOSM (RDMOSM). Fig. 17 shows a filtered signal example (in real time) in which the groups delay was reduced [11].

Figure 16: Evolution of the Ripples Amplitude

Figure 17: The use of RDMOSM to Reduce Group Delay Filtering

n

output sequence in RDMOSM

(40)

28

3.5 Enhanced RDMOSM (ERDMOSM)

In this section, the new proposed filtering algorithm via based circular convolution and the OSM will be examined.

The main aim of this method is to realize zero group delay filtering. In this method, there exists no zero padding to zero phase IR. Let us consider as the result of circular convolution of Now, the of can be written as follows

(3-9)

According to the OSM, if the size of where N is the size of after that leftmost samples of have to be deleted. By evaluating the circular convolution of and , we are able to show that:

(3-10)

Taking inverse DFT gives

(3-11)

(41)

29

convolution result. The convolution result rotation does not change the group delay generated by the filter. Thus, the MOSM offers the same result as obtained from the or other usual filtering method. Afterward, it is noted that a reduction in the group delay can be obtained by re-defining the samples to be kept from last rotated result of the circular convolution.

In case of , a reduction in the group delay can reach half. This technique has been extended to one where reduction in the group delay can be obtained using a factor more than half. In performing based circular convolution the zero samples should be considered to be filtered as in the case of the . Following circular convolution of with , and of the samples are deleted from the left end side. Similarly, and of the samples are deleted from the right end side of the result. These are named as enhanced RDMOSM, and , respectively. This process preserves at the left end side samples in ERDMOSM1 case and samples in the ERDMOSM2 case, which would usually be deleted according to the OSM. Whereas, or samples carrying the group delay are deleted, correspondingly, for the or cases. These lead to the reduction of the group delay by a factor given by

(3-12)

(42)

30

(3-13)

Figures 18 and 19 show an example of a filtered signal (in real time) in which the reduction in the group delay happened by a factor 3/5 and 4/5, correspondingly, in ERDMOSM1 and ERDMOSM2 cases.

Figure 18: Reduced Group Delay Filtering using ERDMOSM1

Figure 19: Reduced Group Delay Filtering using ERDMOSM2

output sequence in ERDMOSM1

output sequence in ERDMOSM2 output sequence in OSM

(43)

31

It is observed that for a filter of order , the result of the output signal begins from sample in the OSM case (see Fig. 17) or linear convolution (the group delay is

samples), where in the RDMOSM case (see Fig. 17), the output sequence begins from the sample (i.e., the group delay is

samples) and in , the output sequence begins from the sample meaning

that there is no group delay. On the opposing side, for the same input signal, the output sequence of ZDMOSM varies a lot from the filtered output which shows a deviation from linear convolution result. In the present ERDMOSM1 case (see Fig. 18), the filtered output sequence begins from the sample (i.e., the group delay is

samples) and for case (see Fig 19), the filtered output sequence begins after 6 samples, from sample (i.e, the group delay is samples).

(44)

32

Figure 20: Algorithm for Figure 21: Algorithm for ERDMOSM1 ERDMOSM2

In our present work, it has been observed that if the movement in the number of samples is increased from the left side of the circular convolution result, there will be

Input x(n) X=FFT(x) Append N-1 Zeros to x L=length(x) H=FFT(h) y(n)=IFFT(H*X) Remove

sample from left

Output y(n)

END START

Remove samples from right

Input x(n) X=FFT(x) Append N-1 Zeros to x L=length(x) H=FFT(h) y(n)=IFFT(H*X) Remove

sample from left

Output y(n)

END START

(45)

33

a reduction in the group delay that increases with the increase of the movement of the number of samples at the cost of increased ripple amplitude. If samples are deleted from the left of the circular convolution result side, the group delay will be totally suppressed since no sample carrying the group delay will remain, which will increase the deviation of the resulting filtered sequence from the OSM result. Thus, the result will be invalid. Therefore, samples have to be deleted from each sides of the circular convolution result to attain better performance.

The reason of removing numbers of samples from the right and numbers of samples from the left can be explained as follows. Three important conditions should be followed in order to re-define the samples to be retained after circular convolution:

 The overall number of samples to be deleted from left and right side of final circular convolution result of length have to be as the original input length is M.

 More samples are to be deleted from left instead of right end of the circular convolution result since the reduction factor of the group delay depends on how many samples are deleted from the left.

(46)

34

Chapter 4

COMPUTER SIMULATIONS

In this chapter, two cases will be presented to show the effectiveness of group delay reduction to the recently suggested algorithms defined in chapter 3. In order to be able to compare these filtering techniques with the traditional , the results with reduced delay are every time compared to those obtained with the .

where (n) and represent the filtered output OSM and the filtered output

(47)

35

4.1 Simulation Study 1: Sine Wave

Figure 22: Impulse Response of FIR Filter Lowpass Equiripple Filter & Actual Impulse Response and Zero Phase h1(n)

(48)

36

Figure 23: Comparison Between the Linear Convolution and OSM method

Fig. 23 shows the comparison between linear convolution and OSM method. Since two methods are equivalent, the OSM method can be considered as the reference in the other parts of this discussion. It has been observed that for a filter length of 60 coefficients, the resultant output signal starts from sample in the case of OSM

(or linear convolution) which shows that the group delay is (N-1)/2=30 samples.

31st sample

(49)

37

Figure 24: Comparison between ZDMOSM and OSM methods

Fig. 24 shows the output of the filter obtained by OSM and MOSM methods for the off-line processing case. The input signal, , the output of the filter obtained by the ZDMOSM, the output of the filter obtained by the OSM are illustrated, from top to bottom, in Fig. 24. It is clear the output obtained by ZDMOSM is different from that of obtained by the OSM.

(50)

38

Figure 25: Comparison between RDMOSM and OSM methods

Fig. 25 shows the output of the filter obtained by OSM and RDMOSM methods for the same input shown in Fig. 24. If the output signals obtained by ZDMOSM in Fig. 24 and by RDMOSM in Fig. 25 are compared, one can easily see that the group delay has been reduced by a factor of 1/2.

(51)

39

Figure 26: Comparison between ERDMOSM1 and OSM methods

Fig. 26 and 27 show the results obtained from the OSM and enhanced-RDMOSM (ERDMOSM1 and ERDMOSM2). In Fig. 26, the results obtained by OSM and ERDMOSM1 are compared. Similarly, in Fig. 27, the results obtained from the OSM and ERDMOSM2 are compared. It can be clearly seen from these figures that ERDMOSM1 and ERDMOSM2 methods result in better delay reduction. The delay reductions obtained by the ERDMOSM 1 and ERDMOSM2 are approximately 3/5 and 4/5, respectively.

The performances of the group delay reduction methods are compared and the results are reported in Table 1. Except ZDMOSM, it is obvious that ERDMOSM1 and ERDMOSM2 performs better than the other methods.

(52)

40

Figure 27: Comparison between ERDMOSM2 and OSM methods

Table 1: Comparison of Group Delay Reduction Methods

Methods Group Delay (samples)

Linear Convolution 30 OSM 30 ZDMOSM 0 RDMOSM 15 ERDMOSM1 12 ERDMOSM2 6

4.2 Simulation Study 2: Random Wave

Another FIR, equiripple filter having passband frequency of 5 kHz, stopband frequency of 6 kHz, sampling frequency of 45 kHz, maximum passband ripple of 0.1 dB and minimum stopband attenuation of 60.1 dB has been considered.

(53)

41

Figure 28: Impulse Response (blue and solid), the Equiripple Linear-phase Filters (red and dash) same Filter after Zero Padding and Circular Left Shifting

(54)

42

Figure 29: Comparison between OSM method and the Linear Convolution

(55)

43

Figure 30: Comparison between ZDMOSM and OSM methods

(56)

44

Figure 31: Comparison between RDMOSM and OSM methods.

(57)

45

Figure 32: Comparison between ERDMOSM1 and OSM methods.

(58)

46

(59)

47

Chapter 5

CONCLUSION

(60)

48

Continually of this work, in future the following points can be taken in consideration: i) Reduction of group delay deviation in pass band by using higher order filters, thereby giving rise to more selective filters.

ii) Generalization of the approach to all linear-phase IIR filters to obtain an effective real-time audio application filter.

iii) Application of the proposed approach to filter banks and modification of the method to reduce the overall group delay.

(61)

49

REFERENCES

[1] E. J. Berbari and P. Lander, “Use of highpass filtering to detect late potentials in signal average ECG,” J. Electrocardiol, no. 225, p. 7–12, 1989.

[2] Y. Lin, M. R. Bai and J. Lai, “Reduction of electronic delay in active noise control systems-a multirate signal processing approach,” Electronic 111, pp. 916-924, 2002.

[3] C. S. Barrus and I. W. Selesnick, “Maximally flat lowpass fir filters with reduced delay,” IEEE Transactions on Circuits and Systems, no. 45, p. 53–68, 1998.

[4] B. L. Evans, N. Damera and S. R. McCaslin, “Design of optimal minimum-phase digital fir filters using discrete Hilbert transforms,” IEEE Transactions on Signal Processing, no. 48, p. 1491–1495, 2000.

[5] R. W. Schafer and A. V. Oppenheim, Discrete-Time Signal Processing, Pearson Education, 2006.

[6] N. Aikawa, A. Ogata and M. Sato, “A design method of low delay fir bandpass filters,” IEEE International Symposium on Circuits and Systems, pp. 28-31, 2000.

(62)

50

[8] S. C. Pei and J. J. Shyu, “A generalized approach to the design of variable fractional-delay fir digital filters,” Signal Processing, no. 88, p. 1428–1435, 2008.

[9] G. Apaydin, “Realization of reduced-delay finite impulse response filters for audio applications,” Digital Signal Processing, 2009.

[10] J. D. Kene, “Extended overlap-save and overlap-add convolution algorithms for real signal,” in IET-UK International Conference on Information and

Communication Technology in Electrical Sciences, 2007.

[11] M. Kom, J. S. Fouda, A. Tiedeu and S. Domngang, “Toward a group delay reduction in digital filtering,” Digital Signal Processing, no. 19, p. 22–32, 2009.

[12] H. H. Monson , Schaum's Outline of Theory and Problems of Digital Signal Processing, 1999, pp. 189-190, 289-291.

[13] B. A. Shenoi, Introduction to digital signal processing and filter design, 2006, pp. 251-258.

[14] L. R. Rabiner and B. Gold, Theory and Application of Digital Signal Processing, Prentice-Hall, 1975.

[15] J. F. Kaiser and S. K. Mitra, Handbook for Digital Signal Processing, New York: Wiley, 1993.

(63)

51

and Electro acoustics, no. 21, p. 506–526, 1973.

(64)

52

(65)

53

Appendix A1: Simulation of Sine Wave

clear all; clc;

wp=0.6*pi; ws=0.8*pi; tr_width=abs(ws-wp);

%Use Hanning window,

M=63;

wc=0.5*(ws+wp); %Ideal LPF cutoff freq.

%========Compute Ideal filter response==============

alpha=(M-1)/2; n=1:M;

MM=n-alpha+eps; %add smallest number to avoid divide by zero

hd=sin(wc*MM) ./ (pi*MM); %design LPF

%===================================================

figure(1);

h=hd.*hanning(M)';

subplot(3,1,1); stem(1:61,hd(1:61)); title('Ideal Impulse Respose'); axis([0 M -inf inf]), xlabel('n');ylabel('hd(n)');

subplot(3,1,2); stem(1:61,h(1:61)); title('Actual Impulse

Response');

axis([0 M -inf inf]),

xlabel('n'); ylabel('h(n)');

h1=circshift(h',(length(h)-1)/2)';

subplot(3,1,3); stem(1:61,h1(1:61)); title('Zero Phase h1'); axis([0 M -inf inf]), xlabel('n'); ylabel('h1(n)');

%=========Comparison between linear convolution and OSM method=========

figure(2);

x=sin(2*pi*0.06*(1:200));%the signal to be filtered

subplot(3,1,1); plot(x); title('Input signal');grid; axis([0 length(x) -3 3]), xlabel('n'); ylabel('x(n)'); h2=[h zeros(1,length(x)-1)];

x2=[x zeros(1,length(h)-1)]; y=ifft(fft(h2).*fft(x2)); y=y(1:length(x));

subplot(3,1,2); plot(y); title('output sequence in OSM');grid; axis([0 length(x) -3 3]), xlabel('n'); ylabel('y(n)');

y1=filter(h,1,x);

subplot(3,1,3); plot(y); title('output sequence in linear

convolution');grid;

(66)

54

%=============Comparison between ZDMOSM and OSM method=========

figure(3);

subplot(3,1,1); plot(x); title('Input signal');grid; axis([0 length(x) -3 3]), xlabel('n'); ylabel('x(n)'); h2=[h zeros(1,length(x)-1)];

x2=[x zeros(1,length(h)-1)]; y=ifft(fft(h2).*fft(x2));

y=y(round(length(h)/2):length(x)+round(length(h)/2)-1);

subplot(3,1,2); plot(y); title('output sequence in ZDMOSM');grid; axis([0 length(x) -3 3]), xlabel('n'); ylabel('y(n)');

y1=filter(h,1,x);

subplot(3,1,3); plot(y1); title('output sequence in OSM');grid; axis([0 length(x) -3 3]), xlabel('n'); ylabel('y1(n)');

%=============Comparison between RDMOSM and OSM method=========

figure(4);

subplot(3,1,1); plot(x); title('Input signal');grid; axis([0 length(x) -3 3]), xlabel('n'); ylabel('x(n)'); h2=[h zeros(1,length(x)-1)];

x2=[x zeros(1,length(h)-1)]; y=ifft(fft(h2).*fft(x2));

y=y(round(length(h)/4):length(x)+round(length(h)/4)-1);

subplot(3,1,2); plot(y); title('output sequence in RDMOSM');grid; axis([0 length(x) -3 3]), xlabel('n'); ylabel('y(n)');

y1=filter(h,1,x);

subplot(3,1,3); plot(y1); title('output sequence in OSM');grid; axis([0 length(x) -3 3]), xlabel('n'); ylabel('y1(n)');

%=============Comparison between ERDMOSM1 and OSM method=========

figure(5);

subplot(3,1,1); plot(x); title('Input signal');grid; axis([0 length(x) -3 3]), xlabel('n'); ylabel('x(n)'); h2=[h zeros(1,length(x)-1)];

x2=[x zeros(1,length(h)-1)]; y=ifft(fft(h2).*fft(x2));

y=y(round((3/5)*(length(h)/2)):length(x)+round((3/5)*(length(h)/2))-1);

subplot(3,1,2); plot(y); title('output sequence in ERDMOSM1');grid; axis([0 length(x) -3 3]), xlabel('n'); ylabel('y(n)');

y1=filter(h,1,x);

(67)

55

%=============Comparison between ERDMOSM2 and OSM method=========

figure(6);

subplot(3,1,1); plot(x); title('Input signal');grid; axis([0 length(x) -3 3]), xlabel('n'); ylabel('x(n)'); h2=[h zeros(1,length(x)-1)];

x2=[x zeros(1,length(h)-1)]; y=ifft(fft(h2).*fft(x2));

y=y(round((4/5)*(length(h)/2)):length(x)+round((4/5)*(length(h)/2))-1);

subplot(3,1,2); plot(y); title('output sequence in ERDMOSM2');grid; axis([0 length(x) -3 3]), xlabel('n'); ylabel('y(n)');

y1=filter(h,1,x);

subplot(3,1,3); plot(y1); title('output sequence in OSM');grid; axis([0 length(x) -3 3]), xlabel('n'); ylabel('y1(n)');

(68)

56

Appendix A2: Simulation of Random Wave

clc; clear all; H = fdesign.lowpass('Fp,Fst,Ap,Ast',5000,6000,0.1,60.1,45000); hd = design(H,'equiripple'); hd=hd.Numerator; l=300; h=[hd zeros(1,l-length(hd)-1)]; stem(hd); hold on h1=circshift(h',-round(length(hd)/2)+1)'; stem(h1,'r'); title('Impulse Response');grid; xlabel('Samples'); ylabel('Amplitude');

leg=legend('orignal filter','Modified filter'); h=hd;

% % %=====Comparison between linear convolution and OSM method========= figure(2); l=300; x=rem((0.5*(sin(2*pi*0.17*(1:200))+rand(1,200)))-0.3,1); h=[hd zeros(1,l-length(hd)-1)]; h1=circshift(h',-round(length(hd)/2)+1)'; h=hd;

subplot(3,1,1); plot(x); title('Input signal');grid; axis([0 length(x) -1 1]), xlabel('n'); ylabel('x(n)'); h2=[h zeros(1,l-length(h)-1)];

x2=[x zeros(1,l-length(x)-1)]; y=ifft(fft(h2).*fft(x2)); y=y(1:length(x));

subplot(3,1,2); plot(y); title('output sequence in OSM');grid; axis([0 length(x) -0.3 0.3]), xlabel('n'); ylabel('y(n)'); y1=filter(h,1,x);

subplot(3,1,3); plot(y1); title('output sequence in linear

convolution');grid;

axis([0 length(x) -0.3 0.3]); xlabel('n'); ylabel('y1(n)');

% % %=============Comparison between ZDMOSM and OSM method=========

figure(3);

subplot(3,1,1); plot(x); title('Input signal');grid; axis([0 length(x) -1 1]), xlabel('n'); ylabel('x(n)'); h2=[h zeros(1,length(x)-1)];

x2=[x zeros(1,length(h)-1)]; y=ifft(fft(h2).*fft(x2));

y=y(round(length(h)/2):length(x)+round(length(h)/2)-1);

subplot(3,1,2); plot(y); title('output sequence in ZDMOSM');grid; axis([0 length(x) -0.3 0.3]), xlabel('n'); ylabel('y(n)');

y1=filter(h,1,x);

subplot(3,1,3); plot(y1); title('output sequence in OSM');grid; axis([0 length(x) -0.3 0.3]);

(69)

57

% % %=============Comparison between RDMOSM and OSM method=========

figure(4);

subplot(3,1,1); plot(x); title('Input signal');grid; axis([0 length(x) -1 1]), xlabel('n'); ylabel('x(n)'); h2=[h zeros(1,length(x)-1)];

x2=[x zeros(1,length(h)-1)]; y=ifft(fft(h2).*fft(x2));

y=y(round(length(h)/4):length(x)+round(length(h)/4)-1);

subplot(3,1,2); plot(y); title('output sequence in RDMOSM');grid; axis([0 length(x) -0.3 0.3]), xlabel('n'); ylabel('y(n)');

y1=filter(h,1,x);

subplot(3,1,3); plot(y1); title('output sequence in OSM');grid; axis([0 length(x) -0.3 0.3]), xlabel('n'); ylabel('y1(n)');

% % %=============Comparison between ERDMOSM1 and OSM method=========

figure(5);

subplot(3,1,1); plot(x); title('Input signal');grid; axis([0 length(x) -1 1]), xlabel('n'); ylabel('x(n)'); h2=[h zeros(1,length(x)-1)];

x2=[x zeros(1,length(h)-1)]; y=ifft(fft(h2).*fft(x2));

y=y(round((3/5)*(length(h)/2)):length(x)+round((3/5)*(length(h)/2))-1);

subplot(3,1,2); plot(y); title('output sequence in ERDMOSM1');grid; axis([0 length(x) -0.3 0.3]), xlabel('n'); ylabel('y(n)');

y1=filter(h,1,x);

subplot(3,1,3); plot(y1); title('output sequence in OSM');grid; axis([0 length(x) -0.3 0.3]), xlabel('n'); ylabel('y1(n)');

% % %=============Comparison between ERDMOSM2 and OSM method=========

figure(6);

subplot(3,1,1); plot(x); title('Input signal');grid; axis([0 length(x) -1 1]), xlabel('n'); ylabel('x(n)'); h2=[h zeros(1,length(x)-1)];

x2=[x zeros(1,length(h)-1)]; y=ifft(fft(h2).*fft(x2));

y=y(round((4/5)*(length(h)/2)):length(x)+round((4/5)*(length(h)/2))-1);

subplot(3,1,2); plot(y); title('output sequence in ERDMOSM2');grid; axis([0 length(x) -0.3 0.3]), xlabel('n'); ylabel('y(n)');

y1=filter(h,1,x);

subplot(3,1,3); plot(y1); title('output sequence in OSM');grid; axis([0 length(x) -0.3 0.3]), xlabel('n'); ylabel('y1(n)');

Referanslar

Benzer Belgeler

(2) homogen sisteminin s¬f¬r çözümü düzgün asimptotik kararl¬ise, bu durumda lineer olmayan (1) sisteminin s¬f¬r çözümü

n  The wall of the oocysts taken by mouth are broken up in the small intestine and free sporozoites.. adhere to microvillus of epithelial cells in

Mutfak, halâ ve banyo duvarla- rına bir buçuk metre yükseklikte yağlıboya sürülmüştür. Dış merdivenler mozayikten ve iç merdivenleri karaağaçtan geç- me ve cilâlı

The shifted 1/N expansion method has been extended to solve the Klein-Gordon equation with both scalar and vector potentials.. The calculations are carried out to the

The camera is connected to a computer through the USB port, and a program is used control the mouse movement as the eye ball is moved.. The developed system has

fonksiyonlar için k¬smi integrasyon yöntemi integrali daha küçük dereceden bir ifadenin integraline dönü¸ stürebilir... Böylece, R (x) rasyonel fonksiyonu daha basit

C) Verilen kelimelerle aşağıdaki boşlukları doldurunuz.. I can look after

Neps sayrna yontemlerini zaman gereksinimleri .iq- sindan kargilagt~rmak iizere ayni ornek a$rll$ kullanl- larak yapllan bir denemede en hizli olqum yontenlinin AFIS-N oldu&