• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Advertise
  • Subscribe

Test & Measurement Tips

Oscilloscopes, electronics engineering industry news, how-to EE articles and electronics resources

  • Oscilloscopes
    • Analog Oscilloscope
    • Digital Oscilloscope
    • Handheld Oscilloscope
    • Mixed-signal Oscilloscope
    • PC-based Oscilloscopes – PCO
  • Design
  • Calibration
  • Meters & Testers
  • Test Equipment
  • Learn
    • eBooks/Tech Tips
    • FAQs
    • EE Training Days
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Video
    • EE Videos
    • Teardown Videos
  • Resources
    • Design Guide Library
    • Digital Issues
    • Engineering Diversity & Inclusion
    • Leap Awards
    • White Papers
  • Subscribe
You are here: Home / Featured / How to use convolution to implement filters: part 3

How to use convolution to implement filters: part 3

March 12, 2025 By Rick Nelson Leave a Comment

A windowed sinc filter outperforms a moving-average filter in the frequency domain.

In part 2 of this series, we described a type of convolution filter called the moving-average filter, and we demonstrated that it is effective at removing Gaussian white noise in the time domain but performs poorly in the frequency domain.

Q: Do all convolution filters perform poorly in the frequency domain?
A: No. In fact, the windowed sinc convolution filter can perform quite well in the frequency domain. To understand how that filter works, consider an ideal low-pass filter, which would pass all frequencies below a cutoff frequency and reject all higher frequencies. This characteristic is represented in the frequency domain in Figure 1, where fC equals the cutoff frequency and where the response is mirrored in the left-half plane. If we want to implement a low-pass filter by convolving an input signal with a filter’s impulse response h(t), called the filter kernel, we need to represent the Figure 1 function of frequency X(f) in the time domain.

Figure 1. The ideal filter X(f) in the frequency domain has a gain of 1 and a cutoff frequency fC.

Q: How do we do that?
A:
We can use the inverse Fourier transform:

This is a simple integral since X(f) is 1 between — and zero everywhere else. Keeping in mind Euler’s formula (ejq = cosq + jsinq ) and remembering from introductory calculus that the indefinite integral of ecxdx is (1/C)ecx plus a constant, we can evaluate Eq. 1 analytically (reference [1] shows more of the algebra):

This result is in the form of the sine cardinal function, abbreviated as sinc, and we call a convolution filter that uses this function a sinc filter. Figure 2 shows one-second-long sinc-function segments of two filters with 5 and 5.5 Hz cutoff frequencies.

filter
Figure 2. These segments of sinc functions represent 256 samples of low-pass filters with 5-Hz and 5.5-Hz cutoff frequencies.

Q: You mentioned earlier the windowed sinc filter. Where does the window fit in?
A: Good question. Note that we cannot implement the perfect filter of Figure 1 on a computer, so we must make some compromises. First, we need to sample the waveform, and for the examples presented here, I am using a sample size of N = 256 mapped onto a time period of 1 s. As Eq. 2 and Figure 2 indicate, the sinc function is continuous (with the noted adjustment in Eq. 2 at t = 0). It has nonzero values that extend to plus and minus infinity, so our second compromise is that we must truncate it at some point—in the Figure 2 case, at 256 samples extending from -0.5 s to 0.5 s. Note also in Figure 2 that the sinc waveforms are not guaranteed to reach zero at each segment end, so we must apply a window function to force these endpoints closer to zero to avoid errors.

Q: A window function, like the Hamming window, which we discussed in an earlier series, right?
A: Yes, the Hamming window is one possibility. Another is the Blackman window. Reference [2] discusses the tradeoffs between the two. For this example, we will reuse the Hamming window. We will first translate our sinc function by N/2 samples, or 0.5 s, to the right to conveniently apply it. Figure 3 shows the Hamming in orange, our translated original sinc function in blue, and the product of the Hamming window and the translated sinc function in red. Note that the windowing does force the red trace to approach zero at each end of the sinc-function segment.

filter
Figure 3. Multiplying our sinc function (blue) by the Hamming window (orange) gives us a new function whose value approximates 0 at each end of the segment.

We are now ready to apply our windowed sinc filter to an arbitrary input waveform. We’ll look at how to do that using a spreadsheet next time.

References

[1] What Is a Sinc Filter? VOCAL Technologies
[2] Windowed-Sinc Filters, Analog Devices

Related EE World content

Basics of math functions on oscilloscopes
Why does the Fourier transform provide apparently inaccurate results, and what can I do about it? part 3
Understanding bandwidth concepts
Practical Filter Design Challenges and Considerations for Precision ADCs
What is phase noise, and how can I measure it? part 1
What is jitter and what can I do about it (part 1 of 2)?

You may also like:


  • How to use convolution to implement filters: part 2

  • How to use convolution to implement filters: part 1

  • How to calculate and apply the inverse discrete Fourier transform:…

  • Should I use a spectrum, signal, or vector network analyzer?…

Filed Under: FAQ, Featured

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Featured Contributions

Why engineers need IC ESD and TLP data

Verify, test, and troubleshoot 5G Wi-Fi FWA gateways

How to build and manage a top-notch test team

How to use remote sensing for DC programmable power supplies

The factors of accurate measurements

More Featured Contributions

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE TRAINING CENTER

EE Learning Center

EE ENGINEERING TRAINING DAYS

engineering
“test
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.
“bills

RSS Current EDABoard.com discussions

  • ISL8117 buck converter blowing up
  • need of carrier supression when locking to cavity resonator
  • Wireless microphone reviews
  • audio transformers impedance
  • Help Creating .lib File for SCR in LTspice

RSS Current Electro-Tech-Online.com Discussions

  • RS485 bus: common ground wire needed or not?
  • Kawai KDP 80 Electronic Piano Dead
  • Good Eats
  • What part is this marked .AC ?
  • Photo interrupter Connections
Search Millions of Parts from Thousands of Suppliers.

Search Now!
design fast globle

Footer

EE World Online Network

  • 5G Technology World
  • EE World Online
  • Engineers Garage
  • Analog IC Tips
  • Battery Power Tips
  • Connector Tips
  • DesignFast
  • EDA Board Forums
  • Electro Tech Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips

Test & Measurement Tips

  • Subscribe to our newsletter
  • Advertise with us
  • Contact us
  • About us

Copyright © 2025 · WTWH Media LLC and its licensors. All rights reserved.
The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media.

Privacy Policy