Frequency Domain Ramp

Taking a time derivative after an FFT would be easy on SPICE if you had some curve that would FFT into a ramp: Just multiply the function by the ramp.

The inverse transform of a ramp on Excel is complex, the real part being a small negative offset with a large positive zero frequency. The imaginary part may work but it looks like it would be hard to fashion with a circuit even if the curve was known.

Just builting up 2**n voltage sources where frequency = amplitude = n is tedious. The FFT is, of course, just 2**n peaks that increase linearly in height on the linear - linear graph. To get a nice ramp would require an infinite number of voltage sources & frequencies and amplitudes.

Is there anyway to get a nice smooth envelope -- "envelope" may have another technical meaning -- over the time domain curve to get a nice ramp in the FFT?

Bret Cahill

Reply to
Bret Cahill
Loading thread data ...

I suggest getting a copy of "The Fourier Transform and Its Applications" by Bracewell. It's a good read and has all of this sort of stuff in it.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058

email: hobbs (atsign) electrooptical (period) net
http://electrooptical.net
Reply to
Phil Hobbs

n
n
.

At $500 / copy it better be a good read. That's what university libraries pay for Russian books on tech esoterica.

Anyway some nuke medicine page claimed the INV FT of a ramp was just 1/ t.

It's somewhat curious that the INV FFT of a function is equal to the reciprocal of the function but nevertheless 1/t seemed to approach a ramp on Excel's FFT, at least at higher frequencies.

I couldn't get anything linear on the SPICE FFT but then, I couldn't get anything to output a 1/t waveform except a crude 10 point plot.

t- Hide quoted text -

Reply to
Bret Cahill

Five hundred bucks? Where do you find that? Try

formatting link
and you'll find a whole pile of the second edition (which is better than good enough) for about $22 plus shipping.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058

email: hobbs (atsign) electrooptical (period) net
http://electrooptical.net
Reply to
Phil Hobbs

No. The usual FFT for finite sampled sequences is done with circular boundary conditions, and you must deal with the enormous discontinuity at that boundary that any frequency-dependent ramp creates. It isn't a suitable 'test function' in the sense of nicely behaved functions for the transformation, so it is going to look very nasty in the time domain (after the inverse transformation of the 'ramp').

Reply to
whit3rd

Would this be true if every point used by the FFT -- SPICE has a 256 minimum -- was plotted and used by the FFT?

Plotting 1/t with about 8 points, (0.125, 8) (.25, 4) . . . (8,

0.125) on SPICE then taking the FFT and then taking the reciprocal -- not sure why this step works or is necessary -- isn't a bad ramp, at least at the lower frequencies.

It would be really convenient if a time derivative could be taken mathematically without a derivative circuit in either domain.

You cannot take a FFT of a wave form after you've taken its time derivative in the time domain -- it won't appear in the box -- and in the frequency domain you only get a derivative w/ respect to frequency, whatever that is.

There doesn't seem to be an easy way to create a time signal on SPICE that equals 1/t.

Bret Cahill

Reply to
Bret Cahill

Indeed. In that, it is exactly the same as polynomial fitting of curves, or any such infinite approximation. Go outside the domain of validity and things can go badly wrong.

I am often amazed at the things people use Fourier approximations for - not because they do, but because they seem to work more often than a naive analysis would expect. But, as you say, you don't get that by just rushing in, blindly.

Regards, Nick Maclaren.

Reply to
nmm1

It is always true that an FFT has an implicit assumption of periodic boundary conditions at the length of the transform which are most commonly a tiled circular wrap around at the edges, but in some implementations may be Dirichlet or mirror boundary conditions leading to a DCT variant. In addition there is also two plausible choices of origin exactly in the centre of each cell or at the edge.

Bad things happen when this basic assumption of periodic boundary conditions is for whatever reason invalid. A saw tooth has very obvious boundary discontinuity problems.

Real applications of FFTs for imaging tend to spend a lot of time and effort ameliorating this potential aliasing effect at the boundaries.

What are you trying to do?

Regards, Martin Brown

Reply to
Martin Brown

Are you windowing the data before taking the DFT? Could get ugly otherwise.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058

email: hobbs (atsign) electrooptical (period) net
http://electrooptical.net
Reply to
Phil Hobbs

Not sure what you are ultimately trying to do, but note that you can obtain the FFT of the time derivative by taking the FFT of the raw waveform and applying a +6 dB/octave "envelope" to that... essentially, you just tilt the spectrum up at a 6 dB/octave slope.

This turns out to be very handy for measuring frequency response of a system. Classically, one can apply an impulse to the system and take the FFT to get the frequency response. But an impulse is pretty narrow (one sample, in a digital system), so it doesn't have much energy. A step response, on the other hand, has a whole lot more. Since the derivatve of a step is an impulse, you can get the frequency response by applying a step, taking the FFT, and tilting it. This is so handy that I built this feature into my Daqarta software. See "Frequency Response Measurement - Step Response" at .

Best regards,

Bob Masta DAQARTA v6.00 Data AcQuisition And Real-Time Analysis

formatting link
Scope, Spectrum, Spectrogram, Sound Level Meter Frequency Counter, FREE Signal Generator Pitch Track, Pitch-to-MIDI Science with your sound card!

Reply to
Bob Masta

I'm not sure I understand what you're trying to do. Are you trying to get a FFT whose "amplitude" is a linear (either positive- or negative- going) ramp?

Reply to
maury

Do you know of a reference that explains when that is mathematically valid? I have seen plenty of references to it, and even done it on rare occasions, but never seen anything that analyses the problem properly.

Of course, it may just be an egregious hack that sometimes works, in which case there may be no such analysis :-)

Regards, Nick Maclaren.

Reply to
nmm1

n
n

Yes.

You can take integer order or fractional order derivatives in the FFT on Spice if you have something proportional to a ramp.

Bret Cahill

Reply to
Bret Cahill

r

A frequency ramp would need to start at (0,0) to be useful taking derivatives.

Take fractional order derivatives.

Bret Cahill

Reply to
Bret Cahill

I.e. it doesn't crash and produces a number. Excel is notorious for doing that sort of thing.

Yeah. And it's a lot easier to build faster-than-light spaceships on Excel, too.

It also helps to be able to judge when what you are building isn't going to work, especially when it comes to minor details like reliability.

And I am one, looking for a grimoire.

That's the sales department. A good engineer has solid reasons to believe that what he has built will work according to the actual requirements and intent. There are a few of us left :-)

Er, like "Well it probably won't break before we have had time to cash the cheque"?

The history of engineering is littered with projects which failed because the analysis was not done properly - and where it was known what the potential problems were.

Regards, Nick Maclaren.

Reply to
nmm1

It seems to me that the approach might be something like this:

First, a continous, infinite Fourier Transform pair:

df(t)/dt (jw)*F(w)

So, I expect your "ramp" is the jw term above, eh? Note the "j"

If this is going to be moved into the discrete-periodic world then we note that the value switches from jW0 to -jW0 where W0=2*pi*fs/2. Keeping things in the continuous, infinite but periodic world in frequency then we should recognize immediately that the sawtooth in frequency will be of infinite extent in time. So, we have to smooth out that discontinuity.

Take a look at a Parks-McClellan time differentiator design. That has a ramp in frequency *but* it's bandlimited so the ramp stops and goes to zero at fs/2.

Fred

Reply to
Fred Marshall

It seems to work on Excel. You can check out a lot of different fractional order derivatives very quickly because you only have to click 3 times on the FT box.

It might be easier to do electronic circuits on Excel than frequency ramp functions on SPICE.

No one will deny it's rigorous elegant civilized orthodox concise organized kosher nice philosophical thoughtful lofty and often practical, utilitarian and easy to have a nice formal proof.

That's why they have witch doctors, aka, "mathematicians" installed at universities.

All an engineer needs to do, however, is be able to say, "well it w O R erks."

There's always an analysis. Mathematicians just want a pretty one.

Bret Cahill

"Picked up a gal, she was ugly too."

-- Commander Cody

Reply to
Bret Cahill

Don't take Cahill too seriously--he's a fairly well known crank who'd far rather slag people off than learn anything from them.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058

email: hobbs (atsign) electrooptical (period) net
http://electrooptical.net
Reply to
Phil Hobbs

That seems to be a bigger problem on SPICE.

The graphs on Excel check out for a variety of test functions, certainly for anything as well behaved as the signal to be processed.

. . .

A series capacitor or inductor is easy on Excel. Take the FFT, go to polar, subtract nu*pi/2 from the phase angles, then back to real & imaginary and then raise each frequency to ^nu and multiply. Then take the inverse transform.

Nu => 0+ for the offset block (a large cap) and =>1 for the 1st derivative (a small cap) circuit.

Nu => -1 to integrate one order with an inductor.

That's the reason for using a variety of simulators in addition to whatever theory you may have.

No one is 100% sure FEA is always reliable but that doesn't stop air frame engineers from using it as a double check for . . . reliability.

The only way to make any money off of a simulator method is to do a full blown investigation and write a book on it.

Even if he "proves" it in a peer reviewed paper with any combination of first principles and simulators he'll still need to actually build and test the thing.

But it's not necessary to fully understand a theory to get a patent on something dependent upon the theory. Many blamed Newton's defective lift equation for delaying aviation, but as von Karmen pointed out, that wouldn't deter inventors.

RR just tried that with their new wide body turbo fan. Whether some engineer should have been fired over it is irrelevant. There isn't any way to ever be 100% risk free, no matter the endeavor.

The real issue is a reasonable cost benefit risk analysis.

That's the purpose of getting a ramp into SPICE's FFT.

Bret Cahill

"You can't get there . . . from here."

-- Maine expression

Reply to
Bret Cahill

No, in this case it's important to *not* window the data. A window function (at least, any of the standard ones) has a gradual onset and offset, for the specific purpose of eliminating transients at the start/end of the FFT frame. But here it is the onset that we are specifically interested in. The transient response should be complete (for all practical purposes) before the end of the frame, or else you need more samples in the frame.

In general, you never want to window a transient or noise, only a continous wave. The FFT analysis presumes a continuous wave, such that every frame is an identical copy that can be spliced seamlessly head to tail. A real-world continuous wave that does not contain an exact integer number of cycles in the FFT frame will have a discontinuity where the next frame is spliced, which results in "spectral leakage" that appears as "skirts" on what would otherwise be a single line in the spectrum. The window function provides a gradual onset and offset to smooth out this discontinuity, greatly reducing the spectral leakage.

Interested readers may want to check out my "Gut Level Fourier Transforms" series at . In particular, see Part 5 "Dumping Spectral Leakage Out a Window"

Best regards,

Bob Masta DAQARTA v6.00 Data AcQuisition And Real-Time Analysis

formatting link
Scope, Spectrum, Spectrogram, Sound Level Meter Frequency Counter, FREE Signal Generator Pitch Track, Pitch-to-MIDI Science with your sound card!

Reply to
Bob Masta

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.