Skip to content Skip to navigation Skip to collection information

OpenStax_CNX

You are here: Home » Content » ECE 454 and ECE 554 Supplemental reading » Efficiency of Frequency-Domain Filtering

Navigation

Table of Contents

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

This content is ...

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • OrangeGrove display tagshide tags

    This module is included inLens: Florida Orange Grove Textbooks
    By: Florida Orange GroveAs a part of collection: "Fundamentals of Electrical Engineering I"

    Click the "OrangeGrove" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

  • Rice DSS - Braille display tagshide tags

    This module is included inLens: Rice University Disability Support Services's Lens
    By: Rice University Disability Support ServicesAs a part of collection: "Fundamentals of Electrical Engineering I"

    Comments:

    "Electrical Engineering Digital Processing Systems in Braille."

    Click the "Rice DSS - Braille" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

  • Rice Digital Scholarship display tagshide tags

    This module is included in aLens by: Digital Scholarship at Rice UniversityAs a part of collections: "Discrete-Time Fourier Analysis", "Fundamentals of Electrical Engineering I"

    Click the "Rice Digital Scholarship" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

  • Bookshare

    This module is included inLens: Bookshare's Lens
    By: Bookshare - A Benetech InitiativeAs a part of collection: "Fundamentals of Electrical Engineering I"

    Comments:

    "Accessible versions of this collection are available at Bookshare. DAISY and BRF provided."

    Click the "Bookshare" link to see all content affiliated with them.

  • Featured Content display tagshide tags

    This module is included inLens: Connexions Featured Content
    By: ConnexionsAs a part of collection: "Fundamentals of Electrical Engineering I"

    Comments:

    "The course focuses on the creation, manipulation, transmission, and reception of information by electronic means. It covers elementary signal theory, time- and frequency-domain analysis, the […]"

    Click the "Featured Content" link to see all content affiliated with them.

    Click the tag icon tag icon to display tags associated with this content.

Also in these lenses

  • Lens for Engineering

    This module is included inLens: Lens for Engineering
    By: Sidney Burrus

    Click the "Lens for Engineering" link to see all content selected in this lens.

Recently Viewed

This feature requires Javascript to be enabled.

Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.
 

Efficiency of Frequency-Domain Filtering

Module by: Don Johnson. E-mail the author

Summary: Compares the efficiency of frequency domain and time domain filtering.

To determine for what signal and filter durations a time- or frequency-domain implementation would be the most efficient, we need only count the computations required by each. For the time-domain, difference-equation approach, we need ( N x +q)(2q+1) N x q 2 q 1 . The frequency-domain approach requires three Fourier transforms, each requiring 5K2log 2 K 5 K 2 2 K computations for a length-KK FFT, and the multiplication of two spectra ( 6K 6 K computations). The output-signal-duration-determined length must be at least N x +q N x q . Thus, we must compare ( N x+q)(2q+1)6( N x +q)+5( N x +q)log 2 ( N x +q) N x q 2 q 1 6 N x q 5 N x q 2 N x q Exact analytic evaluation of this comparison is quite difficult (we have a transcendental equation to solve). Insight into this comparison is best obtained by dividing by N x+q N x q . 2q+16+5log2 ( N x +q) 2 q 1 6 5 2 N x q With this manipulation, we are evaluating the number of computations per sample. For any given value of the filter's order qq, the right side, the number of frequency-domain computations, will exceed the left if the signal's duration is long enough. However, for filter durations greater than about 10, as long as the input is at least 10 samples, the frequency-domain approach is faster so long as the FFT's power-of-two constraint is advantageous.

The frequency-domain approach is not yet viable; what will we do when the input signal is infinitely long? The difference equation scenario fits perfectly with the envisioned digital filtering structure, but so far we have required the input to have limited duration (so that we could calculate its Fourier transform). The solution to this problem is quite simple: Section the input into frames, filter each, and add the results together. To section a signal means expressing it as a linear combination of length- N x N x non-overlapping "chunks." Because the filter is linear, filtering a sum of terms is equivalent to summing the results of filtering each term.

(xn= m =xnm N x )(yn= m =ynm N x ) x n m x n m N x y n m y n m N x
(1)
As illustrated in Figure 1, note that each filtered section has a duration longer than the input. Consequently, we must literally add the filtered sections together, not just butt them together.

Figure 1: The noisy input signal is sectioned into length-48 frames, each of which is filtered using frequency-domain techniques. Each filtered section is added to other outputs that overlap to create the signal equivalent to having filtered the entire input. The sinusoidal component of the signal is shown as the red dashed line.
Figure 1 (sig25.png)

Computational considerations reveal a substantial advantage for a frequency-domain implementation over a time-domain one. The number of computations for a time-domain implementation essentially remains constant whether we section the input or not. Thus, the number of computations for each output is 2q+1 2 q 1 . In the frequency-domain approach, computation counting changes because we need only compute the filter's frequency response Hk H k once, which amounts to a fixed overhead. We need only compute two DFTs and multiply them to filter a section. Letting N x N x denote a section's length, the number of computations for a section amounts to ( N x +q)log 2 ( N x +q)+6( N x +q) N x q 2 N x q 6 N x q . In addition, we must add the filtered outputs together; the number of terms to add corresponds to the excess duration of the output compared with the input (qq). The frequency-domain approach thus requires log 2 ( N x +q)+6+q N x +q 2 N x q 6 q N x q computations per output value. For even modest filter orders, the frequency-domain approach is much faster.

Exercise 1

Show that as the section length increases, the frequency domain approach becomes increasingly more efficient.

Solution

Let NN denote the input's total duration. The time-domain implementation requires a total of N(2q+1) N 2 q 1 computations, or 2q+1 2 q 1 computations per input value. In the frequency domain, we split the input into N N x N N x sections, each of which requires log 2 ( N x +q)+6+q N x +q 2 N x q 6 q N x q per input in the section. Because we divide again by N x N x to find the number of computations per input value in the entire input, this quantity decreases as N x N x increases. For the time-domain implementation, it stays constant.

Note that the choice of section duration is arbitrary. Once the filter is chosen, we should section so that the required FFT length is precisely a power of two: Choose N x N x so that N x +q=2L N x q 2 L .

Implementing the digital filter shown in the A/D block diagram with a frequency-domain implementation requires some additional signal management not required by time-domain implementations. Conceptually, a real-time, time-domain filter could accept each sample as it becomes available, calculate the difference equation, and produce the output value, all in less than the sampling interval Ts Ts. Frequency-domain approaches don't operate on a sample-by-sample basis; instead, they operate on sections. They filter in real time by producing N x N x outputs for the same number of inputs faster than N x T s N x T s . Because they generally take longer to produce an output section than the sampling interval duration, we must filter one section while accepting into memory the next section to be filtered. In programming, the operation of building up sections while computing on previous ones is known as buffering. Buffering can also be used in time-domain filters as well but isn't required.

Example 1

We want to lowpass filter a signal that contains a sinusoid and a significant amount of noise. The example shown in Figure 1 shows a portion of the noisy signal's waveform. If it weren't for the overlaid sinusoid, discerning the sine wave in the signal is virtually impossible. One of the primary applications of linear filters is noise removal: preserve the signal by matching filter's passband with the signal's spectrum and greatly reduce all other frequency components that may be present in the noisy signal.

A smart Rice engineer has selected a FIR filter having a unit-sample response corresponding a period-17 sinusoid: hn=117(1cos2πn17) h n 117 1 2 n 17 , n=016 n 0 16 , which makes q=16 q 16 . Its frequency response (determined by computing the discrete Fourier transform) is shown in Figure 2. To apply, we can select the length of each section so that the frequency-domain filtering approach is maximally efficient: Choose the section length N x N x so that N x +q N x q is a power of two. To use a length-64 FFT, each section must be 48 samples long. Filtering with the difference equation would require 33 computations per output while the frequency domain requires a little over 16; this frequency-domain implementation is over twice as fast! Figure 1 shows how frequency-domain filtering works.

Figure 2: The figure shows the unit-sample response of a length-17 Hanning filter on the left and the frequency response on the right. This filter functions as a lowpass filter having a cutoff frequency of about 0.1.
Figure 2 (sig24.png)

We note that the noise has been dramatically reduced, with a sinusoid now clearly visible in the filtered output. Some residual noise remains because noise components within the filter's passband appear in the output as well as the signal.

Exercise 2

Note that when compared to the input signal's sinusoidal component, the output's sinusoidal component seems to be delayed. What is the source of this delay? Can it be removed?

Solution

The delay is not computational delay here--the plot shows the first output value is aligned with the filter's first input--although in real systems this is an important consideration. Rather, the delay is due to the filter's phase shift: A phase-shifted sinusoid is equivalent to a time-delayed one: cos2πfnφ=cos2πf(nφ2πf) 2 f n φ 2 f n φ 2 f . All filters have phase shifts. This delay could be removed if the filter introduced no phase shift. Such filters do not exist in analog form, but digital ones can be programmed, but not in real time. Doing so would require the output to emerge before the input arrives!

Collection Navigation

Content actions

Download:

Collection as:

EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Module as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Add:

Collection to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks

Module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks