Skip to content Skip to navigation

OpenStax_CNX

You are here: Home » Content » Swept Sine Impulse Response Measurement

Navigation

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 ...

Endorsed by Endorsed (What does "Endorsed by" mean?)

This content has been endorsed by the organizations listed. Click each link for a list of all content endorsed by the organization.
  • IEEE-SPS display tagshide tags

    This module is included inLens: IEEE Signal Processing Society Lens
    By: IEEE Signal Processing SocietyAs a part of collection: "Impulse Response Measurement Toolbox"

    Comments:

    "A clear explanation of estimating impulse responses in acoustic signals using Golay codes and swept sine waves."

    Click the "IEEE-SPS" link to see all content they endorse.

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

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.
 

Swept Sine Impulse Response Measurement

Module by: Edgar Berdahl, Julius Smith. E-mail the authors

Summary: The swept sine measurement technique is used for measuring impulse responses. It has advantages when measuring weakly nonlinear systems in that the linear and nonlinear components can be separated to some extent. Free, open-source software is provided in Matlab (or Octave) and Pure Data (PD) for carrying out swept-sine impulse-response measurements using the sound hardware found on a typical personal-computer.

Introduction

Figure 1: Linear system to be measured
Figure 1 (linsystem2.png)

Figure 1 depicts a linear system characterized by an impulse response h(n)h(n), driven by an input signal s(n)s(n), and producing the output signal r(n)r(n). The system identification problem is to estimate h(n)h(n) given known input/output signals s(n)s(n) and r(n)r(n). A practical method for identifying finite impulse responses is the swept-sine measurement technique, described below.

Sine Sweep Measurement Theory

In some cases, it is desirable to relax the power-maximizing constraint |s(n)|=1n|s(n)|=1n in favor of obtaining some other desirable measurement system properties. For example, we may care more about the accuracy of the measurement at lower frequencies compared to higher frequencies, so we would like the excitation signal s(n)s(n) to contain more energy at lower frequencies [1]. We might also be measuring a mechanical or acoustical system in which the motor controlled by s(n)s(n) behaves weakly nonlinearly. If the nonlinearity is memoryless and is NOT preceded by any filtering, then the system to be measured matches the Hammerstein model shown in Figure 2. The goal is to measure h(n)h(n), independently of the motor nonlinearity f(s)f(s). Performing the measurement is complicated by the fact that superposition no longer holds.

Figure 2: Hammerstein Model
Figure 2 (hammerstein.png)

Mathematically, the Hammerstein system behaves as follows:

r ( n ) = ( f ( s ) * h ) ( n ) r ( n ) = ( f ( s ) * h ) ( n )
(1)

It turns out that we can obtain both of these desirable measurement system properties by using a new excitation signal s(n)s(n). This signal is a sine wave with a frequency that is exponentially increased from ω1ω1 to ω2ω2 over TT seconds [2]:

s ( n ) = sin [ K ( e - n / L f s - 1 ) ] s ( n ) = sin [ K ( e - n / L f s - 1 ) ]
(2)

where K=ω1Tlnω2ω1K=ω1Tlnω2ω1 and L=Tlnω2ω1L=Tlnω2ω1. The MATLAB/Octave code generate_sinesweeps.m generates the appropriate sine sweep.

Now we consider how to extract the linearized impulse response from a measurement. In essence, we need to inverse filter the measurement by the excitation signal.

To this end, we realize that a useful property of s(n)s(n) is that the time delay ΔtNΔtN between any sample n0n0 and a later point with instantaneous frequency NN times larger than the instantaneous frequency at s(n0)s(n0) is constant:

Δ t N = T ln ( N ) ln ω 2 ω 1 Δ t N = T ln ( N ) ln ω 2 ω 1
(3)

This characteristic implies that after inverse-filtering the measured response, the signals due to the nonlinear terms in f(s)f(s) are located at specific places in the final response signal. Consequently, the linear contribution to the response, which is proportional to h(n)h(n) can be separated from the other nonlinear terms. We can thus measure a linear system even if it is being driven by a weakly nonlinear motor.

Because the frequency of s(n)s(n) increases exponentially, the system is excited for longer periods of time at lower frequencies. This means that the inverse filter averages measurements at lower frequencies longer, so this measurement technique is better suited to especially low-pass noise sources.

Sine Sweep Measurement Procedure

  1. Generate the sine sweeps using generate_sinesweeps.m
  2. Open the pd patch sinesweeps.pd in pd.
  3. Ensure that the patch is not in editing mode, and check the “compute audio” box in the main pd window.
  4. Adjust the “Output Volume” so that when you click on “Record Response To The Sine Sweeps,” the system under test is behaving linearly (i.e. not clipping), but so that the input signal to the sound interface is not too noisy.
  5. If there is an input volume on the sound interface, adjust it so that the levels approximately match those shown in Figure 3 when you click on “Record Response To The Sine Sweeps.” If the sound interface has no input volume, then you will need to adjust the “Output Volume” accordingly.
    Figure 3: sinesweeps.pd after making a measurement with an appropriate input level
    Figure 3 (sinesweepsScale.png)
  6. Once you are satisfied with the results, click the “Write Responses to Disk” button.
  7. pd will write the file Resp.wav to disk. Rename this file so that the name matches the measurement you just made. For instance, you might rename it to nonlinear2Resp.wav if it corresponded to the second time you measured the transfer function of a weakly nonlinear system.
  8. Run sinesweeps_response('nonlinear2,100,0.4') in MATLAB or Octave to analyze the measured response. This means that the inverse filter will be restricted to a dynamic range of 100 (40 dB), which helps avoid exaggerating problems beneath ω1ω1 and above ω2ω2, where the excitation signal has little energy. 0.4 refers to the length in seconds of the linear impulse response term to be extracted. Plots will be generated, and the file nonlinear2ImpResp.wav will be written to disk.

References

  1. Abel, J. and Berners, D. (2005). Signal Processing Techniques for Digital Audio Effects. http://ccrma.stanford.edu/courses/424/.
  2. Farina, Angelo. (2000, Feb.). Simultaneous Measurement of Impulse Response and Distortion with a Swept-Sine Technique. Audio Engineering Society Convention, Preprint 5093,

Content actions

Download 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 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