0% found this document useful (0 votes)
23 views12 pages

En DM00390468

Uploaded by

230198895
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)
23 views12 pages

En DM00390468

Uploaded by

230198895
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/ 12

UM2212

User manual

Getting started with AcousticSL real-time sound source localization middleware

Introduction
The AcousticSL software lets you implement a real-time sound source localization algorithm using two or four signals acquired
from digital MEMS microphones to estimate the direction of arrival of the main audio source.
It is based on three different DOA algorithms exploiting cross correlation in the time domain, generalized cross correlation with
phase transform, and a matching pursuit routine using sparse representation framework.
The angle can be estimated over a 180 or 360 degree range, depending on the number of channels adopted and the
microphone placement.
The resolution of the computed value can be chosen at runtime, allowing you to determine the best tradeoff between localization
precision and resource consumption.
The AcousticSL library is provided both in source code and in binary format inside the X-CUBE-MEMSMIC1 software
package with sample applications running on the X-NUCLEO-CCA02M2 expansion board connected to a NUCLEO-F401RE
development board and on the X-NUCLEO-AMICAM1, when connected to a NUCLEO-L4R5ZI.
The AcousticSL is also part of the FP-AUD-SMARTMIC1 function pack.
The package is based on STM32Cube technology and can be easily ported to any microcontroller with an FPU.

UM2212 - Rev 2 - October 2021 www.st.com


For further information contact your local STMicroelectronics sales office.
UM2212
Licensing information

1 Licensing information

Licensed under Software License Agreement SLA0077, (the "License"). You cannot use this package except in
compliance with the License. You may obtain a copy of the License at www.st.com.
Some of the library code is based on the CMSIS DSP software library by ARM®, a suite of common signal
processing functions to be used on ARM® Cortex®-M processor-based devices. Licensing terms are available in
the release_note.html file included in the software package, in the next lines of this document and on the web at
https://www.keil.com/pack/doc/CMSIS/DSP/html/index.html.
ARM license note:
Copyright (C) 2009-2012 ARM Limited. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:
• Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.
• Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other materials provided with the distribution.
• Neither the name of ARM nor the names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS” AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

UM2212 - Rev 2 page 2/12


UM2212
AcousticSL software library

2 AcousticSL software library

This library uses audio signals from microphones to execute sound source localization and estimate the angle
of arrival of the audio source. It embeds three algorithms with differing RAM and MIPS footprints and overall
performance (Knapp, C. H. (1976). The generalized correlation method for estimation of time delay, IEEE
Transactions on Acoustics, Speech and Signal Processing ASSP. 24(4), 320-327):
• XCORR cross correlation algorithm:
– performed in the time domain
– less resource intensive
– lower resolution
– requires microphones to be placed at greater distances
• GCC-PHAT algorithm
– performed in the frequency domain
– relatively resource intensive
– higher resolution
– performance should not be impacted by microphone distance
• BMPH algorithm
– performed in the frequency domain
– more resource demanding than XCORR, but less than GCC-PHAT
– performance should not be impacted by microphone distance
– performs a hangover step to enhance source stability
The basic versions of these algorithms use two audio signals to estimate an angle in a 180 degree range. A 360
degree range requires four audio streams and appropriate library configuration. The algorithm and the number
of microphones are chosen by the user during library initialization. The software is designed to run in a real-time
environment.

2.1 AcousticSL software library


This library uses audio signals from microphones to execute sound source localization and estimate the angle
of arrival of the audio source. It embeds three algorithms with differing RAM and MIPS footprints and overall
performance (Knapp, C. H. (1976). The generalized correlation method for estimation of time delay, IEEE
Transactions on Acoustics, Speech and Signal Processing ASSP. 24(4), 320-327):
• XCORR cross correlation algorithm:
– performed in the time domain
– less resource intensive
– lower resolution
– requires microphones to be placed at greater distances
• GCC-PHAT algorithm
– performed in the frequency domain
– relatively resource intensive
– higher resolution
– performance should not be impacted by microphone distance
• BMPH algorithm
– performed in the frequency domain
– more resource demanding than XCORR, but less than GCC-PHAT
– performance should not be impacted by microphone distance
– performs a hangover step to enhance source stability
The basic versions of these algorithms use two audio signals to estimate an angle in a 180 degree range. A 360
degree range requires four audio streams and appropriate library configuration. The algorithm and the number
of microphones are chosen by the user during library initialization. The software is designed to run in a real-time
environment.

UM2212 - Rev 2 page 3/12


UM2212
AcousticSL software library

2.1.1 Angle resolution


Angle output resolution mainly depends on which algorithm is used and how the result is computed.

2.1.1.1 XCORR cross-correlation algorithm


Cross-correlation is based on time-domain computation and the resolution depends on both the sampling
frequency and the distance between microphones. For each combination of these parameters, the maximum
delay between two microphones (in terms of samples) is:
Distance * Sampling Frequency
DelayMax = Floor (1)
Sound Speed
This value is strictly related to the maximum number of angles that can be deduced by the routine and thus
determines the output resolution.
The minimum detectable angle over 180 degrees is:
180
Minimum Detectable Angle = Floor (2)
2*DelayMax
The larger the microphone distance, the higher the possible resolution, at a higher MIPS cost. If you choose this
algorithm, the initialization function automatically computes the achievable resolution. In this case, the initialization
function ignores the resolution parameter set by the user.

2.1.1.2 GCC-PHAT algorithm


The GCC-PHAT algorithm works with frequencies and generally offers a better resolution even in low
intermicrophone spacing configurations. You can set the desired resolution with a dedicated parameter in the
initialization structure (see the chm help file in the Documentation folder). In this case, the higher the resolution,
the higher the MIPS consumption.
Note: The resolution value is related to the use of the library with two channels; when the library is used with four
channels to perform source localization over a 360 degree range, two detected values are merged internally and
the overall resolution may be different from the initial setting.

2.1.1.3 BMPH algorithm


The block-matching pursuit with hangover (BMPH) algorithm also works with frequencies. You can set the desired
resolution with a dedicated parameter in the initialization structure.
The best resolution available for the BMPH algorithm is four degrees. While MIPS consumption and memory
requirements of the BMPH algorithm are generally lower than for the GCC-PHAT algorithm, the algorithms exhibit
similar performance as the algorithm adaptively analyzes the most relevant frequencies in the frame.

2.1.2 Microphone geometry

2.1.2.1 Two-microphone scenario


The figure below shows the plan view of M1 and M2 microphones.

Figure 1. Two-microphone arrangement

The minimum inter-microphone spacing depends on the algorithm:


• for XCORR, the distance must allow at least one sample delay between them;
• GCC-PHAT has potentially no distance constraints.

UM2212 - Rev 2 page 4/12


UM2212
AcousticSL software library

The estimated angle is measured by taking as a reference the imaginary line that passes through the middle point
of the segment, which joins the two microphones and is orthogonal to it.

2.1.2.2 Four-microphone scenario


The figure below shows the arrangement of M1, M2, M3 and M4 microphones. There are the same distance
constraints of the two-microphone scenario, but measured between opposite microphones, that is, between
M1-M2 and between M3-M4.

Figure 2. Four-microphone arrangement

UM2212 - Rev 2 page 5/12


UM2212
Library profiling

3 Library profiling

Profiling helps to evaluate the library resource consumption in terms of MIPS, RAM, and Flash. You can find
detailed information in the AcousticSL_Package.chm compiled HTML file of the Documentation folder.

UM2212 - Rev 2 page 6/12


UM2212
References

4 References

• Knapp, C. H. (1976). The generalized correlation method for estimation of time delay, IEEE Transactions on
Acoustics, Speech and Signal Processing ASSP. 24(4), 320-327.

UM2212 - Rev 2 page 7/12


UM2212

Revision history
Table 1. Document revision history

Date Version Changes

18-May-2017 1 Initial release.


Replaced references to X-NUCLEO-CCA02M1 expansion board with X-NUCLEO-CCA02M2
26-Oct-2021 2 expansion board.
Minor text changes throughout the document.

UM2212 - Rev 2 page 8/12


UM2212
Contents

Contents
1 Licensing information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 AcousticSL software library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1 AcousticSL software library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1.1 Angle resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1.2 Microphone geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 Library profiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
4 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
List of tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
List of figures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11

UM2212 - Rev 2 page 9/12


UM2212
List of tables

List of tables
Table 1. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

UM2212 - Rev 2 page 10/12


UM2212
List of figures

List of figures
Figure 1. Two-microphone arrangement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Figure 2. Four-microphone arrangement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

UM2212 - Rev 2 page 11/12


UM2212

IMPORTANT NOTICE – PLEASE READ CAREFULLY


STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST
products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST
products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of
Purchasers’ products.
No license, express or implied, to any intellectual property right is granted by ST herein.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.
ST and the ST logo are trademarks of ST. For additional information about ST trademarks, please refer to www.st.com/trademarks. All other product or service
names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.
© 2021 STMicroelectronics – All rights reserved

UM2212 - Rev 2 page 12/12

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy