Hacker News new | ask | show | jobs
by graycat 3046 days ago
Likely DFT abbreviates discrete Fourier transforms. By now the main interest in DFT is the FFT -- fast Fourier transform, for positive integer n points, n / log(n) times faster.

The FFT was reinvented by J. Tukey, at Princeton and Bell Labs, at a US Presidential Science Advisors meeting, while Tukey was taking meeting notes with one hand and doing Fourier derivations with the other, from a query from R. Garwin, at IBM's Watson lab. Garwin said he was using too much computer time calculating Fourier transforms, so Tukey showed him the FFT. Later Cooley at IBM programmed the FFT, and Cooley and Tukey published the work. The FFT was revolutionary for signal processing, for sonar, radar, molecular spectroscopy, etc.

The sampling issue is: Suppose have a periodic waveform with highest frequency 20 KHz (kilo Hertz, 1000 cycles per second). Then there is the canonical theorem of interpolation theory that says that can reproduce the wave form exactly from the values of the waveform at equally spaced points 40,000+ times a second, or some such (there is a detail right at the 40,000). There is a cute pseudo-proof based just on pictures!

So, for DFT/FFT, we start with those sampled values, and that's the "discrete" part. E.g., the reason audio CDs use 44 KHz or some such is that they want to be good for music up to 22 KHz. If the music really does have significant power at 22 KHz and we sample at only, say, 15 KHz, then we will have under sampled and end up with distorted music.

A computer sound card or chip has to reverse the discrete sampling and generate a continuous waveform for the audio system and speakers, that is, to analog.

There is a good start on Fourier series (for periodic waveforms) with the math done carefully in W. Rudin, Principles of Mathematical Analysis. If a waveform is not periodic but defined for all time, then we can do the closely related Fourier transform, and there is a nice treatment of the math in W. Rudin, Real and Complex Analysis.

Suppose we have waveforms x(t) and y(t) where t is time and x(t) and y(t) are real numbers. Suppose we also have real numbers a and b. Suppose we are in, say, a concert hall and musicians are playing x(t) and y(t). Suppose due to the concert hall, for function h what we hear from x is h(x). Then we hope and believe that

h( ax + by ) = ah(x) + bh(y)

that is, the the concert hall effect h is a linear operator. If in addition h doesn't change over time, say, yesterday to tomorrow, then, presto, bingo: All h and the concert hall can do to x and y is adjust the volume of the harmonics! Or, a time invariant linear system is a linear operator and, from Fourier theory, a convolution. Here I am simplifying somewhat.

Well, the world is awash in linear systems, especially for sonar and radar. So, one of the big, early uses of DFT/FFT was in analyzing the acoustic signals from reflections from subsurface layers from small explosions at the surface, all for looking for oil.

2 comments

Good... except that the reason for 44.1KHz isn't to reproduce signals up to 22.05KHz, it's to reproduce signals up to 20KHz reliably. It is possible, though improbable, to hit nothing but zero-crossing values if you sample at exactly twice the highest desired frequency. Sampling just a little more often than 2X eliminates that error; you'll always be forced to non-zero values from which you can reconstruct the original signal.
The nonzero transition band of real antialias filters is typically a way bigger concern than the strict equality of the Nyquist theorem.
> It is possible, though improbable, to hit nothing but zero-crossing values if you sample at exactly twice the highest desired frequency.

Yup! You just filled in what I called a "detail"!!!

Yeah, but... have you read the (fine) article?

Just kidding, graycat, I'm a fan! How's your project going? any news?

Sure, this time I went through the article! Again, I would have liked to have some such and more if I ever teach trigonometry again.

For the project: The work for the project is as usual fast, fun, and easy but gets delayed by random, external nonsense. But have to expect such random stuff. Between now and going live is all just routine.

The current random nonsense is my development computer got sick: Apparently there was a motherboard problem giving serious data corruption.

I was working up orders for parts for two new computers when the old computer finally seriously quit.

So, I rushed out and just -- horrors -- actually BOUGHT a computer, not just parts but an actual computer. I got an HP laptop with Windows 10 Home Edition.

Then I ordered the parts. They have come now and are ready to plug together.

I deliberately selected parts about one generation out of date.

Why?

(1) My startup software makes some use, actually light, of SQL Server; it insists on ECC (error correcting coding) main memory, and I like it, too.

Apparently ECC main memory needs all of the memory, motherboard, and processor to support ECC. Well, now the easy way to get that is to buy some old parts.

(2) I'm happy using a computer with a good BIOS but don't want to get involved in the newer Unified Extensible Firmware Interface (UEFI).

Why against UEFI? No visible upside for me. Likely big downsides of lots of new architecture I don't need, lots of new complexity I don't want to have to work with, maybe some new bugs, and no doubt rather poor documentation, and less good technical information on the Internet.

Computer Industry: If you don't work hard to document your work, then I'll work hard to avoid your work.

(3) Older parts tend to have fewer bugs and better technical information.

For the case I got a

Thermaltake V3 VL80001W2Z (Black)

It's big, with a 120 mm fan and lots of air holes and places for more fans.

For a motherboard, I considered the

Asus m5a97 R2.0

but gave up as apparently they are now out of production and super hard to find in stock.

So, I settled on the

Asus m5a78l-m-usb3

It's a cute little thing, micro-ATX, a BIOS but no Unified Extensible Firmware Interface (UEFI). It supports ECC (error correcting coding) main memory and has an AM3+ socket for the AMD FX series of processors. I got two of the motherboards from AVADirect in Cleveland.

For main memory the motherboard has four DDR3 slots and can take a total of 32 GB. I was able to find and got 4 DIMMs of DDR3, 4 GB per DIMM, at 1333 MHz with ECC.

The processor is an AMD FX-8350, 64 bit addressing, with 8 cores with a standard clock of 4.0 GHz. Yes it can consume 125 W of power; thus, I will have maybe more than one fan in the case.

For the needs of my startup, that processor, motherboard, and main memory will do a LOT of computing. E.g., my old computer that died had a single core processor at 1.8 GHz, and it had my Web site pages showing on the screen before I could get my finger off the Enter key. My actual software timings indicate that this new FX-8350 computer will have plenty of capacity to do very nicely as a first server.

For disks, I got two Western Digital drives, SATA at 3.0 Gbps, and 500 GB each.

And I will bring over the SATA drives from my old computer.

And I got lots of fans, cables, etc.

Long ago I got tired of wrestling with file system drive letters. So, I have some directories DATA01, DATA02, DATA03, DATA05, PROG01, PROG02, PROG03, and they have all MY data, and my software works fine no matter what drive letters those directories are on or larger trees they are in. I will be using this little approach again.

I have a thing, goal, I want:

In my past work with Windows for this project, too often I had to reinstall Windows and all my other software, and those reinstalls, even with all the practice I got, were a lot of work. So my goal is to solve this problem of reinstalling.

So, I want:

(1) More than one instance of a bootable operating system.

(2) Each installed instance on its own hard disk partition with little or nothing else important on such a partition.

(3) In case a hard disk with a bootable partition fails, bootable partitions on at least two hard disks.

(4) Good backups of the bootable partitions.

So, if something seems wrong with a bootable partition, say, C:, then I will boot another bootable partition, say, D:, and restore C: from a backup.

I want the restore to be fast, easy, and bit-perfect.

So, how to get such bootable partition backups and do such restores? Well, maybe Acronis True Image or the Western Digital Data Lifeguard Tools will be sufficient -- I have fully legal copies of both. In the past I had some really bad times with Microsoft's NTBACKUP, but I'm willing to try again.

But for Acronis, Lifeguard, NTBACKUP, I accept I will have to run some experiments. So, as soon as the computer is running, I will do the experiments and get saving and restoring a bootable partition fast, easy, reliable, and well documented.

Yes, apparently backup and restore of the files for SQL Server requires some special considerations.

So, backup/restore needs are for (A) instances of installed operating systems, (B) files used by SQL Server, and (C) everything else, that is my data.

For (C) my long used solution is just using Microsoft's XCOPY with some carefully selected options and called from one of several scripts I have in Rexx. I have some scripts for full backup of a file system directory sub-tree and also incremental backups.

For the experiments in backup and restore of bootable partitions, I may just use my old legal copy, that before the experiments are over, I will have to reinstall several times, of Windows XP SP2 Professional.

When I get those experiments done I will install a legal copy I have of Windows 7 64 bit Professional, on bootable partitions on at least two bootable drives, get the updates, and backup up the partitions.

Then I will do software installations and do backups again.

Next get SQL Server running again.

Then try to get my old SQL Server data base working again.

My experience doing such things in the past has me suspect that before I get this far I will have to make use of the results of my experiments in restoring bootable partitions.

Then install the .NET Framework and get my startup software running again.

That will be a good day!

I have a few tweaks in mind for the software.

For the code for the crucial core applied math, I want to check that a third time. The last time I checked that code, I got out a lot of trace data, programmed the calculations again independently, and confirmed that on the trace data both codes gave the same results. I want to do that again.

Then I will do some more data collection.

Then I will give a critical review and consider revisions.

Then comes alpha test, beta test, going live, ....

In short, between now and then, it's all just routine work.

Wow, thanks for the update! Good luck!