I have been playing around with the discrete wavelet transform (dwt) as
a preprocessor for an adaptive system (for system identification and
time-series prediction). The problem is however that the DWT is
anti-causal and suffers from boundary value problems (due to the signal
extension).
I've tried the first thing that I could think of - a dwt with an
expanding window where I only keep the last sample from each transform.
The results were utter rubbish (due to the boundary distortions I
suspect).
Does anybody know an approach that would work - to enforce causality so
that the dwt doesn't use future samples?
> Hi,
>
> I have been playing around with the discrete wavelet transform (dwt) as
> a preprocessor for an adaptive system (for system identification and
> time-series prediction). The problem is however that the DWT is
> anti-causal and suffers from boundary value problems (due to the signal
> extension).
>
> I've tried the first thing that I could think of - a dwt with an
> expanding window where I only keep the last sample from each transform.
> The results were utter rubbish (due to the boundary distortions I
> suspect).
>
> Does anybody know an approach that would work - to enforce causality so
> that the dwt doesn't use future samples?
>
> Any pointers would be appreciated,
> Denoir
In case of DWT with FIR filters, causality can be ensured by appropriately
delaying the signal.
--
Jani Huhtanen
Tampere University of Technology, Pori
> In case of DWT with FIR filters, causality can be ensured by appropriately
> delaying the signal.
Yes, but for more complex signals, that may require a fairly high
number of decomposition levels, that isn't really an option. As the
signal is downsampled in each pass, the non-causal region doubles for
each level. This limits its usefulness in practice.
>> In case of DWT with FIR filters, causality can be ensured by
>> appropriately delaying the signal.
>
> Yes, but for more complex signals, that may require a fairly high
> number of decomposition levels, that isn't really an option. As the
> signal is downsampled in each pass, the non-causal region doubles for
> each level. This limits its usefulness in practice.
So you're running the wavelet transform for a real-time stream?
As is the case with pretty much every transform, you have to settle for the
delay. Use low order filters, decompose as little as possible and
compensate the anti-causality with the delay. I don't think there is much
choice. (Well, there is but all effectively add delay to the signal).
Whether or not this is useful in practice depends on your requirements.
--
Jani Huhtanen
Tampere University of Technology, Pori
[email protected] wrote:
>> In case of DWT with FIR filters, causality can be ensured by appropriately
>> delaying the signal.
>
> Yes, but for more complex signals, that may require a fairly high
> number of decomposition levels, that isn't really an option. As the
> signal is downsampled in each pass, the non-causal region doubles for
> each level. This limits its usefulness in practice.
That's true of all filters, digital or analog. That's why we can't
extend the bandwidth of a Hilbert transformer down to DC. The delay of a
symmetric FIR with N taps is (N - 1)/2.
Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
Jani Huhtanen wrote:
> So you're running the wavelet transform for a real-time stream?
Well, sort of. I have all the past data of the signal, but I am for
T=t_n trying to model T=t_n+d. So it needs to be causal.
Now, the problem is as I see it that the DWT uses downsampling to be
able to reuse the same FIRs for each pass while capturing other
frequencies. This is terrible in terms of causality as the required
delay increases exponentially with the decomposition level.
I'm thinking something along the lines of rather than downsampling the
data, changing the filter for each pass. Sure, there would still be a
delay, but it would increase in a linear fashion with the decomposition
level, rather than exponentially. Or am I missing something?
[email protected] wrote:
> Jani Huhtanen wrote:
>> So you're running the wavelet transform for a real-time stream?
>
> Well, sort of. I have all the past data of the signal, but I am for
> T=t_n trying to model T=t_n+d. So it needs to be causal.
>
> Now, the problem is as I see it that the DWT uses downsampling to be
> able to reuse the same FIRs for each pass while capturing other
> frequencies. This is terrible in terms of causality as the required
> delay increases exponentially with the decomposition level.
>
> I'm thinking something along the lines of rather than downsampling the
> data, changing the filter for each pass. Sure, there would still be a
> delay, but it would increase in a linear fashion with the decomposition
> level, rather than exponentially. Or am I missing something?
The filter delay is built into the problem; low frequencies at high
sample rates make for long filters. Downsampling the data is simply an
efficient way to downsize the filter. Using a different filter that
enables you to avoid downsampling won't decrease your delay.
Put differently, you can either downsample the data or increase the
filter length for each pass. That increases memory use but doesn't
change the delay.
Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
> The filter delay is built into the problem; low frequencies at high
> sample rates make for long filters. Downsampling the data is simply an
> efficient way to downsize the filter. Using a different filter that
> enables you to avoid downsampling won't decrease your delay.
>
> Put differently, you can either downsample the data or increase the
> filter length for each pass. That increases memory use but doesn't
> change the delay.
Right - I'll end up doubling the filter length for each level and end
up with the same situation. Ok, scratch that idea.
How about my initial one, that didn't work - simply using an expanding
window? For each sample you transform it and the previous samples. You
then only keep the last sample from each transform. I know it is
computationally atrocious, but still, it should eliminate the delay, at
least explicitly. It didn't work for me (i suspect) because of the
boundary problems due to padding, but I'm thinking it's possible to
work around the problem by using such window lengths that no padding is
necessary. In that situation, there will be a delay, but it will be
constant for all decomposition levels.
[email protected] wrote:
> Jerry Avins wrote:
>
>> The filter delay is built into the problem; low frequencies at high
>> sample rates make for long filters. Downsampling the data is simply an
>> efficient way to downsize the filter. Using a different filter that
>> enables you to avoid downsampling won't decrease your delay.
>>
>> Put differently, you can either downsample the data or increase the
>> filter length for each pass. That increases memory use but doesn't
>> change the delay.
>
>
> Right - I'll end up doubling the filter length for each level and end
> up with the same situation. Ok, scratch that idea.
>
> How about my initial one, that didn't work - simply using an expanding
> window? For each sample you transform it and the previous samples. You
> then only keep the last sample from each transform. I know it is
> computationally atrocious, but still, it should eliminate the delay, at
> least explicitly. It didn't work for me (i suspect) because of the
> boundary problems due to padding, but I'm thinking it's possible to
> work around the problem by using such window lengths that no padding is
> necessary. In that situation, there will be a delay, but it will be
> constant for all decomposition levels.
Low frequencies at high data rated demand long filters. Long transforms
are needed to get to low frequencies with the proposed scheme. It's true
that aside from startup and ending transients there is a sample out for
each sample in (self evident, really), but you need to ask how long
before an input sample significantly affects the output. If your
transforms have a few kilosamples of history in them, and every sample
matters, there's your delay. FFT or FIR; the computations are different
but equivalent. The delays are precisely the same.
BTW, a sliding FFT, which is what you just described, needn't be
inefficient. Google it.
Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
> Hi,
>
> I have been playing around with the discrete wavelet transform (dwt) as
> a preprocessor for an adaptive system (for system identification and
> time-series prediction). The problem is however that the DWT is
> anti-causal and suffers from boundary value problems (due to the signal
> extension).
>
> I've tried the first thing that I could think of - a dwt with an
> expanding window where I only keep the last sample from each transform.
> The results were utter rubbish (due to the boundary distortions I
> suspect).
>
> Does anybody know an approach that would work - to enforce causality so
> that the dwt doesn't use future samples?
Perhaps your problem is how to transform a linear-phase filter into a
minimum-phase filter?
I can't really tell what your problem is, and why you feel that the DWT
is a solution. Time-series prediction using linear methods does require
any bandsplitting. You can directly compute the linear predictor for
any subband that you wish in the frequency domain.
Andor wrote:
> Denoir wrote:
>
>> Hi,
>>
>> I have been playing around with the discrete wavelet transform (dwt) as
>> a preprocessor for an adaptive system (for system identification and
>> time-series prediction). The problem is however that the DWT is
>> anti-causal and suffers from boundary value problems (due to the signal
>> extension).
>>
>> I've tried the first thing that I could think of - a dwt with an
>> expanding window where I only keep the last sample from each transform.
>> The results were utter rubbish (due to the boundary distortions I
>> suspect).
>>
>> Does anybody know an approach that would work - to enforce causality so
>> that the dwt doesn't use future samples?
>
> Perhaps your problem is how to transform a linear-phase filter into a
> minimum-phase filter?
>
> I can't really tell what your problem is, and why you feel that the DWT
> is a solution. Time-series prediction using linear methods does require
> any bandsplitting. You can directly compute the linear predictor for
> any subband that you wish in the frequency domain.
>
However, prediction in transform domain has some benefits. Consider the
lowpass band (i.e., the approximation of the original signal). N-tap
predictor applied for the lowpass band spans much longer time interval than
N-tap predictor applied for the original signal. Thus, prediction in the
approximation band can capture much longer term correlations in the signal
that what plain linear prediction could do.
Note also that even though one has to use many predictors in the subband
approach (i.e., one for every band), computationally both are equally cheap
(neglecting the cost of the subband decomposition).
--
Jani Huhtanen
Tampere University of Technology, Pori
> Andor wrote:
>> Denoir wrote:
>>
>>> Hi,
>>>
>>> I have been playing around with the discrete wavelet transform (dwt) as
>>> a preprocessor for an adaptive system (for system identification and
>>> time-series prediction). The problem is however that the DWT is
>>> anti-causal and suffers from boundary value problems (due to the signal
>>> extension).
>>>
>>> I've tried the first thing that I could think of - a dwt with an
>>> expanding window where I only keep the last sample from each transform.
>>> The results were utter rubbish (due to the boundary distortions I
>>> suspect).
>>>
>>> Does anybody know an approach that would work - to enforce causality so
>>> that the dwt doesn't use future samples?
>>
>> Perhaps your problem is how to transform a linear-phase filter into a
>> minimum-phase filter?
>>
>> I can't really tell what your problem is, and why you feel that the DWT
>> is a solution. Time-series prediction using linear methods does require
>> any bandsplitting. You can directly compute the linear predictor for
>> any subband that you wish in the frequency domain.
>>
>
> However, prediction in transform domain has some benefits. Consider the
> lowpass band (i.e., the approximation of the original signal). N-tap
> predictor applied for the lowpass band spans much longer time interval
> than N-tap predictor applied for the original signal. Thus, prediction in
> the approximation band can capture much longer term correlations in the
> signal that what plain linear prediction could do.
>
> Note also that even though one has to use many predictors in the subband
> approach (i.e., one for every band), computationally both are equally
> cheap (neglecting the cost of the subband decomposition).
>
Oops, missed your last sentence Andor. What do you mean by that? Although
one could theoretically do that, why bother doing it in full band?
--
Jani Huhtanen
Tampere University of Technology, Pori
> Jani Huhtanen wrote:
>
> > Andor wrote:
> >> Denoir wrote:
> >>
> >>> Hi,
> >>>
> >>> I have been playing around with the discrete wavelet transform (dwt) as
> >>> a preprocessor for an adaptive system (for system identification and
> >>> time-series prediction). The problem is however that the DWT is
> >>> anti-causal and suffers from boundary value problems (due to the signal
> >>> extension).
> >>>
> >>> I've tried the first thing that I could think of - a dwt with an
> >>> expanding window where I only keep the last sample from each transform.
> >>> The results were utter rubbish (due to the boundary distortions I
> >>> suspect).
> >>>
> >>> Does anybody know an approach that would work - to enforce causality so
> >>> that the dwt doesn't use future samples?
> >>
> >> Perhaps your problem is how to transform a linear-phase filter into a
> >> minimum-phase filter?
> >>
> >> I can't really tell what your problem is, and why you feel that the DWT
> >> is a solution. Time-series prediction using linear methods does require
> >> any bandsplitting. You can directly compute the linear predictor for
> >> any subband that you wish in the frequency domain.
> >>
> >
> > However, prediction in transform domain has some benefits. Consider the
> > lowpass band (i.e., the approximation of the original signal). N-tap
> > predictor applied for the lowpass band spans much longer time interval
> > than N-tap predictor applied for the original signal. Thus, prediction in
> > the approximation band can capture much longer term correlations in the
> > signal that what plain linear prediction could do.
> >
> > Note also that even though one has to use many predictors in the subband
> > approach (i.e., one for every band), computationally both are equally
> > cheap (neglecting the cost of the subband decomposition).
> >
>
> Oops, missed your last sentence Andor. What do you mean by that? Although
> one could theoretically do that, why bother doing it in full band?
Since the OP was unhappy with the performance of his DWT, I was giving
suggestion to achieve similar results using other techniques. Another
possibility to gain non-linear frequency resolution for predictors is
to use frequency-warping.
As I said, not knowing the OPs real intentions, we can only guess.
>
> Jani Huhtanen wrote:
>
>> Jani Huhtanen wrote:
>>
>> > Andor wrote:
>> >> Denoir wrote:
>> >>
>> >>> Hi,
>> >>>
>> >>> I have been playing around with the discrete wavelet transform (dwt)
>> >>> as a preprocessor for an adaptive system (for system identification
>> >>> and time-series prediction). The problem is however that the DWT is
>> >>> anti-causal and suffers from boundary value problems (due to the
>> >>> signal extension).
>> >>>
>> >>> I've tried the first thing that I could think of - a dwt with an
>> >>> expanding window where I only keep the last sample from each
>> >>> transform. The results were utter rubbish (due to the boundary
>> >>> distortions I suspect).
>> >>>
>> >>> Does anybody know an approach that would work - to enforce causality
>> >>> so that the dwt doesn't use future samples?
>> >>
>> >> Perhaps your problem is how to transform a linear-phase filter into a
>> >> minimum-phase filter?
>> >>
>> >> I can't really tell what your problem is, and why you feel that the
>> >> DWT is a solution. Time-series prediction using linear methods does
>> >> require any bandsplitting. You can directly compute the linear
>> >> predictor for any subband that you wish in the frequency domain.
>> >>
>> >
>> > However, prediction in transform domain has some benefits. Consider the
>> > lowpass band (i.e., the approximation of the original signal). N-tap
>> > predictor applied for the lowpass band spans much longer time interval
>> > than N-tap predictor applied for the original signal. Thus, prediction
>> > in the approximation band can capture much longer term correlations in
>> > the signal that what plain linear prediction could do.
>> >
>> > Note also that even though one has to use many predictors in the
>> > subband approach (i.e., one for every band), computationally both are
>> > equally cheap (neglecting the cost of the subband decomposition).
>> >
>>
>> Oops, missed your last sentence Andor. What do you mean by that? Although
>> one could theoretically do that, why bother doing it in full band?
>
> Since the OP was unhappy with the performance of his DWT, I was giving
> suggestion to achieve similar results using other techniques. Another
> possibility to gain non-linear frequency resolution for predictors is
> to use frequency-warping.
>
> As I said, not knowing the OPs real intentions, we can only guess.
>
Ah, ok then
--
Jani Huhtanen
Tampere University of Technology, Pori
Andor wrote:
> Since the OP was unhappy with the performance of his DWT, I was giving
> suggestion to achieve similar results using other techniques. Another
> possibility to gain non-linear frequency resolution for predictors is
> to use frequency-warping.
>
> As I said, not knowing the OPs real intentions, we can only guess.
The intention is to use it as a pre-processing stage for a dynamic
neural network. The reason why the transform is so suitable is because
it is able to extract both local and global multiresolution information
from non-stationary processes. The decomposition isn't something that
the neural net can do on its own, but it makes great use of the signal
components.
In addition, the wavelet filters themselves can be adapted to fit the
problem. It's really a great transform for the purpose, except for that
pesky causality bit.
Jerry Avins wrote:
>
> BTW, a sliding FFT, which is what you just described, needn't be
> inefficient. Google it.
Well, not quite. First of all, was referring to an expanding window,
that uses all historic data and not just a frame of it. In addition FFT
is in several ways inferior for the task than DWT. First of all while a
sliding window does localize it a bit, you sacrifice the global picture
completely. It makes it unsuitable for non-stationary processes with
local non-periodic properties.
Apart from extending a window, I can think of another method:
fake-extending the signal. The basic idea being that I pad the signal
(symmetric extension or something like that) with the length of the
maximum needed delay for the original signal. I then do the transform
and and pick my sample from its original point in time, ignoring the
extended samples. I haven't tried it yet, but I suspect I'll end up
with the same results as with the expanding window...
> ... It's really a great transform for the purpose, except for that
> pesky causality bit.
That reminds me of a Principals quip: "Running a school would be a great
job if it weren't for the kids."
A global view of a long interval implies low frequency. Long delays go
with that territory. You don't have non-causality. You simply haven't
incorporated enough delay.
Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
> [email protected] wrote:
>
>> ... It's really a great transform for the purpose, except for that
>> pesky causality bit.
>
> That reminds me of a Principals quip: "Running a school would be a great
> job if it weren't for the kids."
>
> A global view of a long interval implies low frequency.
I have learned that narrow bands imply long intervals. Could you elaborate
why global view of a long interval implies low frequency? Perhaps I'm not
entirely clear what is meant by global view here. :\
--
Jani Huhtanen
Tampere University of Technology, Pori
Jani Huhtanen wrote:
> Jerry Avins wrote:
>
>> [email protected] wrote:
>>
>>> ... It's really a great transform for the purpose, except for that
>>> pesky causality bit.
>> That reminds me of a Principals quip: "Running a school would be a great
>> job if it weren't for the kids."
>>
>> A global view of a long interval implies low frequency.
>
> I have learned that narrow bands imply long intervals. Could you elaborate
> why global view of a long interval implies low frequency? Perhaps I'm not
> entirely clear what is meant by global view here. :\
Let's suppose that a sample rate is 8 KHz, and that periods of a minute
encompass significances that would be lost by considering only shorter
intervals. That's nearly half a million samples that need to be treated
jointly.
Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
> Jani Huhtanen wrote:
>> Jerry Avins wrote:
>>
>>> [email protected] wrote:
>>>
>>>> ... It's really a great transform for the purpose, except for that
>>>> pesky causality bit.
>>> That reminds me of a Principals quip: "Running a school would be a great
>>> job if it weren't for the kids."
>>>
>>> A global view of a long interval implies low frequency.
>>
>> I have learned that narrow bands imply long intervals. Could you
>> elaborate why global view of a long interval implies low frequency?
>> Perhaps I'm not entirely clear what is meant by global view here. :\
>
> Let's suppose that a sample rate is 8 KHz, and that periods of a minute
> encompass significances that would be lost by considering only shorter
> intervals. That's nearly half a million samples that need to be treated
> jointly.
True. Is there something that implies low frequency?
--
Jani Huhtanen
Tampere University of Technology, Pori
Jani Huhtanen wrote:
> Jerry Avins wrote:
>
>> Jani Huhtanen wrote:
>>> Jerry Avins wrote:
>>>
>>>> [email protected] wrote:
>>>>
>>>>> ... It's really a great transform for the purpose, except for that
>>>>> pesky causality bit.
>>>> That reminds me of a Principals quip: "Running a school would be a great
>>>> job if it weren't for the kids."
>>>>
>>>> A global view of a long interval implies low frequency.
>>> I have learned that narrow bands imply long intervals. Could you
>>> elaborate why global view of a long interval implies low frequency?
>>> Perhaps I'm not entirely clear what is meant by global view here. :\
>> Let's suppose that a sample rate is 8 KHz, and that periods of a minute
>> encompass significances that would be lost by considering only shorter
>> intervals. That's nearly half a million samples that need to be treated
>> jointly.
>
> True. Is there something that implies low frequency?
Something whose period requires that it be represented using a minute's
worth of samples.
Jerry
--
Engineering is the art of making what you want from things you can get.
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
> Jani Huhtanen wrote:
>> Jerry Avins wrote:
>>
>>> Jani Huhtanen wrote:
>>>> Jerry Avins wrote:
>>>>
>>>>> [email protected] wrote:
>>>>>
>>>>>> ... It's really a great transform for the purpose, except for that
>>>>>> pesky causality bit.
>>>>> That reminds me of a Principals quip: "Running a school would be a
>>>>> great job if it weren't for the kids."
>>>>>
>>>>> A global view of a long interval implies low frequency.
>>>> I have learned that narrow bands imply long intervals. Could you
>>>> elaborate why global view of a long interval implies low frequency?
>>>> Perhaps I'm not entirely clear what is meant by global view here. :\
>>> Let's suppose that a sample rate is 8 KHz, and that periods of a minute
>>> encompass significances that would be lost by considering only shorter
>>> intervals. That's nearly half a million samples that need to be treated
>>> jointly.
>>
>> True. Is there something that implies low frequency?
>
> Something whose period requires that it be represented using a minute's
> worth of samples.
>
Well consider sum of two sinusoids:
x[n] = sin(2*pi*f*n/Fs)) + sin(2*pi*(f+B)*n/Fs),
If B = 1 then x[n] has a period of one second. x[n] still doesn't have to
contain any low frequencies. For example, f=Fs/4 will do.
The point is that long periods correspond to narrow bands but not
necessarily to low frequencies.
--
Jani Huhtanen
Tampere University of Technology, Pori
> Apart from extending a window, I can think of another method:
> fake-extending the signal. The basic idea being that I pad the signal
> (symmetric extension or something like that) with the length of the
> maximum needed delay for the original signal. I then do the transform
> and and pick my sample from its original point in time, ignoring the
> extended samples. I haven't tried it yet, but I suspect I'll end up
> with the same results as with the expanding window...
Symmetric extension at the edges is a pretty common technique in
wavelet decomposition. Waving my hands wildly, it seems to me that
doing this nets twice the coefficient variance as for central
coefficients that use complete input data. Proof left to the reader, of
course.
Another approach would be to switch to asymmetric basis functions at
the edges. That's a time-honored technique with conventional spline
fitting. Poking through the literature on spline wavelets might yield
something applicable.
Third idea is forget about using the coefficients that are too close to
the boundary. If new data keeps coming in, all you have to do is wait.
For years, folks have been using overlap techniques with FFT's to
reduce blocking problems. What keeps you from doing the same thing with
the DWT?
David L. Rick
Hach Company
Note: The address in the header goes straight to the bit bucket. Actual
humans are welcome to contact me at
davidDOTrickAThachDOTcomREMOVE
Jani Huhtanen <[email protected]> wrote in news:H46Dg.588$n02.156
@reader1.news.jippii.net:
> If B = 1 then x[n] has a period of one second. x[n] still doesn't have to
> contain any low frequencies. For example, f=Fs/4 will do.
You mean Fs=4f will do.
> The point is that long periods correspond to narrow bands but not
> necessarily to low frequencies.
>
By Narrow bands, you mean better resolution in the frequency domain.
If you don't have good resolution in the frequency domain, though, you
might have trouble resolving low frequencies. For me, this usually turns
out to be one case where you're not trading one off over the other--to get
good enough resolution in the frequency domain to resolve low frequencies,
I like to collect at least 1.5-2 cycles of the lowest frequency I'm trying
to resolve. Practically, it seems easier to get sufficient resolution in
the higher frequencies just by zero-padding your data, but this can really
distort your low frequency spectrum. So if you need high frequency
resolution but care about low frequencies, the easiest way to go is to make
sure you sample for long enough. Alternatively, if you're not interested
in the high frequencies, you can often filter then downsample to spread out
your low frequency spectrum.