List

Spectral leakage can cause engineering design issues when designing any system or instrument which uses channels to carry data (in the communication sense). I went over these issues in SPECTRAL LEAKAGE I, and here I will derive some constraints that we have between channel frequencies, sampling rate, and Nyquist, given that we want no spectral leakage in the Fourier domain channels themselves.

There are ways to mitigate spectral leakage when we reconstruct our data from the channel(s), but this makes writing the reconstruction code more difficult, more bug prone, etc. These techniques are beyond the scope of this entry, but may be discussed in detail in another post.

Assumptions

 

Suppose that we denote our sampling rate fs=ns1s,nsN, i.e., ns evenly spaced samples per second, where ns is an integer. Now suppose that we also have defined an ordered list of channel frequencies, ν0ν1νkfs2, where the last frequency is necessarily less than or equal to the Nyquist frequency (caveat : when sampling at Nyquist there exist functions which cannot be reconstructed, the Nyquist condition is strictly less than, but we typically may use the equality in engineering applications). Given these assumptions, we now want to find the minimum window length which encloses an integer number of sampled periods, for each frequency. Some additional insight and graphs of what is happening in the temporal domain is discussed at GaussianWaves.

The solution

 

The sample increment is Δt=1fs, so we need to find m such that f0(0)=f0(mΔt)f1(0)=f1(mΔt)fk(0)=fk(mΔt) simultaneously, where fj(t)=cos2π(νjt) or fj(t)=sin2π(νjt). This implies that for an arbitrary j, 1=cos2π(νjmΔt)or0=sin2π(νjmΔt) which then leads to the fact νjmΔt=lj,ljNm=ljνjΔt,jm=ljfsνj,j

This last equation ( means for all) reveals a key piece of information; fs/νj must be a rational number.

The boxed equation above can then be rearranged to solve for lj, lj=mνjfssince m is fixed and both νj and fs can be specified as in the previous post, for example cos2π(3.75t)+cos2π(7.5t)+cos2π(11.25t)+cos2π(15t), sampled at 30fps.

For our example, we have the following set of equations l0=3.75m30=m8l1=7.5m30=m4l2=11.25m30=3m8l3=15m8=m2. By inspection we can see that m8, then plugging in m=8 does in fact seem to satisfy all of the equations, resulting in l0=1,l1=2,l2=3,l3=4.  For this example, the smallest window is 8 samples.

8 should not be used, however, because in this case there is not enough “distance” between the respective δ-functions in the Fourier domain, so at least 16 samples should be used (any multiple of 8 will work for this specific example).

To summarize, a spectral leakage free channel construction requires:

m=ljfsνj,j, where m is the minimum number of samples, fs is the sampling rate, νj is each of the channel frequencies, lj corresponds to the number of periods in the window for each respective νj, and finally fs/νj must be rational. Notice that, typically fs is fixed, which implies that there can never be an irrational ratio between any of the channel frequencies if we want the channels to remain free of spectral leakage.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.