Commit 88008033 authored by Erik Strand's avatar Erik Strand

Add final psets and project

parents 888df3c0 dae2f5a3
......@@ -4,7 +4,7 @@ GEM
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
colorator (1.1.0)
concurrent-ruby (1.1.4)
concurrent-ruby (1.1.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
......@@ -29,10 +29,10 @@ GEM
safe_yaml (~> 1.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-watch (2.1.2)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (1.17.0)
liquid (4.0.1)
liquid (4.0.3)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
......@@ -46,8 +46,8 @@ GEM
ffi (~> 1.0)
rouge (3.3.0)
ruby_dep (1.5.0)
safe_yaml (1.0.4)
sass (3.7.3)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
......
---
title: Fourier Examples
---
Working these out by hand helped me debug my CT algorithms.
![page_1](../assets/img/notes_ft_examples_1.jpg)
![page_2](../assets/img/notes_ft_examples_2.jpg)
![page_3](../assets/img/notes_ft_examples_3.jpg)
---
title: Fourier Series
---
## Definition
Let $$f: \mathbb{R} \rightarrow \mathbb{C}$$ be a reasonably well behaved $$L$$-periodic function
(i.e. $$f(x) = f(x + L)$$ for all $$x$$). Then $$f$$ can be expressed as an infinite series
$$
f(x) = \sum_{n \in \mathbb{Z}} A_n e^{2 \pi i n x / L}
$$
The values of the coefficients $$A_n$$ can be found using the orthogonality of basic exponential
sinusoids. For any $$m \in \mathbb{Z}$$,
$$
\begin{align*}
\int_{-L/2}^{L/2} f(x) e^{-2 \pi i m x / L} dx
&= \int_{-L/2}^{L/2} \sum_{n \in \mathbb{Z}} A_n e^{2 \pi i n x / L} e^{-2 \pi i m x / L} dx \\
&= \sum_{n \in \mathbb{Z}} A_n \int_{-L/2}^{L/2} e^{2 \pi i (n - m) x / L} dx \\
&= \sum_{n \in \mathbb{Z}} A_n L \delta_{nm} \\
&= L A_m
\end{align*}
$$
where the second to last line uses [Kronecker delta](https://en.wikipedia.org/wiki/Kronecker_delta)
notation. Thus by the periodicity of $$f$$ and the exponential function
$$
\begin{align*}
A_n &= \frac{1}{L} \int_{-L/2}^{L/2} f(x) e^{-2 \pi i n x / L} dx \\
&= \frac{1}{L} \int_{0}^{L} f(x) e^{-2 \pi i n x / L} dx
\end{align*}
$$
## Relation to the Fourier Transform
Now suppose we have a function $$f: \mathbb{R} \rightarrow \mathbb{C}$$, and we construct an
$$L$$-periodic version
$$
f_L(x) = \sum_{n \in \mathbb{Z}} f(x + nL)
$$
The coefficients of the Fourier Series of $$f_L$$ are
$$
\begin{align*}
L A_n &= \int_0^L \sum_{m \in \mathbb{Z}} f(x + mL) e^{-2 \pi i n x / L} dx \\
&= \sum_{m \in \mathbb{Z}} \int_0^L f(x + mL) e^{-2 \pi i n x / L} dx \\
&= \sum_{m \in \mathbb{Z}} \int_{mL}^{(m + 1)L} f(x) e^{-2 \pi i n (x - mL) / L} dx \\
&= e^{-2 \pi i n m} \sum_{m \in \mathbb{Z}} \int_{mL}^{(m + 1)L} f(x) e^{-2 \pi i x n / L} dx \\
&= \int_\mathbb{R} f(x) e^{-2 \pi i x n / L} dx \\
&= \hat{f}(n/L)
\end{align*}
$$
so
$$
f_L(x) = \frac{1}{L} \sum_{n \in \mathbb{Z}} \hat{f}(n / L) e^{2 \pi i n x / L}
$$
Thus the periodic summation of $$f$$ is completely determined by discrete samples of $$\hat{f}$$.
This is remarkable in that an uncountable set of numbers (all the values taken by $$f_L$$ over one
period) can be determined by a countable one (the samples of $$\hat{f}$$). Even more incredible, if
$$f$$ has finite bandwidth then only a finite number of the samples will be nonzero. So the
uncountable set of numbers is determined by a finite one.
As an aside, by taking $$x = 0$$ we can derive the
[Poisson summation formula](https://en.wikipedia.org/wiki/Poisson_summation_formula):
$$
\sum_{n \in \mathbb{Z}} f(nL) = \frac{1}{L} \sum_{n \in \mathbb{Z}} \hat{f}(n / L)
$$
## Derivation of the Discrete Time Fourier Transform
We can apply the above results to $$\hat{f}$$ as well. Recall that the Fourier transform of
$$\hat{f}$$ is $$f(-x)$$. Thus the periodic summation of $$\hat{f}$$ is
$$
\begin{align*}
\hat{f}_L(x) &= \frac{1}{L} \sum_{n \in \mathbb{Z}} f(-n / L) e^{2 \pi i n x / L} \\
&= \frac{1}{L} \sum_{n \in \mathbb{Z}} f(n / L) e^{-2 \pi i n x / L}
\end{align*}
$$
This is precisely the definition of the discrete time Fourier transform.
If $$f$$ is time-limited, then we'll have only a finite number of nonzero samples. But then
$$\hat{f}$$ is necessarily not bandwidth limited, so the tails of $$\hat{f}$$ will overlap in the
periodic summation. On the other hand, if $$f$$ is bandwidth limited, for sufficiently large $$L$$
we can recover $$\hat{f}$$. To do so perfectly requires an infinite number of samples, but in
practice reasonably bandwidth limited signals can still be recovered quite well from a finite number
of samples.
## Interpretation of the Discrete Fourier Transform
### Forward DFT
Suppose we take samples of a function $$f$$ at integer multiples of a time $$T$$ (or distance,
etc.). As we saw above,
$$
\hat{f}_{1/T}(x) = T \sum_{n \in \mathbb{Z}} f(n T) e^{-2 \pi i n x T}
$$
So when $$f$$ is time limited such that only the $$N$$ samples $$f(0)$$, $$\ldots$$,
$$f((N - 1) T)$$ are nonzero,
$$
\hat{f}_{1/T}(x) = T \sum_{n = 0}^{N - 1} f(n T) e^{-2 \pi i n x T}
$$
In this case the discrete Fourier transform gives us $$N$$ evenly spaced samples from one period of
$$\hat{f}_{1/T}$$. Namely, for $$0 \leq k < N$$,
$$
\hat{f}_{1/T}(k / NT) = T \sum_{n = 0}^{N - 1} f(n T) e^{-2 \pi i n k / N}
$$
### Backward DFT
Similarly,
$$
f_{NT}(x) = \frac{1}{NT} \sum_{n \in \mathbb{Z}} \hat{f}(n / NT) e^{2 \pi i n x / (NT)}
$$
So when $$f$$ is bandwidth limited such that only the $$N$$ samples $$\hat{f}(0)$$, $$\ldots$$,
$$\hat{f}((N - 1) / NT)$$ are nonzero,
$$
f_{NT}(x) = \frac{1}{NT} \sum_{n = 0}^{N - 1} \hat{f}(n / NT) e^{2 \pi i n x / (NT)}
$$
And in this case the inverse discrete Fourier transform gives us $$N$$ evenly spaced samples from
one period of $$f_{NT}$$. Namely, for $$0 \leq k < N$$,
$$
f_{NT}(kT) = \frac{1}{NT} \sum_{n = 0}^{N - 1} \hat{f}(n / NT) e^{2 \pi i n k / N}
$$
### Commentary
If $$f$$ were both time and bandwidth limited as discussed above, then $$f_{NT} = f$$ and
$$\hat{f}_{1/T} = \hat{f}$$. So the samples of $$\hat{f}$$ we get from the forward DFT could be fed
into the backward DFT to exactly recover our original samples of $$f$$. Unfortunately no such
functions exist, but in practice it works pretty well for signals that strike a balance between time
and bandwidth limits. The penalty for the imprecision is some aliasing caused by overlapping tails
in the periodic summations. So make sure $$1/T$$ is large enough to avoid significant aliasing in
the frequency domain, and $$NT$$ is large enough to avoid significant aliasing in the time (or
space, etc. domain).
We also see why the frequency spectra obtained from the DFT is periodic: we're not getting samples
of $$\hat{f}$$, but of its periodic summation. If $$\hat{f}$$ is localized near the origin, it
can be more instructive to view half the samples of $$\hat{f}_{1/T}$$ provided by the DFT as
representing positive frequencies, and the other half as negative frequencies.
......@@ -2,34 +2,52 @@
title: Fourier Transforms
---
To really make sense of chapter 2 I needed to review the properties of Fourier Transforms. These
notes are based on my prior knowledge and some helpful websites:
- [Properties of Fourier Transform](http://fourier.eng.hmc.edu/e101/lectures/handout3/node2.html)
- [symmetry.pdf](https://www.cs.unm.edu/~williams/cs530/symmetry.pdf)
## Definition
Note: I'm sloppy with the proofs here since all physical functions will have the nice properties
that make the relevant operations valid, but I don't always call of these properties out when they
are used.
For a suitable function $$f : \mathbb{R} \rightarrow \mathbb{C}$$, the Fourier transform and inverse
Fourier transform are defined to be
$$
\begin{align*}
(\mathcal{F} f)(\xi) &= \int_\mathbb{R} f(x) e^{-2 \pi i x \xi} \mathrm{d} x \\
(\mathcal{F}^{-1} f)(x) &= \int_\mathbb{R} f(\xi) e^{2 \pi i \xi x} \mathrm{d} \xi
\end{align*}
$$
## Basics
The Fourier transform of $$f$$ is frequently written as $$\hat{f}(\xi) = (\mathcal{F} f)(\xi)$$.
For a function $$f : \mathbb{R} \rightarrow \mathbb{C}$$, I use the definitions
Every function in [$$L^1$$](https://en.wikipedia.org/wiki/Lp_space#Lp_spaces) has a Fourier
transform and inverse Fourier transform, since
$$
(\mathcal{F} f)(x) = \int_\mathbb{R} f(x') e^{-2 \pi i x' x} \mathrm{d} x'
\begin{align*}
\left \vert \hat{f}(\xi) \right \vert
&\leq \int_\mathbb{R} \left \vert f(x) e^{-2 \pi i x \xi} \right \vert \mathrm{d} x \\
&= \int_\mathbb{R} \left \vert f(x) \right \vert \mathrm{d} x
\end{align*}
$$
$$
(\mathcal{F}^{-1} f)(x) = \int_\mathbb{R} f(x') e^{2 \pi i x' x} \mathrm{d} x'
$$
Furthermore when $$f$$ is in $$L^1$$, then $$\hat{f}(\xi)$$ is a uniformly continuous function that
tends to zero as $$|\xi|$$ approaches infinity. However $$\hat{f}$$ need not be in $$L^1$$, and not
every continuous function that tends to zero is the Fourier transform of a function in $$L^1$$
(indeed describing $$\mathcal{F}(L^1)$$ is an open problem). As such it can be helpful to restrict
the definition to the [Schwartz space](https://en.wikipedia.org/wiki/Schwartz_space) over
$$\mathbb{R}$$, where the Fourier transform is an
[automorphism](https://en.wikipedia.org/wiki/Automorphism).
On the other hand, we'll also want to talk about the Fourier transforms of functions that aren't
absolutely integrable, or objects that aren't functions at all (like the [delta
function](https://en.wikipedia.org/wiki/Dirac_delta_function)). So I will tend to be very liberal
with my application of the transform.
## Basic Properties
The Fourier Inversion Theorem states that $$\mathcal{F} \mathcal{F}^{-1} = \mathcal{F}^{-1}
\mathcal{F} = \mathcal{I}$$ (where $$\mathcal{I}$$ is the identity operator). This holds for the space
of functions whose Fourier transforms exist and for which both the function and the transform are
absolutely integrable and continuous. All claims I make about functions should be interpreted to
apply only to functions in this space.
The [Fourier Inversion Theorem](https://en.wikipedia.org/wiki/Fourier_inversion_theorem) states that
$$\mathcal{F} \mathcal{F}^{-1} = \mathcal{F}^{-1} \mathcal{F} = \mathcal{I}$$ (where $$\mathcal{I}$$
is the identity operator). This is strictly true for functions in $$L^1$$ whose transforms are also
in $$L^1$$, but can also be extended to more general spaces as well.
The Fourier transform is linear:
......@@ -38,24 +56,45 @@ $$
$$
If you shift everything in the original basis (usually the time or space domain), you pick up a
phase shift in the transformed (i.e. frequency) basis. This follows from a simple change of
variables.
phase shift in the transformed (i.e. frequency) basis. This follows from a change of variables.
$$
\begin{align*}
(\mathcal{F} f(x + x_0))(\xi)
&= \int_\mathbb{R} f(x + x_0) e^{-2 \pi i x \xi} \mathrm{d} x \\
&= \int_\mathbb{R} f(x) e^{-2 \pi i (x - x_0) \xi} \mathrm{d} x \\
&= e^{2 \pi i x_0 \xi} \int_\mathbb{R} f(x) e^{-2 \pi i x \xi} \mathrm{d} x \\
&= e^{2 \pi i x_0 \xi} \hat{f}(\xi)
\end{align*}
$$
The reverse is also true (with a sign difference):
$$
\begin{align*}
\mathcal{F}(e^{2 \pi i x \xi_0} f(x))(\xi)
&= \int_\mathbb{R} e^{2 \pi i x \xi_0} f(x) e^{-2 \pi i x \xi} \mathrm{d} x \\
&= \int_\mathbb{R} f(x) e^{-2 \pi i x (\xi - \xi_0)} \mathrm{d} x \\
&= \hat{f}(\xi - \xi_0)
\end{align*}
$$
If you expand $$f$$ horizontally, you contract $$\hat{f}$$ both horizontally and vertically.
$$
\begin{align*}
(\mathcal{F} f(x' + x_0))(x)
&= \int_\mathbb{R} f(x' + x_0) e^{-2 \pi i x' x} \mathrm{d} x' \\
&= \int_\mathbb{R} f(x') e^{-2 \pi i (x' - x_0) x} \mathrm{d} x' \\
&= e^{2 \pi i x_0 x} \int_\mathbb{R} f(x') e^{-2 \pi i x' x} \mathrm{d} x' \\
&= e^{2 \pi i x_0 x} (\mathcal{F} f(x'))(x)
\mathcal{F}(f(a x))(\xi)
&= \int_\mathbb{R} f(a x) e^{-2 \pi i x \xi} \mathrm{d} x \\
&= \frac{1}{|a|} \int_\mathbb{R} f(x) e^{-2 \pi i x \xi / a} \mathrm{d} x \\
&= \frac{1}{|a|} \hat{f} \left( \frac{\xi}{a} \right)
\end{align*}
$$
## Fourier Flips
The Fourier transform has a number of interesting properties related to the flip operator
$$(\mathcal{R} f)(x) = f(-x)$$. By definition
The Fourier transform has a number of interesting properties related to the flip (or reversal)
operator $$(\mathcal{R} f)(x) = f(-x)$$. By definition
$$
(\mathcal{F}^{-1} f)(x) = \int_\mathbb{R} f(x') e^{2 \pi i x' x} \mathrm{d} x'
......@@ -73,7 +112,8 @@ $$
\end{align*}
$$
Thus $$\mathcal{F}^{-1} = \mathcal{F} \mathcal{R} = \mathcal{R} \mathcal{F}$$. This means that
Thus $$\mathcal{F}^{-1} = \mathcal{F} \mathcal{R} = \mathcal{R} \mathcal{F}$$. (You can also derive
this using the expansion/contraction formula discussed above). This means that
$$
\mathcal{I}
......@@ -175,9 +215,9 @@ when we're dealing with a real function and only care about the magnitude of the
for spectral power analysis).
## Transforms of Gaussians
## The Transform of a Gaussian
A Fourier Transform that comes up frequently is that of a Gaussian. It can be calculated by
A Fourier transform that comes up frequently is that of a Gaussian. It can be calculated by
completing a square.
$$
......@@ -214,5 +254,5 @@ $$
\end{align*}
$$
This depends on the variance, which is inverted by the Fourier Transform. So since the power is
This depends on the variance, which is inverted by the Fourier transform. So since the power is
invariant, the normalization cannot in general be conserved.
......@@ -199,11 +199,11 @@ equal to $$\num{2e-7}$$ newton per metre of length."
Show that that current at that distance produces that force.
First let's find the magnetic field of an infinitely long straight conductor. Let's use a
cylindrical coordinate system along this axis. Considering the Biot-Savart Law and the symmetry of
this problem, the magnetic field must be oriented along $$\hat{\mathrm{d} \theta}$$, with a
magnitude that depends only on $$r$$. Consider then a circle of radius $$r$$ centered on the wire.
Amp&egrave;re's Law tells us that the magnitude of the field at any point on this circle is $$I / (2
\pi r)$$.
cylindrical coordinate system along this axis. Considering the [Biot-Savart
Law](https://en.wikipedia.org/wiki/Biot%E2%80%93Savart_law) and the symmetry of this problem, the
magnetic field must be oriented along $$\hat{\mathrm{d} \theta}$$, with a magnitude that depends
only on $$r$$. Consider then a circle of radius $$r$$ centered on the wire. Amp&egrave;re's Law
tells us that the magnitude of the field at any point on this circle is $$I / (2 \pi r)$$.
The differential force exerted by this field on a differential piece of current is $$dF = I (dl
\times B)$$. In this case the direction of the current and the magnetic field are perpendicular, so
......
---
title: Problem Set 8
---
![page1](../assets/img/pset8_1.jpg)
![page2](../assets/img/pset8_2.jpg)
![page3](../assets/img/pset8_3.jpg)
## (11.1)
### (a)
{:.question}
Derive equation (11.28) by taking the integral and limit of equation (11.27).
### (b)
{:.question}
Show that equation (11.29) follows.
## (11.2)
{:.question}
What is the expected occupancy of a state at the conduction band edge for Ge, Si, and diamond at
room temperature (300 K)?
## (11.3)
{:.question}
Consider Si doped with 1017 As atoms/cm3.
### (a)
{:.question}
What is the equilibrium hole concentration at 300 K?
### (b)
{:.question}
How much does this move EF relative to its intrinsic value?
## (11.4)
{:.question}
Design a tristate CMOS inverter by adding a control input to a conventional inverter that can force
the output to a high impedance (disconnected) state. These are useful for allowing multiple gates to
share a single wire.
---
title: Problem Set 9
---
![page_1](../assets/img/pset9_1.jpg)
![page_2](../assets/img/pset9_2.jpg)
![page_3](../assets/img/pset9_3.jpg)
![page_4](../assets/img/pset9_4.jpg)
![page_5](../assets/img/pset9_5.jpg)
![page_6](../assets/img/pset9_6.jpg)
## (9.6)
{:.question}
Solve the periodically forced Lorentz model for the dielectric constant as a function of frequency,
and plot the real and imaginary parts.
The periodically forced Lorentz model is
$$
m \left( \ddot{x}(t) + \gamma \dot{x}(t) + \omega_0^2 x(t) \right) = -e E(t)
$$
It models the motion of a particle of mass $$m$$ and charge $$-e$$ subjected to a time-varying
electric field $$E(t)$$. Assuming a bulk material composed of such particles, we can use this model
to find a relation between the dielectric constant and frequency of incoming radiation.
To start, the [polarization density](https://en.wikipedia.org/wiki/Polarization_density) can be
expressed in terms of the number of particles per unit volume, their charge, and their displacement:
$$
P = -N e x
$$
But it can also be expressed using the electric field and dielectric constant:
$$
P = \epsilon_0 E(\epsilon_r - 1)
$$
Thus the dielectric constant for this material is
$$
\epsilon_r = \frac{-N e x}{\epsilon_0 E} + 1
$$
So now let's solve the model. Let's assume a simple sinusoidal solution.
$$
\begin{align*}
x(t) &= A e^{i \omega t} \\
\dot{x}(t) &= i \omega A e^{i \omega t} \\
\ddot{x}(t) &= - \omega^2 A e^{i \omega t}
\end{align*}
$$
Then the Lorentz model reduces to
$$
m A e^{i \omega t} \left( - \omega^2 + i \omega \gamma + \omega_0^2 \right) = -e E(t)
$$
or
$$
\frac{x(t)}{E(t)} = \frac{-e}{m \left( \omega_0^2 - \omega^2 + i \omega \gamma \right)}
$$
So this solution is valid for a sinusoidally varying electric field.
Finally we just plug this in to find
$$
\epsilon_r = \frac{N e^2}{\epsilon_0 m \left( \omega_0^2 - \omega^2 + i \omega \gamma \right)} + 1
$$
## (12.1)
### (a)
{:.question}
How many watts of power are contained in the light from a 1000 lumen video projector?
### (b)
{:.question}
What spatial resolution is needed for the printing of a page in a book to match the eye’s limit?
## (12.2)
### (a)
{:.question}
What is the peak wavelength for black-body radiation from a person? From the cosmic background
radiation at 2.74 K?
### (b)
{:.question}
Approximately how hot is a material if it is “red-hot”?
### (c)
{:.question}
Estimate the total power thermally radiated by a person.
## (12.3)
### (a)
{:.question}
Find a thickness and an orientation for a birefringent material that rotates a linearly polarized
wave by $$90^\circ$$. What is that thickness for calcite with visible light ($$\lambda \approx 600
\si{nm}$$)?
### (b)
{:.question}
Find a thickness and an orientation that converts linearly polarized light to circularly polarized
light, and evaluate the thickness for calcite.
### (c)
{:.question}
Consider two linear polarizers oriented along the same direction, and a birefringent material
placed between them. What is the transmitted intensity as a function of the orientation of the
birefringent material relative to the axis of the polarizers?
---
title: Problem Set 10
---
![page_1](../assets/img/pset10_1.jpg)
![page_2](../assets/img/pset10_2.jpg)
## (13.1)
### (a)
{:.question}
Estimate the diamagnetic susceptibility of a typical solid.
Starting from equation 12.15,
$$
\begin{align*}
\chi_m &= -\mu_0 \frac{q^2 Z r^2}{4 m_e V} \\
&= -\num{1.26e-6} \si{N/A^2} \frac{(\num{1.6e-19} \si{C})^2 \cdot 1 \cdot (10^{-10} \si{m})^2}
{4 \cdot \num{9.1e-31} \si{kg} \cdot (10^{-10} \si{m})^3} \\
&= \num{-8.9e-5}
\end{align*}
$$
### (b)
{:.question}
Using this, estimate the field strength needed to levitate a frog, assuming a gradient that drops to
zero across the frog. Express your answer in teslas.
From 12.7,
$$
F = -V \mu_0 \chi_m H \frac{d H}{d z}
$$
I'll assume the frog is 0.1 meters tall, has a mass of 0.1 kg, and a volume of $$10^{-4} \si{m^3}$$
(this is consistent with the frog being mostly water). I'll also assume the magnetic field gradient
is constant, so $$dH/dz = H / 0.1$$. Solving for $$H$$,
$$
\begin{align*}
H &= \sqrt{-\frac{F z}{V \mu_0 \chi_m}} \\