04-09-2018 08:39 PM
Hey guys, I think this is a super simple problem but I am having great difficulty with it for some reason.
I have an input signal (which is 4-20mA) which I feed through a filter. I have an output signal which is in Volts. I want to find the frequency response and bode plot of this system. I change the frequency based on the loop iteration (I increase the frequency value each time).
I convert the input signal to corresponding volts (multiply by 250). I then calculate my gain (20*log*Vout/Vin). This gain is now in dB.
If I am correct, I should just be able to plot the gain vs the frequency but I am not sure how. Each time I try plotting, its always against time (rather than a logarithmic frequency scale)
can anybody help me with this? I have attached the VI below. To run it however you need the FPGA code (should I upload that too? This just creates the sweeping 4-20ma sine wave)
Thank you!
04-09-2018 08:41 PM
Further, I just want to be able to plot the changing frequency with the Gain to get the plot. But I cant graph the frequency on the X axis and Gain on the Y axis.
04-10-2018 03:07 AM
Try the LabVIEW Help and search for XY Graph.
04-10-2018 06:20 PM
Thanks, I hadn't thought of that before..
Was the first thing I had done. I think part of my problem comes down to my timing and reading data sets, still looking.
04-10-2018 07:20 PM
Which part of that help document discussed how to change their data to a logarithmic representation? Finding "XY Graph" wasn't helpful here.
OP, I forget which graphs have the right-click property to view the axis logarithmic. Take a look at a graph and the xy graph. If you can't find it on either, I'll check when I'm by a PC with LV installed
04-10-2018 11:11 PM
Remember that the word "time" is just the default label for the x-axis. You can change it to whatever you want.
04-10-2018 11:51 PM
Hi guys, just an updated. I was looking at the problem at an incorrect angle. I needed to sample the peak to peak voltages for both in and out (after sampling for X seconds) and then write both these arrays into an XY graph via bundling. I had it inherently wrong.
The log scale is a property of the graph which you can get to by the front panel (right click)
04-12-2018 04:02 AM
Hello Muri,
can you share the vi with the sollution please because i have the same problem !