Swept Sine Chirps or Measuring Impulse Response Ian H. Chan Design Engineer Stanord Research Systems, Inc. Log-sine chirp and variable speed chirp are two very useul test signals or measuring requency response and impulse response. When generating pink spectra, these signals posses crest actors more than 6dB better than maximumlength sequence. In addition, log-sine chirp separates distortion products rom the linear response, enabling distortion-ree impulse response measurements, and variable speed chirp oers lexibility because its requency content can be customized while still maintaining a low crest actor.. Introduction Impulse response and, equivalently, requency response measurements are undamental to characterizing any audio device or audio environment. In principle, any stimulus signal that provides energy throughout the requency range o interest can be used to make these measurements. In practice however, the choice o stimulus signal has important implications or the signal-to-noise ratio (SR), distortion, and speed o the audio measurements. We describe two signals that are generated synchronously with FFT analyzers (chirp signals) that oer great SR and distortion properties. They are the log-sine chirp and the variable speed chirp. The log-sine chirp has a naturally useul pink spectrum, and the unusual ability to separate non-linear (distortion) responses rom the linear response [,]. The utility o variable speed chirp comes rom its ability to reproduce an arbitrary target spectrum, all the while maintaining a low crest actor. Because these signals mimic sines that are swept in time, they are known generically as swept sine chirps.. Why Swept Sine Chirps? Most users are probably amiliar with measuring requency response at discrete requencies. A sine signal is generated at one requency, the response is measured at that requency, and then the signal is changed to another requency. Such measurements have very high signal-to-noise ratios because all the energy o the signal at any point in time is concentrated at one requency. However, it can only manage measurement rates o a handul o requencies per second at best. This technique is best suited to making measurements where very high SR is needed, like acoustic measurements in noisy environments, or when measuring very low level signals, like distortion or ilter stop-band perormance. In contrast, broadband stimulus signals excite many requencies all at once. A 3k sample signal, or example, generated at a sample rate o 64kHz can excite 6, dierent requencies in only hal a second. This results in much aster measurement rates, and while energy is more spread out than with a sine, in many situations the SR is more than suicient to enable good measurements o low level signals. We will show several such measurements in Section 5.. - -. 3 - -. -3.....3.3.4.4 Figure. a) Close-up o an MLS signal showing the large excursions due to sudden transitions inherent in the signal. Crest actor is about 8dB instead o the theoretical db. b) Three signals with pink spectra. From top to bottom, log-sine chirp, iltered MLS, and iltered aussian noise. The crest actor worsens rom top to bottom. All signals have a peak amplitude o V. Signals oset or clarity. page
Swept Sine Chirps or Measuring Impulse Response A igure o merit that distinguishes dierent broadband stimulus signals is the crest actor, the ratio o the peak to RMS level o the signal. A signal with a low crest actor contains greater energy than a high crest actor signal with the same peak amplitude, so a low crest actor is desirable. Maximum-length sequence (MLS) theoretically its the bill because it has a mathematical crest actor o db, the lowest crest actor possible. However, in practice, the sharp transitions and bandwidth-limited reproduction o the signal result in a crest actor o about 8dB (Fig. a). Filtering MLS to obtain a more useul pink spectrum urther increases the crest actor to -db. oise is even worse. aussian noise has a crest actor o about db (white spectrum), which increases to 4dB when pink-iltered. On the other hand, log-sine chirp has a measured crest actor o just 4dB (Fig. b), and has a naturally pink spectrum. The crest actor o variable speed chirp is similarly low, measuring 5dB or a pink target spectrum. These crest actors are 6-8dB better than that o pink-iltered MLS. That is, MLS needs to be played more than twice as loud as these chirps, or averaged more than our times as long at the same volume, or the same signal-to-noise ratio. 3. enerating Swept Sine Chirps - Compounding the low crest actor advantage are the unique properties o log-sine chirp to remove distortion, and variable speed chirp to produce an arbitrary spectrum. To understand how these properties come about requires a knowledge o how these signals are constructed. First up is the log-sine chirp. The log-sine chirp is essentially a sine wave whose requency increases exponentially with time (e.g. doubles in requency every ms). This is encapsulated by [] π T t x( t) = sin exp( ) () T where is the starting requency, the ending requency, and T the duration o the chirp. This signal is shown in Figure. The explanation o its special property will come in Section 4, when the signal is analyzed. The variable speed chirp s special property comes rom the simple idea o using the speed o the sweep to control the requency response [3]. The greater the desired response, the slower the sweep through that requency (Fig. 3). To generate a variable speed chirp, it is easiest to go into the requency domain. This entails speciying both the magnitude and phase o the signal, and then doing an inverse-fft to obtain the desired time-domain signal. The magnitude o a variable speed chirp is simply that o the desired target requency response H user ( ). The phase is a little trickier to speciy. What we have to do is irst speciy the group delay o the signal, and then work out the phase rom the group delay. The group delay or variable speed chirp is [3] where ( ) = ( d ) C H ( ) () + C = user ( ) ( ). (3) = S / H user ( ) Power (dbvrms) -3-4 -5. - -... Figure. a) Power spectrum o a log-sine chirp signal. It is pink except at the lowest requencies. b) Time record o a logsine chirp signal. The requency o the signal increases exponentially beore repeating itsel..3.4 True aussian noise has an ininite crest actor; the excursion o the noise here was limited to ±4s. page
Swept Sine Chirps or Measuring Impulse Response That is, the group delay at is the group delay at the previous requency bin, plus an amount dependent on the magnitude-squared o the target response. The group delay at the irst requency bin is ). ( The starting and ending group delays, ) and ( ( ), represent the start and stop times o the sweep respectively, and are speciied by the user. They must all within the time interval o the chirp T ( ) < ( ) T. (4) Because the signal is generated in the requency domain, the actual start and stop times will leak over a little in the time domain. Depending on your requirements, you may want to start the sweep a little ater, and stop the sweep a little beore T. dφ( ) Recalling that group delay ( ) =, phase (in πd radians) can be obtained by integrating the group delay φ ( ) = π ( ) d. (5) This is best done numerically. 4. Analysis o Swept Sine Chirps Swept-sine chirps are analyzed using twochannel FFT techniques (Fig. 4) to determine the requency response o the device under test (DUT), Y ( ) H DUT ( ) = (6) X ( ) where Y ( ) is the FFT o the input channel, and X ( ) is the FFT o the reerence channel. Division by the reerence channel response (assuming it is non-zero) cancels out both the magnitude and phase irregularities present in the test signal. This automatically accounts or any intended or unintended non-latness in the stimulus signal, as well as zeros out any group delay present. The impulse response o the DUT is then the inverse-fft o H DUT ( ). ow we can see how the log-sine chirp can create a distortion-ree impulse response. The group delay o a log-sine chirp (which will be removed), is ln( ) ( ) = T. (7) enerator Power (dbvrms) -3-4 -5-6 -7. - -. DUT. Reerence Ch. Input Ch. ch. FFT Cross- Spectrum Frequency Response Time ating FFT ated Response ETC Windowing + Calculation Inverse FFT Inverse FFT Impulse Response Energy Time Curve Figure 4. Diagram illustrating signal low in a -channel FFT measurement, such as ound in the SR Audio Analyzer employed in this paper. Time gating and energy-time curve (ETC) computation are typically used in acoustic measurements.. Figure 3. a) Power spectrum o a variable speed chirp signal. In this example, the target EQ was that o USASI noise. b) Time record o the same variable speed chirp signal. The signal dwells at requencies that have large emphasis, and speeds through requencies with small emphasis, to achieve a low crest actor (4.4dB in this case)..3.4 It is also important that the FFT sees a consistent stimulus spectrum, especially i there are delays between reerence and input channels. Using a noise-like stimulus that has inconsistent shot-to-shot spectra can result in unreliable measurements. page 3
Swept Sine Chirps or Measuring Impulse Response This represents the time at which the (undamental) requency is produced. The time at which the th harmonic,, is produced is the time when the undamental is. Thus, the group delay o the harmonic is ln( ) ( ) = T. (8) Following the two-channel FFT analysis, the group delay o the undamental is zeroed out, meaning that the time delay at each requency is subtracted according to (7). The group delay o the harmonics thus becomes ln( ) ( ) = ( ) ( ) = T. (9) ote that it only depends on the order o the harmonic,, but not at all on the requency,! So ater analysis, all requencies arising rom a particular harmonic order arrive at the same time, creating an impulse response that precedes the linear impulse response by a time (Fig. 5a). This is quite a result, and is a property unique to the log-sine chirp. 5. Examples o Swept Sine Measurements For the measurements made here, we employed our new SR Audio Analyzer. This analyzer includes both log-sine chirp and variable speed chirp generators, as well as a two-channel FFT analyzer (actually, it has two). In Figures 5 and 6, we use log-sine chirp to measure the behavior o an elliptical low-pass ilter with a 6kHz cut-o requency. Figure 5a shows the impulse response o the ilter with the harmonic impulses neatly separated in time. In this example, =495 and T=8ms, and all the harmonic impulses are seen to arrive at their expected times. By time-gating the impulse response to Impulse Response (unitless) - 4th Harmonic 3rd Harmonic nd Harmonic nd Harmonic (db) -6-8 - Log-sine Chirp Stepped Sine -4x -6 - -3 - - 4 6 8-5 -6 Response with Distortion Response without Distortion - Response (db) -7-8 Phase (deg) - -3-9 -4-5 5 Figure 5. a) Measured electrical impulse response o an elliptical low-pass ilter with log-sine chirp. The main response (which is distortion-ree) occurs ater t=. The non-linear responses consist o peaks that precede the main response, with the higher-order responses occurring earlier. b) By gating the impulse response, we can examine the stop-band requency response with distortion products (green), and without (blue). The intrusion o nd harmonic energy at -65dB up to twice the low-pass requency is clear. -5-6 4 6 8 Frequuency (Hz) Figure 6. a) Second harmonic distortion o the elliptical lowpass ilter, as measured using a log-sine chirp (blue), and a conventional stepped sine sweep (red). Both measurements made reerred to input. The log-sine chirp data tracks the conventional measurement very well down to about -db. b) Phase response o the second harmonic with the delay removed, as measured using a log-sine chirp. page 4
Swept Sine Chirps or Measuring Impulse Response include or exclude the distortion impulses, we obtain the stop-band requency response o the DUT with or without distortion (Fig. 5b). The blue curve is the distortion-ree requency response o the ilter, while the green curve includes the distortion components. The dierence between the two curves is entirely because o distortion (predominantly second harmonic, as evidenced by the ~khz roll-o, which is twice the ilter cut-o requency). ow, each harmonic impulse response in Figure 5a captures the ull behavior o the distortion product (amplitude and phase), and may be analyzed just like the linear response. In igure 6, the second harmonic impulse response is time-gated and analyzed (between -4ms and -4ms, with 5% raised cosine windowing applied to both ends). 3 The admittedly unusual second harmonic distortion response tracks the results o a conventional stepped sine measurement closely, so this veriies that the distortion measured with log-sine chirp is accurate. Phase response o the second harmonic is shown in Figure 6b, ater the constant delay has been removed. These measurements were averaged or less than a second (8ms chirp averaged 4 times). ext we demonstrate using the variable speed chirp to make an acoustic measurement o a loudspeaker. Being able to tailor the requency response o the test signal is oten very useul. In this case, we chose a target EQ o USASI noise (Fig. a), which resembles the requency spectrum o program material. We also chose it because power alls o below Hz, and due to time-gating, we did not expect meaningul data below a ew hundred hertz anyway. The measurement setup used was similar to Figure 4, except that the driving ampliier output was ed into the reerence channel o the SR Audio Analyzer (Fig. 7). Doing so removes the requency response o the driving ampliier, leaving the measured response as that o the -way speaker (DUT) and the calibrated microphone. Power to the speaker was set at V rms (W into 4Ω), and the measurement microphone was placed about eet away. enerator Figure 8a shows part o the impulse response measured with the variable speed chirp. The main response begins at about 9.5ms, and the irst echo ollows about.5ms later. Figure 8b shows the quasi-anechoic response in blue (gated rom 8ms to ms, with 5% raised-cosine window at both ends) overlaid with the ungated requency response in green. The time-gated requency response is, o course, much smoother and more meaningul than the ungated response due to the exclusion o echoes. The gated impulse response and energytime curve (ETC) are shown in Figure 9. The ETC was computed using a hal-hann window [4], and is an indication o the energy response o the loudspeaker. Measurements here were averaged over about seconds (5ms long chirp averaged 4 times). Impulse Response (unitless) 4 - -4x -6 Anechoic Response (db) Amp -5-55 -6-65 -7-75 -8 DUT Reerence Ch. Input Ch. ch. FFT Cross- Spectrum 4 6 Frequency Response 8 3 4 5 6 7 8 9 3 4 5 6 7 8 9 Figure 7. Modiied signal low, where the output o the power ampliier is ed into the reerence channel. This removes the amplitude and phase imperections o the ampliier rom the measurement o the loudspeaker. Figure 8. a) Impulse response o a speaker measured with a variable speed chirp that had a target EQ o USASI noise to simulate program material. The impulse response starts at about 9.5ms due to the distance between the mic and the speaker. The irst echo (relection rom loor) ollows about.5ms later. b) The raw requency response o the speaker, including the echoes, is shown in green. The trace in blue is the gated, quasi-anechoic response, which shows a much smoother, meaningul response. The gating was applied between 8ms and ms, with a 5% raised-cosine window at both ends. Due to the irst echo arriving just.5ms later, the response below about 4Hz is not accurate. 3 When analyzing harmonic impulses, remember to divide the requency axis by. e.g. the response at khz or a second harmonic impulse was generated by a undamental at khz. page 5
Swept Sine Chirps or Measuring Impulse Response 6. Conclusions Both the log-sine chirp and variable speed chirp signals are powerul additions to the toolbox o the proessional audio engineer. These signals can be used to make measurements very quickly compared to traditional stepped sine sweeps, and have crest actors signiicantly better than that o MLS. The log-sine chirp also has the unique advantage o being able to separate distortion response rom linear response, while the variable speed chirp is able to generate a customized requency spectrum at a low crest actor. The advantages o these signals were demonstrated in real-world test situations using the Stanord Research Systems SR Audio Analyzer. Energy-Time Curve (db) -7-8 -9 - - - -3-4 8 9 -.4.x -3 Figure 9. Energy-time curve o the speaker under test (red) together with the corresponding gated impulse response (blue), as measured using a variable speed chirp. The target requency spectrum o the chirp was USASI noise. A hal-hann window was used to calculate the ETC..8.6.4. -. Impulse Response (unitless) 7. Reerences [] A. Farina, Simultaneous measurement o impulse response and distortion with a swept sine technique, presented at the 8 th AES Convention, Paris, France, February. [] T. Kite, Measurement o audio equipment with log-swept sine chirps, presented at the 7 th AES Convention, San Francisco, October 4. [3] S. Müller and P. Massarini, Transer-Function Measurement with Sweeps, J. Audio Eng. Soc., vol. 49, pp. 443-47, June. [4] J. Vanderkooy and S. P. Lipshitz, Uses and Abuses o the Energy-Time Curve, presented at the 87 th AES Convention, ew York, October 989. Stanord Research Systems, Inc. 9-D Reamwood Avenue, Sunnyvale, CA 9489. www.thinksrs.com page 6