on the use of scilab acoustical applications · philippe glé, christophe heinkelé, guillaume...
TRANSCRIPT
Philippe Glé, Christophe Heinkelé, Guillaume Dutilleux
16/05/2014
On the use of Scilab for Acoustical Applications using an Automatic Generation of Toolboxes
Direction territoriale Est
2
, a new public body in support of national and local authorities in the field of sustainable development
16/05/2014 – Acoustical Toolboxes
l Understanding and preventing risks l Developing new infrastructures l Energies and climate l Managing existing infrastructures l Impact on health l Mobility and transportation l Sustainable regions and natural resources l Sustainable cities and buildings
3 16/05/2014 – Acoustical Toolboxes
17 researchers, engineers and technicians working on: l Propagation of sound in complex media l Noise emission of infrastructures l Noise barriers characterisation l Building acoustics l Acoustics of porous and bio-based materials l Bioacoustics
Strasbourg Acoustics Group
4
Acoustics & Scilab
16/05/2014 – Acoustical Toolboxes
l Scilab used since 2000 for acoustical applications in Strasbourg (noise generation, sound emission, propagation and dissipation) l Scilab toolboxes used to share, diffuse and reuse the code, but…
Scilab toolboxes functioning Wished behaviour - Functions maintained separated - Functions grouped by theme in a
same file (easier for the coding, pre-tests and debugging)
- Code and related help in separate files (help file in XML format)
- Code and help in same .sce or .sci file
- Manual writing of auxiliary files to build and load
- Automatic generation of builder and loader files
5
Presentation content
16/05/2014 – Acoustical Toolboxes
l Automatic generation of toolboxes l Programming approach l Generation process l Demonstration
l Overview of the acoustical toolboxes l Sound acquisition and emission l Sound propagation and dissipation l Miscellaneous
l Conclusions and outlooks
7
Automatic generation of toolboxes Programming approach
16/05/2014 – Acoustical Toolboxes
1. Source code is written in Scilab files, regrouping several functions
2. Comments are used to integrate informations and complementary code: l General description of the file l Functions descriptions l Help l Examples and/or unit tests
3. A generation file is used to : l Generate scripts files (1 file/function) l Build help on the basis of the source code l Load the toolboxes in Scilab platform
8
Automatic generation of toolboxes Programming approach
16/05/2014 – Acoustical Toolboxes
Short description of the file content, authors and date
Additional informations dealing with the function (nodoc to prevent help generation for the function)
Function description
Function body
Example and/or unit test (//&name to copy bloc starting with /name written in head section)
l Syntax of the files (example with one function)
9
Automatic generation of toolboxes Generation process
16/05/2014 – Acoustical Toolboxes
For each toolbox (1 toolbox/source code folder)
1. Toolbox folder and files generation l Directories creation l Creation of scripts and other required files (builder.sce, .start & .quit files, …) l Generation of split script files (macros) and xml files (help) using Perl l Basic syntax check (brackets, loops, …)
2. Building of code and help files (builder.sce)
3. Loading in Scilab (loader.sce)
4. Testing l Execution of the lines of code placed after the body of the functions
10
Automatic generation of toolboxes Demonstration
16/05/2014 – Acoustical Toolboxes
1. Illustration of the syntax on demo functions
2. Toolbox generation with demo functions
3. Application to Acoustical Toolboxes
12
Overview of the acoustical toolboxes Sound acquisition and emission
16/05/2014 – Acoustical Toolboxes
1. Toolbox “Audio recording” l Audio I/O interface l Based on PortAudio Cross-Platform
2. Toolbox “Vibrations” l Vibration signals processing
3. Toolbox “Emission” l Road Emission Models
4. Toolbox “MLS generation” l Maximum Length Sequence noise generation l Impulse response calculation using FHT
13
Overview of the acoustical toolboxes Sound acquisition and emission - Demonstration
16/05/2014 – Acoustical Toolboxes
1. Toolbox “Audio recording” l Audio I/O interface l Based on PortAudio Cross-Platform
4. Toolbox “MLS generation” l Maximum Length Sequence noise generation l Impulse response calculation using FHT
14
Overview of the acoustical toolboxes Sound propagation and dissipation
16/05/2014 – Acoustical Toolboxes
1. Toolbox “Propagation” l Models for the propagation of sound over
impedance ground
2. Toolbox “Micro-meteo effects” l Modelling of micro-meteorological effects
on sound propagation
3. Toolbox “Porous media“ l Models of dissipation of sound in porous
materials
15
Overview of the acoustical toolboxes Sound propagation and dissipation - Demonstration
16/05/2014 – Acoustical Toolboxes
3. Toolbox “Porous media“ l Models of dissipation of sound in porous materials
16
Overview of the acoustical toolboxes Miscellaneous
16/05/2014 – Acoustical Toolboxes
1. Toolbox “Optimization” l Genetic algorithms, simulated annealing l Evolution strategies (ES, CMA-ES), clonal selection, particles swarm
(PSO)
2. Toolbox “Maths & Stats” l Numeric integration l Signal processing and windowing
3. Toolbox “ Report generation” l Export to Docbook format l LaTeX tables generation
4. Toolbox “ XML support” (obsolete) l Conversion between XML & Scilab structured data (tlist)
17
Conclusions & Outlooks
16/05/2014 – Acoustical Toolboxes
l Toolboxes generation A tool to automate toolbox production Easy implementation of help and test files Need a strict syntax Only works with Scilab scripts (macros), or precompiled libraries or
executables: Toolboxes with source code files (C, C++, Fortran, Java) not tested
l Acoustical application A wide range of Toolboxes from sound emission to signal processing Possible applications in other fields (Audio I/O, MLS, …) To date, Toolboxes essentially used in Cerema network
Philippe Glé, Christophe Heinkelé, Guillaume Dutilleux Acoustics Group CEREMA, LR Strasbourg +33 (0)3 88 77 46 28 [email protected]
Thank you for your attention…
…any questions?
Direction territoriale Est