FRidh's blog

Discovery consists of seeing what everybody has seen and thinking what nobody has thought -- Albert Szent-Gyorgyi

Back in Gothenburg for SONORUS

Last month I was back in Gothenburg for a week and it was nice! I've been living in Gothenburg for close to two years and being back there brought up some good memories. The reason I was there again was that we had a course for SONORUS on leadership.

In the course we treated topics like communication, knowledge, coaching, group dynamics and decision making. There was one very interesting exercise on group dynamics. In 20 minutes the entire group had to agree on a list of statements related to meetings. We also built a tower using dry spaghetti, a meter of tape and a marshmallow, or at least we tried!

Besides the course we spent time on some practical matters in the project, like discussing how we would cooperate, e.g. with regards to sharing data. Another topic that was discussed is the upcoming International Noise Awareness Day, but more about that later!

Sparse arrays in Python

Numpy offers dense arrays and both Numpy and Scipy offer sparse matrices. However, they don't offer any sparse array solution. On the web I found some implementations of sparse arrays but they were generally quite limited:

  • ndsparse operators only support scalars
  • sparray operators only support other sparse arrays

What I would like to do is replace in some of my calculations certain dense arrays with sparse arrays. Numpy compatibility is therefore important. A first version can be found here.

What works?

  • The basic operators work with scalars, sparse arrays and dense arrays.
  • Basic slicing is partially supported. newaxis, None, slice and Ellipsis aren't really supported yet.
  • Converting from dense to sparse and vice versa

What's left to do?

  • Finish basic slicing
  • In-place operators
  • Advanced slicing
  • Enforcing dtype
  • Cythonize

Because I was curious I Cythonized it quickly. While it is much much faster than the plain Python implementation it still is about a factor 1000 slower than dense arrays when operatoring with a dense array. Unfortunately this is too slow for my use case, so for now I reverted to using dense arrays but with a reduced model size. Nevertheless I am sure there is a significant performance increase possible.

Planet Acoustics

Recently I set up a new Planet aimed at acousticians called Planet Acoustics. A Planet is basically a feed reader; it downloads news feeds published by web sites and aggregates their content together into a single combined feed. The purpose of this Planet is to collect blogs and news by and for acousticians.

Planets are very popular in the open-source software development world. Planets like Planet KDE, Planet Debian, Planet Python and Planet SciPy syndicate posts from many people all over the world who write posts related to respectively KDE, the Debian project, Python programming language and the Python module SciPy.

The posts on such a Planet give a good overview of which efforts are currently taking place. Contrary to news posts, press releases or journal articles they are informal. People write about their current work, problems they face, events they attend and often share nice tips and tricks or even detailed tutorials.

I hope that Planet Acoustics will become a Planet with many nice posts regarding acoustics and the life of acousticians. If you would like to have your posts syndicated, then please send an e-mail to admin@planetacoustics.org with your name and a link to your Atom or RSS feed. Hopefully, in time, Planet Acoustics will become just as successfull as those Planets I referred to :-)

Blogging with Pelican

Joining many others I've just switched my blog from Wordpress to Pelican. Writing posts in Markdown or ReStructuredText and no more Wordpress upgrades, yay :-)

Modelling a turbulent atmosphere

When listening to an aircraft flying over, you can hear that the level and spectral contents fluctuate somewhat. These fluctuations are due to turbulence in the atmosphere, affecting the sound generation (variable load on engines) and the sound propagation. In order to create a plausible auralisation of aircraft noise these fluctuations have to be accounted for.

Turbulent flow can be modeled as a superposition of a spectrum of fluctuations and eddies upon a mean flow. A common approach for noise predictions methods to include the effects of atmospheric turbulence is to use a statistical approach; generate many random 'frozen' turbulence fields, calculate for each of these how sound propagates through them and then average your results. The 'frozen' fields represent snapshots in time of how the atmosphere could look like. These snapshots are calculated based on a spectrum of fluctuations. Well known descriptions of these spectra are the Gaussian and von Karman spectra.

The figure belows shows a portion of two turbulence spectra.

Gaussian and Von Karman spectral densities as function of wavenumber.

A random turbulence field is created by the superposition of modes. The figure below shows the amplitude of these modes as function of wavenumber.

Gaussian and Von Karman mode amplitudes as function of wavenumber.

And finally a figure showing the refractive-index fluctuation. The field is generated using a Von Karman spectrum and 200 modes.

Von Karmann refractive-index field.

Lloyd's mirror effect

When two waves are superimposed on each other it is possible that the resultant wave has a higher or lower amplitude at certain moments in time. This phenomenon is called interference. One classical experiment related to interference is Lloyd's mirror. In the classical experiment, light from a monochromatic slit source reflects from a glass surface at a small angle. The reflected light then interferes with the direct light from the source, forming interference fringes. This pattern is called Lloyd's mirror effect.

In the classical experiment light is used but the same result can be obtained using sound waves. When a sound wave is reflected from a surface the reflected sound wave will also interfere with the direct sound wave. This phenomenon can also be experienced with aircraft noise due to the ground reflection. However, because an aircraft generally (hopefully?) moves in the sky, the interference pattern changes over the time.

Today I managed to include this effect in my aircraft auralisation tool. The figure below shows a spectrogram of a synthesized aircraft passage. In the spectrogram the Doppler shift can be seen as well as many curves which represent interference fringes, the Lloyd's mirror effect. The mirror effect is in this case solely due to the ground. Now, since my implementation supports reflections from buildings as well, the effect will also be obtained due to these reflections from facades, although far less pronounced.

Spectrogram of a synthesized aircraft passage showing the Doppler effect and Lloyd's mirror effect. The x-axis shows time and y-axis frequency. The color indicates sound pressure.

Project meeting of SONORUS in Ghent, Belgium

Last week was the first winterschool of the SONORUS project as well as a Network Meeting and this was also the first time for us, ESR's, to meet each other and all other partners involved in this project. SONORUS is an Initial Training Network under the FP7 People Programme in the field of Urban Sound Planning, aiming at improving the acoustic environment of our cities in a holistic approach. In the project, 14 young researchers (ESR's) work together on improving the soundscape of several cities in conjunction with their individual research projects.

On Sunday evening prior to the winterschool there was a dinner for all those involved in the project, a very pleasant way to get to know each other. On Monday morning the Network Meeting began. An introduction to the project was given by the project leader and the research partners also presented themselves. Juergen Bauer of WIT then gave a talk named 'Urban sound planning in the bigger context' stressing the importance of Urban Sound Planning. That afternoon the ESR's presented themselves as well as the involved city partners showing their cases.

Tuesday morning the winterschool truly began. From then on every day was packed with lectures and workshops. The winterschool dealt with urban sound propagation and therefore sound propagation and modelling technique were extensively discussed along with standard methods and the European Noise Directive. The winterschool was concluded on Friday with a small exam.

A topic that briefly passed by during a presentation of Timothy van Renterghem seemed to have impressed me quite a bit. He briefly showed the results from his research on the importance of rooftops for road traffic noise shielding. Basically, the shape of a rooftop can have great influence on how much sound is diffracted and thus how quiet a courtyard could potentially become.

The importance of roof shape for road traffic noise shielding in the urban environment environment, T. Van Renterghem et al., Journal of Sound and Vibration, 2010.[/caption]

The Tuesday afternoon we had an initial look together at the test cases and groups were formed to see how they would tackle the problems that were presented. Each group discussed a single test site and concluded the session with a presentation about their initial impressions of the challenge at hand.

Right from the start of this week project members started discussing their work and how they might cooperate. Thursday after the lectures I gave a short presentation on tools for collaboration resulting in a brief discussion on the topic. While we were all too tired to go into the details at the time my general impression was that the consensus was that we should definitely look deeper into these kind of tools.

All in all I think this meeting was quite fruitful and I'm looking forward to the next time!

Auralisation of aircraft noise

Almost two months ago I started working at the Swiss research institute Empa in Dübendorf, Switzerland, as part of a European Seventh Framework project called Sonorus. The project is about urban sound planning and my task is to develop an aircraft noise simulator.  The first two months passed really fast. It's a great place to work, and the type of work really fits me. Obviously I began with reading a bit about the topic and thinking how I would tackle the issues at hand. But very soon I began with implementing the first bits and mainly prototyping what I think it should become.

The idea is that I develop an aircraft noise simulator capable of simulating how an aircraft pass-by sounds at a stationary receiver while in an urban environment. This means effects like spherical spreading, Doppler shift and reflections at the ground and facades have to be included in the propagation model. But first it is important to obtain a good time-frequency representation of an aircraft, and obviously these depend on the make or type of the aircraft as well as the conditions. Finally, the aircraft noise has to be reproduced using for example an Ambisonics setup.

Now, there are quite some challenges here and 'unknowns' to be solved . While I have a good idea of how I will build such a tool for auralisation, there are many details requiring attention. An example is how much does turbulence in the atmosphere influence the propagation? How to simulate decorrelation? How to reproduce correct over-head information? And quite some more questions that need answering the coming three years :-)

Final weeks in India

It's four weeks now that I am back in Sweden. June the 2nd I arrived back home in Gothenburg. It was quite a change, for sure! But it was definitely good. I really enjoyed my 4.5 months India experience, but after some time I was starting to feel like being home again. Let's give a short summary of the last month or so in India.

I spend almost a month in McLeodGanj, a town a liked and disliked. There are so many foreign tourists, that you don't have the feeling you're in India. And this is both a positive and negative thing I found. Anyway, during my stay there I met again several travelers from before which was very nice! It's good to see some familiar faces once in a while. After McLeodGanj - including a night at the Snowline Cafe - I headed to Srinagar, Kashmir. It was quite a long bus journey; first a 5 hour ride from Dharamsala to Jammu, and after that a night bus from Jammu to Srinagar. While the ride was supposed to take about 12 hours it took in fact 16 due to two punctures, and a driver deciding to sleep it off instead. Unfortunately for him the police didn't agree with him and put him to work. The ride turned out to be really nice, with amazing views and nice discussions.

In Srinagar I spend only a couple of days. Somehow the city didn't appeal to me. I think it was because it is way too touristic without offering me any reasons to stay. So, after Srinagar I took the amazing two-day bus ride to Leh, Ladakh! Amazing views, and nice dangerous small roads. Awesome road.

Ladakh is beautiful. Certain locations are simply stunning. It is a pity though that all the valleys are full of military bases. This does destroy some of the immersion. It's also unfortunate that Leh has been growing so much; big concrete hotels are appearing everywhere and they simply don't fit in. Since I had quite some work left on my thesis I wasn't able to explore much of Ladakh but I will definitely come back here for trekking, or maybe some teaching? We'll see!

Holi and McLeod Ganj

In my previous post I wrote how few foreign tourists could be found in Shimla. Well, I've spend some weeks now here in McLeod Ganj, and I  can tell you it's quite the opposite. You really have to look hard to find Indian people around here! Okay, they're still here, but seem to be a minority compared to the huge amounts of Tibetan people and foreign tourists.

Anyhow, let's continue where I finished last time. I spend quite some time in Shimla, and during my stay I met again some travelers I met before in Udaipur and Jodhpur, which was quite nice. Unlike me they have been to many more places since we split ways so it was very nice to catch up and hear their stories of their travels. It was actually the last day for me in Shimla when I met two Canadians I had met before in Jodhpur. While they decided to spend Holi in Shimla I went back to Delhi.

So....Delhi and Holi. Quite some people are afraid of this combination, but I must say there is no reason at all. While it can get chaotic (drunk rickshaw drivers doing tricks on their rickshaws, waterballoons coming at you from all directions), it is a VERY nice and colourful day! I had a great day and stay there and look forward to a next Holi :-)

Some days after Holi I took the bus again, and this time to Dharamsala or more precise, McLeod Ganj. McLeod Ganj is the area where the Tibetan government in exile can be found and as such many Tibetan refugees live here. Many foreigners could also be found due to popularity of the Dalai Lama and Tibetan Buddhism. While I am one of the foreigners here I must say I am definitely not here for this reason. Most foreigners that I met here in McLeod Ganj come to learn about that culture, for meditation or to smoke.

Again I met some travelers from before here, which was nice to spend some time with again. By now though they've all left, and so I feel it's time to move on again as well. As I've been working real hard on my thesis again for a while (except last week due to a stupid injury) I feel like having a short break again. Therefore my plan is to go to Dalhousie for a dat or two, departing at the end of the weekend. After that I continue my plans by heading to Srinagar. I haven't figured out yet whether I go there via Udhampur or Jammu. While I don't want to go via the latter I am told it is easiest to go from there. Hmmm, I'll have to think about it. Maybe when I go up Triund again and spend the night at the Snowline Cafe?