0% found this document useful (0 votes)
74 views36 pages

Holmimpulse User Guide: Document Version 0.0.8 (October 23, 2009) Compatible Holmimpulse Versions 1.4.X.X

This document is a user guide for the HOLMImpulse software. It provides instructions on how to navigate and manipulate response graphs in the software. Key points covered include how to adjust the heights and ranges of graphs, view cursor coordinates, export and import response data, and configure measurement options like normalization and filtering. Mathematical concepts behind the analysis techniques are also explained in an appendix.

Uploaded by

Ogie Fermo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views36 pages

Holmimpulse User Guide: Document Version 0.0.8 (October 23, 2009) Compatible Holmimpulse Versions 1.4.X.X

This document is a user guide for the HOLMImpulse software. It provides instructions on how to navigate and manipulate response graphs in the software. Key points covered include how to adjust the heights and ranges of graphs, view cursor coordinates, export and import response data, and configure measurement options like normalization and filtering. Mathematical concepts behind the analysis techniques are also explained in an appendix.

Uploaded by

Ogie Fermo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

HOLMImpulse User Guide

Document version 0.0.8 (October 23, 2009)


Compatible HOLMImpulse versions 1.4.x.x
CONTENTS i

Contents

Contents i

1 Introduction 1
1.0.1 HOLMImpulse and DSPreLab? . . . . . . . . . . . . . . . . . . . . 1
1.0.2 HOLMImpulse @ diyAudio.com . . . . . . . . . . . . . . . . . . . . 1

2 Navigating the Response Graphs 2


2.1 Adjusting the heights of the areas . . . . . . . . . . . . . . . . . . . . . . . . 2
2.2 Coordinates for the cursor position . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 Adjusting the Ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3.1 Lower limit [dB] for the frequency response . . . . . . . . . . . . . . 3
2.3.2 ’Auto Zoom’ & ’Zoom Out’ for the Impulse Response . . . . . . . . 4
2.3.3 Zoom in & out with the cursor . . . . . . . . . . . . . . . . . . . . . 5
2.4 Impulse response with normalized dB-scale . . . . . . . . . . . . . . . . . . . 6

3 Exporting a Response 7
3.1 Text-file options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2 Exporting the Frequency Response . . . . . . . . . . . . . . . . . . . . . . . 8
3.3 Exporting the Impulse Response . . . . . . . . . . . . . . . . . . . . . . . . 9

4 Importing a response 11
4.1 Importing a frequency response . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2 Importing a impulse response . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.3 Importing a Signal & Recording pair . . . . . . . . . . . . . . . . . . . . . . 12

5 Measurement Options 13
5.1 Normalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.2 Time zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.2.1 Auto detect time-zero . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.3 Time-window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.4 Frequency response - Amplitude Smoothing . . . . . . . . . . . . . . . . . . 18
5.5 Frequency response - Frequency dependent time-window. . . . . . . . . . . . 19
5.6 Highpass and Lowpass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

6 Manipulation 22
6.1 Frequency domain arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . 22

HOLM Acoustics HOLMImpulse User Guide v0.0.8


CONTENTS ii

A Mathematics 24
A.1 Definitions and Fourier transforms . . . . . . . . . . . . . . . . . . . . . . . 24
A.2 Filtering in the frequency domain . . . . . . . . . . . . . . . . . . . . . . . . 26
A.2.1 Constant time-window . . . . . . . . . . . . . . . . . . . . . . . . . . 26
A.2.1.1 Example: Hann window . . . . . . . . . . . . . . . . . . . . 27
A.2.1.2 Example: Blackman window . . . . . . . . . . . . . . . . . 27
A.2.1.3 Example: Gaussian smoothing - time window . . . . . . . . 28
A.3 1/N Octave Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
A.3.1 The intervals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
A.3.2 Complex smoothing of discrete frequency values . . . . . . . . . . . . 29
A.3.2.1 Filter shape . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
A.3.2.2 Time-windowing . . . . . . . . . . . . . . . . . . . . . . . . 30
A.3.2.3 Visualizing with graphs . . . . . . . . . . . . . . . . . . . . 31
A.3.3 Absolute smoothing of discrete frequency values . . . . . . . . . . . . 32

Index 33

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Introduction 1 of 33

Chapter 1

Introduction

The goals for the application is to

• Measure Impulse-response
• Measure Phase-response
• Measure Frequency-response
• Measure Harmonic distortion (THD)
• Make bandwidth limited measurements with no phase-errors
• Compare measurements
• Import Frequency- & Impulse-response
• Export Frequency- & Impulse-response
• Using open format for saved files (zip, wav/flac, txt)

HOLMImpulse is freeware (Non-Commercial) and works with any PC soundcard with no


limitations.

1.0.1 HOLMImpulse and DSPreLab?


The main product for HOLM Acoustics is the digital preamplifier DSPre 1, which is con-
figured using the DSPreLab software. DSPreLab has the same measurement techniques
as HOLMImpulse, but with automatic integrated corrections for the DSPre 1 based upon
the measurements. The core software libraries for HOLMImpulse and DSPreLab are the
same - Hence no extra effort making the core of HOLMImpulse.

1.0.2 HOLMImpulse @ diyAudio.com


The people at the diyAudio.com forum have been very help full making this application
better - Thanks!
Discussing technicalities and mathematics - And reporting bugs:
http://www.diyaudio.com/forums/showthread.php?threadid=144984
Measurements in practice - Feedback & help:
http://www.diyaudio.com/forums/showthread.php?threadid=145662

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Navigating the Response Graphs 2 of 33

Chapter 2

Navigating the Response Graphs

The frequency and impulse response graphs are the cornerstone in HOLMImpulse. There
are several tips and tricks for changing the visualization of these graphs. This chapter will
also reveal some very nice features when dealing with these graphs.

2.1 Adjusting the heights of the areas


A standard windows graphical user-interface option is to adjust the heights of windows by
moving the middle bar:

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Navigating the Response Graphs - Coordinates for the cursor position 3 of 33

2.2 Coordinates for the cursor position


When moving the cursor around on the graph, the coordinates in the selected units are
shown

In this example the coordinates are: (1004Hz; -9,6dB; 62 Deg; -5,9cm)


The first three values (1004Hz; -9,6dB; 62 Deg) are obvious, the -5,9cm is the phase delay
calculated as distance:
Phase [Deg] 62
Phase delay [sec] = − =− = −0, 1715ms
360 × Frequency [Hz] 360 × 1004Hz
Phase distance [m] = 344m/s × Phase delay [sec] = −0, 059m = −5, 9cm

2.3 Adjusting the Ranges


The possibility to adjust the ranges of a graph is essential when visualizing data.

2.3.1 Lower limit [dB] for the frequency response


The lower dB-limit can be adjusted easily by the two arrows in the lower left corner:

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Navigating the Response Graphs - Adjusting the Ranges 4 of 33

2.3.2 ’Auto Zoom’ & ’Zoom Out’ for the Impulse Response
The ’Auto Zoom’ and the ’Zoom Out’ button in the lower left corner will adjust the ranges
for the shown impulse response(s)

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Navigating the Response Graphs - Adjusting the Ranges 5 of 33

2.3.3 Zoom in & out with the cursor


Navigating in graphs with respect to zooming in and out is easy using the pointing device:

When you have zoomed in you can zoom in again, and right-clicking will the follow your
zoom history back.

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Navigating the Response Graphs - Impulse response with normalized dB-scale 6 of 33

2.4 Impulse response with normalized dB-scale


The value for the impulse response can be shown on a dB-scale to eg. visualize reflections
on a dB-scale:

The ’Reverberation’ button will enable the dB-scale and adjust the range so that the
reverberation is shown:

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Exporting a Response 7 of 33

Chapter 3

Exporting a Response

A response can be exported as a frequency response or as an impulse response.

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Exporting a Response - Text-file options 8 of 33

3.1 Text-file options


When exporting to a text-file you can adjust some self·-explanatory preferences:

• Information header in file is a comment section in the top of the text-file, where the
comment start character(s) can be configured
• The column separator is the character which is used to separate to columns
• The decimal separator is a . (Dot) or a , (Comma) such that eg.
π = 3.1416 . . . or π = 3, 1416 . . .

Note: The text-file options are remembered - also after a restart of the application

3.2 Exporting the Frequency Response


The frequency response is exported as an ASCII text file with the above text-file options.
The procedure for exporting is:

1. Find the measurement, which you want to export and click the ’Export’ button
2. Select file-name (Browse) and verify settings in the Frequency tab
3. Click the ’Export Frequency Response’ button

Exporting phase is optional and so is the phase unwrapping.


The discrete frequencies can be exported using following settings:

FFT-Frequencies will export all the discrete frequencies (current FFT-size)

Non-Equidistant will only export frequencies, when the response changes

Linear will export frequencies at a selected step

Logarithmic will export frequencies with a step increasing logarithmic

Note: The frequency export options are remembered - also after a restart of the application

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Exporting a Response - Exporting the Impulse Response 9 of 33

3.3 Exporting the Impulse Response


Exporting the impulse response can either be done as text-file or as a wave-file
(http://en.wikipedia.org/wiki/WAV)

The procedure for exporting is:

1. Find the measurement, which you want to export and click the ’Export’ button
2. Select file-name (Browse) and verify settings in the Impulse tab
3. Click the ’Export impulse response’ button

Note: The frequency export options are remembered - also after a restart of the application

Time window
The time window lets you define the range of samples that should be exported

Wave file options


The format of the wave-file can be:

• 32 bit float
• 16 bit PCM (integer)
• 24 bit PCM (integer)
• 32 bit PCM (integer)

When exporting to wave-files it is convenient to normalize the impulse response, so that


the highest magnitude equals 1.

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Exporting a Response - Exporting the Impulse Response 10 of 33

Text file options


Exporting an impulse as a text-file can result in rather large files. The impulse sample
number is trivial when using this file in other programs - therefore is the sample numbers
in the text-file optional.
Note: The general settings in the ’Text Options’ tab as described in Section 3.1 are used
when exporting the impulse response as ASCII text-file

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Importing a response 11 of 33

Chapter 4

Importing a response

A response can be import as a frequency response, impulse response or a recorded/manipulated


response to a known signal.
Click ’Import’ in a measurement slot which can be overwritten:

4.1 Importing a frequency response


A frequency response can be imported from a text-file with either two or three columns if
the phase is to be imported. The rules of import are:

• Expects data in columns: Frequency <separator> dB <separator> phase <eol>


• Ignores lines not starting with a number
• Accepts the following column-separators: space, semicolon, tabular
• Accepts , (Comma) and/or . (Dot) as decimal point

Note: The samplerate will be the current set under the ’Device & Signal’ tab
An example of a valid frequency response text-file:

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Importing a response - Importing a impulse response 12 of 33

4.2 Importing a impulse response

4.3 Importing a Signal & Recording pair

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Measurement Options 13 of 33

Chapter 5

Measurement Options

The measurement options allows you to change the representation of the measurement.
Changing the options for the measurements does not affect the measurement data - only
the representation.

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Measurement Options - Normalization 14 of 33

5.1 Normalization
When comparing measurements the input gain often differs, therefore the normalization
allows you to offset measurements.
Below shows the same measurement with two different normalization offset.
The third curve shows an inverted measurement

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Measurement Options - Time zero 15 of 33

5.2 Time zero


The application uses a strategy to locate the measured impulse response.
The located time offset (Time zero) can be adjusted manually

The phase is depending on the time-zero - In the above example the to graphs represents
the exact same measurement, but with a different time-zero. It is good to remember that

1 sample = 180 Degrees @ Nyquist frequency, (Nyquist frequency = samplerate/2)

In above example the one impulse is delayed 2 samples, which gives a phase shift of 360
Degrees at 22.5 kHz.

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Measurement Options - Time zero 16 of 33

5.2.1 Auto detect time-zero


As seen the time-zero is crucial when inspecting the phase. Different strategies can be
chosen. In below graph three different methods are shown - all five are:

• First positive peak

– Disregard the pre-ringings from DAC/ADC


– Assume correct polarity

• Highest positive peak

– Disregard every information except the highest positive peak


– Assume correct polarity

• First peak

– Disregard the pre-ringings from DAC/ADC

• Largest peak

– Disregard every information except the largest peak (Safest method)

• Causal impulse

– Don’t allow any pre-ringings

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Measurement Options - Time-window 17 of 33

5.3 Time-window
The time is used for gated measurements. Reflections/echoes can be neglected. The time-
window can be dynamically adjusted using the pointing device (The frequency response is
instantly updated)

Gating frequency
When the wavelength becomes longer than the time window the frequency response is no
longer reliable (rule of thumb).

1 344m/s
Gating frequency [Hz] = =
Time window [s] Time window [m]

Auto detect
The ’Auto Detect’ button will locate reflections from the main-impulse and set the time-
window just before these reflections.

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Measurement Options - Frequency response - Amplitude Smoothing 18 of 33

5.4 Frequency response - Amplitude Smoothing


This total response is the response including all reflections and echoes from the room
(Speaker & Room-response)

The smoothing is optional and can be adjusted. In below graph the green curve is without
smoothing and the red and blue has different amount of smoothing

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Measurement Options - Frequency response - Frequency dependent time-window. 19 of 33

5.5 Frequency response - Frequency dependent time-window.


Making a complex logarithmic average in the frequency domain corresponds to a frequency
dependent time-window. The frequency dependent window is shown for each decade (10Hz,
100Hz, 1kHz, 10kHz)

There are advantages and disadvantages compared to a constant (normal) time window

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Measurement Options - Highpass and Lowpass 20 of 33

5.6 Highpass and Lowpass


Deploying highpass and/or lowpass to a measurement will reveal the impulse response in
the desired frequency range.

Lowpass a woofer measurement


In below measurement a woofer has been measured, but the impulse response is only
interpretable after the lowpass

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Measurement Options - Highpass and Lowpass 21 of 33

Lowpass and Highpass (Bandpass) two measurements


If a eg. tweeter and a mid is measured, and we want to compare the time alignment of
these two measurements we can bandpass the measurements for directly comparison in the
time domain

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Manipulation 22 of 33

Chapter 6

Manipulation

The manipulation menu allows you to make certain operations on existing measurements
and make new simulated data.

6.1 Frequency domain arithmetic


There are three measurement slots: A, B and C, that makes it possible to make the most
common algebraic operations.
NB: Be aware that the measurement on the left-hand-side of the equation will be overwrit-
ten.
For simplicity - Assume that the samplerates for A, B are same.
First define some symbols:

k : Frequency number
A[k], B[k], C[k] : Complex sequences representing the three slots A,B,C

Thereafter the frequency domain manipulations are straight forward

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Manipulation - Frequency domain arithmetic 23 of 33

Difference (C = A - B)
Example: A and B are to drivers played where B has inverted polarity - then C is the
resulting response.

C[k] = A[k] − B[k], for all k

Sum (C = A + B)
Example: A and B are to drivers played - then C is the resulting response.

C[k] = A[k] + B[k], for all k

Product (C = A * B)
Example: A represents a driver and B represents a filter - then C is the result you will get
deploying the filter to the driver.

C[k] = A[k]B[k], for all k


Division (C = A / B)
Example: A represents a measurement and B represents a microphone response - then C
is the measurement after microphone calibration.

A[k] B[k]∗
C[k] = = A[k] , for all k
B[k] |B[k]|2

Inversion (B = 1 / A)
Example: A represents a measurement - then B is the filter you will need to deploy to the
speaker to get a flat response.

1 A[k]∗
B[k] = = , for all k
A[k] |A[k]|2

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Mathematics 24 of 33

Appendix A

Mathematics

Below definitions and derivations can be found in many books. I have chosen to write
down my own derivations, because we have special cases when dealing with computational
Fourier transforms:

• The frequency- and time-domain are always discrete


• The frequency- and time-domain are always finite
• The Fourier-size (FFT-size) is always a power of two (even)
• The values in time-domain are allways real

A.1 Definitions and Fourier transforms

Symbol Definition

L = LF F T FFT length, L is a power of 2: L = 2M , M = 1, 2 . . .


N = L/2 = NF F T Half FFT length
R Samplerate [Hz]
i Complex constant: eiθ = i cos θ +⎧sin θ and i2 = −1

1 ,n = 0
δ[n] Kronecker delta function, δ[n] =
⎩ 0 , n = 0


1 ,n = m
δ[n, m] = δ[n − m] Kronecker delta function, δ[n, m] =
⎩ 0 , n = m
∗ Complex conjugation z = a + ib, z ∗ = a − ib
arg(z) ∈ [−π, π[ Phase of the complex number z
Impulse responses are represented by real sequences (lowercase):

x[n] ∈ R, n = −N, . . . , N − 1

Frequency responses are represented by complex sequences (uppercase):

X[k] ∈ C, k = 0, . . . , L − 1

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Mathematics - Definitions and Fourier transforms 25 of 33

The Fourier basis functions and properties:


 

e[nk] = exp i nk
L

e[nk] = e[−nk]
e[(n ± L)k] = e[nk]
e[n(k ± N )] = (−1)n
 
∗ 2π
e[nk] + e[nk] = 2 cos nk
L
Kronecker delta function represented by the basis functions:
N
1 
δ[k] = e[nk]
L
n=−N
L
1
δ[n] = e[nk]
L
k=0

The Fourier transforms:

N
 −1
X[k] = x[n]e[nk] (A.1)
n=−N
L−1
1 
x[n] = X[n]e[nk]∗ (A.2)
L
k=0

Properties of these transforms:

N
 −1
X[L − k] = x[n]e[n(L − k)] = X[k]∗
n=−N
N
 −1
X[0] = x[n], X[0] ∈ R
n=−N
N
 −1
X[N ] = (−1)n x[n], X[N ] ∈ R
n=−N

These properties can be used to see, that there is in fact only N frequencies with 2N = L
degrees of freedom

L−1
1 
x[n] = X[k]e[nk]∗
L
k=0
N −1
1 1  1
= X[0] + (X[k]e[nk]∗ + X[k]∗ e[nk]) + X[N ] (−1)n
L L L
k=1

1 2
N
 −1 π 1
= X[0] + |X [k]| cos nk + θ[k] + X[N ] (−1)n (A.3)
L L N L
k=1
where X [k] = |X [k]| eiθ[k] , θ[k] = arg(X[k])

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Mathematics - Filtering in the frequency domain 26 of 33

A.2 Filtering in the frequency domain


Let W [k, j] be a general filtering function defined in the frequency domain such that the
filtered frequency sequence XW [k] is a result of the unfiltered X[k]
N
1 
XW [k] = W [k, j]X[j]
N +1
j=0
L−1

1
= W [k, j]X[j] (A.4)
L
j=0

This expression is the most general filtering. The relation to the impulse response x[n] is
L−1
1 
xw [n] = XW [k]e[nk]∗
L
k=0
L−1
 L−1
1 1 
= W [k, j]X[j]e[nk]∗
L L
k=0 j=0
L−1
 L N
1 1 
= W [k, j] x[m]e[mj]e[nk]∗
L L
k=0 j=0 m=−N
⎛ ⎞
N
 L−1
 1 L−1 
1
= x[m] ⎝ W [k, j]e[mj]e[nk]∗ ⎠
L L
m=−N k=0 j=0
N

= x[m]w[n, m]
m=−N

So that filtering in the frequency domain corresponds to another operation in the impulse
domain where:
L−1 L−1
1  1 
w[n, m] = W [k, j]e[mj]e[nk]∗
L L
k=0 j=0
N
 N

W [k, j] = w[n, m]e[mj]∗ e[nk]
n=−N m=−N

A.2.1 Constant time-window


A constant time-window in the impulse domain corresponds to a translation invariant
frequency domain filter.
Assume that w[n, m] is a constant time-window:
w[n, m] = w[n]δ[n, m]
xw [n] = x[n]w[n], w[n] ∈ R
The filter in frequency domain becomes:
N
 N

W [k, j] = w[n, m]e[mj]∗ e[nk]
n=−N m=−N
N

= w[n]e[n(k − j)]
n=−N
= L × W [k − j]

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Mathematics - Filtering in the frequency domain 27 of 33

Utilizing the translation invariance gives:


L−1
1 
XW [k] = W [k, j]X[j]
L
j=0
L−1

= W [k − j]X[j]
j=0

The Fourier transforms becomes:


N
1 
W [k] = w[n]e[nk]
L
n=−N
L−1

w[n] = W [k]e[nk]∗
k=0
N
 −1 π
= W [0] + 2 |W [k]| cos nk + θ[k] + W [N ] (−1)n (A.5)
N
k=1
iθ[k]
where W [k] = |W [k]| e , θ[k] = arg(W [k])

A.2.1.1 Example: Hann window

A running average (smoothing) in frequency domain:

1 1 1
W [k] = δ[k] + δ [k + 1] + δ [k − 1]
2 4 4
or in table form:
1
W [0] =
2
1
W [−1] = W [1] =
4
In time domain using (A.5):
1 1 π
w[n] = + cos n
2 2 N
This is the well-known Hann time-window.

A.2.1.2 Example: Blackman window

A running average (smoothing) in frequency domain:

W [k] = 0.42δ[k] + 0.25δ [k + 1] + 0.25δ [k − 1] + 0.04δ [k + 2] + 0.04δ [k − 2]


or in table form:

W [0] = 0.42
W [−1] = W [1] = 0.25
W [−2] = W [2] = 0.04

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Mathematics - Filtering in the frequency domain 28 of 33

In time domain using (A.5):


1 π  π
w[n] = 0.42 + cos n + 0.08 cos 2 n
2 N N

This is the well-known Blackman time-window.

A.2.1.3 Example: Gaussian smoothing - time window

Now assume a Gaussian frequency smoothing:


 2
1 −k
W [k] = √ exp
σ 2π 2σ 2
σ = FWHM (width of the smoothing)

The Fourier transform of a Gaussian distribution is again a Gaussian distribution:


 2 2
σ −n σ
w[n] = √ exp
2π 2
1
= FWHM (time-window-width)
σ

So as a rule of thumb:

σ = Smoothing width in frequency domain [Hz] (A.6)



1
= Time-window-width in time domain [s]
σ
Note: When using a Gaussian time-window one actually needs to apply an additional
window to avoid sidelopes in the frequency domain due to the non-zero values at w[−N ]and
w[N − 1]. Further more one need to use the so called discrete gaussian kernel for correct
normalization.

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Mathematics - 1/N Octave Smoothing 29 of 33

A.3 1/N Octave Smoothing


The 1/N octave smoothing originates from the analog world, with limited number of band-
width bins. But the concept can be applied to the digital world, where we have a huge
number of equidistant frequencies - typical 215 = 32768 or more.

A.3.1 The intervals


At a frequency f we want to apply smoothing in an interval from f − to f + . The Interval
must be NOct = 1/N octaves wide. This starting point gives the following constraints:
− +
f − < f < f + or flog < flog < flog (The interval)
f −
f− = or flog = flog − Δlog (The interval start)
Δ
+
f+ = f × Δ or flog = flog + Δlog (The interval end)
f+ + −
= 2NOct or flog − flog = log10 (2) × NOct (NOct octaves)
f−

In above the log-subscript denotes the logarithmic value of the number such that:

flog = log10 (f )

flog = log10 (f − )
+
flog = log10 (f + )
Δlog = log10 (Δ)

Solving these equations for Δ gives:



Δ= 2NOct = 20.5×NOct (A.7)

A.3.2 Complex smoothing of discrete frequency values


Assume the discrete complex frequencies in the frequency domain are:

F [k], k = 0, ..., NF F T

The complex average is calculated without taking the norm of the complex frequencies:
N
1 1
FC,N [k] = × F [j]W [k, j] (A.8)
S j
j=1
N
 1
where S = W [k, j] (Normalization constant)
j
j=1
FC,N [0] = F [0] (Special case for k = 0)

W [k, j] is a symmetric logarithmic filter with center at k and bandwidth from k0 to k1 :


1/N = 1/N Octave smoothing

2(1/N ) = 2(
0.5/N )
ΔN =
k0 = k/ΔN , f0 = fk/ΔN
k1 = k × ΔN , f1 = fk × ΔN

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Mathematics - 1/N Octave Smoothing 30 of 33

Example at fk = 1000Hz with 1/N = 1/3


2(1/3) = 2(
0.5/3)
ΔN = = 1.12246...
f0 = 1000Hz/ΔN = 891Hz
f1 = 1000Hz × ΔN = 1122Hz

So that at 1000Hz there is an average from 891Hz to 1122Hz.


Such an average is equivalent to a FPPO (Fixed Point Per Octave) calculation.

A.3.2.1 Filter shape

There is no standard filter shape for the W [k, j] filter in (A.8). The filter shape used in
this implementation is the Blackman filter:


⎨0.42 + 0.5 cos (πx) + 0.08 cos (2πx) , k /2 ≥ k ≥ 2k
0 1
W [k, j] = (A.9)

⎩0 , otherwise

where:
2
x = |jlog − klog |
Wlog
jlog = log10 (j)
klog = log10 (k)
x0.5 = 0.40547865 . . .
1 1
Wlog = (log10 (k1 ) − log10 (k0 )) = 2Δlog
x0.5 x0.5
|jlog − klog |
so that x = x0.5 ×
Δlog

the bandwidth of the filter has been adjusted for FWHM using x0.5 :
1
0.42 + 0.5 cos (πx0.5 ) + 0.08 cos (2πx0.5 ) =
2

thereby W [k, j] has the following properties:

W [k, k] = 1
1
W [k, k0 ] = W [k, k1 ] = (bandwidth)
2

A.3.2.2 Time-windowing

The smoothing in (A.8) can be written in the general form (A.4):


N N
1  1 1
FC,N [k] = W [k, j]F [j] = F [j] W [k, j]
N +1 j S
j=0 j=1

At a frequency f we have a smoothing width:


 
1
Smoothing-width(f ) = f1 − f0 = f Δ−
Δ

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Mathematics - 1/N Octave Smoothing 31 of 33

Using (A.6) gives the the time-window-width (TWW) becomes:

TWW(f ) = Time-window-width(f )
= (Smoothing-width(f ))−1 (A.10)
1 1
= × 1

f Δ− Δ
1
= T × (0.5/N ) (A.11)
2 − 2−(0.5/N )
1
where T = = period of frequency [s]
f

The exact form of this time-window depends on the logarithmic window function W [k, j],
but this expression (A.11) shows that the width of the time-window is proportional to the
time period. When windowing the impulse response using a symmetric window the half
window-width is what determines the time-gating frequency. Eg. for N = 1, 3, 6
1 1 1
TWWN =1 = × T  0.71 × T
2 22 ( 0.5/1)
− 2−(0.5/1)
1 1 1
TWWN =3 = × T  2.16 × T
2 22 ( 0.5/3)
− 2−(0.5/3)
1 1 1
TWWN =6 = × T  4.33 × T
2 2 2(0.5/6) − 2−(0.5/6)

A.3.2.3 Visualizing with graphs

The smoothing concept can be visualized with graphs. As a test impulse a artificial perfect
impulse followed by extreme noise can be used

Applying different smoothing cuts the noise away for different frequencies:

HOLM Acoustics HOLMImpulse User Guide v0.0.8


Mathematics - 1/N Octave Smoothing 32 of 33

Here it has been chosen to display the time-window for each decade (1Hz, 10Hz, 100Hz,
1kHz, 10kHz)

A.3.3 Absolute smoothing of discrete frequency values


The total response is calculated by making a running average in the frequency domain
(smoothing). Assume the discrete complex frequencies in the frequency domain are:

F [k], k = 0, ..., NF F T

Then the logarithmic absolute average is calculated by:

N
1 1
FA,N [k] = × |F [j]| W [k, j] (A.12)
S j
j=1
N
 1
where S = W [j] (Normalization constant)
j
j=1
FA,N [0] = F [0] (Special case for k = 0)

W [k, j] is a symmetric logarithmic window function with center at k.


Such a smoothing CAN NOT be written as a convolution like in (A.4), since the function
F [k] → |F [k]| is in play. A absolute smoothing can therefore not be seen as time-windowing.

HOLM Acoustics HOLMImpulse User Guide v0.0.8


INDEX 33 of 33

Index

Auto detect time-zero, 16

Bandpass, 21

Causal impulse, 16

Exporting the Frequency Response, 8


Exporting the Impulse Response, 9

FFT-Frequencies, 8
First peak, 16
First positive peak, 16
FPPO, 30

Highest positive peak, 16

Largest peak, 16
Lowpass, 20

Non-Equidistant, 8
Normalization, 14

Room-response, 18

smoothing, 18

Text-file options, 8
Time zero, 15
Time-window, 17

wave-file, 9
woofer measurement, 20

HOLM Acoustics HOLMImpulse User Guide v0.0.8

You might also like