# steveWang/Notes

### Subversion checkout URL

You can clone with
or
.

# Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

# Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
• 2 commits
• 10 files changed
• 1 contributor
Commits on Aug 17, 2012
 steveWang Another update. b6ef4a3 steveWang Merge branch 'master' into gh-pages 1223466
2  cs191.html
 @@ -2560,7 +2560,7 @@ div.style.width = '15%'; for (var i = 0; i < ll; i++) { div.innerHTML += '' - + a[i].parentElement.nextElementSibling.innerHTML + + a[i].parentElement.nextElementSibling.nextElementSibling.innerHTML + '
'; } var div = document.getElementsByClassName('wrapper')[0];
2  ee105.html
 @@ -1814,7 +1814,7 @@ div.style.width = '15%'; for (var i = 0; i < ll; i++) { div.innerHTML += '' - + a[i].parentElement.nextElementSibling.innerHTML + + a[i].parentElement.nextElementSibling.nextElementSibling.innerHTML + '
'; } var div = document.getElementsByClassName('wrapper')[0];
2  ee120.html
 @@ -1804,7 +1804,7 @@ div.style.width = '15%'; for (var i = 0; i < ll; i++) { div.innerHTML += '' - + a[i].parentElement.nextElementSibling.innerHTML + + a[i].parentElement.nextElementSibling.nextElementSibling.innerHTML + '
'; } var div = document.getElementsByClassName('wrapper')[0];
2  markdown
 @@ -31,7 +31,7 @@ if (ll > 0) { div.style.width = '15%'; for (var i = 0; i < ll; i++) { div.innerHTML += '' - + a[i].parentElement.nextElementSibling.innerHTML + + a[i].parentElement.nextElementSibling.nextElementSibling.innerHTML + '
'; } var div = document.getElementsByClassName('wrapper')[0];
2  phys112.html
 @@ -2604,7 +2604,7 @@ div.style.width = '15%'; for (var i = 0; i < ll; i++) { div.innerHTML += '' - + a[i].parentElement.nextElementSibling.innerHTML + + a[i].parentElement.nextElementSibling.nextElementSibling.innerHTML + '
'; } var div = document.getElementsByClassName('wrapper')[0];
2  phys137a.html
 @@ -856,7 +856,7 @@ div.style.width = '15%'; for (var i = 0; i < ll; i++) { div.innerHTML += '' - + a[i].parentElement.nextElementSibling.innerHTML + + a[i].parentElement.nextElementSibling.nextElementSibling.innerHTML + '
'; } var div = document.getElementsByClassName('wrapper')[0];
82 sp2012/ee105/26.html
 @@ -1,82 +0,0 @@ - - - - - - -26.md - - - - - - - - -

EE 105: Devices & Circuits

-

Wednesday, March 21, 2012

-

Midterm Friday; OBONNS.

-

Today: Graphing and calculating $G_m$, $R_o$, $A_v$, keep talking about -frequency response.

-

Graphings

-

So, the thing to do: you know you're going to have (if I've got -some $A_0\sin(\omega t) \mapsto \abs{H(j\omega)}A_0\sin(\omega t + \angle -H(\omega))$. If I give you a plot of angle or frequency, one way or -another, you've got to find the angle of $H(j\omega)$. Also, find max/min -voltages (determined by gain at various stages). Should make sure that those -points are marked (circled, even) so Pister can see that we know what's up.

-

If it's greater than 0, it's called "phase lead". You want to find and -label and mark zero-crossings and min/max in time (which is really in -phase). Points move left.

-

If it's less than 0, it's called "phase lag", and points move right.

-

Calculating $G_m$, $R_o$

-

There have been some questions about this on Piazza. There's the basics, -like when you're looking into a collector or a drain, you're going to see -$r_o$; when you're looking into an emitter or a source, and the -collector/drain are at some AC ground, you're going to see $\frac{1}{g_m}$, -and then there's the blocks that you know and ought to recognize/use in -circuits, which are: what happens if I have some emitter degeneration or -some source degeneration ($G_m \equiv \frac{g_m}{1 + g_m R_s}$ for MOS, -$R_s \equiv R_E \parallel r_\pi$); if I'm looking into the source/emitter, -then this looks like $\frac{1}{g_m}\parens{1 + \frac{R_D}{r_o}}$. Note that -for a BJT, you have $r_\pi$ in parallel with this whole thing.

-

For example: steps for finding gain: $A_v = -G_m R_o$. In general, this is -how you'll find gain. $G_m = \frac{I_o}{V_i}\bigg|_{v_i=0}$. Straight -taylor approximation: this is why we set $V_o = 0$ when calculating $G_m$ -and $V_i = 0$ when calculating $R_o$.

-

When doing $G_m$ calculation, we just don't care about anything above the -junction.

-

Mentally, what people like Razavi do is say "aha! I've got a bias voltage -on that gate; this thing now is one of my basic elements! Aha! I've got a -$\frac{1}{g_m}$ to ground, and now I can draw my small signal model." And -so the current coming out is roughly $g_m v_i$. The only time you look up -is if there's a current source up there that depends on one of the lower -node voltages.

-

The reason why we call it $g_m$ is because it's mutual -transconductance.

-

So now we're not so sure. What I see is $\frac{1}{g_m}\parens{1 + \frac{1 / -g_m}{r_o}}$ when looking into source.

-

So now we've figured out what our $g_m v_i$ is. Current dividers.

-

So I wanted to do a couple more examples. For example, source follower -(recall, measure output at source). We know $A_v = -G_m R_o$. So what is -$R_o$? It's $\frac{1}{g_m} \parallel R_s$. $G_m$ is a little tricky. Draw -the small signal model, then do KCL at the output node. Note that since -we're grounding $v_s$, $v_{gs} = v_i$, and no current is flowing through -the source resistance (or the output resistance, even!). Thus $G_m \equiv --g_m$. What does this mean? We're shoving current out, instead of shoving -current in.

-

So finally $A_v = -G_m R_o = \frac{g_m R_s}{1 + g_m R_s}$

- -
117 sp2012/ee120/18.html
 @@ -1,117 +0,0 @@ - - - - - - -18.md - - - - - - - -

EE 120: Signals and Systems

-

Upsampling property

-

$$-x(n) \mapsto \uparrow N \mapsto y(n) = \begin{cases} -x(n/N) & \text{if } n \equiv 0 (\mod N) -\\ 0 & \rm{e/w} -\end{cases} -$$

-

i.e. we have the same values, but now interspersed with more zeroes. Take -the axis and dilate by three. So see if you can come up with an expression -for the Z-transform of the upsampled signal. We should just have -$\hat{X}(z^N)$.

-

This should not surprise you. When you upsampled in the time domain, what -happened in frequency? We contracted in the frequency domain. You get that -even from here. If I remind you of an example we did eons ago, $y(n) = -\alpha y(n-1) + x(n)$ had a frequency response of $G(\omega) = \frac{1}{1 - -\alpha e^{-i\omega}}$. If I change this to the parameters of $y(n) = \alpha -y(n-N) + x(n)$, $H(\omega) = \frac{1}{1 - \alpha e^{i\omega N}$. But if you -compare $g(n) = \alpha^n u(n)$ with $h(n) = \alpha^{nN} u(n)$, we've -already seen this.

-

So when you upsample, you have the $z$ raised to the $n^{th}$ power.

-

What's the RoC? Should bring up two more questions: what happens to the -poles and zeroes? We take the $n^{th}$ root of everything (i.e. the inverse -function), so everything moves closer to 1. (rationale: $z_p^N = p \implies -z_p = ?$. We get $N$ times as many poles, in fact, since we have $N$ roots -of $p$. ibid for zeros.

-

Going back to the question for the region of convergence for y: if the RoC -for x is $R_1 < \abs{z} < R_2$, the RoC for y is $R_1 < \abs{z}^N < R_2$, -so $R_y = R_x^{1/N}$.

-

So let's do the example given earlier: $y(n) = \alpha y(n-N) + x(n)$. -$\hat{H}_1(z) = \frac{1}{1 - \alpha z^{-1}}$. $\hat{H}_4 = \frac{1}{1 - -\alpha z^{-4}}$. Draw pole-zero diagrams, region of convergence?

-

(note that we've got degeneracy -- multiplicity. Must denote with a number -in parentheses if you've got multiplicity greater than 2; if multiplicity -is 2, you can use a double-circle or double-x).

-

Differentiation

-

Another property that's actually very important is differentiation in Z. So -suppose you've transformed $x \ztrans \hat{X}(z)$. What is $\deriv{\hat{X}} -{z}$? $-z\deriv{\hat{X}}{z} \ztrans n(x(n)$.

-

Example:

-

$g(n) = n\alpha^n u(n) \ztrans \hat{G}(z) = ?$

-

If you want to make this look like the original form, just multiply top and -bottom by $z^{-2}$. Very important point: extension to higher derivatives.

-

So what happens as we increase this? What does this mean?

-

We can decompose any rational z transform into a linear composition of -lower-order terms. Fundamental theorem of -algebra. Proposition: suppose we've got a transfer function. We've got a -numerator over a denominator. We can factor the numerator and -denominator. You also learned that whenever you do this, you can break -apart the ratio in terms of a sum.

-

Note that this starts breaking when you have degeneracy (i.e. systems with -duplicate poles). So from this qualitative argument, it should not surprise -you if I tell you that the only way you can get a rational Z-transform is -if the system is the sum of one-sided exponentials multiplied by -some polynomial.

-

We'd also have to include the left-sided versions of these.

-

We can make a general statement: a Z-transform expression $\hat{X}(z)$ is -rational iff x(n) is a linear combination of terms $n^k \alpha^n u(n)$, -$n^k\beta^n u(-n)$. Shifted versions will certainly also work.

-

Using partial fractions is one of the methods of doing an inverse -transform. We're not going to learn a formal inverse Z-transform; we're -just going to use various heuristics (not unlike solving differential -equations).

-

In general, inverse z-transform requires a contour integral (complex -analysis) and thus is not a required in this class.

-

Now, if you believe this, we've got several things: $n^k\alpha^n u(n)$, -LCCDEs, and rational Z-transforms. They form a family.

-

LCCDEs and Rational Z Transforms

-

Suppose I've got an input, an impulse response, and an output. You know -this is a convolution of x and h, so $\hat{Y} = \hat{X}\hat{Z}$, which -means the transfer function of an LTI system is the ratio of the transform -of the output to the transform of the input (for LTI systems).

-

Frequency response of the filter gives you the Fourier transform of the -output.

-

We can write our difference equation as $\sum_{k=0}^N a_k y(n-k) = \sum_m^M -b_m x(n-m)$. We've seen this.

-

One way to get the transfer function is to take the z-transforms of both -sides. If they're equal in the time domain, their z-transforms must also be -equal in the frequency domain. Time-shift property. Just considering the -ratio $\hat{H} \equiv \frac{\hat{Y}}{\hat{X}}$, we have our transfer -function.

-

Familiarize yourself with going from the LCCDE to the transfer function by -inspection.

-

Now, for the end of the lecture: irrational Z-transform.

-

Example

-

This is a standard example in practically any signal-processing book you'll -find. $\hat{X} = \log(1 + \alpha z^{-1}$. Determine $x(n)$.

-

Using the differentiation property, $-z\deriv{\hat{X}}{z} \ztrans nx(n)$.

-

$\frac{\alpha z^{-1}}{1 + \alpha z^{-1}} \ztrans$

- -
154 sp2012/phys112/25.html
 @@ -1,154 +0,0 @@ - - - - - - -25.md - - - - - - - -

Physics 112: Statistical Mechanics

-

Black bodies and phonons: Mar 23, 2012

-

What I would like to do today, if you've looked at the homework for next -week, is finish black body radiation -- in particular stars -- and to speak -of phonons in a crystal. So, uhm, let's start with a simple question: a -star like the sun is to a first approximation a black body. Is the -radiation across the disk constant, brightening at the limb, or dimming at -the limb?

-

Experimentally, it looks constant, roughly. Why is this? This is coming -from the fact that for black body radiation, the radiation is -isotropic. When we ask ourselves what is the amount of light that reaches -our photodetector in a time $dt$, this is basically $u(\nu, \theta, \phi) -d\nu d\Omega dA cdt$.

-

So if I take my sun, essentially what is happening is that I am looking at -a radiation shell of thickness $cdt$.

-

So that's one way of thinking about it: does not depend on angle. Another -way of considering it: area $dA$. Whatever emerges from this area is -independent of the angle. What I receive in my eye is not proportional to -$dA$ but rather $dA\cos\theta$ ($\cos\theta$ is normal to my line of -sight).

-

So apparent radiation is constant all over the disk, if I have a black -body, which is radiating isotropically, where I am not depending on -$\theta$ and $\phi$. That is why the disk of the sun is basically constant -luminosity, the moon is constant luminosity.

-

Why are we considering the sun a black body? The black body occurs in -thermal equilibrium when the photons (of a star), at least those very close -to the edge, are scattering so much that they are in thermal -equilibrium. Basically, this is coming from the fact that the photons are -scattering very much. It is not an exact black body for the following -reason: the sun is surrounded by its corona. When photons are coming -through that region, they are absorbed at certain frequencies. We have -absorption line at certain frequencies. By the way, that's how we -discovered helium: absorption lines we had no idea existed; was discovered -by looking at the sun through a spectrograph.

-

Essentially, that's a black body: photons in equilibrium.

-

Maybe 10 years ago, there was a professor from Ohio State (or something -like that) who published a full-page ad of the New York Times (which was twice -his monthly salary) how people talking about the Big Bang don't understand -anything about anything. Whole argument was that since this is not coming -from an oven with a small hole, this was just silly. Argued that stars were -not black bodies.

-

It shows you that people can get very emotional spending twice two months' -salary on a full-page ad in the New York Times.

-

Now, an interesting question is: what happens if the sun in practice is not -also a black body with very defined edges? The density in the sun goes down -as the radius increases; one over the mean free path does something like -$\rho\sigma$. The emissivity of the sun, therefore, as a function of -radius, is 1 very close to 0, and dies off at some point. This leads to -limb darkening. And by looking precisely at the intensity as a function of -the radius, you can have an idea of the mean free path, and of therefore -the density. That is how we mapped the density at the edges of the sun.

-

If $u$ (energy density) is a function of the radius, then $cdt$ at the -edges has more energy than $cdt$ at the edges. There is a whole field of -stellar astronomy devoted to this kind of stuff.

-

So any way. This kind of simple question (why the sun appears to be of -constant luminosity despite it being a sphere) is interesting and not -totally trivial to answer. Related to the isotropic behavior of the black -body.

-

Solid angles and surfaces at emission/reception

-

Showed last time these simple geometric relationships. The one at the -bottom is related to refraction and comes from the fact that the angle -$\theta_D$ at some radius R goes as $\frac{\lambda}{R}$. So the solid angle -goes as $\frac{\lambda^2}{R^2}$, and the area of my detector goes as $\pi -R^2$,and so $\Omega_r A_r \sim \lambda^2$.

-

This has an interesting consequence. Suppose that I am looking at a totally -diffuse object, e.g. the microwave background. If I have a -diffraction-limited telescope, how does the radiation I receive depend on -the diameter of my telescope? (i.e. how does the received energy depend on -the diameter of a diffraction-limited telescope?) Does it increase or stay -constant?

-

It indeed stays constant, for the following reason: the portion that I see -of this diffuse object is my $\Omega_r$. Therefore the area at emission is -just $\Omega_r d^2 = A_e$. Now whhat is received is also proportional to -the solid angle of my telescope, i.e. $I_\nu d\nu \Omega_e A_e$. So that is -equal to $I_\nu d\nu \frac{A_r}{d^2} \Omega_r d^2 = I_\nu d\nu \lambda^2$.

-

If I am looking, however, at a point object (i.e. something significantly -small), that is not correct. That is why astronomers go for very large -telescopes; to capture as much light as possible.

-

So if you have a diffuse emitter, it [increasing area] does not change the -power. Size of microscope is not important in terms of power, but is -definitely important if you're trying to look at ripples from fluctuations -in temperature of microwave background. Larger telescope means more detail, -better angular resolution.

-

This leads to a number of interesting results. For instance: if the sun is -a black body, the amount of radiation that I get in my telescope is a -measure of its diameter. More exactly, apparent diameter (i.e. diameter -divided by distance) of the star. So let's take a star that emits power -(absolute luminosity) $L$ isotropically. If I am now trying to look at the -apparent luminosity $\ell$, this is $\frac{\text{Power received}}{\text{Area -of telescope}}$. Since our object is much smaller than the telescope, this -does depend on area of the telescope. This is the apparent luminosity. I -can compute that and say "look, my star is emitting a power L over the -whole $4\pi$ solid angle, so over my unit solid angle it emits -$\frac{L}{4\pi}$. So what do I see? $\frac{L}{4\pi}\frac{A^2}{d^2}$. So -$\ell = \frac{L}{4\pi}\frac{1}{d^2}$. So for a black body, $L = 4\pi r_e^2 -\sigma_B T^4$. That's my Stefan-Boltzmann law. So $\ell = \frac{4\pi -r_e^2}{4\pi d^2} \sigma_B T^4 = \expfrac{r_e}{d}{2}\sigma_B -T^4$.

-

There are a number of objects that are vibrating or exploding (so they are -changing their diameters and often also their temperatures). So we can do -the same thing with supernovae. If we look at $\deriv{\ell}{t}$, we have -two terms: $\frac{2 r_e \deriv{r_e}{t}}{d^2}$ and $\frac{r_e^2}{d^2} -\sigma_B 4T^3 \deriv{T}{t}$. We can measure both of these changes over -time, so now if we make a spherical approximation, I can get -$\deriv{r_e}{t} = \deriv{r_\perp}{t} = \deriv{r_\parallel}{t}$. We can -measure this last derivative by Doppler shift. If we assume that, then we -can measure the distance. And that is how we measure distance to stars that -are too far to see parallaxes and how we are able to measure the expansion -of the universe.

-

Pretty clever method. It relies on this assumption, which if a star is -vibrating, is not an unreasonable assumption. It is a much less rigorous -assumption if you have an explosion, since stability varies.

-

We used this method for supernova 1987A to check that it was indeed (at the -same distance as) the Magellanic cloud.

-

Another little thing that radio astronomers do is related to the antenna -temperature. This is very simple, actually: $I_\nu d\nu dA d\Omega = -\frac{c}{c^3}\frac{2h\nu^3 d\nu}{e^{h\nu/\tau}-1}$. If $\frac{h\nu}{\tau} -\ll 1$, $e^{h\nu/\tau} - 1 \sim \frac{h\nu}{\tau}$. so this goes to -$\frac{\tau}{c^2} \nu^2 d\nu dA_e d\Omega_e$. If our telescope is -diffraction-limited, then we know that this is roughly $2\tau -\frac{\nu^2}{c^2} d\nu \lambda^2$. So $I_\nu d\nu dA d\Omega \sim 2\tau -d\nu$, which means that the amount of power received by my telescope is -$2\tau d\nu$ (independent of area of object since this is a diffuse object, -and we are diffraction-limited). So the amount of power received is just -$\tau$; $k_B T$. Antenna temperature is just amount of power at low -frequency.

- -
56 sp2012/phys137a/33.html
 @@ -1,56 +0,0 @@ - - - - - - -33.md - - - - - -
-

Physics 137A: Quantum Mechanics

-

Wednesday, April 16

-

Stuff.

-

$r,\theta,\phi$

-

$\cos\frac{\theta}{2}\ket{0} + e^{i\phi}\sin\frac{\theta}{2}\ket{1}$

- - - - -