07-05-2016 11:09 AM
If you don't understand what a Spectrum is, how to do frequency analysis, filters, etc., then you shouldn't be trying to program them in LabVIEW. You need to "know what you are doing" before you try to actually do it.
If this is Homework, you have a lot of work to do first. If this is something an engineering colleague asked you to do, consult her and get her to tell you about signal analysis.
Bob Schor
07-05-2016 12:20 PM - edited 07-05-2016 12:20 PM
There definately seems to be a misunderstanding of what the inputs are and what they are doing.
For the moving RMS, you want a moving window of points that an RMS is computed for. What you have currently is creating a window size of the entire waveform. So in the end you just have a cumulative RMS for the waveform. That is not what we are after. For your waveform, the default window size of 100 points seems to work well. So let's just use that. Then you should have something like this.
07-05-2016 12:59 PM
Is the phase and frequency of the high frequency signal invariant across the squares or is it variable for each new square pulse? (i.e. is it derived from a continuous source that is modulated with the square pulse?).
Is the high frequency sinusooidal? Of course the square pulses will have harmonics, but the fundamental frequency should be dominant.
Another problem is that you have fractional cycles for the square wave (4.5 cycles over the sampling inteval, so you should use some windowing or select/trim the data better. Currently, the frequency falls right between two frequency bins in the transform and you get significant leakage.