Showing results for 
Search instead for 
Did you mean: 

bode plot

Hi all,

I am creating a project for vibration experiment. I generated four kinds of signals and get feedback signals. I want to get frequency vs phase/magnitude plot which compared input and output signal. What should I do? I tried SI bode plot .vi and CD bode plot .vi but they seems both not suitable for me. Can someone give some advice? Thank you so much!

Here is my file.


0 Kudos
Message 1 of 6

Hi, I am also trying to get bode plot for the signal I generate which need to compared with the feedback signal. I tried SI bode and CD bode but they both don't suitable for my signal. Do you have any suggestion? Really appreciate it.

Here is my .vi file.

0 Kudos
Message 2 of 6

It might be a "language problem", but I'm a little concerned that you might not understand the idea behind Signal Analysis, including the meaning and use of Bode plots.  The LabVIEW code you attached showed doesn't make much sense (and is poorly written -- note the input wire to the DAQmx Write appearing to be an output of this function).Uo


When dealing with a Linear System (is your System linear?  Does the amplitude of the Output Signal double when the amplitude of the Input doubles?), the Bode Plot shows how the Gain and Phase of the Output Signal varies as a function of the frequency of an input Sinusoid over some frequency range.  In order to construct a Bode Plot, you need to measure the Output as a function of Input Frequency.  If your Stimulus is a sinusoid of a single frequency, your Bode Plot will consist of a single point (not very illuminating!).


Your LabVIEW code doesn't appear to deal with this issue, perhaps because you are unsure how to approach the design of a system to test your device over a wide range of frequencies and thereby generate a Bode Plot.  That's OK -- we might be able to help.  If this is the situation, try writing a description of what you want to do to perform your test, including the type(s) of signal(s) you want to use (give some idea of the duration of the signals and how to characterize them -- are they sinusoids, sums of sinusoids, step functions, PRBS's, something else?), and suggestions of the kind(s) of analysis you want to do with the recorded System Response(s).


Bob Schor

0 Kudos
Message 3 of 6

Thank you so much for your reply!

First, it is true that I am not clearly understand about bode plots, I only know it provides magnitude of the frequency response and phase shift. I know I need to compare output signal and feedback signal to get phase response but I cannot find out a way to do that. I used FFT spectrum to measure the feedback signal, the frequency vs magnitude plot looks a little bit similar to the correct one but not exactly.

Second, I am generating several kinds of signals to an amplifier then connected to a shacking bar. I think AO Voltage is correct and it works well.

Third, I think it is a linear system because I tried to double the amplitude of input and the output signal also doubled.

I have four kinds of signals: normal sine wave, swept sine, chirp and white noise. I know normal sine wave with single frequency won't have bode plots, so I will pay attention to other three. They will have very similar results, right?

Can you give me some suggestions about what kind of function or vi block I need to use?

Thank you so much!

0 Kudos
Message 4 of 6

First, a kudo for checking the linearity of your system!  Non-linear systems are much more "interesting" (= "complex" and sometimes a pain in the rear).  Another feature of Linear Systems is "sinusoid in, sinusoid of same frequency out" and "Response to (Signal 1 + Signal 2) = (Response to Signal 1) + (Response to Signal 2)".  Indeed, the second feature is basically the definition of a Linear System.


I have not done Signal Analysis myself for many years.  When I did, I basically chose a range of frequencies (I was doing low-frequency stuff) of, say, 0.05, 0.1, 0.2, 0.5, 1.0 , and 2.0 Hz, stimulated with a pure sinusoid at each frequency, fit each response with a sinusoid at the stimulus frequency (and also verifying that there were no significant higher harmonics in the response), and plotted Log Gain vs Log Frequency and Phase vs Log Frequency to make a Bode Plot.  [The phenomena of interest, manifested by changes in gain and phase, largely took place in this frequency range].


I'm sure other Community members have more recent experience than I.  There is an entire Sound and Vibration Toolkit in LabVIEW that I know exists, but largely haven't explored that may also be of help.


Bob Schor

0 Kudos
Message 5 of 6

If you have access to the Sound and Vibration toolbox, have a look at the shipped examples (hole set of FRF exsamples ...)

Greetings from Germany

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

0 Kudos
Message 6 of 6