Impulse response analysis

From DRC

Jump to: navigation, search

This short article presents my experience in acoustical room treatment and digital equalization. Its purpose is not to be a comprehensive review of these topics as I am still a newbie in this field. However, it is intended to give a look at what can be done quite simply using low-cost materials and some patience.

The measurement chain

Being an engineering student the first problem I had to solve was building a reliable measurement chain in order to perform good quality measurements of my speakers in my listening room.

The equipment that I collected for this purpose is:

  • A normal PC with CoolEdit (trial version works fine) and Aurora plug-ins installed, used as signal test generator and signal recording machine.
  • A Rotel RSP-1098 used as a digital to analog converter and volume control tool (set in PCM2CH mode, front speakers set as large, sub set to off).
  • Behringer DEQ2496 set in bypass mode used as an analog to digital converter and clock synched with RSP-1098 by an optical s/pdif cable (note RSP-1098 is synched to the PC by s/pdif cable, so the entire digital chain is clock synched).
  • The chain has been looped by connecting the DEQ2496's digital out to the PC's digital input.

The second stereo channel was looped by connecting the RSP-1098's analog output to DEQ2496's analog input, bypassing the microphone, mic pre-amp, power-amp, speakers, and the room: this will be called the looped channel, while the other one (the one running through microphone, mic pre-amp, power-amp, speakers, and the room) will be named the measuring channel.

Note that this chain could seem a little complicated, and someone could ask why a simple soundcard was not used. The reason is at that time I used all of this stuff to perform these measurements I owned only a cheap motherboard integrated soundcard, whose analog inputs and outputs performed very poorly.

Then I tested the chain that I built, running a logarithmic sine sweep through the looped channel in order to analyze measuring chain performance. This could be done quite deeply using RMAA, but my purpose was simply to check if everything was working fine and no errors were performed in chain building.

The ideal behavior of a measuring chain is to be completely linear both in amplitude and in phase: working in the digital world we have to manage a finite sample rate, so let's say the ideal behavior will be linear both in phase and in amplitude up to Nyquist frequency, which is calculated as (sample rate)/2. The impulse response of such a system is given by a so called Dirac impulse with some frequency limitation, which is represented in this figure:

  • http://michelespinolo.altervista.org/DRC/dirac_impulse.jpg

It could also be called "the perfect system" representation, and it is what we would really like to have for our measuring system: this would mean no alterations are introducted by the measurement chain. The next figure represents a measure through the looped channel:

  • http://michelespinolo.altervista.org/DRC/impulse_loop.jpg

As it is possible to see the result is almost perfect, except for the impulse inversion (same as putting a minus in front of the functions which describe the Dirac impulse). Obviously it as some frequency limit due to the 48Khz sample rate used, but it is a really nice result for a looped channel. The inversion could be due to a wrong connection (I.E. switching mass connector with hot pole), but I double-checked all of the wires and that was not the cause. The phenomenon is hardly audible, and it could be due to the Rotel RSP-1098 or Behringer DEQ2496, anyway this will be taken into account by simply comparing the looped channel (this is the reason why it is used!) and the measuring channel.

The next figure shows the spectrogram of the looped channel impulse representation:

  • http://michelespinolo.altervista.org/DRC/impulse_loop_spettro.jpg

It is possible to distinguish the impulse and its frequency content, which is limited to 21Khz due to the test signal used (a logarithmic sine sweep normalized to -6dB running from 10Hz to 21Khz), and some noise between in [15;16]Khz intervals stated between [-160;-140]dB. It is probably generated by the video card, anyway it is so low that it does not need to be taken into account. Some more information could be obtained by looking at the test signal recorded through the looped channel:

  • http://michelespinolo.altervista.org/DRC/sweep_loop_spettro.jpg

Here, the bottom of the scale is set at -150dB.

Now it is time to be a real perfectionist, and use a useful tool provided in Denis Sbragion's DRC: lsconv. This is a very simple program (not so simple for a non-programmer such as me) which simply convolves two raw pcm files, and gives the chance to choose a third raw pcm file to be used as a reference. This is very useful in our case, in fact running lsconv as:

lsconv sweep.pcm inverse.pcm reference.pcm

where:
 -sweep.pcm is the logarithmic sine sweep recorded through the looped channel
 -inverse.pcm is the inverse of the logarithmic sine sweep created in Cool Edit
 -reference.pcm is, in this case, again sweep.pcm

By doing this we can take into account the linear distortions given by the looped channel, obtaining a better measure (I.E. an impulse response more similar to the Dirac impulse) than the one shown above.

It is a lot easier to do than to explain, in fact the only thing you have to do (refer to John Rush's DRC guide to learn how to perform signal generation and recording in Cool Edit) is type a line in your dos prompt/linux terminal.

The result is shown here, both in waveform and spectrogram view:

  • http://michelespinolo.altervista.org/DRC/sweep_loop_lsconv.jpg
  • http://michelespinolo.altervista.org/DRC/sweep_loop_lsconv_spettro.jpg

It is possible to notice the noise is lower than in the previous image (the bottom of the scale is set at -190dB), and the waveform view shows a quite perfect Dirac impulse.

These measures could be displayed in a more practical way doing as this:

  • download http://www.etfacoustic.com/software/etf5.exe ETF5 trial version
  • upsample/downsample the impulse measured at 44.1Khz (for example using Cool Edit)
  • download http://michelespinolo.altervista.org/DRC/Blank-44.1Khz.etf this file
  • Copy approximately 140,000 sample centering the impulse peak at sample number 2,205 and substitute the first 140,000 samples in the file downloaded above (raw 16bit LSPCM 44.1Khz)
  • Save the ETF file and open it by ETF regenerating all measures: you are done!

A practical example

After you have set, measured, and calibrated your chain it is time to do something usefull for your listening experience.

The measuring channel is used here with the same procedure used for the looped channel.

First you have to know that DRC is a very powerful tool. It obviously is not magical however: it needs to understate some physics laws, which limits its "power". I am not an expert about this topic, so maybe someone else could add a deeper explanation. Anyway, to continue reading, what you have to know and keep in mind is that DRC's "power" is a function of frequency. This means DRC can easily correct a room's low frequencies linear distortion (stationary waves, reflections, etc...), but can not correct high frequency reflection for example.

Fortunately, it is quite easy and economical to correct high frequency room acoustics. Basically what you need is a very cheap laser pointer (such as the one used in business presentations, or a pen-laser), a mirror, and some acoustic absorbers (such as pyramid panels or something similar). The rule of thumb I used is to sit in the listening position (which needs to be as symmetrical as possible relating to the front speakers). Aim the laser pointer at the mirror which is kept in contact with a wall (roof, floor, side walls, ect). Move the mirror around until the laser pointer shines a dot onto the cone of the tweeter. Then a 1 meter² (approx. 3.5 ft²) acoustic absorber is placed at the same location where the mirror was previously.

This rule gave me optimal results, with all first reflections absorbed and corrected. Obviously I checked the result with some measures. Here you can see what I got:

  • http://michelespinolo.altervista.org/DRC/senza/impulso_dx_10ms.jpg

This is a measure of my right channel before any acoustic correction: the marked peaks are due to wall reflections, which are very strong especially for the first three.

Early reflections are very deleterious to the listening experience, giving a "fuzzy" and unfocused stage reproduction. LEDE acoustical treatment philosophy suggests that there should be no reflections for the first 25ms, so this what should be achieved.

Here you can see the same measure displayed by ETF:

  • http://michelespinolo.altervista.org/DRC/senza/impulso_dx_10ms_etf.jpg

The first 10ms after the direct sound (the main peak) are displayed: notice when reflections arrive help to find where the sound reflection point is placed. Sound travels 340m/s (1133ft/s) in dry air, which means that for every millisecond 34 cm (13.5 in) are covered. This means that a reflection displayed after 2 ms covers 34 cm² (13.5 in²) more than direct sound: this is a good indication to discern if the reflection occurs on the floor or on the side wall for example.

ETF allows the display of multiple aspects of your room's acoustics:

  • http://michelespinolo.altervista.org/DRC/senza/TE_dx_senza.jpg

Time-energy curves, for example, are very usefull to get an idea of the delayed energy (the cause of "fuzzy" stage) you have in your listening room and which frequency range contributes more to this. So it helps to understand if you need absorbers (they can help down to 1000Hz as a rule of thumb) or you need DRC (if you have a lot of energy associated with lower frequency range). In my case both are needed! :-)

These curves help you to find reflections too. Let us imagine that you have very large speakers (I.E. four way tower speakers) and you use only a very few number of acoustic absorbers in order to achieve better room cosmetics. This could lead to a treatment of early reflections given by your tweeter, but maybe, not the ones given by the mid-range or mid-woofer driver. Ok, it is quite difficult but it happens. This is just an example to show how you can notice reflections related to different frequencies! So here you will see a peak for lower frequency range curves only.

Now it is possible to analyze the amplitude and frequency response of your speaker

1/3 octave full range frequency response:

  • http://michelespinolo.altervista.org/DRC/senza/dx_rf_etf.jpg

Linear low frequency response:

  • http://michelespinolo.altervista.org/DRC/senza/lowrf_dx_etf.jpg

Full range phase response:

  • http://michelespinolo.altervista.org/DRC/senza/phase_dx_senza.jpg

Keep in mind that these measures are done without taking into account the microphone calibration file, so they are only qualitative and not quantitative results (especially in amplitude): however, they are still usefull to determine room resonances (peaks or dips in linear low frequency response), reflections, and general behavior. With more you can get an idea by these images what a measure should look like.

Now the next step will be to improve my room's acoustics.

Room acoustics improvement

This section will show you how to read and classify different measures, and how it is possible to point out improvements achieved by both digital and traditional room treatments. An example of a physical measure is given in the section above.

  • http://michelespinolo.altervista.org/DRC/impulso_canale.jpg

This is the impulse response of my left channel: it is possible to notice four main reflections (in particular the first and the second are really strong) which are very deleterious for listening quality. The first step is to improve room acoustics using a traditional approach (I.E. absorbers, sound diffusers, bass traps, etc). For example here:

  • http://michelespinolo.altervista.org/DRC/sinistro/impsinnoeq.jpg

It shows the left channel's impulse response after absorbers and carpets have been displaced: it is easy to notice all of the strong reflections are gone, and the whole impulse response is less confused (it is less fuzzy). Now this acoustic treatment is far from perfect or at least acceptable for very advanced users: more could be done, but keep in mind this is just an example.

The following couple of images will show measurements made before and after digital room correction treatment (made by Denis Sbragion's DRC). DRC is set to use the "normal" profile (normal.drc) with some minor modifications.

  • Before DRC - http://michelespinolo.altervista.org/DRC/sinistro/impsinnoeqETF.jpg
  • After DRC - http://michelespinolo.altervista.org/DRC/sinistro/sinistro_bk_impETF.jpg

Here it is possible to notice that DRC's correction is stronger in the firsts 2ms, while it is softer after this time. It is useful to notice how DRC can perform improvements in both amplitude and time domain: for example the reflection after 8ms is less stronger after DRC, and the impulse response is less "fuzzy" after the first 2ms, which means you have some kind of sound absorption done in a digital way.

Next two images show the linear frequency response: it's quite hard to read these kind of graphs, anyway some improvements in term of amplitude linearity could be noticed as well.

  • Before DRC - http://michelespinolo.altervista.org/DRC/sinistro/sinistro_noeq_linear.jpg
  • After DRC - http://michelespinolo.altervista.org/DRC/sinistro/sinistro_bk_linear.jpg

Looking only at the low frequency response, (I.E. below 200Hz) the improvements achieved by DRC are quite incredible:

  • Before DRC - http://michelespinolo.altervista.org/DRC/sinistro/sinistro_noeq_lowfreq.jpg
  • After DRC - http://michelespinolo.altervista.org/DRC/sinistro/sinistro_bk_lowfreq.jpg

I think that these images are self-explanatory, however, some little considerations could be done: the second image is obviously much more linear, all peaks have been removed. The amplitude response is contained in +-3dB range, which is aa incredible result for the low frequency range.

Next two images show 1/3 octave frequency response:

  • Before DRC - http://michelespinolo.altervista.org/DRC/sinistro/sinistro_noeq_freq_response.jpg
  • After DRC - http://michelespinolo.altervista.org/DRC/sinistro/sinistro_bk_freq.jpg

Here, no comments are really needed!:-)

Phase curves show how DRC tends to drive the system to its minimum phase.

  • Before DRC - http://michelespinolo.altervista.org/DRC/sinistro/sinistro_noeq_phase.jpg
  • After DRC - http://michelespinolo.altervista.org/DRC/sinistro/sinistro_bk_phase.jpg

Having both speakers emitting the same phase response is very good for low frequncies: this means they arrive to the listener phased, with no cancellation phenomena. For high frequencies the result is a very small sweet spot listening area, which could lead to a broken stereo effect if the listener is not properly placed (i.e. the speakers are displaced symmetrically with respect to the listener), anyway with some tweaking of DRC's parameters this effect could be dumped.

  • Before DRC - http://michelespinolo.altervista.org/DRC/sinistro/sinistro_noeq_TE.jpg
  • After DRC - http://michelespinolo.altervista.org/DRC/sinistro/sinistro_bk_TE.jpg

Time-Energy curves show a more dumped system after digital equalization: this means that the stage is more focused, and less fuzzy. It is worth it to notice that big improvements are made in the lower frequency range, while in higher frequency little or no improvements are achieved. This is the reason why conventional acoustic treatments should be taken in consideration for the high frequency range.

Here it is possible to download the .etf files related to my left channel:

  • Before DRC - http://michelespinolo.altervista.org/DRC/sinistro/sinistronoeq.etf
  • After DRC - http://michelespinolo.altervista.org/DRC/sinistro/left092-bk-dxtc.etf
Personal tools