DSPRelated.com
Forums

Rectified FFT

Started by Benjamin M. Stocks December 5, 2003
Hi Everybody,
I have a question that may or may not make sense: is it possible to
take the FFT of a fully recitified sine wave (the positive half cycles
are inverted) and still produce the same results as would be
calculated with the same waveform non-rectified?

Is this possible? Do I need to do anything special before or after the
FFT calculations?

Thanks much,

Ben
"Benjamin M. Stocks" <stocksb@ieee.org> wrote in message
news:132e56ad.0312051354.7ab523ba@posting.google.com...
> Hi Everybody, > I have a question that may or may not make sense: is it possible to > take the FFT of a fully recitified sine wave (the positive half cycles > are inverted) and still produce the same results as would be > calculated with the same waveform non-rectified?
Nope. A rectified sinusoid is equivalent to introducing distortions into your signal. An FFT of that will essentially show all the distortions. I can't think of a way undo that after the FFT. Cheers Bhaskar
> Is this possible? Do I need to do anything special before or after the > FFT calculations? > > Thanks much, > > Ben
Benjamin M. Stocks wrote:

> Hi Everybody, > I have a question that may or may not make sense: is it possible to > take the FFT of a fully recitified sine wave (the positive half cycles > are inverted) and still produce the same results as would be > calculated with the same waveform non-rectified? > > Is this possible? Do I need to do anything special before or after the > FFT calculations? > > Thanks much, > > Ben
What do you mean by "same results"? Clearly, the spectrum will be different. (No fundamental, lots of harmonics.) Remember, you have to exclude all harmonics not less than half the sample rate, so the waveform won't look exactly like a half-wave rectified signal in the book. For pi/4 peak amplitude and and symmetry about a peak, so that all terms are cosines, and assuming nmax far enough below Nyquist, C[0] = 1, C[n] = 1/(4n&#4294967295; - 1), n = 1, 2, ..., nmax Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
"Bhaskar Thiagarajan" <bhaskart@deja.com> wrote in message 
> Nope. A rectified sinusoid is equivalent to introducing distortions into > your signal. An FFT of that will essentially show all the distortions. I > can't think of a way undo that after the FFT.
What if I knew the frequency of the non-rectified signal (I'm the one generating the signal) is there a time or frequency domain manipulation I can do to produce an FFT? Basically there's a system I can only get a rectified signal through and I want to measure its frequency response. The more I think about it the less I think this is possible to do with an FFT but it was the first thing to come to mind.
If you know the frequency and know that there is only one tone at a time
what's the point of FFT'ing it? It sounds as if all you need is to measure
the power of your rectified signal. For a sine wave you can then always
calculate the original amplitude or whatever else you need...

/Mikhail


"Benjamin M. Stocks" <stocksb@ieee.org> wrote in message
news:132e56ad.0312061454.147c829d@posting.google.com...
> "Bhaskar Thiagarajan" <bhaskart@deja.com> wrote in message > > Nope. A rectified sinusoid is equivalent to introducing distortions into > > your signal. An FFT of that will essentially show all the distortions. I > > can't think of a way undo that after the FFT. > > What if I knew the frequency of the non-rectified signal (I'm the one > generating the signal) is there a time or frequency domain > manipulation I can do to produce an FFT? Basically there's a system I > can only get a rectified signal through and I want to measure its > frequency response. > > The more I think about it the less I think this is possible to do with > an FFT but it was the first thing to come to mind.
"Benjamin M. Stocks" <stocksb@ieee.org> wrote in message
news:132e56ad.0312061454.147c829d@posting.google.com...
> "Bhaskar Thiagarajan" <bhaskart@deja.com> wrote in message > > Nope. A rectified sinusoid is equivalent to introducing distortions into > > your signal. An FFT of that will essentially show all the distortions. I > > can't think of a way undo that after the FFT. > > What if I knew the frequency of the non-rectified signal (I'm the one > generating the signal) is there a time or frequency domain > manipulation I can do to produce an FFT? Basically there's a system I > can only get a rectified signal through and I want to measure its > frequency response.
Benjamin, OK - well your first post wondered if the question made sense. Maybe not. Here's why. You're now asking to measure the "frequency response". A "signal" doesn't have a frequency response, but a "system" does - as you've properly said. Normally the frequency response is the result of putting in sinusoids at each and every imaginable frequency and characterizing the output amplitude and phase. And, because this usually only applies to linear systems, superposition applies and scaling of amplitudes applies as a subset of superposition. You're describing the output of what's apparently a nonlinear system with an output that is is highly non-sinusoidal. It sounds as if you have a system that has a pure sinusoid as input and a half-wave rectified version coming out. And, you want to characterize the response of the system that introduces the half-wave rectification and perhaps has other characteristics that gives it a peak in vs. peak out type of "frequency response". Is that it? If so, here are some observations: The system isn't a linear system. So, it doesn't have a frequency response in the classical sense. But, it may have a frequency response in some other sense - one that you will have to carefully define. Here are some examples: A perfect half-wave rectifier with the output equal to the input when the input is positive and zero when the input is negative. We normally find it handy to express inputs as sinusoids of various frequencies. Here we also note that the output amplitude is directly proportional to the input amplitude - so there is no dependence on the amplitude of the input in determining the output. if in>out then k*in>k*out. A Fourier Series will describe the output as a function of the input and the output will scale with the input as above. Now, let's put a lowpass filter at the output of the rectifier. The output is then no longer independent of the input frequency and the Fourier Series results are modified by the filter response. For a given input and for various amplitudes, the output still scales though. So, you could figure this one out in two steps: 1) Figure out the Fourier Series that represents the output of the rectifier. 2) Weight the Fourier Series with the frequency response of the following filter This yields a Fourier Series that represents the final output. You can get this by multiplying the Fourier Transform of the impulse response of the filter by the Fourier Series of the output of the rectifier. Maybe this works if you can always put the nonlinear part of a system (with no filtering allowed in this part, just nonlinearities) ahead of and in series with a linear part. Then you can compute the Fourier series of the output of the nonlinear part and weigh the result with the linear part as above. Now, a rectifier is a pretty special thing because the output varies perfectly with the input amplitude. What if you had a rectifier-limiter? Then the output Fourier Series would be dependent on the input amplitude and you'd no longer be able to talk about a "frequency response" as readily. Then you'd have frequency components in the output that vary according to the input amplitude as well as of the frequency. You can still analyze it the same way though. I hope this helps, I'm not sure it really addresses what you're trying to do. Fred
Benjamin M. Stocks wrote:

> I have a question that may or may not make sense: is it possible to > take the FFT of a fully recitified sine wave (the positive half cycles > are inverted) and still produce the same results as would be > calculated with the same waveform non-rectified? > > Is this possible? Do I need to do anything special before or after the > FFT calculations?
I think the easy answer is no. The changes are just too strange to imagine. But then I consider instead of a full wave rectifier, square the signal, instead. Since sin**2(x)=(1-cos(2 x))/2, it would seem not so hard to retrieve the original Fourier terms, except for the constant term. Full wave rectification is a little harder, but not completely different. It will tend to mix bins, and the inverse transform will have signal to noise problems. Well, it seems somewhat related to deconvolution, which can be done if the signal to noise is good enough. If your input is not really sin() and cos(), but, for example, already rectified sin() and cos() then the inverse transform will assume that they are sin() and cos(), anyway. -- glen

Fred Marshall wrote:

> Now, a rectifier is a pretty special thing because the output varies > perfectly with the input amplitude.
Is that true? Well, assuming it is - his system frequency response could be characterized as H1(f)+R(f)+H2(f). Where H1 and H2 are linear responses of the system before and after the rectifier and R is the rectifier. The plus signs indicate only how the system is arranged in time due to the nonlinearity of R. If we assume the signal input is periodic and H2 has a flat response it would seem possible to detect the period of the signal and de-rectify it to find H1. If H1 is flat then feeding a rectified square wave thru the system would give the step response of H2 and from that the impulse response could be derived. If both H1 and H2 are substantially not flat in their response then it probably gets a lot more complicated. -jim -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
"jim" <"N0sp"@m.sjedging@mwt.net> wrote in message
news:3fd33220_7@corp.newsgroups.com...
> > > Fred Marshall wrote: > > > Now, a rectifier is a pretty special thing because the output varies > > perfectly with the input amplitude. > > Is that true? Well, assuming it is - his system frequency response could
be
> characterized as H1(f)+R(f)+H2(f). Where H1 and H2 are linear responses of
the
> system before and after the rectifier and R is the rectifier. The plus
signs
> indicate only how the system is arranged in time due to the nonlinearity
of R.
> If we assume the signal input is periodic and H2 has a flat response it
would
> seem possible to detect the period of the signal and de-rectify it to find
H1.
> If H1 is flat then feeding a rectified square wave thru the system would
give
> the step response of H2 and from that the impulse response could be
derived.
> If both H1 and H2 are substantially not flat in their response then it
probably
> gets a lot more complicated.
Jim, What it gets is more than complicated. It becomes impossible. Here's why: First, it appears that you're assuming an arbitrary input. That being the case, there is no way to predict what the cut off part of the waveform (the part the rectifier removes) may have looked like. That's also the reason that H1 can't be derived with in a direct way. In order to understand the output given an input, you would have to: 1) Define the input. 2) Define the output of H1 in the time domain. 3) Rectify the result. 4) convert to the frequency domain 5) multiply by H2 in frequency or convolve in time with h1(t). Step 3 isn't a 1 to 1 mapping or conversion. There are many outputs of H1 (and therefore, system inputs) that can result in identical outputs from the rectifier, so you can't go back. Accordingly, I don't see any general way to find H1 given the output. One might state a special case as I did earlier - but that's about it. No general case. Is it true that the amplitude of the ouput of a rectifier tracks the input amplitude if the input is a sinusoid and the rectifier is perfect? Yes. That was the context of the discussion. Note that "a sinusoid" doesn't have a dc offset - otherwise it would be something else. So, if the input is arbitrary, then no. Fred
jim wrote:

> > Fred Marshall wrote: > > >>Now, a rectifier is a pretty special thing because the output varies >>perfectly with the input amplitude. > > > Is that true? Well, assuming it is - his system frequency response could be > characterized as H1(f)+R(f)+H2(f). Where H1 and H2 are linear responses of the > system before and after the rectifier and R is the rectifier. The plus signs > indicate only how the system is arranged in time due to the nonlinearity of R. > If we assume the signal input is periodic and H2 has a flat response it would > seem possible to detect the period of the signal and de-rectify it to find H1. > If H1 is flat then feeding a rectified square wave thru the system would give > the step response of H2 and from that the impulse response could be derived. > If both H1 and H2 are substantially not flat in their response then it probably > gets a lot more complicated. > > -jim
Neither H1 nor H2 can be linear. Just as the rectifier produces DC from a single sinusoid, it produces intermodulation frequencies when more than one sinusoid is present. If you know enough about the original signal, there are deductions that can be made from the rectified output. If you only infer the original signal from the output, you can go far astray. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;