LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -20023 occurred at Filter

While filtering my half wave rectifier I got the above error,followed by Analysis:  The following conditions must be met:  0 < f_low <= f_high <= fs/2.

I've tried tinkering with samples/second of my sine wave but I still dont know how the nyquist criterion is not satisfied.

0 Kudos
Message 1 of 8
(4,009 Views)

 0 < f_low <= f_high <= fs/2

 

f_low = 10.  f_high is not used. fs = ? In your case the filter thinks fs = 1.  If no other information is provided, the filter defaults to one sample per second.  When you converted the Dynamic Data Type (which probably contains the timing information from the Simulate Signal VI) to an array, the timing information is discarded. When you convert back to DDT at the input to the filter VI, no timing information is restored.

 

The Express VIs and the DDT signals hide much important information and make it difficult or impossible to get at it. That is why many experienced LV programmers do not use them.

 

One thing you could try is to convert the DDT to a waveform data type.  That should preserve the timing information. Then use the Get Waveform Components and Build Waveform primitives to extract the array for clipping and building a new waveform for the processing.

 

Also, the for loop does not do anything because you are only using the last value of the output.  Either remove it or use arrays of the outputs.  In this simulation all the outputs are identical, but I suspect you are planning to use real data later.

 

The attached modification of your VI shows how to do some of these things.

 

Lynn

0 Kudos
Message 2 of 8
(3,995 Views)

Thanks alot,the only problem that I still have is how to calculate the fs,I basically want to stop any frequency above 1500Hz

0 Kudos
Message 3 of 8
(3,983 Views)

You specify fs when you configure the Simulate Signal VI.  Since it is not available as an input or output on the block diagram, you need to document it and enter it manually where needed for other VIs.

 

Just another demonstration of the inflexibility of the Express VIs.

 

Lynn

0 Kudos
Message 4 of 8
(3,972 Views)

Just one last question ,how can I actually make the LPF.I'd put my fs=3200Hz,which is greater than my highest frequency but still the Nyquist criterion wasnt getting satisfied,is there any other way of making it?

0 Kudos
Message 5 of 8
(3,960 Views)

Please post your latest VI.  I have no idea of what you have done.  Your original Simulate Signal seemed to have fs = 10000. Did you change that to 3200? To get things to work correctly fs needs to be the same everywhere the signal is used.

 

That is why I used the Waveform data type - it carries the timing information with it.

 

Lynn

0 Kudos
Message 6 of 8
(3,945 Views)

How do I make fs same after it becomes a half wave?

0 Kudos
Message 7 of 8
(3,936 Views)

The waveform wire running from the Get Waveform Component function to the Build Waveform function takes care of that. Since you removed the loop around the Simulate Signal VI you also need to remove the loop around the Clip VI and change the to DDT module to Single Waveform.

 

Lynn

0 Kudos
Message 8 of 8
(3,933 Views)