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

Electrical Engineering News and Products

Electronics Engineering Resources, Articles, Forums, Tear Down Videos and Technical Electronics How-To's

  • Products / Components
    • Analog ICs
    • Battery Power
    • Connectors
    • Microcontrollers
    • Power Electronics
    • Sensors
    • Test and Measurement
    • Wire / Cable
  • Applications
    • 5G
    • Automotive/Transportation
    • EV Engineering
    • Industrial
    • IoT
    • Medical
    • Telecommunications
    • Wearables
    • Wireless
  • Learn
    • eBooks / Handbooks
    • EE Training Days
    • Tutorials
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • White Papers
    • Design Guide Library
    • Digital Issues
    • Engineering Diversity & Inclusion
    • LEAP Awards
    • Podcasts
    • DesignFast
  • Videos
    • EE Videos and Interviews
    • Teardown Videos
  • EE Forums
    • EDABoard.com
    • Electro-Tech-Online.com
  • Bill’s Blogs
  • Advertise
  • Subscribe

How to use convolution to implement filters: part 1

March 26, 2025 By Rick Nelson

Convolution is used in a variety of signal-processing applications, including time-domain-waveform filtering.

In a recent series on the inverse fast Fourier transform (FFT), we concluded with a mention of convolution and its application to filtering.

Convolution

Q: What is convolution?
A: Convolution, denoted by * symbol, combines two functions to form a third function in accordance with this integral:

As with the Fourier transform, there is a discrete version:

What’s an application for convolution?
A: If you have an arbitrary function of time f(t) and you know a filter’s impulse response h(t), you can substitute h(t) for g(t) in either of the above equations and calculate the filter’s output, as shown in Figure 1.

Figure 1. You can use convolution to calculate an output signal if you know a filter’s impulse response.

What role does t play?
A: t is a dummy variable over which we perform integration (Eq. 1) or summation (Eq. 2). An example using simple geometric shapes helps illustrate how convolution works. In Figure 2a, f(t) is a rectangular pulse, or boxcar function, that equals 1 for time units 0 to 10 and 0 everywhere else. In contrast, g(t) is a single sawtooth cycle that rises from 0 to 1 in 10 time units and is 0 everywhere else. Because g(t) is zero outside a well-defined time window, a filter with such an impulse response is called a finite-impulse-response (FIR) filter.

To convolve these two functions, we convert both to functions of t and plot them on the same t-axis (Figure 2b). Then, we mirror g(t ) around the y-axis, forming g(-t), as shown in Figure 2c, keeping in mind that g(-t) does not equal –g(t). Finally, we bring t back into the picture by adding a time delay t to g(-t), forming g(t–t). For t=0, g(t–t) remains the same as g(-t) in Figure 2c, as indicated in Figure 2d, which also shows g(t–t) for t = -20. Now, we can use Eq. 2 to calculate the products and sums necessary to determine output y(t).

Figure 2. To convolve two-time functions (a), plot them on the same x-axis (b), mirror one about the y-axis (c), and add a time shift (d).

It looks as though the products and sums will all be zero for values of t less than 0; is that right?
A: Right, so there’s no need to go back to minus infinity or as close as we can come within the limits of our oscilloscope’s acquisition memory. We’ll start our calculation at t=0, as shown in Figure 2c and repeated in Figure 3a. We note that the product of f(t)g(t–t ) is zero, so we record that value for future use in plotting y(t). Next, in Figure 3b, we increment t by one, shifting g(t–t) one-time unit to the right. We notice that g(t–t) overlaps f(t) in the form of a triangle whose height hT is 0.1 and width wT is 1, and we see that y(1)=0.1×1/2=0.05.

Figure 3. Beginning with t=0 (a), we calculate the sum of products for t=1 (b), t=2 (c), and so on, keeping in mind that we must calculate the products for each integer value of t.

So, next, we can increment t again to t=2, as in Figure 3c, where we have a triangle of height 0.2 and width 2 for a total area of 0.02, correct?
A: That’s the correct answer for this example, but we are in danger of a major mistake. Let’s look at t=7 in Figure 3d to get a closer look. Here, the product is represented by a triangle of height 0.7 and width 7 for an area of 2.45. But we don’t know in advance that g(t) will be a straight line from t=0 to t=7, so we have to evaluate the seven products for each integer value of t individually and sum them, as shown by the seven alternatively shaded yellow and blue segments and associated equations in Figure 3d. Note that if g(t) actually followed the trajectory of the red dashed line from t =1 to t =6, our triangle approximation would miss an area of 1.25.

Can we plot y(t) now?
A: Yes. The blue curve in Figure 4 shows y(t), along with snapshots of the convolution diagrams for  y = 0, 5, 10, 15, and 20.

Figure 4. With the sums of products calculated for t=1 through t=20, we can plot y(t).

Could you provide a more useful example of convolution?
A: Next time, we will look at a practical example of convolution for a signal-filtering application.

Related EE World content

Measuring active and passive filters
Making best use of acquisition memory in digital storage oscilloscopes
Fast Fourier Transforms
Filters, Part 1: Analog, switched, and digital filters
An overview of filters and their parameters, Part 1: Context
Why does the Fourier Transform provide apparently inaccurate results, and what can I do about it? Part 1

You Might Also Like

Filed Under: FAQ, Featured, Test and Measurement Tips Tagged With: FAQ

Primary Sidebar

EE Engineering Training Days

engineering

Featured Contributions

GaN reliability milestones break through the silicon ceiling

From extreme to mainstream: how industrial connectors are evolving to meet today’s harsh demands

The case for vehicle 48 V power systems

Fire prevention through the Internet

Beyond the drivetrain: sensor innovation in automotive

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 Learning Center

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

R&D World Podcasts

R&D 100 Episode 10
See More >

Sponsored Content

Advanced Embedded Systems Debug with Jitter and Real-Time Eye Analysis

Connectors Enabling the Evolution of AR/VR/MR Devices

Award-Winning Thermal Management for 5G Designs

Making Rugged and Reliable Connections

Omron’s systematic approach to a better PCB connector

Looking for an Excellent Resource on RF & Microwave Power Measurements? Read This eBook

More Sponsored Content >>

RSS Current EDABoard.com discussions

  • Core loss in output inductor of 500W Two Transistor forward?
  • GanFet power switch starts burning after 20 sec
  • Colpitts oscillator
  • problem identifying pin purpose on PMA5-83-2WC+ amplifier
  • Voltage Regulator Sizing Question

RSS Current Electro-Tech-Online.com Discussions

  • LED circuit for 1/6 scale diorama
  • Electronic board faulty?!?
  • Can I use this charger in every country?
  • using a RTC in SF basic
  • An Update On Tarrifs
Search Millions of Parts from Thousands of Suppliers.

Search Now!
design fast globle

Footer

EE World Online

EE WORLD ONLINE NETWORK

  • 5G Technology World
  • Analog IC Tips
  • Battery Power Tips
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • Electro-Tech-Online Forums
  • Engineer's Garage
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips

EE WORLD ONLINE

  • Subscribe to our newsletter
  • Teardown Videos
  • 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