Showing posts with label science. Show all posts
Showing posts with label science. Show all posts

FFT(just about everything)

Listening to Brad Osgood on Fourier Series, and kinda reading at the notes.
In the first lecture, his main point was that periodicity comes from the circle (eg sin, cos) and that frequency and wavelength have reciprocal relationship.  Right away, I'm challenged by the limited formatting that exists (or that I know how to apply) to this blog.  In no time I'm going to need integrals, and Mathcad beckons.  Maybe I can get the ideas down in English!  That's more challenging but might make me understand better.

In the notes, there's a concept of the series of functions periodic on an interval, and finding a coefficient as an integral of the product of exp(n*i*pi) across the interval.  The why is cool: first, the deal is that all periodic functions can be made from a sum of sines & cosines (with integer frequency multiples) and if you multiply that sum by the negative frequency component you're interested in, it isolates one coefficient because for that term, the exponent of e adds to zero and so the e terms cancel and c drops out of the integral. Meanwhile, integrating each of the other terms across the interval yields zero every time. That's the orthogonality of the set of functions I think.  I'm happy with that description! On to the second lecture.  It seems easy so far but I'm getting the value from the notes, and when I dropped in in the middle of the class I was lost, so I'm taking this more ponderous approach, for now.

Second lecture: "periodicity."  It's very tempting to complain about his lecture and chalkboard style!  Maybe, people in glass houses... "Here's a secred of the universe, comin' your way."  Now, that's a joke that deserves a laugh, but he got nothing.

Functions with limited time frame of interest can be matched over that interval only, and you just pretend it was periodic, repeating just that interval.  Sin(2pi*t) has period = 1. That restriction is useful for analysis. Model generic signals by using 2pi*n*t. Over that one period, you can stuff in many frequencies in harmonics of the "base" (longest) signal.  Remember frequency w (omega) = 2pi*n.  Sum a bunch of these and period is still 1 - it's limited by the lowest frequency being represented. Besides different frequencies, we can modify amplitudes and phase of each term, to model different signals.  What about frequency 2pi*1.5? That's not an integral multiple, not periodic over the interval 1, probably not legal to use.

Writing them down, he noted sin(2pi*k*t + p) = sin(2pik)cos(p) + cos(2pik)sin(p).  (p's the phase).  I mention it because in thinking about the angle sum formula, I realized how complex numbers can be used to derive this formula.  Think of p as the rotation angle in a direction cosine matrix. So we have sin(A+p) and the A part is spinning vector and the p is the fixed phase offset of the sin wave out of the real plane. Our question is "what part of this imaginary wave projects on the real axis, and for the answer you just multiply the signal by the DCM. QED. Back to Osgood's point, the fixed values, sin(p) & cos(p) can be thought of as coefficients, and then an arbitrary function is made of sines and cosines with various coefficients and the phase of the net wave is buried in those coefficients, instead of explicitly calling out a phase angle, and using only sine.

Complex notation:  csubk* exp(i*2pi*k*t + p) is the way to write it in complex form. To get coefficients c, isolate them again (as noted from the notes before) using the trick of multiplying the whole sum by the MINUS frequency of the coefficient you want. All the rest of the terms will sum to zero.


There is no mogul: ...the ontology of Outhouse.

Outhouse
In a cherished conversation with Miles, I once claimed you could ski bumps blind just by feeling the first one. The rest follow naturally, from the rhythm of the universe, the giant fft that is us all (or wavelets, if you like!).

The best quote from the matrix  has to be the kid breaking out, "Do not try to bend the spoon — that's impossible. Instead, only try to realize the truth: there is no spoon." Once mentioning the matrix, we cannot continue without reviewing Carl Sagan's apple pie. (and of course the musical rap cover.)


This post offers some notes on Ontology.

Here, we are going deep into Meinong's Jungle, wherein prowl pegasii and unicorns, which must subsist in some sense since we can talk about them.  This is Meinong's Gegenstandstheorie. Apparently, there are many levels of "real," if you think about it hard enough.

Oh my God, WTF is happening here? This blog has gone crazy!  Well, yes, sort of, but there is some scrap of coherence here, I think...  It all started when a student asked, "what is i, anyway?"  I was stumped, and I pretty much still am, but here is my answer anyway.  Obviously it's a complicated one, but, here goes!

First, let's get rid of the obvious canonical answer: i = sqrt(-1), but you knew that.

Now, what do we make of this?  Well, there is at least some major utility to it, eh?  Never minding whether or not i is an actual part of reality, I mean.  It's a nice tool, like a number line, or a bubble level: helps you figure things out. Sort of like saying "my very educated mother just served us nine *pies," it's a construct you can use whether or not it has any meaning grounded in reality.
(* Sorry, Pluto's not a planet.  Don't blame me, take it up with this guy.)

Let's look at some of the utility we get from i.  For one, consider helical antennas!  They make circularly polarized radiation and that is really neat. I once worked on a satellite that used those. That tubular structure in the picture is a multi-element quadrifilar helix.  The polar coordinate representation of exp(i*theta) is a visual model for all kinds of oscillatory phenomena, including the motion of airplanes.

Here's another example of something you can do with i. You can take the cube root of 1!  What, you're not impressed?  How many cube roots do you think there are?  (Hint:  thew sqrt of 4 = +/-2, right?  Why should it make sense to have two square roots and only one cube root?) Actually plain old +1 does have three cube roots (as it should) and they are 1 and  -1/2 +/- sqrt(3)i/2.  You don't want i just to get the root of -1, you want it even for mundane cube roots of plain old positive numbers!

Renee Descartes disagreed. He found i a lamentable necessity and saddled it with the pejorative "imaginary" label, but that, we'll see isn't really fair.

** ToDo: Put something intelligent here in the middle... ***

So the answer takes us full circle, back to the spoon only rephrased like this:  "Do not ask if there really are imaginary numbers. That's impossible. Instead, only try to realize the truth: the real numbers are all imaginary."


Science Friday, speech decoding

On Science Friday Ira had one of his occasional fantastic guests. He was exploring the brain, recording and playing back words.  On the radio, you'd hear the actual spoken word, then you'd hear the consequent brainwave. It was intelligible, barely.  While the research was really cool, on reflection it didn't seem so strange that there's an electrical signal running around in your head that sounds like "chair" when I say "chair."

Then I started to think, "what will it sound like as they go deeper in?"

Following the signal chain from that word to the muscle commands that make you sit down, I'm expecting a more and more pulse-like burst of signal, less of a chair, and more of a databit.  What are the internal symbolic representations of words, the things with meaning?  Are they still vaguely "chair-sounding?" Or are they structurally encoded, just a data bit, but WHICH data bit, which networks activated that matter.

Writing it now it still sounds prosaic but I was really enthralled at the time. Maybe worth a listen.