Professional Documents
Culture Documents
www.elsevier.com/locate/sigpro
Abstract
The S-transform was originally de4ned as a method of determining the local spectrum of a time series, through the use
of a translating, real Gaussian window that dilates to accomodate the di6erent cycle durations of di6erent frequencies. The
S-transform “wavelet” is obtained by multiplying this real window with the complex Fourier sinusoid. Since the Fourier
sinusoid has time-invariant frequency, the S-transform is consequently unsuitable for resolving waveforms whose frequency
changes with time. This problem can be addressed by introducing a complex Gaussian window, with a user designed, complex
phase function. The phase function modulates the frequency of the Fourier sinusoid to give a speci4c waveform, leading to
better time–frequency localization of similar waveforms on the time series. The complex-window S-transform is similar to
a wavelet transform, but has the 4xed phase reference of the Fourier transform.
? 2004 Elsevier B.V. All rights reserved.
Keywords: Time–frequency analysis; Waveform analysis; Short-time Fourier transform; Wavelet transform; S-transform
1. Introduction are
∞
Non-stationary time series, such as human speech, 1 −t
CWT(; s) = h(t) √ g dt; (1)
electrocardiograms, and seismograms, typically con- −∞ s s
tain time-bounded events. Proper study of such events ∞
requires the determination of time-local spectra; to
STFT(; f) = h(t){w( − t)
this end, several methods of determining local spec- −∞
tra have been proposed during the last few decades
[2,4]. These methods usually display local spectral ×exp(−2
ift)} dt; (2)
content as two-dimensional plots, with axes that de-
note time and scale, as in the continuous wavelet where t denotes time, h denotes a function of time,
transform (CWT), or time and frequency, as in the denotes the time of spectral localization, s denotes
short-time Fourier transform (STFT). The general, scale in the CWT, and f denotes Fourier frequency in
continuous-time expressions of the CWT and STFT the STFT. The integrands of the CWT and STFT both
contain oscillatory, time-local functions that resolve
∗ Corresponding author. Tel.: +1-519-661-3187; fax: +1-519- the spectral content of h in the neighborhood of t = .
661-3198. In our notation, functions of this type are referred to
E-mail address: pinnegar@ucalgary.ca (C.R. Pinnegar). as “analyzing functions”. In the CWT, the analyzing
0165-1684/$ - see front matter ? 2004 Elsevier B.V. All rights reserved.
doi:10.1016/j.sigpro.2004.03.015
1168 C.R. Pinnegar, L. Mansinha / Signal Processing 84 (2004) 1167 – 1176
Nomenclature
Discrete versions of continuous functions are wGS the real window of the original S-trans-
form
denoted by a caret. Ĥ is the discrete Hartley
wLC the “linear chirp” complex S-transform
transform of ĥ, and Ŵ is the
window
discrete Hartley transform of ŵ.
the phase function of the complex
a convolution variable with units of fre- S-transform window
quency A the amplitude (modulus) function of
the degree of phase modulation of wCG the complex S-transform window
the position of g or w on the t-axis CWT the continuous wavelet transform of h
f continuous frequency H the Fourier transform of h
g a continuous wavelet IF generalized instantaneous frequency
h a function of time IFCG the instantaneous frequency of the
j the discrete-time position of ŵCG on the analyzing function of SCG
k-axis (j = =T ) M the number of samples in ĥ
k discrete time (k = t=T ) P the normalizing prefactor of wCG
m discrete frequency (m =
NT ) S the S-transform of h
n discrete frequency (n = fNT ) SCG the “hyperbolic-chirp” complex-win-
p the parameter list of the generalized dow S-transform of h
S-transform window SGS the original S-transform of h
s scale in continuous wavelet transforms SLC the “linear-chirp” complex-window
t continuous time S-transform of h
w a generalized window STFT the short-time Fourier transform of h
wCG the “hyperbolic chirp” complex S-trans- T sampling interval
form window W the Fourier transform of w
function (the term in braces in (1)) is the wavelet g, The √scalable Gaussian window (the product of
which scales to accomodate the di6erent cycle dura- |f|= 2
and the real exponential) localizes the com-
tions of di6erent frequencies. In the STFT, the analyz- plex Fourier sinusoid, giving the S-transform analyz-
ing function (the term in braces in (2)) is obtained by ing function (the term in braces in (3)). Fig. 1 shows
multiplying the complex Fourier sinusoid with a real three examples of S-transform analyzing functions,
window w. Since w does not scale with frequency, and Figs. 2 and 3 show amplitude S-spectra (i.e.
the STFT analyzing function cannot accurately re- moduli of the S-transform) of two di6erent “chirp”
solve low frequencies whose periods are longer than signals. The chirp frequency in Fig. 2 increases hyper-
the duration of w. In addition, the STFT exhibits poor bolically with time as 6=[256(0:8 − t)] and is similar
time resolution of high frequencies. An alteration to to chirps used by some species of bats [1,3]. Fig. 3
the STFT, in which the window (in analogy with shows the amplitude S-spectrum of a linear chirp.
wavelets) is a function of f in addition to ( − t), The increase in vertical “smearing” of the spectrum
is the S-transform [8] at high frequencies is due to the narrowing of the
∞ window at high f, which results in an increase in
|f| −f2 ( − t)2
S(; f) = h(t) √ exp bandwidth in the Fourier domain.
−∞ 2
2
The CWT provides time resolution by translating
×exp(−2
ift) dt: (3) its whole analyzing function (the wavelet) along the
time axis. The S-transform is di6erent because only
C.R. Pinnegar, L. Mansinha / Signal Processing 84 (2004) 1167 – 1176 1169
1
0.01
0 0.2
Frequency (Hz)
-0.01
(a) 0.8
0.15
(b)
0.4
0
0 64 128 192
0.01 Time (s)
0.2
Amplitude
0
-0.01 0.5
(c) 0
−0.5
0 64 128 192
0.01
0 Sample Point Number
-0.01
(d) Fig. 3. Amplitude SˆGS -spectrum of a linear chirp de4ned by
0 32 64 96 128 160 192 224 h(0:63)=0, h(64:197)=sin(2
{4[0:133]=256+40[0:133]2 =2562 }),
Time Index (k) h(198:255)=0. The dashed line shows the instantaneous frequency
12 of the chirp. The sampling interval is 1 s and the contour interval
Fig. 1. (a) Gaussian S-transform window ŵGS at f = 256 (the time is 0.1.
series has 256 points). This window gives analyzing functions
whose frequencies are time invariant. Examples are shown for (b)
= 87, (c) = 127, and (d) = 167. Solid and dashed lines denote Since the local oscillatory properties of the analyzing
real and imaginary parts of functions.
function determine the phase of the local spectrum,
the S-transform can be considered as having “4xed”
phase reference. The 4xed-phase reference gives the
1
S-transform some advantages over wavelet transforms
0.2 (see for example [5]), but has a disadvantage because
Frequency (Hz)
0.15
0.8 the analyzing function of the S-transform has constant
frequency; note the equal spacing of the zero crossings
0.1 0.6 of the real and imaginary parts of the S-transform an-
0.05
alyzing function in Figs. 1b–d, a property which does
0.4 not generally hold for wavelets. Thus, the S-transform
0
0 64 128 192 is not ideal for resolving waveforms whose frequency
Time (s) varies with time, such as the chirps in Figs. 2 and 3.
Amplitude
0.2
0.5
The S-transform has previously been generalized
0
-0.5
from the original de4nition shown in (3) to include
0 64 128 192
real, non-Gaussian windows that provide user de-
Sample Point Number signed amplitude modulation of the Fourier sinusoid.
Some examples of windows of this type are de-
Fig. 2. Amplitude SˆGS -spectrum of a chirp de4ned by h(0:36) = 0, scribed in [5–7]. In this paper, we further generalize
h(37:191)=sin(12
log([255:−1:101]=256−0:2)), h(192:255)=0. the S-transform, to include complex windows that
The dashed line shows the instantaneous frequency of the chirp.
modulate both the amplitude and the phase of the
This and subsequent amplitude S-spectra have been divided by
their maximum values. The sampling interval is 1 s and the contour Fourier sinusoid. This gives a scalable S-transform
interval is 0.1. analyzing function, with time-varying frequency;
similar to wavelets, but maintaining the 4xed phase
reference of the Fourier transform. Modulation of the
the amplitude envelope of the analyzing function (the Fourier phase has previously been proposed by Mc-
window) translates; the oscillations are given by the Fadden et al. [5], but not in the context of a time-local
4xed Fourier sinusoid, which does not depend on . window and time–frequency analysis. We present an
1170 C.R. Pinnegar, L. Mansinha / Signal Processing 84 (2004) 1167 – 1176
∞
example of a time-local complex window and use it
I{w(; f; p)} d = 0; (9)
to obtain S-transforms of the chirps used in Figs. 2 −∞
and 3. We also present a simple Matlab program to
calculate the complex-window S-transform.
w( − t; f; p) = [w( − t; −f; p)]∗ : (10)
×exp(+2
i
) d
(5) Here A and are the amplitude and phase of w. When
both sides of (12) are multiplied by the Fourier sinu-
with soid, the result is
∞
w( − t; f; p) exp(−2
ift)
H (f) = h(t) exp(−2
ift) dt; (6)
−∞
=A( − t; f; p) exp{−2
i[ft + ( − t; f; p)]}:
∞
(13)
W (
; f; p) = w(t; f; p) exp(−2
i
t) dt: (7)
−∞
Expression (13) gives an alternative expression for the
In (7), the variable
has the same units as f. term in braces in (4). The term in square brackets in
If w is an S-transform window, it must satisfy four the RHS of (13) is the total phase of the S-transform
conditions. The 4rst three are analyzing function, which includes the Fourier phase
∞ in addition to . Since A and are user de4ned,
R{w(; f; p)} d = 1; (8) the instantaneous frequency IF of the analyzing
−∞ function can be unambiguously de4ned as the time
C.R. Pinnegar, L. Mansinha / Signal Processing 84 (2004) 1167 – 1176 1171
0.2
@
Frequency (Hz)
IF = f + ( − t; f; p): (14) 0.8
@t 0.15
0.1 0.6
In a sense, IF can be thought of as the time-dependent 0.05
target frequency of the S-transform analyzing func- 0.4
tion. Waveforms whose instantaneous frequencies 0
0 64 128 192
have time variations that resemble those of IF give Time (s)
time–frequency signatures that have larger ampli-
Amplitude
0.2
0.5
tudes on S(; f). However, IF does not determine the 0
-0.5
vertical positions of these signatures on the amplitude
0 64 128 192
S-spectrum; that is controlled by f. Thus, one should
Sample Point Number
always take care to ensure that f is approximately
equal to the average of the values IF takes on where Fig. 5. Misleading amplitude SˆGS -spectrum of the linear chirp
the window amplitude is large. If this is not done, the from Fig. 3, obtained using the window de4ned in the caption of
f of the amplitude S-spectrum’s frequency axis can Fig. 4. The vertical position of the chirp signature is lower than
the actual instantaneous frequency (given by the dashed line).
be very di6erent from the IF of its analyzing function,
leading to vertical “warping” of the time–frequency
space and serious problems for interpretation. As an
example, the window of Fig. 4 is nonideal because it gives IF = 3f=2. When this window is applied to
the linear chirp from Fig. 3, the result is a misleading
amplitude S-spectrum (Fig. 5),in which the apparent
2
1
frequency of the local chirp spectrum is much lower
0 than its true frequency. (For real windows, such as
-1
-2 (a) wGS , this is not a problem because here = 0, so
IF = f at all times.)
2 The problem of Fig. 5 can be avoided by stipulating
1
0 that IF must be equal to f when |w| is a maximum.
-1
Windows are normally de4ned so that the peak ampli-
Amplitude
-2 (b)
tude of |w| occurs at t = ; thus we obtain the fourth
2 condition
1
0
-1 @
-2 (c) ( − t; f; p)|t= = 0: (15)
@t
2
1
0 2.3. A Gaussian window with phase modulation
-1
-2 (d)
0 32 64 96 128 160 192 224 The S-transform provides a good local spectrum
Time Index (k) when the shape of the analyzing function is tailored
to match the shapes of events on the time series
Fig. 4. (a) Poorly modulated discrete Gaussian S-transform win-
12 being analyzed. Thus the hyperbolic chirp from
dow ŵGS [ − t; f] exp[
if( − t)] at f = 256 . This window is
not preferred because it leads to S-transform analyzing functions Fig. 2 is best resolved by an analyzing function whose
whose oscillations are similar to those of the f = 256 18
Fourier frequency also increases hyperbolically with time.
component. Examples are shown for (b) = 87, (c) = 127, and We de4ne this analyzing function by multiplying the
(d) = 167. Solid and dashed lines denote real and imaginary Fourier sinusoid with the Gaussian window of (3),
parts of functions.
then applying phase modulation through use of an
1172 C.R. Pinnegar, L. Mansinha / Signal Processing 84 (2004) 1167 – 1176
appropriate complex factor and renormalizing accord- frequencies are being used to resolve wave packets
ing to (8) and (9). This leads to the complex Gaussian that also have constant frequencies, so it is not surpris-
window wCG : ing that the three packet signatures show no systematic
wCG ( − t; f; )
change in frequency over the duration of each packet.
Fig. 9 shows the SCG -spectrum of the same time se-
f2 ( − t)2 ries, calculated at = 6. This time, the leading edge of
P exp − exp{−2
if( − t)
2
each packet signature has a lower apparent frequency
=
+2
i sign(f)log[ + |f|( − t)]}; t ¡ + =|f|; than the trailing edge. This happens because, at each
0; t ¿ + =|f|:
, the largest SCG -spectrum amplitude occurs at the
value of f for which the IF of the analyzing function
(16)
matches the packet frequency near the time of maxi-
In order to satisfy (8)–(10), the prefactor P in (16) is mum packet amplitude. Thus, at values of that occur
de4ned as before the maximum packet amplitude, f needs to be
∞ slightly lower than the packet frequency to give the IF
f 2 2
−1
P = exp − − 2
if + 2
i sign(f) of the analyzing function time to increase; when oc-
−=|f| 2 curs after the maximum packet amplitude, f needs to
be slightly higher than the packet frequency, to give
× log[ + |f|] d: (17) IF time to decrease. This type of reasoning needs to be
kept in mind whenever complex-valued S-transform
The positive parameter controls the degree of phase windows are used. When analyzing functions of SCG
modulation. When wCG = 0, (14) and (16) give are substituted for those of SGS in the time series of
f
IFCG = : (18)
+ |f|( − t)
Expression (18) shows that IFCG increases hyperbol-
ically with ( − t). Since IFCG = f at t = , condition 0.02
0.01
(15) is satis4ed. 0
-0.01
An example of wCG , and its analyzing function at -0.02 (a)
12
f = 256 (we use time series of length 256 points,
0.02
and a sampling interval of 1 s), is shown in Fig. 6. 0.01
The similarities between the shape of the hyperbolic 0
-0.01
Amplitude
chirp, and the shape of the analyzing function obtained -0.02 (b)
from wCG , are shown in Fig. 7. Since P is a complex
0.02
quantity, normalization by P introduces a phase shift 0.01
that causes the phase of wCG to be non-zero at t = , 0
-0.01
where |wCG | is largest. -0.02 (c)
Each (; f) point on an S-transform is surrounded 0.02
by a “region of sensitivity”, within which signals 0.01
0
occurring at particular frequencies and times a6ect -0.01
(d)
the value of S(; f). The shape of this region is de- -0.02
0 32 64 96 128 160 192 224
termined by the functional form of the S-transform Time Index (k)
analyzing function. To illustrate this point, we con-
struct a time series from three wave packets, obtained 12
Fig. 6. (a) Phase-modulated window ŵCG , for =127, f= 256 , and
from the real part of the analyzing function of SGS = 6. This window gives analyzing functions with time-varying
frequency; note that the zero crossings of the real and imagi-
at three di6erent frequencies; these have been shifted
nary parts change with due to phase modulation of the Fourier
along the time axis to avoid overlap. This time se- sinusoid. Examples are shown for (b) = 87, (c) = 127, and
ries, and its amplitude SGS -spectrum, are shown in (d) = 167. Solid and dashed lines denote real and imaginary
Fig. 8. Here, analyzing functions that have constant parts of functions.
C.R. Pinnegar, L. Mansinha / Signal Processing 84 (2004) 1167 – 1176 1173
1.5 1
1
Amplitude
0.5 0.2
Frequency (Hz)
0 0.8
0.15
-0.5
-1
0.1 0.6
-1.5
64 96 128 160 192
0.05
(a) Time Index (k)
0.4
0
1.5 0 64 128 192
1 Time (s)
Amplitude
Amplitude
0.2
0.5
0.5
0 0
-0.5
-0.5 -1
-1 0 64 128 192
-1.5 Sample Point Number
64 96 128 160 192
(b) Time Index (k) Fig. 9. SˆCG -transform of the time series from Fig. 8, obtained
using = 6. The time dependence of the analyzing function of
Fig. 7. (a) Non-zero part of the nonlinear chirp from Fig. 3 (solid SˆCG leads to apparent changes in frequency over the duration of
line), and the real part of the analyzing function of SCG , multiplied each wave packet.
12
by −1 (dashed line), at = 78 and f = 256 . (b) Non-zero part
of the nonlinear chirp from Fig. 3 (solid line), and the real part
1
of the analyzing function of SˆCG (dashed line) at = 155 and
30
f = 256 . The similar shapes of the analyzing function and the 0.2
Frequency (Hz)
0.05
1
0.4
0
0.2 0 64 128 192
Frequency (Hz)
0.15 0.2
0.5
0
0.1 0.6 -0.5
0.2
0.5 frequency (similar to analyzing functions of SˆCG at =6), showing
0
-0.5 the time dependence of the IF for each wave packet.
-1
0 64 128 192
Sample Point Number of SCG is well resolved by the constant-IF analyzing
functions of SGS .
Fig. 8. SˆGS -transform of a time series constructed from three In the discrete domain, the modulation of the
monotonic, Gaussian-modulated wave packets (similar to analyz-
Fourier sinusoid towards a higher frequency causes
ing functions of SˆGS ), showing the region of sensitivity of the
SˆGS -transform at di6erent frequencies. aliasing near the Nyquist frequency. This adds to
self-aliasing e6ects, described in [8]. For this reason
we only present SCG at values of f less than half the
Figs. 8 and 9, the resulting SGS (shown in Fig. 10) has Nyquist frequency, where self-aliasing is not a seri-
an appearance very similar to that of Fig. 9. Here the ous problem. The details of the calculation of SCG in
time dependence of the IF of the analyzing function the discrete domain are discussed in the appendix.
1174 C.R. Pinnegar, L. Mansinha / Signal Processing 84 (2004) 1167 – 1176
3. Examples 1
0.2
Frequency (Hz)
Fig. 11 shows SCG of the hyperbolic chirp, for =6. 0.8
Since the di6erent prefactors of wGS and wCG lead to 0.15
di6erent scales on the amplitude S-spectrum, Figs. 2
0.1
and 11 (and the other S-spectra in this paper) have 0.6
Amplitude
0.2
to the real IF of the chirp. Thus SCG shows a better 0.5
concentration of the energy of the signal on the time– 0
-0.5
frequency plane, for this signal and the matching wCG . 0 64 128 192
Some parts of the outermost contour, corresponding Sample Point Number
to low amplitudes near the initiation time of the chirp,
are slightly farther away from the real IF of the chirp Fig. 11. SˆCG -transform of the hyperbolic chirp from Fig. 2, ob-
on SCG than on SGS . This happens because the sudden tained using = 6, showing generally improved resolution of the
chirp location.
onset of the chirp is a source of high frequencies.
Modulating the Fourier sinusoid can increase the
bandwidth of wCG in the Fourier domain, as compared
with wGS , leading to some vertical smearing on SCG . 1
0.2
0.5
linear chirp are more asinusoidal and are thus closer in 0
-0.5
shape to the analyzing function of SCG , so SCG gives
0 64 128 192
better time–frequency resolution. At high f, the cy-
Sample Point Number
cles of the linear chirp are more sinusoidal, so the un-
modulated analyzing function of SGS is better suited Fig. 12. SˆCG -transform of the linear chirp from Fig. 3, obtained
to resolve these cycles. using = 6, showing improved localization of the chirp signature
Figs. 2, 3, 5, and 8–12 all show amplitude at low frequency only.
SGS -spectra and SCG -spectra. Since the analyzing
function of SCG has varying frequency and has been
multiplied by a complex phase factor, one might at some (; f) positions where the amplitude is low.)
expect that the phase SCG -spectrum would be mean- As an example, Fig. 13 shows the di6erence between
ingless. However, in tests on several synthetic time the phases of the S-transforms whose amplitude SGS -
series using several values of , we have observed and SCG -spectra appear in Figs. 3 and 12. Thus the
empirically that, at (; f) positions where SCG and phase of SCG still seems to have some meaning, even
SGS both have large amplitude, normalizing wCG though it is calculated using a phase-modulated and
through multiplication with P tends to bring the phase phase-shifted Fourier sinusoid.
SCG -spectrum into close alignment with the phase A more diKcult problem is the design of a
SGS -spectrum. (The phases of SGS and SCG also align complex-valued window that matches the shape of a
C.R. Pinnegar, L. Mansinha / Signal Processing 84 (2004) 1167 – 1176 1175
40
0.5
0 using A = 256 . Although this S-spectrum does a better
-0.5
0 job of resolving the high-frequency part of the chirp, as
0 64 128 192
compared with SGS and SCG , the low-frequency part of
Sample Point Number
the spectrum contains very large amplitude artifacts.
Fig. 13. Magnitude of the phase di6erence between SˆGS in Fig. 3,
and SˆCG in Fig. 9. In regions of the time–frequency plane where
SˆGS and SˆCG both have large amplitudes, their phases tend to 4. Conclusions
align. Where their amplitudes are small, their phases sometimes
align but usually do not.
We have presented a complex S-transform win-
dow that modulates the phase of the Fourier sinu-
soid, conceptually bringing the S-transform closer to
a continuous wavelet transform, but using the concept
of frequency instead of scale, and keeping the 4xed
phase reference of the original S-transform. The dis-
crete form of this S-transform is calculated using a
fast-Fourier transform algorithm. If a time series con-
tains a speci4c, asinusoidal waveform that is expected
at all scales, then the complex Gaussian window can
give better time–frequency resolution of event signa-
tures than the unmodulated, real-valued Gaussian win-
dow of the original S-transform.
Appendix
Fig. 14. SˆLC -transform of the linear chirp from Fig. 3, obtained
40
using A= 256 . At high frequencies, this S-transform provides good For computational reasons [8] the discrete
localization of the chirp signature, but at low frequencies there are SGS -transform is obtained by sampling (5) in the fre-
problematical artifacts whose amplitudes can be two to three times
larger than the amplitude of the actual chirp. To prevent these
quency domain. The resulting expression is evaluated
artifacts from distorting the amplitude scale, this SLC -transform using an inverse FFT:
has been normalized to the maximum value it takes on above
16
f = 256 . This facilitates comparison with Figs. 3 and 12. M=2−1
n n+m
Ŝ CG jT; ;p = Ĥ
MT MT
m=−M=2
linear chirp. One simple de4nition is m
n
f2 ( − t)2 ×Ŵ CG ; ;p
wLC ( − t; f; A) = P exp − MT MT
2
+2
imj
×exp ; (A.1)
×exp[ − 2
iA( − t)2 ]; (19) M
1176 C.R. Pinnegar, L. Mansinha / Signal Processing 84 (2004) 1167 – 1176