Bode Plotter

K

Kari Laine

Guest
Hi,

again thank you for the previous help.
I will start building the simple PSU next week.

This question is little on the edge whether it belongs here.
But Scope are used in electronics, so there I go.

Now I am back to my main project, which is to make Linux-software for
the Velleman PCSGU250 USB-Scope. This has been uphill battle because I
not that fluent with C++, the user interface lib Qt (Nokia.com) is new
to me and I don't know the scopes very well. But as this is totally my
hobby there is no time limit, so I learn as I go. Now I have done the
channels and trigger and part of the Function generator.

The part of the scope I don't have the faintest idea yet, is the Bode
Plotter. I would really need some hand holding with it. Maybe there is
some free code somewhere to do it, which I can borrow. I tried to google
but it is too mathematical to my taste (I am middle of re-learning
math). The bode plotter seems quite important part of scope so I would
like to implement it.

Any help, comments and web-links appreciated. If I have to make it all
by myself it is going to take 2-3 months to learn, I think....

Btw. the software will be free with either GPL license. But I might
consider paying something for help....if that's the only way.


Best Regards
Kari

Below what the Windows-version gives as instructions.
--------------------------------------------------------

BODE BLOTTER
This text is lifted from the Windows-version - it is not implemented yet

To get the amplitude plot
- Connect the output of the Function Generator to the input of the
device under test.
- Connect the output of the device under test to CH1 of the Oscilloscope.

To get the phase plot:
- Connect the output of the Function Generator also to CH2 of the
oscilloscope.
- From the View menu select Phase Plot.

To use the option "Normalize Output by input".
- Connect the output of the Function Generator also to CH2 of the
oscilloscope.
- From the Options Menu select Normalize Output by input.
- See Help for more information.

--------------------------------------------------------------


--
PIC - ARM - DISPLAYS - RELAYS - MODULES - CONVERTERS - I2C - SPI -
KEYPADS - ACCESSORIES
http://www.byvac.com (I am just a satisfied customer)
 
Kari Laine wrote:
Hi,

again thank you for the previous help.
I will start building the simple PSU next week.

This question is little on the edge whether it belongs here.
But Scope are used in electronics, so there I go.

Now I am back to my main project, which is to make Linux-software for
the Velleman PCSGU250 USB-Scope. This has been uphill battle because I
not that fluent with C++, the user interface lib Qt (Nokia.com) is new
to me and I don't know the scopes very well. But as this is totally my
hobby there is no time limit, so I learn as I go. Now I have done the
channels and trigger and part of the Function generator.

The part of the scope I don't have the faintest idea yet, is the Bode
Plotter. I would really need some hand holding with it. Maybe there is
some free code somewhere to do it, which I can borrow. I tried to google
but it is too mathematical to my taste (I am middle of re-learning
math). The bode plotter seems quite important part of scope so I would
like to implement it.

Any help, comments and web-links appreciated. If I have to make it all
by myself it is going to take 2-3 months to learn, I think....

Btw. the software will be free with either GPL license. But I might
consider paying something for help....if that's the only way.


Best Regards
Kari

Below what the Windows-version gives as instructions.
--------------------------------------------------------

BODE BLOTTER
This text is lifted from the Windows-version - it is not implemented yet

To get the amplitude plot
- Connect the output of the Function Generator to the input of the
device under test.
- Connect the output of the device under test to CH1 of the Oscilloscope.

To get the phase plot:
- Connect the output of the Function Generator also to CH2 of the
oscilloscope.
- From the View menu select Phase Plot.

To use the option "Normalize Output by input".
- Connect the output of the Function Generator also to CH2 of the
oscilloscope.
- From the Options Menu select Normalize Output by input.
- See Help for more information.

--------------------------------------------------------------


From the instructions it sounds like the "Bode plotter" is acting like
a dynamic systems analyzer or control systems analyzer -- it appears to
be injecting a reference signal into the system, then measuring the
amplitude and phase of one or two points within the system to determine
the transfer function between the two points.

This is basically what I describe here:
http://www.wescottdesign.com/articles/FreqMeas/freq_meas.html, except
that in the paper I'm describing how you embed this functionality into a
microcontroller that is also implementing a control system, where you
want this in a stand-alone instrument.

I don't know how far you're going to be able to get away from the math
-- you have to get the signal processing right or the information you
want will be buried in noise, and getting the signal processing right
demands doing the math.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
 
On Thu, 01 Apr 2010 21:10:48 +0300, Kari Laine <klaine8@gmail.com> wrote:

Hi,

again thank you for the previous help.
I will start building the simple PSU next week.

This question is little on the edge whether it belongs here.
But Scope are used in electronics, so there I go.

Now I am back to my main project, which is to make Linux-software for
the Velleman PCSGU250 USB-Scope. This has been uphill battle because I
not that fluent with C++, the user interface lib Qt (Nokia.com) is new
to me and I don't know the scopes very well. But as this is totally my
hobby there is no time limit, so I learn as I go. Now I have done the
channels and trigger and part of the Function generator.

The part of the scope I don't have the faintest idea yet, is the Bode
Plotter. I would really need some hand holding with it. Maybe there is
some free code somewhere to do it, which I can borrow. I tried to google
but it is too mathematical to my taste (I am middle of re-learning
math). The bode plotter seems quite important part of scope so I would
like to implement it.

Any help, comments and web-links appreciated. If I have to make it all
by myself it is going to take 2-3 months to learn, I think....
Simply output your data as a CSV and use the spreadsheet of your choice to do
your plotting.
 
On Thu, 01 Apr 2010 21:10:48 +0300, Kari Laine
<klaine8@gmail.com> wrote:

Hi,

again thank you for the previous help.
I will start building the simple PSU next week.

This question is little on the edge whether it belongs here.
But Scope are used in electronics, so there I go.

Now I am back to my main project, which is to make Linux-software for
the Velleman PCSGU250 USB-Scope. This has been uphill battle because I
not that fluent with C++, the user interface lib Qt (Nokia.com) is new
to me and I don't know the scopes very well. But as this is totally my
hobby there is no time limit, so I learn as I go. Now I have done the
channels and trigger and part of the Function generator.

The part of the scope I don't have the faintest idea yet, is the Bode
Plotter. I would really need some hand holding with it. Maybe there is
some free code somewhere to do it, which I can borrow. I tried to google
but it is too mathematical to my taste (I am middle of re-learning
math). The bode plotter seems quite important part of scope so I would
like to implement it.

Any help, comments and web-links appreciated. If I have to make it all
by myself it is going to take 2-3 months to learn, I think....

Btw. the software will be free with either GPL license. But I might
consider paying something for help....if that's the only way.


Best Regards
Kari

Below what the Windows-version gives as instructions.
--------------------------------------------------------

BODE BLOTTER
This text is lifted from the Windows-version - it is not implemented yet

To get the amplitude plot
- Connect the output of the Function Generator to the input of the
device under test.
- Connect the output of the device under test to CH1 of the Oscilloscope.

To get the phase plot:
- Connect the output of the Function Generator also to CH2 of the
oscilloscope.
- From the View menu select Phase Plot.

To use the option "Normalize Output by input".
- Connect the output of the Function Generator also to CH2 of the
oscilloscope.
- From the Options Menu select Normalize Output by input.
- See Help for more information.
Kari:

You need to measure frequency response for a Bode
plot. While you could do this via a slow sweep of
the signal generator while you watch the magnitude
of the response, it's much faster (and usually
more accurate) to get the spectrum with an FFT.

I have some Help topics at
<www.daqarta.com/dw_0akk.htm> that discuss various
strategies for frequency response, including the
slow sweep. The other strategies mentioned are
stepped frequency sweep (that hits only the
spectral lines of the FFT), impulse response, step
response (with correction back to impulse
response), and white, pink, or arbitrary noise
spectra.

In all of these you usually need to average
multiple responses together. (In principle, you
only need a single impulse or step, but averaging
improves the accuracy in the presence of noise.)

But the first step is to get a working FFT. I
don't have any handy reference code to point you
to, but I'm sure there are plenty of sources out
there. FFT source code is typically far from
optimized, but the first step is to get the system
working, then go back and fine-tune.

With FFTs, ideally you will want a routine that
accepts real input... but almost all of the sample
code you will find is for real+imaginary input.
That will work (you just put your input samples
into the real slots and leave the imaginary slots
empty), but it's wasteful. Again, something you
can deal with after you have it working.

A Bode plot is always shown with log-log axes.
The Y axis is no problem: Just take the log of
the magnitude value you get from the FFT. The X
axis is more of a problem because the FFT returns
data only at linearly spaced frequencies.
(The spacing is equal to the sample rate divided
by the number of raw data points used in the FFT.)
So you will need a routine to plot those linear
frequencies logarithmically, giving unevenly
spaced display points (stretched apart at the low
end and squished together at the high end).

Best regards,


Bob Masta

DAQARTA v5.10
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Scope, Spectrum, Spectrogram, Sound Level Meter
Frequency Counter, FREE Signal Generator
Pitch Track, Pitch-to-MIDI
DaqMusic - FREE MUSIC, Forever!
(Some assembly required)
Science (and fun!) with your sound card!
 

Welcome to EDABoard.com

Sponsor

Back
Top