03-20-2022 11:37 PM
I am using Repeated VIs but with different inputs but for some reason when i run the code the output that i get will all end up being the same despite changing the parameters. Does anyone know how to wire peak detector .VI efficiently ? I am new to Labview so apologies if im slow
03-21-2022 04:09 AM
You're only changing the approximate frequency.
The results would depend completely on the input data, that you're not giving us.
Extract Single Tone Information.vi is not typically a peak finding VI (although it finds the peak frequency)...
@MBSHIRAZIZ wrote:
Does anyone know how to wire peak detector .VI efficiently ?
You wired it correctly.
The correct input values depend on what you want as a result, and the input data.
So, we need to know at least what you expect and the input data...
03-21-2022 05:01 AM
The problem is the result that i am looking for is circumstantial in a way that the peak should only appear should there be a problem/fault. Thus i am programming to look for a peak that does not exist currently unless there is a fault in the machine. How do i wire it such that i am able to be confident that when the time does arise the correct peak will be identified. The input that i have wired in to the estimated frequency is roughly where i expect it the peak to appear should there be a fault. However without an actual fault, i can't tell if i wired it correctly or not. Do you have any suggestions? Also thank you for your initial reply.
03-21-2022 08:37 AM
@MBSHIRAZIZ wrote:
Do you have any suggestions? Also thank you for your initial reply.
If this is a continuous check, you need to use a PtByPt VI.
If you don't it will be a measurement on a single peace of data, and you'll run into all sorts of problems if the peak is 'between' sampled arrays. You're likely to end up with something that works half of the time...
If I was looking for a peak at a certain frequency (range), I'd probably use a PtByPt FFT or PtByPt STFT. The problem with all those fancy waveform measurement VIs is that it's hard to grasp what they are doing. A PtByPt FFT, with a min & max on the output array (subset) would be pretty clear. A PtByPt STFT might be more efficient then the PtByPt FFT.
Both PtByPt STFT and PtByPt FFT visualize very nicely. This makes them (to me) more intuitive to use compared to some black box VI.
With peak detection algorithms, the definition of the peak is very important. I think you want to check if there is a signal (peak) on a certain frequency, but without pass\fail examples, it's hard to tell.
03-21-2022 10:45 PM
I see thanks for the help. I have another problem in the meantime , why is it that the values of "Central frequency" and "Central Frequency 2" is different by 150 and that happens to be the difference for each of the subsequent ones (MAZ1 and MAZ 1.1 and so on) when in theory the values should only be different by only a small amount right?
03-22-2022 06:27 AM
@MBSHIRAZIZ wrote:
I see thanks for the help. I have another problem in the meantime , why is it that the values of "Central frequency" and "Central Frequency 2" is different by 150 and that happens to be the difference for each of the subsequent ones (MAZ1 and MAZ 1.1 and so on) when in theory the values should only be different by only a small amount right?
I have no idea. I assume it depends entirely on the input signal.
I have no idea what's going on in that measurement VI...
03-22-2022 09:56 AM
If you're asking for a way to test your implementation, you can simulate a signal with the required frequency spectrum and see if your implementation can detect it.
03-22-2022 09:56 PM
I see okay thank you.