Reply by Robert Gush December 11, 20032003-12-11
"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message news:<KLqdnfto6IKG-kqiRVn-iw@centurytel.net>...
> I *think* he was saying that the input to the linear system isn't under > direct control. That it is fixed in its nonsinusoidal form but that > frequency and amplitude are under his control. So, if the output is > lowpassed just above 2x the frequency of the sinusoid of the sweep (which is > input pre-rectifier), then the output amplitude will be a measure of > frequency response at the fundamental only. Sort of like applying > "describing functions" in control systems analysis. How'd you propose to > sweep the LP filter to do this? >
Hi Fred, I am sure the OP indicated that he can generate any stimulus frequency. He did indicate that there may be interference present, but Jerry's suggestion of using a BP filter that is matched to this stimulus frequency may be adequate. Of course if the input signal is close to the interference then there will be a problem. I wonder if the OP were to stimulate it with a unit impulse - in the direction that the rectifier would pass - and then do the FFT on the result. Because of the large influence an interfering tone can have on this method it might be prudent (if the interfence is changing) to do a number of these 'frequency response checks' and average the results Regards Robert
Reply by Fred Marshall December 10, 20032003-12-10
In re-reading Ben's response, I see that the full-wave rectified sinusoid is
under your control.  What's not clear to me is if you have *chosen* to make
it a full-wave rectified sinusoid or if you have no control over it.  The
approach I described earlier will work if you have no control over it.
However, if you *do* have control over the waveform at that point, then a
classical approach with a sinusoidal input may be preferred because it
avoids having to do the Fourier Transform.   After having done that, you can
determine the output from any full-wave rectified sinusoid as before.

Hey Ben, we need to understand if we're even close here.  It's really not
likely that any of what we're talking about can be all that proprietary.
Anyway, pictures sometimes help.  Here are a couple:

This is what I understand the system setup to look like:

   +-----+      +-----------+      +-----------+
   |     | s1   | Full Wave | s2   | Linear    |  s3
   | cos +----->| Rectifier |----->| System/   |----->
   |     | f0/2 |    -1     |  f0  | Filter    |  f0
   +-----+      +-----------+ 2f0  +-----------+ 2f0
                              3f0                3f0
                              4f0                4f0
                              5f0                5f0
                               .                  .
This shows that a sinusoid (actually a cosine with positive peak at time=0)
going into a full wave rectifier which outputs an average negative voltage
as you've specified (thus the "-1" shown in the box).  In general, the
output will have sinusoidal components at f0 and all of its harmonics.  This
goes into the linear system.  In general, the output s3 will have all the
same sinusoidal components - but at differenct amplitudes and phases.

I understand that you can control the amplitude and frequency of cos=s1
where I've labeled the frequency to be f0/2 and have not shown the amplitude
on the diagram.
A question is, can you also control directly the form of s2 or not?

The approach I tried to suggest earlier worked like this:

In general, s1=A*cos(wt) where A is the peak amplitude and w is the radian
frequency and t is time.
Using the notation from the figure:
s1=A*cos(2*pi*f0/2*t)

from this, the general form for s2 is:
s2=A*[b0 + b1*cos(2*pi*f0/2*t) + phi1) + b2*cos(4*pi*f0/2*t + phi2) +
b3*cos(6*pi*f0/2*t + phi3) + .....]
where b0, b1, b2, ..... are the Fourier Series coefficients for the output
of a general nonlinear such as the full wave rectifier.

To be very specific, let's use the actual Fourier Series coefficients for a
perfect full-wave rectifier:

s2 = -A*[(2/pi)*(1 + (2/3)*cos(2*pi*f0/2*t) - (2/15)*cos(4*pi*f0/2*t) +
(2/35)*cos(6*pi*f0/2*t) - .....]

s2 = -A*[(2/pi)*(1 + (2/3)*cos(pi*f0*t) - (2/15)*cos(2*pi*f0*t) +
(2/35)*cos(3*pi*f0*t) - .....]

So, there is
- a dc term with value -A*2/pi,
- a fundamental sinusoid with amplitude -A*4/3*pi,
- a second harmonic with amplitude +4*A/15*pi,
- etc.
These are the Fourier Series Coefficients scaled by the input amplitude "A".

(I conveniently chose a cosine as input so that the entire Fourier Series
would be made up of cosines with no phase terms).

With this:

s3= -A*[(2/pi)*(c0*1 + c1*(2/3)*cos(pi*f0*t + phi1) -
c2*(2/15)*cos(2*pi*f0*t + phi2) + c3*(2/35)*cos(3*pi*f0*t + phi3) - .....]

where c0, c1, c2 etc. are the amplitude responses of the linear system at
dc, 1*f0, 2*f0, etc.
and where phi1 is the phase shift of the linear system at 1*f0, phi2 at
2*f0, etc.

The first method I suggested would have you calculate the Fourier Transform
of the output at f0, 2*f0, etc.
The Fourier Transform gives you the phase values directly - or at least to
an arbitrary phase reference if you haven't registered the output relative
to the input phase.
The Fourier Transform magnitudes allow you to calculate the magnitude
response of the linear system by dividing them by the input amplitudes in s2
which are the Foureir Series Coefficients scaled by the input amplitude "A"
given above.

So, if you compute the Fourier Transform of s3 at f0, let's say you get
magnitude 0.5 and phase pi/4.
Let's also say that the temporal epoch that you transformed was aligned to
start and end on peaks of the input sinusoid - so it looks like a cosine
input for phase alignment purposes.
Let's also say that the input peak amplitude A=1.0.

The input amplitude to the linear system is 4/3*pi and the output is 0.5.
So, the linear system amplitude response at f0 is 4/6*pi and the phase is
pi/4 - assuming that the rectifier introduces no phase shift or delay.

This calculation is repeated at each frequency 2*f0, 3*f0, etc.  giving you
the "frequency response" for a sinusoidal input at f0/2.

For each different value of f0, you get a list of amplitude and phase for
each of the harmonic frequencies.
Then, the process is repeated for each value of f0 of interest and you end
up with a table of input frequency vs. amplitude and phase for each harmonic
frequency number.

Now, this assumes that you only had control on s1 and not on s2.

If you do have control over s2, then the process can be different - although
I'm not sure if it's better.
It does avoid doing the Fourier Transform by doing a direct measurement.
You input a sinusoid as s2 for measurement purposes and measure magnitude
and phase of s3 and stick those results in a table for each frequency of
interest - being careful to include measurements at all of the harmonic
frequencies - actually in this case only the even harmonics and not even the
fundamental because of the form of the Fourier Series.
Then, you use those results the same as if you had calculated the Fourier
Transform of the output and use the same process as above to create a table
of input frequency vs. amplitude and phase for each harmonic frequency
number.

I do hope that you realize that there isn't one "frequency response" except
at a chosen harmonic - for example at f0 you can talk about a frequency
response as you vary f0.  However, there are also outputs at 2*f0, 3*f0,
etc. that have energy in them which you may or may not be interested in.  If
you are interested in them, then you might view the situation as multiple
frequency responses which apply to the "harmonic numbers".  That is, you
could plot the frequency response for f0 and another for 2*f0 and another
for 3*f0.  These could be superimposed on a plot against f0 as long as it's
clear that the scale for the response at 2*f0 is really compressed,
etc......

If the linear system is a perfect lowpass filter at 240Hz, then you might
end up with a plot that looks something like this:


amplitude ^ (not to scale)
  |                   |
  |  f0---------------------------------------+
  |                   |                       |
  |                                           |
  |  2*f0------------------+                  |
  |                   |    |                  |
  |                        |                  |
  |                        |                  |
  |                        |                  |
  |  3*f0--------+    |    |                  |
  |              |         |                  |
  |              |         |                  |
  |              |         |                  |
  +--------------|----|----|------------------|---------+

  0                  100  120                240         f0---->

The way this plot would be read is this:
Say the input sinusoid frequency is 50Hz
Then the rectifier output fundamental is 100Hz.
This plot says that the fundamental will have some appreciable amplitude
that can be read off the chart.
It says that the 2nd harmonic will have some appreciable amplitude that can
be read off the chart.
It says that the 3rd harmonic will *not* have appreciable amplitude.
Below f0=80Hz, the 3rd harmonic will show up.  80Hz=240/3
Above f0=120Hz, the 2nd harmonic will drop out. 120Hz=240/2
Above f0=240Hz, the fundamental will drop out.

Phase can be plotted similarly.

So, either this matches your situation and helps or it doesn't.  Does it???

Fred




Reply by Jerry Avins December 10, 20032003-12-10
Fred Marshall wrote:

   ...
> > > Robert, > > I *think* he was saying that the input to the linear system isn't under > direct control. That it is fixed in its nonsinusoidal form but that > frequency and amplitude are under his control. So, if the output is > lowpassed just above 2x the frequency of the sinusoid of the sweep (which is > input pre-rectifier), then the output amplitude will be a measure of > frequency response at the fundamental only. Sort of like applying > "describing functions" in control systems analysis. How'd you propose to > sweep the LP filter to do this? > > Fred
It doesn't have to be low pass. Band pass will do. Think "lock-in amplifier." Jerry -- Engineering is the art of making what you want from things you can get. &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
Reply by Fred Marshall December 10, 20032003-12-10
"Robert Gush" <robert@suesound.co.za> wrote in message
news:a0f35ea5.0312100614.18bae255@posting.google.com...
> stocksb@ieee.org (Benjamin M. Stocks) wrote in message
news:<132e56ad.0312090748.4c829fe@posting.google.com>...
> > "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message > > > Is that the case? Do you know that it's a linear system? Your
descriptions
> > > have really been too cryptic for people to respond very well. > > > > I apologize for the cryptic nature (I didn't think I was being that > > cryptic but maybe I was) but this is a work related question so I need > > to be careful about how much I describe, I'm sure you can understand. > > It is a linear system except for a device at the input that prevents > > any DC and any positive voltages from entering. > > > > > You have not said if you want the frequency response of the system in
the
> > > general case or if you want the frequency response of the system to
the
> > > input signal. > > > > To the specific input signal. I want to know the system's response at > > a specified frequency. > > > a) Generate a frequency sweep. > b) Lowpass filter the output. > c) Plot the measured amplitude against the input frequencies. > voila! you have the frequency response. > > Unless we're all missing something...
Robert, I *think* he was saying that the input to the linear system isn't under direct control. That it is fixed in its nonsinusoidal form but that frequency and amplitude are under his control. So, if the output is lowpassed just above 2x the frequency of the sinusoid of the sweep (which is input pre-rectifier), then the output amplitude will be a measure of frequency response at the fundamental only. Sort of like applying "describing functions" in control systems analysis. How'd you propose to sweep the LP filter to do this? Fred
Reply by Robert Gush December 10, 20032003-12-10
stocksb@ieee.org (Benjamin M. Stocks) wrote in message news:<132e56ad.0312090748.4c829fe@posting.google.com>...
> "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message > > Is that the case? Do you know that it's a linear system? Your descriptions > > have really been too cryptic for people to respond very well. > > I apologize for the cryptic nature (I didn't think I was being that > cryptic but maybe I was) but this is a work related question so I need > to be careful about how much I describe, I'm sure you can understand. > It is a linear system except for a device at the input that prevents > any DC and any positive voltages from entering. > > > You have not said if you want the frequency response of the system in the > > general case or if you want the frequency response of the system to the > > input signal. > > To the specific input signal. I want to know the system's response at > a specified frequency. >
a) Generate a frequency sweep. b) Lowpass filter the output. c) Plot the measured amplitude against the input frequencies. voila! you have the frequency response. Unless we're all missing something... regards Robert
Reply by Jerry Avins December 10, 20032003-12-10
Benjamin M. Stocks wrote:

   ...


> It is a linear system except for a device at the input that prevents > any DC and any positive voltages from entering.
I just reread that. It sounds like a half-wave rectifier. You wrote originally that that positive voltages are inverted. Now you write that they are blocked. Was that a slip? Jerry -- Engineering is the art of making what you want from things you can get. &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
Reply by glen herrmannsfeldt December 10, 20032003-12-10
Benjamin M. Stocks wrote:

(snip)

> I'm the one generating the full-wave rectified signal and I can use > just about any frequency or amplitude I desire.
>>1) Represent the full-wave rectified sinusoid as a Fourier Series. >>2) Assuming a reasonably long sample of the output, Fourier Transform the >>output with this special input present. >>3) Sample the Fourier Transform at the frequencies represented in the >>Fourier Series you calculated in (1) for those frequencies where the Fourier >>Series coefficients of (1) are not zero.
> If I understand what you are saying here I should take the Fourier > Transform of the output signals at the same frequencies as the input > signals? I tried this but I get distortion.
The first thing that happens is that the frequency is doubled. The sound people are used to calling "60Hz hum" is actually 120Hz. The vibrations of transformer wires are at twice the line frequency. There is also a non-linear effect, which generates an infinite series of harmonics of decreasing amplitude. If you square the rectified signal, you should get pretty much the FT with each component at twice the original frequency, and some phase information lost. I haven't tried to figure out what the phase information does. -- glen
Reply by jim December 10, 20032003-12-10

"Benjamin M. Stocks" wrote:

> It is a linear system except for a device at the input that prevents > any DC and any positive voltages from entering.
Well, everyone is still guessing as to what it is that you are really observing. It has been suggested that you input a periodic waveform with a DC bias (sounds like negative bias would be appropiate here) - have you tried that? What does the resulting output look like? If the input is AC coupled as you suggest then the DC gets removed and its no different than if you inputed the signal without a DC bias - is that what you are observing? If thatis the case then inputing a rectified signal (inverted I guess) would be of no help either since the DC component of that signal will also be removed and you would have just doubled the distortion. -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! =-----
Reply by Paavo Jumppanen December 9, 20032003-12-09
stocksb@ieee.org (Benjamin M. Stocks) wrote in message news:<132e56ad.0312090748.4c829fe@posting.google.com>...
> "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message > > Is that the case? Do you know that it's a linear system? Your descriptions > > have really been too cryptic for people to respond very well. > > I apologize for the cryptic nature (I didn't think I was being that > cryptic but maybe I was) but this is a work related question so I need > to be careful about how much I describe, I'm sure you can understand. > It is a linear system except for a device at the input that prevents > any DC and any positive voltages from entering. > > > You have not said if you want the frequency response of the system in the > > general case or if you want the frequency response of the system to the > > input signal. > > To the specific input signal. I want to know the system's response at > a specified frequency. > > > If the system is linear and if you input a full-wave rectified sinusoid then > > you can do this: > > 0) You must know the frequency and amplitude of the full-wave rectified > > sinusoid > > I'm the one generating the full-wave rectified signal and I can use > just about any frequency or amplitude I desire. > > > 1) Represent the full-wave rectified sinusoid as a Fourier Series. > > 2) Assuming a reasonably long sample of the output, Fourier Transform the > > output with this special input present. > > 3) Sample the Fourier Transform at the frequencies represented in the > > Fourier Series you calculated in (1) for those frequencies where the Fourier > > Series coefficients of (1) are not zero. > > If I understand what you are saying here I should take the Fourier > Transform of the output signals at the same frequencies as the input > signals? I tried this but I get distortion. > > Ben
So am I correct in thinking that the output of the rectifier (which is the input to your linear system) is not observable and that the input to the rectifier is know (ie. waveform shape)? If that is the case my suggestion would be to construct a model of the rectifier in code and input the model with the same signal as the real rectifier. Then you just perform transfer function analysis by measuring the cross spectrum of the system output with your virtual input and divide that by the power spectrum of the input to get the frequency response. The only caveat with this approach is that you need sufficient whiteness in your input signal to be able to measure the freuqnecy response so you may have to add some noise to your sinusoid, or if your system can handle pure noise then just use rectified noise. Regards, Paavo Jumppanen Author of AtSpec : A 2 channel PC based FFT spectrum analyzer http://www.taquis.com
Reply by Fred Marshall December 9, 20032003-12-09
"Jerry Avins" <jya@ieee.org> wrote in message
news:3fd60c6a$0$14969$61fed72c@news.rcn.com...
> Benjamin M. Stocks wrote: > > > "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message > > > >>Is that the case? Do you know that it's a linear system? Your
descriptions
> >>have really been too cryptic for people to respond very well. > > > > > > I apologize for the cryptic nature (I didn't think I was being that > > cryptic but maybe I was) but this is a work related question so I need > > to be careful about how much I describe, I'm sure you can understand. > > It is a linear system except for a device at the input that prevents > > any DC and any positive voltages from entering. > > > > > >>You have not said if you want the frequency response of the system in
the
> >>general case or if you want the frequency response of the system to the > >>input signal. > > > > > > To the specific input signal. I want to know the system's response at > > a specified frequency. > > > > > >>If the system is linear and if you input a full-wave rectified sinusoid
then
> >>you can do this: > >>0) You must know the frequency and amplitude of the full-wave rectified > >>sinusoid > > > > > > I'm the one generating the full-wave rectified signal and I can use > > just about any frequency or amplitude I desire. > > > > > >>1) Represent the full-wave rectified sinusoid as a Fourier Series. > >>2) Assuming a reasonably long sample of the output, Fourier Transform
the
> >>output with this special input present. > >>3) Sample the Fourier Transform at the frequencies represented in the > >>Fourier Series you calculated in (1) for those frequencies where the
Fourier
> >>Series coefficients of (1) are not zero. > > > > > > If I understand what you are saying here I should take the Fourier > > Transform of the output signals at the same frequencies as the input > > signals? I tried this but I get distortion. > > > > Ben > > There's a conceptual gap somewhere. A rectifier creates distortion. The > FT merely shows it.
Ben and Jerry :-) No gap but perhaps another qualification for Ben: See step 1. This will generate a series of sinusoids that are harmonically related with the fundamental frequency the same as 2x the frequency of the original rectified sine wave. Terms at the fundamental, f0, and 2*f0, 3*f0, etc. all with different amplitudes and phases. This is the input to the linear system - a superposition of sinusoids. The output of the linear system will also be a superposition of those same sinusoids but weighted by the frequency response of the linear system - amplitude and phase again..... So, if one computes the Fourier Transform of the output of the linear system at each of the input frequencies, and divides by the amplitude of the input and takes the phase difference, one will have the linear system transfer function at those frequencies - and at those frequencies only. Example: I put in a full-wave rectified sinusoid with original frequency f0/2 and fundamental frequency of f0. Let's examine the 3rd harmonic, 3*f0: It is input to the linear system with let's say amplitude 3/4 and phase pi/4. The Fourier Transform of the output of the linear system at 3*f0 is of amplitude 1/2 and phase of pi/2. So, the linear system has reduced the amplitude to 2/3 and has added a phase shift of pi/2-pi/4=pi/4. This is the value of the transfer function of the linear system at 3*f0. So, Ben, if you know the amplitude and frequency of the input rectified sinusoid, you can determine the amplitudes and the frequencies at the output of the linear system. An exhaustive measurement process may allow you to fully characterize the linear system. Otherwise, you can make measurements at all the frequencies of interest and do this calculation. Interpolation of results comes to mind.... You use this then by saying: Here is the amplitude and frequency of the input. Now I can look up the amplitudes and frequencies of the output in my table of results as generated above. If the amplitude changes, the output scales directly. If the frequency changes, you need to do another look up from your table of results. The result is independent of input amplitude but not of the input frequency in general. Also, I've neglected the effect of "there is no dc passed to the input". You should be careful about this. If you start with a zero average sinusoid (no dc term) and then rectify it, then there will be a dc term resulting. If you start with a zero average sinusoid (no dc term), rectify it and *then* remove the dc term, that's a different waveform - but the method above still works. Fred