Connexions

You are here: Home » Content » Band-Limited Pulse Generator
Content Actions
Lenses

What is a lens?

Lenses

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

What is in a lens?

Lens makers point to Connexions 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 Connexions member, a community, or a respected organization.

This content is ...
In these lenses
  • This module is included inLens: Digital Signal Processing with NI LabVIEW and the National Instruments Platform
    By: Sam ShearmanAs a part of collection:"Musical Signal Processing with LabVIEW (All Modules)"

    Comments:

    "This online course covers signal processing concepts using music and audio to keep the subject relevant and interesting. Written by Prof. Ed Doering from the Rose-Hulman Institute of Technology, […]"

    Click the "NI Signal Processing" link to see all content selected in this lens.

    NI Signal Processing
Tags

(?)

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

Band-Limited Pulse Generator

Module by: Ed Doering

Summary: Subtractive synthesis techniques often require a wideband excitation source such as a pulse train to drive a time-varying digital filter. Traditional rectangular pulses have theoretically infinite bandwidth, and therefore always introduce aliasing noise into the input signal. A band-limited pulse (BLP) source is free of aliasing problems, and is more suitable for subtractive synthesis algorithms. The mathematics of the band-limited pulse is presented, and a LabVIEW VI is developed to implement the BLP source. An audio demonstration is included.

LabVIEWq.png This module refers to LabVIEW, a software development environment that features a graphical programming language. Please see the LabVIEW QuickStart Guide module for tutorials and documentation that will help you:
• Apply LabVIEW to Audio Signal Processing
• Get started with LabVIEW
• Obtain a fully-functional evaluation edition of LabVIEW

Introduction

Subtractive synthesis techniques apply a filter (usually time-varying) to a wideband excitation source such as noise or a pulse train. The filter shapes the wideband spectrum into the desired spectrum. The excitation/filter technique describes the sound-producing mechanism of many types of physical instruments as well as the human voice, making subtractive synthesis an attractive method for physical modeling of real instruments.
A pulse train, a repetitive series of pulses, provides an excitation source that has a perceptible pitch, so in a sense the excitation spectrum is "pre-shaped" before applying it to a filter. Many types of musical instruments use some sort of pulse train as an excitation, notably wind instruments such as brass (e.g., trumpet, trombone, and tuba) and woodwinds (e.g., clarinet, saxophone, oboe, and bassoon). Likewise, the human voice begins as a series of pulses produced by vocal cord vibrations, which can be considered the "excitation signal" to the vocal and nasal tract that acts as a resonant cavity to amplify and filter the "signal."
Traditional rectangular pulse shapes have significant spectral energy contained in harmonics that extend beyond the folding frequency (half of the sampling frequency). These harmonics are subject to aliasing, and are "folded back" into the principal alias, i.e., the spectrum between 0 and f s /2 f s /2 . The aliased harmonics are distinctly audible as high-frequency tones that, since undesired, qualify as noise.
The band-limited pulse, however, is free of aliasing problems because its maximum harmonic can be chosen to be below the folding frequency. In this module the mathematics of the band-limited pulse are developed, and a band-limited pulse generator is implemented in LabVIEW.

Mathematical Development of the Band-Limited Pulse

By definition, a band-limited pulse has zero spectral energy beyond some determined frequency. You can use a truncated Fourier series to create a series of harmonics, or sinusoids, as in Equation 1:
x(t)= k=1 N sin(2πk f 0 t) x(t)= k=1 N sin(2πk f 0 t) MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8YjY=vipgYlh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamiEaiaacIcacaWG0bGaaiykaiabg2da9maaqahabaGaci4CaiaacMgacaGGUbGaaiikaiaaikdacqaHapaCcaWGRbGaamOzamaaBaaaleaacaaIWaaabeaakiaadshacaGGPaaaleaacaWGRbGaeyypa0JaaGymaaqaaiaad6eaa0GaeyyeIuoaaaa@49C4@ (1)
The Figure 1 screencast video shows how to implement Equation 1 in LabVIEW by introducing the "Tones and Noise" built-in subVI that is part of the "Signal Processing" palette. The video includes a demonstration that relates the time-domain pulse shape, spectral behavior, and audible sound of the band-limited pulse.
LabVIEW.png Download the finished VI from the video: blp_demo.vi. This VI requires installation of the TripleDisplay front-panel indicator.
sub_blp-tonenoise.html
Figure 1: [video] Band-limited pulse generator in LabVIEW using "Tones and Noise" built-in subVI
The truncated Fourier series approach works fine for off-line or batch-mode signal processing. However, in a real-time application the computational cost of generating individual sinusoids becomes prohibitive, especially when a fairly dense spectrum is required (for example, 50 sinusoids).
A closed-form version of the truncated Fourier series equation is presented in Equation 2 (refer to Moore in "References" section below):
x(t)= k=1 N sin(kθ)=sin[ (N+1) θ 2 ] sin( N θ 2 ) sin( θ 2 ) x(t)= k=1 N sin(kθ)=sin[ (N+1) θ 2 ] sin( N θ 2 ) sin( θ 2 ) MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8YjY=vipgYlh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaamiEaiaacIcacaWG0bGaaiykaiabg2da9maaqahabaGaci4CaiaacMgacaGGUbGaaiikaiaadUgacqaH4oqCcaGGPaGaeyypa0Jaci4CaiaacMgacaGGUbWaamWaaeaacaGGOaGaamOtaiabgUcaRiaaigdacaGGPaWaaSaaaeaacqaH4oqCaeaacaaIYaaaaaGaay5waiaaw2faaaWcbaGaam4Aaiabg2da9iaaigdaaeaacaWGobaaniabggHiLdGcdaWcaaqaaiGacohacaGGPbGaaiOBamaabmaabaGaamOtamaalaaabaGaeqiUdehabaGaaGOmaaaaaiaawIcacaGLPaaaaeaaciGGZbGaaiyAaiaac6gadaqadaqaamaalaaabaGaeqiUdehabaGaaGOmaaaaaiaawIcacaGLPaaaaaaaaa@60FB@ (2)
where
θ=2π f 0 t θ=2π f 0 t MathType@MTEF@5@5@+=feaagaart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLnhiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYb1uaebbnrfifHhDYfgasaacH8YjY=vipgYlh9vqqj=hEeeu0xXdbba9frFj0=OqFfea0dXdd9vqai=hGuQ8kuc9pgc9q8qqaq=dir=f0=yqaiVgFr0xfr=xfr=xb9adbaqaaeGaciGaaiaabeqaamaabaabaaGcbaGaeqiUdeNaeyypa0JaaGOmaiabec8aWjaadAgadaWgaaWcbaGaaGimaaqabaGccaWG0baaaa@3D44@ . The closed-form version of the summation requires only three sinusoidal oscillators yet can produce an arbitrary number of sinusoidal components.
Implementing Equation 2 contains one significant challenge, however. Note the ratio of two sinusoids on the far right of the equation. The denominator sinusoid periodically passes through zero, leading to a divide-by-zero error. However, because the numerator sinusoid operates at a frequency that is N times higher, the numerator sinusoid also approaches zero whenever the lower-frequency denominator sinusoid approaches zero. This "0/0" condition converges to either N or -N; the sign can be inferred by looking at adjacent samples.

References

  • Moore, F.R., "Elements of Computer Music," Prentice-Hall, 1990, ISBN 0-13-252552-6.

Comments, questions, feedback, criticisms?

Send feedback