LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple local max and local min of a signal (Time Period Method)

Hello everyone,

 

I have a chopper modulated signal and i want to extract multiple local maximas and minimas for which I have programmed a VI. The extraction is done by using time period starting from T/4, 3T/4 and so on (image attached). At lower frequencies the signal tends to be flat when it is off and on, I want to take all the points from flat behaviour. At higher frequencies, the the response is not flat for long so i just want to take the points from it.

 

I have tried to extract the points from flat section of the signal but my VI is only applicable for a single frequency. The increasing frequency yields changes the flatness of the signal and i am struggling to make a VI which works for all signal frequencies.

0 Kudos
Message 1 of 4
(1,509 Views)

Hi Yum,

 


@Pukhtun_Yum wrote:

 my VI is only applicable for a single frequency.


Because of those numeric constants inside the FOR loop to define distance between peaks and their duration.

When you need to adapt to different frequencies you cannot use constants here!

 

What's the point of that case structure?

When the first sample is TRUE then you search for a TRUE sample, and when the first sample is FALSE you search for a FALSE sample??? The result of those search operations is known at edit time!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(1,487 Views)

Yeah this is what i am struggling with, I want to program it in such a way that it works for all frequencies.

 

The case structure is used so that I could get the corresponding signal when chopper frequency is rising.

0 Kudos
Message 3 of 4
(1,475 Views)

Hi Yum,

 


@Pukhtun_Yum wrote:

The case structure is used so that I could get the corresponding signal when chopper frequency is rising.


You already (try to) determine the chopper frequency so you can adjust those numeric constant values depending on this frequency…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(1,473 Views)