NI Home
Cart Cart | Help
Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Currently Being Moderated

Overlap and Add in LabVIEW

VERSION 5

Created on: Dec 9, 2008 10:23 AM by LaloPerez - Last Modified:  Mar 16, 2009 10:04 PM by LaloPerez

Overlap and Add in LabVIEW

Introduction

Overlap and add is a very common operation in digital signal processing streaming applications.  It is often the preferred method to process large amounts of data where memory and/or storage devices are constrained and where the overhead of processing samples individually significantly reduces the systems’ performance.

 

Overlap and Add Operation

The basic principle is as follows.  Assume you have a sampled signal H that is too big to be processed all at once.  First, split H into a series of contiguous blocks containing N elements each such that

 

h = h1 + h2 + h3 + …

 

The desired result of applying a Finite Impulse Response (FIR) filter with M taps is given by the convolution operation

 

f * h = f * (h1 + h2 + h3 + … ) = f * h1 + f * h2 + f * h3 + …

 

However, the individual convolution operations result in an output filtered sequence of size N + M - 1, composed of a filtered data segment fi concatenated with a transient ti.  The correct filtered ith segment of size N is given by

 

f * hi = fi + ti-1

 

Overlap and Add in LabVIEW

The simplest overlap and add implementation is array addition.  However, it is necessary to keep track of the filtered data (size N) and the delayed transient for that segment (size M - 1).  Figure 1 shows an implementation where the Array Shift function is used to save the transient and the feedback node is used to delay it for the next iteration.

 

 

Overlap and Add 05.png

Figure 1:  Overlap and Add Implementation

 

The overlap and add VI can be inserted in a loop to process the data on a frame-by-frame (block-by-block) basis.  The LabVIEW block diagram in Figure 2 shows a filtering operation done on the entire sound data.  The lower branch of the block diagram applies the filter to the entire data set all at once while the For Loop performs the same filtering operation using the overlap and add VI.

 

 

Overlap and Add 06.png

Figure 2:  Overlap and Add Program

 

The results of the LabVIEW block diagram shown in Figure 2 are shown in Figure 3 below.  Notice that the Mean Squared Error is 2.08188E-35.

 

Overlap and Add 07.png

Figure 3:  Overlap and Add Results

 

Zooming into the filtered graph shows clear details of the results of processing the entire data set or using overlap and add techniques.  Figure 4 below show the processing methods to be virtually identical.

Overlap and Add 08.png

Figure 4:  Zoomed Filtered Data Sets

 

Download the Overlap and Add LabVIEW Project

The Overlap and Add v2.zip project contains the cleaned up version of the diagrams demonstrating the benefits of using global variables to obtain a better signal flow representation of the filtering methods.

 

The original LabVIEW Overlap and Add project includes various implementations based on the same principle discussed in this tutorial.

 

Downloads:
Average User Rating
(0 ratings)




There are no comments on this document

More Like This

  • Retrieving data ...