views:

239

answers:

9

For example you measure the data coming from some device, it can be a mass of the object moving on the bridge. Because it is moving the mass will give data which will vibrate in some amplitude depending on the mass of the object. Bigger the mass - bigger the vibrations. Are there any methods for filtering such kind of noise from that data? May be using some formulas of vibrations? Have no idea what kind of formulas or algorithms (filters) can be used here. Please suggest anything. EDIT 2: Better picture, I just draw it for better understanding: alt text

Not very good picture. From that graph you can see that the frequency is the same every time, but the amplitude chanbges periodically. Something like that I have when there are no objects on the moving road. (conveyer belt). vibrating near zero value. When the object moves, I there are the same waves with changing amplitude. The graph can tell that there may be some force applying to the system and which produces forced occilations. So I am interested in removing such kind of noise. I do not know what force causes such occilations. Soon I hope I will get some data on the non moving road with and without object on it for comparison with moving road case.

A: 

In order to smooth the signal, I'd average the previous 2 * n samples where n is the maximum expected wavelength of the vibrations.

This should cause most of the noise to be eliminated.

recursive
Averaging produces a very poor low pass filter - you can do a lot better with fewer terms and a properly designed filter.
Paul R
A: 

If you have some idea of the range of frequencies, you could do a simple average as long as the measurement period were sufficiently long to give you the level of accuracy you want to achieve. The more wavelengths worth of data you average against, the smaller the ratio of contributed error from a partial wavelength.

I'd suggest first simulating/modeling this in software like Matlab.

Data you'll need to consider:

The expected range of vibration frequencies The measurement accuracy you want to achieve The expected range of mass you'll want to measure The function of mass to vibration amplitude

glenviewjeff
I had an idea of modeling the vibration during all this process and use it to cancel the vibrations, but, this seem to fail, because if even I could make a correct model of vibrations, I have to synchronize them so that I can cancel it.. I do not know the way of canceling the vibrations actually..
maximus
+1  A: 

Have you tried filters with lowpass characteristics? There are different approaches for smoothing data (i.e. Savitzky-Golay, Gauss, moving average) but often, a simple N-point median filter is already sufficient.

It really depends on what you're after.

Josh
It is not sufficient. There is noise + sinusoidal noise (vibrations)
maximus
A: 

You should be able to apply the same principles as noise-cancelling microphones: put two sensors out, then subtract the secondary sensor's (farther away from the good signal source) signal from the primary sensor's (closer to the good signal source) signal.

Obviously, this works best if the "noise" will reach both sensors fairly equally while the "signal" reaches the primary sensor much more strongly.

For things like sound, this is pretty easy to do in the sensor itself, which makes your software a lot easier and more performant. Depending on what you're measuring, this might be easier to do with multiple sets of hardware and doing the cancellation in software.

Hank Gay
Interesting idea, but how is it possible in case of scales? Second scale? I can't understand how this method will work in my case.
maximus
@maximus Honestly, I just misread your question: I saw "vibration", which is practically synonymous with sound, and didn't make the connection that if you were measuring mass, you were probably using scales. My intuition is that this could be made to work even for scales, but a second scale of this size might be impractical. As other answers have pointed out, if the "noise" is predictable, e.g., it's a sine that distorts your measurements by 10%, you can just filter it in software.
Hank Gay
+1  A: 

Take a look at this book:

The Scientist and Engineer's Guide to Digital Signal Processing

You can download it for free. In particular, check chapters 14 and 15.

Alejandro
Thank you! I check it!
maximus
A: 

If you can characterize the frequency spectra of the unwanted vibration noise, you might be able to synthesize a set of (near) minimum phase notch or band reject filter(s) to allow you to acquire your desired signal at your desired S/N ratio with minimized latency or data set size.

hotpaw2
Can you give more infromation about that? The frequency of vibration changes depending on the weight.
maximus
If the vibration frequency spectra is reliably correlated with the signal (weight), you might even be able to use some spectral analysis of this "noise" to help improve the reliability of your measurements.
hotpaw2
A: 

Filtering noisy digital signals is straight forward, as previous posters have noted. There are lots of references. You have not however stated what your objectives are clearly, so we cannot point you into a good direction. Are you looking for a single measurement of a single object on a bridge? [Then see other answers].

Are you monitoring traffic on this bridge and weighing each entity as it passes by? Then you need to determine when entities are on the sensor and when they are not. Typically, as long as the sensor's noise floor is significantly lower than the signal you're measuring this can be accomplished by simple thresholding.

Are you trying to measure the vibrations of the bridge caused by other vehicles? In which case you need either a more expensive sensor if you're having problems doing this, or a clearer measuring objective.

John
I want to be able to get the weight of objects while they are moving.
maximus
So, the sensor is on a bridge? On a road? On a conveyor belt? What kind of sensor are you using? A scale? What kind of precision do you need? Are you trying to distinguish between different vehicle types (car/SUV/truck) or objects (apple/banana)? That will drive the amount of filtering you need. How much noise is in your sensor? Does the sensor data sheet characterize the noise/error profile? Does it scale with the weight of the object, or is it an absolute error? etc. etc. What kind of accuracy do you require out of your sensor? How does that compare to the noise? etc. etc.
John
All John´s questions are relevant ... if the OP cares to answer them and provide zero-charge and sample charge data I am sure we can help on this one
belisarius
@John: Yes it is a scale under conveyer belt. I need accuracy about +-250gramm if the load is 50 kg. Noise without filtering when no objects are above - +-1kg. If 50 kg loaded then +-10 kg. The noise is unusual. I made Kalman filtering but even after that I see sinusoidal noise.
maximus
+1  A: 

If the frequency changes with mass and you're trying to measure mass, why not measure the frequency of the oscillations and use that as your primary measure?

Otherwise you need a notch filter which is tunable - figure out the frequency of the "noise" and tune the notch filter to that.

Another book to try is Lyons Understanding Digital Signal Processing

Martin Thompson
It was first attempt to measure the mass. But then I realized that the noise is actually occilations changing in amplitude as I suppose, when changing the mass. So now I am thinking of measuring or better to say modeling the occilations.. The frequency is not with fixed amplitude even when there are no objects on it.
maximus
+1  A: 

What you have in your last plot is basically an amplitude modulated oscillation coming from a function like:

 f[x] := 10 * (4 + Sin[x]) * Sin[80 * x]

The constants have been chosen to match your plot (using just a rule of thumb)

The Plot of this function is

alt text

That isn't "noise" (although may be some noise is there too), but can be filtered easily.

Let's see your data for the static and moving payloads ....

Edit

Based on your response to several comments, and based in my previous experience with weighting devices:

  1. You are interfacing the physical world, not just getting input from a mouse and keyboard. It is very important for you understand the device, how it works and how it is designed.
  2. You need a calibration procedure. You have to use several master weights to be sure that the device is working properly and linearly in the whole scale, and that the static case is measured much better than your dynamic needs.
  3. You'll not be able to predict if you can measure with several loads in the conveyor until you do some experiments and look very carefully at the resulting plots
  4. You need to be sure that a load placed anywhere in the conveyor shows the same reading. Or at least you should be able to correlate reading and position.

As I said before, you need a lot of info, and it seems that is not available. I always worked as a team with the engineers designing the device.

Don't hesitate to add more info ...

belisarius
Hello! Sorry for a long absence. I've got the data. So, the mean value of the data, when the conveyer is not moving is: 49969,80834where the true value is 50000gram.
maximus
The way is similar to that plot above, but of course not so ideal and as I realized, it can change its frequency. So if only one object is on the road, then the average of the data when the object is fully loaded (so that the scale is measuring the whole object) is: 49760,93653But there can be other objects following it placed so that there is some minimum distance between them, it means we can use only limited amount of data. Actually, anyway, I want to find out how to cancel that noise.
maximus
So, if we take mean of the data, at the period when another object is not on the scale, it will be: 48616,79337This is bad actually. As I know that the "noise" has some vibrations like shown in the plot, I want to know how is it possible to filter it and get rid of vibrations as much as possible. Yes, I agree, it is not the noise, but anyway it makes it hard to calculate an accurate weight. Please, if you want more details about the data, ask me, and I will write it here.
maximus
@Maximus Glad to know you have the data. I've dealt in the past with these problems several times. I suggest 1) Post the characteristics of the physical system (length and material of the conveyor, where the weighting device is located and its type) 2) The calibration procedure you are using 3) a few data series (plots and data) with only one load and with several loads entering sequentially in the conveyor. I am sure we can help.
belisarius
@belisarius: 1. Sorry, but I do not know much about the system parameters. 2. what do you mean by calibration? I just get data and have some restrictions on respond, I mean it must be quick and accurate. 3. The data in the case of several load going one after another can not be retrieved for now... Can you tell me in generall form about how you solved this problem please? How the problem was solved in your case? May be I can try the same way, and it may help..
maximus
@maximus see edit
belisarius