<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linear Systems &#8211; Dr. Israel Vaughn</title>
	<atom:link href="http://israelvaughn.com/category/linear-systems/feed/" rel="self" type="application/rss+xml" />
	<link>http://israelvaughn.com</link>
	<description>Optics Discipline Supervisor</description>
	<lastBuildDate>Wed, 20 Oct 2021 00:27:50 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>http://israelvaughn.com/wp-content/uploads/2015/02/1654231589817.jpg</url>
	<title>Linear Systems &#8211; Dr. Israel Vaughn</title>
	<link>http://israelvaughn.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Spectral Leakage II</title>
		<link>http://israelvaughn.com/spectral-leakage-ii/</link>
					<comments>http://israelvaughn.com/spectral-leakage-ii/#respond</comments>
		
		<dc:creator><![CDATA[Israel]]></dc:creator>
		<pubDate>Mon, 30 Mar 2015 01:32:40 +0000</pubDate>
				<category><![CDATA[Image Science]]></category>
		<category><![CDATA[Linear Systems]]></category>
		<guid isPermaLink="false">http://israelvaughn.com/?p=144</guid>

					<description><![CDATA[Spectral leakage can cause engineering design issues when designing any system or instrument which uses channels to carry data (in [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>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 <a href="http://israelvaughn.com/spectral-leakage-i/">SPECTRAL LEAKAGE I</a>, and here I will derive some constraints that we have between channel frequencies, sampling rate, and Nyquist, given that we want <em>no spectral leakage </em>in the Fourier domain channels themselves.</p>
<p>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.</p>
<h3><span style="text-decoration: underline;">Assumptions</span></h3>
<p> </p>
<p>Suppose that we denote our sampling rate $$f_s = n_s \frac{1}{s}, \:n_s \in \mathbb{N},$$ i.e., $n_s$ evenly spaced samples per second, where $n_s$ is an integer. Now suppose that we also have defined an ordered list of channel frequencies, $$\nu_0 \leq \nu_1 \leq \cdots \leq \nu_k \leq \frac{f_s}{2},$$ 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 <em>an integer number of sampled periods, for each frequency. </em>Some additional insight and graphs of what is happening in the temporal domain is discussed at <a title="GaussianWaves Spectral Leakage" href="http://www.gaussianwaves.com/2011/01/fft-and-spectral-leakage-2/">GaussianWaves</a>.</p>
<h3><span style="text-decoration: underline;">The solution</span></h3>
<p> </p>
<p>The sample increment is $$\Delta t = \frac{1}{f_s},$$ so we need to find $m$ such that $$f_0(0) = f_0(m\Delta t)\\f_1(0) = f_1(m\Delta t)\\\vdots\\f_k(0) = f_k(m\Delta t)$$ simultaneously, where $f_j(t) = \cos 2\pi(\nu_j t)$ or $f_j(t) = \sin 2\pi(\nu_j t)$. This implies that for an arbitrary $j$, $$ 1 = \cos 2\pi(\nu_j m \Delta t)\quad \text{or}\quad 0 = \sin 2\pi(\nu_j m \Delta t)$$ which then leads to the fact $$ \nu_j m \Delta t = l_j,\:\: l_j\in\mathbb{N}\\\implies m = \frac{l_j}{\nu_j\Delta t},\forall j\\\implies \boxed{m = \frac{l_j f_s}{\nu_j},\forall j} $$</p>
<p>This last equation ($\forall$ means for all) reveals a key piece of information; $f_s/\nu_j$ <strong>must be a rational number</strong>.</p>
<p>The boxed equation above can then be rearranged to solve for $l_j$, $$l_j=\frac{m\nu_j}{f_s}$$since $m$ is fixed and both $\nu_j$ and $f_s$ can be specified as in the previous post, for example $$\cos 2\pi(3.75t) + \cos2\pi(7.5t) + \cos2\pi(11.25t) + \cos2\pi(15t),$$ sampled at 30fps.</p>
<p>For our example, we have the following set of equations $$\begin{align}l_0 &amp;=  \frac{3.75m}{30}=\frac{m}{8}\\\\l_1 &amp;=  \frac{7.5m}{30}=\frac{m}{4}\\\\l_2 &amp;=  \frac{11.25m}{30}=\frac{3m}{8}\\\\l_3 &amp;= \frac{15m}{8} = \frac{m}{2}.\end{align}$$ By inspection we can see that $m \geq 8$, then plugging in $m=8$ does in fact seem to satisfy all of the equations, resulting in $l_0=1,l_1=2,l_2=3,l_3=4$.  For this example, the smallest window is 8 samples.</p>
<p>8 should not be used, however, because in this case there is not enough &#8220;distance&#8221; between the respective $\delta$-functions in the Fourier domain, so at least 16 samples should be used (any multiple of 8 will work for this specific example).</p>
<p>To summarize, a <em>spectral leakage free</em> channel construction requires:</p>
<p>$$\boxed{m = \frac{l_j f_s}{\nu_j},\forall j},$$ where $m$ is the minimum number of samples, $f_s$ is the sampling rate, $\nu_j$ is each of the channel frequencies, $l_j$ corresponds to the number of periods in the window for each respective $\nu_j$, and finally $f_s/\nu_j$ must be rational. Notice that, typically $f_s$ 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.</p>


<p></p>
]]></content:encoded>
					
					<wfw:commentRss>http://israelvaughn.com/spectral-leakage-ii/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Spectral Leakage I</title>
		<link>http://israelvaughn.com/spectral-leakage-i/</link>
					<comments>http://israelvaughn.com/spectral-leakage-i/#respond</comments>
		
		<dc:creator><![CDATA[Israel]]></dc:creator>
		<pubDate>Sun, 22 Mar 2015 01:05:43 +0000</pubDate>
				<category><![CDATA[Image Science]]></category>
		<category><![CDATA[Linear Systems]]></category>
		<guid isPermaLink="false">http://israelvaughn.com/?p=142</guid>

					<description><![CDATA[For my Ph.D. thesis work I&#8217;ve been working with a lot of linear systems theory. Because of my mathematics background, [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>For my Ph.D. thesis work I&#8217;ve been working with a lot of linear systems theory. Because of my mathematics background, I typically think of linear systems details from a functional/harmonic analysis perspective, with real numbers, mostly continuous functions, etc.  In the engineering world, however, we use discrete versions of these mathematics.</p>
<h3><span style="text-decoration: underline;">Motivation</span></h3>
<p>The application which I&#8217;m applying linear systems to is a channel design for a <a href="http://www.opticsinfobase.org/josaa/abstract.cfm?uri=josaa-31-5-1013">channeled polarimeter</a>.  Abstractly we may think of channels in the typical communications sense, sets of $\delta$-functions in the Fourier domain which are convolved with the data (carrier channels/frequencies). The Fourier domain data around each channel can then be filtered out and deconvolved to obtain the spatio-temporal domain data for different channels.</p>
<p>In our polarimetric system design, we must temporally sample (via our focal plane array, i.e., a camera). We also are forced to use a window of samples, since we don&#8217;t have infinite time or computer memory. These windows must be integer periods of our carrier (or modulation) frequencies, otherwise we get <em>spectral leakage. </em>The seminal paper on spectral leakage and mitigating it is by <a href="http://ieeexplore.ieee.org/xpl/login.jsp?tp=&amp;arnumber=1455106&amp;url=http%3A%2F%2Fieeexplore.ieee.org%2Fiel5%2F5%2F31261%2F01455106">Harris</a> (1978). Basically when performing a discrete Fourier transform (DFT, including FFT), if the window is not an integer multiple of the period, then frequencies from the sharp cutoff become introduced into the DFT.</p>
<h3><span style="text-decoration: underline;">The issues</span></h3>
<p>The camera on our polarimeter has a maximum framerate of 30 frames per second (fps). The bandwidth optimal system design (found so far) for this particular type of system has sets of 9 temporal channels (there are also spatial channels, and the channels are actually three dimensional spatio-temporal channels, but for simplicity here we may ignore this complexity), including the DC or 0 channel, corresponding to the temporal modulation dimension.  Due to Hermicity, this means there are really 4 unique temporal frequencies other than 0 for this design, and they are evenly spaced. The maximum frequency is limited by the physical rotation speed limitations of a retarder, and the sample rate of the camera (due to Nyquist).</p>
<p><strong>The above puts constraints on the windows,  frequencies, and sampling rates that we can use without spectral leakage.</strong> It is sometimes theoretically desirable (for noise reasons in this polarimetric instrument) to sample at slightly above Nyquist, however in our case spectral leakage does not allow this.  Our <strong>window must be an integer number of periods</strong> of all 4 frequencies. Practically this means that I cannot increase the sampling rate to something like 32 fps, because of the <em>interplay between Nyquist, spectral leakage, and channel frequency spacing</em>.</p>
<p>Below is a graph of $$ f(t) = \cos 2\pi(3.75t) + \cos2\pi(7.5t) + \cos2\pi(11.25t) + \cos2\pi(15t),$$ the blue dots denote sampling at 30 fps (or once every $\frac{1}{30}s$), and the red squares denote sampling at 32 fps.</p>
<p><a href="http://israelvaughn.com/wp-content/uploads/2015/03/ChanExT1.png"><img fetchpriority="high" decoding="async" class=" wp-image-55 aligncenter" src="http://israelvaughn.com/wp-content/uploads/2015/03/ChanExT1-e1427779983105.png" alt="time domain" width="846" height="420" /></a>When we take the Fourier transform (I use the unitary version here) $$\mathcal{F}\{f(t)\}_{t \to \nu}$$ for the 30fps sampled case we obtain the graph in blue below. This is the correct representation, there is no imaginary part, and the discrete $\delta$-functions are located precisely at the frequencies expected from the corresponding real (non-discrete) Fourier transform results.  The red graphs show the <em>spectral leakage</em> <em>issue,</em> the imaginary part becomes non-zero, and the $\delta$-functions sort of &#8220;split&#8221; into positive and negative parts. This creates problems when trying to reconstruct data after filtering. Note that we have the leftmost $\delta$-function at twice the magnitude of the others, and a missing $\delta$-function on the right side, this is due to the channel being right at Nyquist.</p>
<p><a href="http://israelvaughn.com/wp-content/uploads/2015/03/ChanEx1.png"><img decoding="async" class=" wp-image-54 aligncenter" src="http://israelvaughn.com/wp-content/uploads/2015/03/ChanEx1-e1427780051400.png" alt="fourier domain" width="846" height="420" /></a>In the next <a href="http://israelvaughn.com/spectral-leakage-ii/">post</a> I will go over precisely what the mathematical relationship is between spectral leakage, Nyquist, and channel frequency, and the constraints imposed upon us as engineers when using channeled systems.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://israelvaughn.com/spectral-leakage-i/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
