Chirp Signal Generation Using Spectral Warping - CiteSeerX

1 downloads 0 Views 261KB Size Report
chirp signals, and their applications are discussed in the paper. Keywords: digital signal processing, spectral analysis, signal generation, electronic testing. 1.
Chirp Signal Generation Using Spectral Warping W. Allen, D. Bailey, S. Demidenko +

Institute of Information Sciences and Technology, Massey University Private Bag 11222, Palmerston North, NEW ZEALAND Phone (06) 350 5799 ext. 2457, Fax (06) 3505604

Email: [email protected], [email protected], [email protected]

Abstract: Spectral warping is a technique that transforms a digital signal in the time domain by a warping of the frequency axis in its frequency representation. This corresponds to a mapping of the samples in the z-domain such that they are unevenly spaced around the unit circle. Spectral warping can be implemented with a network of linear all-pass filters. The Spectral Warping has a property that a time-shifted impulse function is transformed into a chirp function. This has useful applications in the electronic testing of mixed-signal (analog-digital) circuits. The properties of the spectral warping network, generation of the chirp signals, and their applications are discussed in the paper. Keywords: digital signal processing, spectral analysis, signal generation, electronic testing. 1. INTRODUCTION Spectral warping (SW) transforms an original digital signal to another one such that its frequency spectral content is non-linearly shifted along the frequency axis. The new signal exhibits the property that its discrete Fourier transform corresponds to unequally spaced samples of the z-transform of the original sequence around the unit circle. SW was initially proposed by A. Oppenheim, D. Johnson, and K. Steiglitz [1] and further elaborated in a number of later works by various authors (e.g. [2 - 4]). SW transforms an original signal in such a way that it results in a non-linear sampling of the frequencies of the signal. The frequency axis corresponds to the unit circle in the z-domain, implying that spectral warping maps the unit circle onto another one with some parts of the circle being stretched by the transformation and others being compressed. This corresponds to an allpass transform: 1 − az −1 zˆ = (1) z −1 − a*

entire input set has passed through. That is, g k = g~k , N −1 . A tap taken at the output of each of M filters will give an output sequence of length M. f-n

(1–|a|2) z -1

1 1 – az

-1

1 – az

~ g 0,n

-1

~ g 1,n

z –1 – a∗

z –1 – a∗

-1

1 – az -1

1 – az

~ g 2,n

The relationship between the frequency of a warped signal and the frequency of the original Ω depends on the warping parameter a (|a| < 1) and is given by 2 ˆ = θ (Ω) = tan −1  (1 − a ) sin Ω  Ω (3)   2  (1 + a ) cos Ω − 2a  The effect of applying different real values of a is illustrated in Fig. 2.

(2)

This can be achieved by means of cascaded all-pass filters (Fig. 1) [2]. A set of N samples is processed. The value at the output of each of the all-pass filters is forming the element of output sequence, once the



Figure 1 – Spectral Warping network

The warped sequence gk, derived from the reversed original sequence f-n, is found by passing it through a linear shift-invariant system Hk(z):  k −1  (1 − a 2 ) z −1  z −1 − a∗  k >0    H k ( z ) =  (1 − az −1)2  1 − az −1   1 k =0.  −1 1 − az

~ g 3,n

Figure 2 – Frequency shift graphs.

2. EFFECT OF THE WARPING ON SIGNAL DURATION In order to transform a portion of an infinite input signal g[n], a finite set of samples must be selected. It is achieved by multiplying g[n] by a time windowing function. Assuming all samples before n = 0 and after n = N-1 are equal to zero is equivalent to multiplying g[n] by a rectangular window. It is known that a rectangular window appears as sinc function in the frequency domain. This results in significant spectral leakage. Several windowing functions are commonly used to reduce the spectral leakage. For the following discussion, a windowing function with a bounded spectral response is assumed. Multiplication of a narrow-band signal and a window function in the time domain corresponds to a their convolution in the frequency domain. The frequency distribution of the resulting signal will be the same shape as that corresponding to the window while it will be centred at the frequency of the narrow-band signal. When the windowed signal is passed through a SW network, this frequency distribution is transformed according to (3). Hence if the slope of the warping function is greater than 1 then the frequency distribution will be stretched. Similarly, if the slope is less than 1 the distribution will be condensed. This corresponds, respectively, to compression and stretching of the window in the time domain. If the frequency distribution of the window is sufficiently narrow, the slope of the frequency transform is approximately constant, and the degree of stretching can be estimated as the slope of (3) at the centre frequency. Thus the duration of the signal is stretched by the reciprocal of the slope. That is: length of output 1 − 2a cos(Ω) + a 2 (4) = θ ′(Ω)−1 = length of input 1 − a2 Fig. 3 shows an experimentally obtained ratio of the number of samples needed to represent the output and input signals. These results deviate from those predicted by (4) by less than –15.8 dB.

It can be seen that the signals having different frequencies but the same length will be of different lengths after SW. This means that the different frequency components of a wide-band signal become separated, which is accentuated by a time delay. This has an implication that if some continuous signal (e.g. music) is broken into blocks and fed through the spectral warping network (SWN), some frequencies will finish before others causing ‘gaps’ in the output signal. This may limit the effectiveness of the transform for altering the pitch of sound signals. However, for speech signals each glottal period maybe transformed individually, while the natural gaps in the voice signal will allow room for the expansion of frequencies. This also means that the fundamental frequency of the speech remains unchanged. 3. SW NETWORK FREQUENCY RESPONSE When a signal H(f) is compressed in frequency, it is attenuated, as well as being stretched in the time domain. This relationship can be presented as: ∞ 1 t j 2πft (5) ∫−∞H (kf ) e d f = | k | h k  Here k is the factor by which the signal is compressed in the frequency domain. For a narrow-band signal that has passed through the SWN, k-1 is the slope of the warping function: 1 − 2a cos Ω + a 2 k = θ ′(Ω) −1 = (6) 1− a2 For |a| < 1, k is always greater than zero, so the absolute value operator can be ignored, thus: 1 1− a2 (7) H (Ω) = = k 1 − 2a cos Ω + a 2 This agrees with results obtained in [3], where the frequency response was calculated by analysing the SWN individual filters. There the phase response of the system was found as:  (1 − a 2 ) sin(ΩT )  Φ M (Ω) = − ( M − 1) tan −1   (8) 2  (1 − a ) cos(ΩT ) − 2a  where M is the number of sections in the SWN, and T is the sampling period. Frequency Response (dB)

Input Frequency ω (×π rad/sample)

Figure 3 - Effect of warping on the signal duration.

Warping Factor a

Figure 4 – SWN amplitude-frequency response

The amplitude-frequency response, for the range of the warping factor 0.02 < |a| < 0.98 over 0 < Ω < π, has been calculated using the ‘filter function’ software implementation. The results presented in Fig. 4 fit closely with those predicted by (7), except for at extreme values of a. There the truncation occurs because the signal is stretched to such an extent that it is not fully represented by the M output samples (for these experiments M was set to 4N).

These recurrent expressions can be implemented in hardware using an M-word shift register, two singleword registers and a special-function arithmetic logic unit (ALU) for calculating F. A block diagram of this implementation is shown in Fig. 5 [2]. a

b M-word shift register

k>0

f-n

D

d

k=0

ALU

k>1

0

k≤1

C c

4. SW IMPLEMENTATION Figure 5 - SW hardware implementation architecture. The SW transform has been implemented in software (using MATLAB) by three different methods. The first method implements the filters in Fig.1 using the filter function. function g = swn(f, a, M) M → number of output samples N → number of input samples

N = length(f); x = zeros(1,N); g = zeros(1,M);

}

Pre-allocate memory

Function (11) is at the core of the transform implementation. Several ASIC designs for an arithmetic logic unit (ALU) to implement the function have been evaluated including parallel, pipelined and sequential designs [5-7]. All the designs were done for AMI 0.6um CMOS 3-metal technology. It is planned that the final design of the SW test chip will be done and implemented using more advanced 0.18um 5 metal 3V CMOS technology.

Time reverse signal

f = flip(f); x = filter([1 0], [1 -a], f); g(1) = x(end); x = filter([0 1-a^2], [1 -a], x); g(2) = x(end); for k = 3:M x = filter([-a 1], [1 -a], x); g(k) = x(end); end

}

}

First filter Last sample from first filter becomes first output sample

5. CHIRP SIGNAL GENERATION It is commonly known in signal theory that an impulse at some time T0 can be constructed as a linear combination of cosine functions:

Second filter and tap Filter and taps 3 to M



The filter network can also be expressed as a set of difference equations [2], and the second implementation follows these equations directly: g~0,n = a[ g~0,n −1 − 0] + f n (9) g~ = a[ g~ − 0] + g~ 1, n

1, n −1

0, n −1

g~k ,n = a[ g~k ,n −1 − g~k −1,n ] + g~k −1,n −1 k = 2,3,… . The third implementation mimics the hardware design in [2]. It is effectively a direct realisation of (9).

The hardware implementation generally follows the initial design idea proposed in [2]. The following variables are introduced: a = warping factor (a constant) b = g~k , n −1  g~k −1, n n > 0 c= (10) n=0 0  g~k −1, n −1 k > 0 d = k =0  f n −1

Let function F be F [a, b, c, d ] = a (b − c ) + d . Then the equations (4) can be rearranged as g~k ,n = F [a, b, c, d ] g~ = F [a, g~ ,0, f ] 0, n

0,n −1

(11) (12)

−n

g~1,n = F [a, g~1,n −1 ,0, g~0,n −1 ] g~k ,n = F [a, g~k ,n −1 , g~k −1,n , g~0,n −1 ] 0 ≤ k < M .

(13)

δ (t − T0 ) = ∫ iπ cos( t − T0 ) d i

(14)

0

SW can be considered as a liner transform. It is truly linear if the output sequence is long enough to represent the original signal completely. If truncation occurs, the transform strictly speaking is no longer linear, however, it may be approximated as being linear with a high degree of accuracy. For this reason the transformation of an impulse can be analysed by observing the effect on the sinusoids that make it up. Each sinusoid is warped a different amount, in both time and frequency, according to (3) and (4) respectively. This has the effect of separating the frequency components in time, thus generating a chirp signal. Fig. 6 illustrates an example of a chirp signal generated in this manner. It is produced by warping an impulse function with a warping factor of a = 0.5. The envelope that causes the signal to appear as though if it has modulated near the end of the signal is a due to the signal’s frequency at that point being close to half the sampling frequency. For a < 0 , frequencies around π are compressed in time and amplified in magnitude while the low frequencies are spread and attenuated. The highest frequency components of the signal are compressed the most, causing their warped version to be the closest to the origin.

generation as well as the test response analysis are realised by digital means. The speed of DSP testing depends heavily on the speed of the processor. Such dependence is a serious weak point of the scheme (due to the limitations on the computing resources inherent in built-in test resources). This is where the use of Spectral Warping can significantly ease the problem, thus making DSP-based testing more efficient.

0.2

Input: Impulse at T0 = 384

0.15

0.1

0.05

0

-0.05

Chirp signal output -0.1

-0.15

-0.2 100

200

300

400

500

600

700

800

900

1000

1100

1200

Time

Figure 6 - A chirp signal generation. For the signal that occurs some time after t = 0 , there will always some time before the first frequencies appear. This delay is given by substituting ω = π in (4): (1 + a ) 2 (15) T1 = T0 , 1− a2 where T1 and T0 are output and input signal lengths. Similarly ω = 0 can be used to found the maximum expansion, and hence the end T2 of the chirp signal. T2 =

(1 − a ) 2 1− a2

T0 .

(16)

The distribution of the frequencies between these two points is a function of a . To produce a chirp of a given duration ∆T = T2 − T1 , using a warping factor a , the position at which that the impulse needs to be is given by T0 =

∆T 2 (a − 1) . 4a

(17)

To find the frequency response of a system, one can apply an impulse to the input and measure the response on the output. Because all the energy in an impulse signal is concentrated in one point in time, this method can damage delicate systems (integrated circuits, for example). A chirp signal contains frequencies from the entire spectrum, so the frequency response can also be derived from its chirp response. SW provides a method for such an analysis. To find a system’s impulse response function, a test chirp signal is generated by spectrally warping an original impulse, using some warping factor a. This signal is then passed through the circuit/system being tested. The Fourier transform of the resulting test response signal has the same magnitude as the system’s frequency response, but the phase information is altered due to the time shifting. To reverse this effect, the signal is warped again but using the warping factor –a. The output of this inverse warping is moved in time to begin at the origin. The signal is then re-warped with +a to produce the system’s impulse response. As an example, the Fourier transform of the impulse response of an arbitrary system was found using SW. The results are plotted in Fig. 7 along with the known frequency response of the system. 50

Response measured with SW

0

Gain dB

Spectral Warping is a reversible transform. Thus, an output signal can be transformed again using a~ = − a to produce the original signal (this is only true when there is no spectral leakage due to windowing).

SW-based chirp signal generation can provide additional efficiency to analog and mixed-signal testing of electronic circuits and systems. One of the main parameters being evaluated during the testing is the unit-under-test frequency response function.

-50

-100

6. SW APPLICATION FOR MIXED-SIGNAL TESTING OF ELECTRONIC CIRCUITS

-200 -250 -300

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

180 0

Actual response

-180

Phase (°)

Among the numerous areas of possible application of the spectral warping, the electronic testing of mixedsignal circuits and systems can be of particular interest. The use of SW can open up new opportunities in test signal generation and response analysis for both external testing and built-in selftesting (BIST). Application of SW for external testing would allow the tester performance to be increased. The use of SW in mixed-signal BIST is related to the current trend of using digital test tools and methods for both digital and analog components (so-called DSP-Based Testing). The test signal

Actual response

-150

Response measured with SW

-360 -540 -720 -900 0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Normailised Frequency (×π rad/sample)

Figure 7 – SW-based testing: known response and response measured using SW (a = 0.5).

1

7. CONCLUSION

8. REFERENCES

In this paper a special algorithm for a transform of a discrete-time signal is discussed. It corresponds to representation of one digital sequence by another digital sequence. The algorithm (called Spectral Warping) based on the concept of mapping the ztransform by substitution of variables. It allows the shape of spectrum for a discrete-time signal to be maintained, but transforms the frequency axis in a non-linear manner. This feature can have numerous applications in signal, speech and image processing and correction. Additional, a very promising area is analog and mixed-signal electronic testing. In particular, spectral warping can be employed for test signal generation and test response analysis where non-uniform frequency resolution is required (e.g., testing with logarithmic resolution – octave analysis). It allows a decrease of the array size for DFT or other frequency analysis technique, and thereby increases test throughput as measured, for example, by the speed of test execution.

[1] A. Oppenheim, D. Johnson, and K. Steiglitz, Computation of Spectra with Unequal Resolution Using the Fast Fourier Transform, Proceedings of the IEEE, 59 (2), 1971, pp. 299301.

A new interesting result presented in this paper is related to the idea of using the SW transform for circuit/system testing based on the impulse response evaluation. Application of SW allows such tests to be conducted without the risk of overloading and damaging the system, as might happen when applying an impulse. A suitable chirp signal can be generated in advance and applied to a system. The output is fed through two SW networks to produce the impulse response. If only the magnitude response is required, then only one SW network is needed.

[2] A. Oppenheim, and D. Johnson, Discrete Representation of Signals, Proceedings of the IEEE, 60 (6), 1972, pp. 681-691. [3] S. Demidenko, and K. Lever, Analysis of the Frequency Characteristics of a Digital Spectral Warping Network, International Workshop on Design Methodologies for Microelectronics and Signal Processing, Gliwice-Cracow, Poland, 1993, pp. 397-401 [4] S. Demidenko, and V. Piuri, Using Spectral Warping for Instrumentation and Measurements in Mixed-Signal Testing, IEEE IMTC’1999, Venice, Italy, 1999, pp. 1547-1552 [5] W. Allen, A Spectral Warping Network: Implementation and Application. BEng degree project report (S. Demidenko, D. Bailey supervisors), College of Sciences, Massey University, 2001. [6] T. Hall, and D. Rothlisberger: ASIC Design (S. Demidenko supervisor), Adv. Digital Tech., Massey University, 2001, 35p. [7]

Our paper presents just an initial discussion of how the application of SW and chirp signal generation could benefit analog and mixed-signal testing. A number of practical problems have to be addressed before the application of spectral warping will actually come into engineering practice. The research on the area is already under way, and we plan to publish a comprehensive journal paper on the results in due course.

B. Collett, and N. Lord, ASIC Design (S. Demidenko supervisor), Advance Digital Tech., Massey University, 2001, 34p.

[8] C.-L. Wey: Mixed-Signal Fault Models and Design for Test, Tutorial 4, The 5th Asian test Symposium, Nov., 20, 1996, Hsinchu, Taiwan, 72 p.