Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

Using 3 filters to cut off 60, 120, 180 Hz noise

Sachet,

 

Both subtraction of the mean and a high pass filter will remove any steady strain because that has approximately zero frequency after it settles.

 

I looked back through your posts and do not see any place where you described the expected signal. What is the freqeuncy range of the desired signal (from the strain gauge)? Does that range include zero?  If the zero frequency component is what you want to measure, then obviously it should not be removed.

 

Before we go any further in choosing a filter configuration or frequency response, we need to have a clear understanding of what we are filtering.

 

Lynn

0 Kudos
Message 11 of 20
(2,289 Views)

If you work with sine exitation, there is no need to filter the signal. Just use the tone detection vi , it will give you a narrow band answer to frequency (known, and should be used to narrow the search region)) , amplitude and phase. It's very robust ( one may say blind 😉 ) to other frequencies.

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 12 of 20
(2,284 Views)

Why do you make three threads concerning your line noise ???

 

What do you want to measure?   The voltage of a noisy (switched??) powersupply?  No need to filter the hum... it's part of the result 😉

 

A lot of noise is a strong indicator for a bad setup.   

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 13 of 20
(2,276 Views)

Hi Lynn,

 

Yes , thats what i thought too.  I think what we are measuring have a range that include zero. That's why the the mean is cancelling out the response of the strain gage. 

Is there any other way to correct the dc offset besides taking mean? i want the signal to be at zero when there is no response from the strain gage.

 

Thanks.

 

Sachet

0 Kudos
Message 14 of 20
(2,270 Views)

Hi,


Thanks for your suggestions. Can u suggest way to remove DC offset?

 

Thanks.

 

Sachet

0 Kudos
Message 15 of 20
(2,269 Views)

The question comes down to "How do you know what to subtract?" One way to do this is to record a data set with no load applied to the strain gauge. When the user presses a button on the front panel, the value over some period of time such as one second is averaged and saved in a shift register or configuration file as a baseline value. Then during strain operations that value is subtracted from every future reading. Then any constant strain will remain as part of the data. 

 

If the system has thermal drift or mechanical relaxation that you do not consider part of the signal to be measured, then it is more difficult.

 

We have spent several days chasing various problems and still may not be close to a solution. Please keep all the discussion in one thread, probably this one. And provide a detailed description of the signal you want to measure, what produces that signal, how the source is excited or driven, and what will be done with the signal after it is measured. Include information about the signal waveforms, amplitude, and frequency. Include information about noise and interfering signals. If possible post a file or VI with a real signal, noise, and interference.  When we have to guess about each detail and then learn that it is different from what we interpreted from your earlier posts, we get frustrated and it takes much longer for you to get help.

 

Lynn

0 Kudos
Message 16 of 20
(2,265 Views)

Hi Lynn,

 

Thanks for your help and suggestions. Actually now i want the labview to start  wrting data in excel file when i press the "Save button" and i want that data updating to take place just for 1 minute,

 

So what i did was i used timing structure with dt set at 100ms - 1s and time out at 6000ms- 60s .Since i wanted the operation to start once i press the Save button. So inside this Timing Structure i placed "Case Structure". 

 

But i get error stating data file is already opened .

 

Could you please let me know why is it giving me that error?

 

Thanks alot.

 

Sachet

 

Download All
0 Kudos
Message 17 of 20
(2,225 Views)

Sachet,

 

I do not think that is the way the timed loop works. First, timed loops generally should not be used for general purpose timing. Second, timed loops rarely make sense when writing to a file because the OS can occaisionally take very large amounts of time to write, such as when needing to allocate a new file segment. Also, the timeout is not the time when it will stop but the time it will wait to start. This is quoted from the Detailed Help for the Timed Loop:


Specifies the maximum amount of time a Timed Loop can wait to begin execution. The default is -1,which means that no timeout is specified for the next frame. The timeout value is relative to the start of the Timed Loop or the end of the previous iteration and is specified in units of the frame timing source.


 

 

With nothing wired to the stop terminal the loop will contiune to run forever. Again, from the help:


Unlike the While Loop, the Timed Loop does not require wiring to the stop terminal. If you do not wire anything to the stop terminal, the loop will run interminably.


 

 

When the Save 2 button is pressed the timed loop will write to the file the data which is shown in Filtered Signal 1. Then 100 ms later it will attempt to write the same data again. After another 100 ms it will repeat with the same data. It will contiue until you abort the program or a file error occurs. Why? Dataflow. The timed loop will not stop until its stop terminal is true. It will not get new input data until it stops and then starts again.  The case stucture will not complete its execution until the timed loop inside stops. The outer while loop will not start its next iteration until the case structure exits.

 

The best solution is to use a Producer /Consumer architecture which separates the data acquisition from the file writing so that timing of one is not forced to match the timing of the other. The Consumer can accumulate data in a buffer to handle those situations where the file write may sometimes be slow.

 

If your data rates are low, you might be able to get away with saving to file in the same loop as the acquisition. Remove the timed loop. Add an Elapsed TIme VI. Set it for one minute. Start it when Save 2 is pressed. Save on each iteration of the outer loop. When the time has elapsed, use a local variable to set Save 2 back to False.

 

- - - - -

"Press to stop taking mean further" does not stop taking the mean. It just changes the data you feed into the shift register from the current acquisition to the previous mean.  Try this test VI which duplicates the process but uses the iteration counter as an input so you can easily see what is happening.

 

Lynn

0 Kudos
Message 18 of 20
(2,218 Views)

Hi Lynn,

 

Thank you for the suggestions. But when i try from your way  in my vi there is some wiring error of data type in the wiring diagram. Could you please give a quick look on it ?

 

Also, regarding writing data to a file. I followed your directions but still there is error regarding buffer. Does that mean i have to use producer and consumer loop? Or is there any other way ?

Thanks .

 

Sachet

Download All
0 Kudos
Message 19 of 20
(2,195 Views)

Also, i fogot to mention that i changed the data acquisition rate to 50 samples per second. But still i get the buffer error.

 

Sachet

0 Kudos
Message 20 of 20
(2,193 Views)