12
$\begingroup$

I'm working on a project where we measure the solderability of components. The measured signal is noisy. We need to process the signal in real time so that we are able to recognize the change that begins at the time of 5000 milliseconds.

My system takes sample of real value every 10 miliseconds - but it can be adjusted to slower sampling.

  1. How can I detect this drop at 5000 milliseconds?
  2. What do you think about signal/noise ratio? Should we focus and try to get better signal?
  3. There is a problem that every measure has different results, and sometimes the drop is even smaller than this example.

Sample Signal Sample signal 2 Sample signal 3

Link to data files (they are not same with ones used for plots, but they show latest system status)

  1. https://docs.google.com/open?id=0B3wRYK5WB4afV0NEMlZNRHJzVkk
  2. https://docs.google.com/open?id=0B3wRYK5WB4afZ3lIVzhubl9iV0E
  3. https://docs.google.com/open?id=0B3wRYK5WB4afUktnMmxfNHJsQmc
  4. https://docs.google.com/open?id=0B3wRYK5WB4afRmxVYjItQ09PbE0
  5. https://docs.google.com/open?id=0B3wRYK5WB4afU3RhYUxBQzNzVDQ
$\endgroup$
  • 5
    $\begingroup$ You appear to have a relatively small signal-to-noise ratio. As with most detection problems, you'll want to consider the balance between the probability of correctly detecting the feature you indicated and the probability of falsely declaring that one is there. Which is more important for your application? Do you have any detection latency requirements? $\endgroup$ – Jason R Sep 19 '12 at 15:00
  • 2
    $\begingroup$ The 'noise' looks more like an interference at a particular frequency. If this is the case (a spectrum plot will help), then appropriate filtering will do most of the job. $\endgroup$ – Juancho Sep 19 '12 at 15:51
  • $\begingroup$ Actually the detection of this feature is very important. But I can live with some latency, but I need to adjust final stop position, becasue I don't know exactly where the part touches solder, and I need to control immersion depth. So for example if I know immersion should be 0,5 mm, I calculate theoretical position according to ideal size of solder globule, but then I need to do the correction for actual size of a globule which I detect by touch - it appears as a change in force. $\endgroup$ – Petr Sep 19 '12 at 15:57
  • $\begingroup$ The whole measuremnt tool is located on springs, so it can move freely, but it also produces the noise and also we have fixed springs for the whole range of measurements, and of course these problems appears when using highest sensitivity, where measured forces are terribly small. $\endgroup$ – Petr Sep 19 '12 at 16:02
  • $\begingroup$ Juancho - maybe this could help, but how can I solve it for different weghts of parts, resulting in different frequencies? Also this component changes when part is immersed into solder, because wetting process is reducing the noise level, but this happens only for bigger parts, here it is almost the same when in or out. $\endgroup$ – Petr Sep 19 '12 at 16:04
9
$\begingroup$

The classic reference for this problem is Detection of Abrupt Changes - Theory and Application by Basseville and Nikiforov. The whole book is available as a PDF download.

My recommendation is that you read Chapter 2.2 on the CUSUM (cumulative sum) algorithm.

$\endgroup$
4
$\begingroup$

I usually frame this problem as one of slope detection. If you compute a linear regression over a moving window, the illustrated drop will be visible as a significant change in slope sign and/or magnitude. This approach offers are a number of factors that will require "tuning": for example, the sampling frequency, the window size, etc, will affect the robustness (noise resistance) of the slope sign detector. This is where some of the above comments may be applied. Any filtering or noise suppression that can be applied prior to line fitting will improve your results.

$\endgroup$
2
$\begingroup$

I've done this sort of thing by computing a T-statistic of the mean of the left part of the data vs. the right part of the data. This assumes you know where the transition point is which of course you don't.

So, what you do is try several hundred partition points along the time axis and find the one with the most significant T-statistic.

u_left, u_right : mean of left and right portion
s_left, s_right : SD of left and right portion
n_left, n_right : number of samples on left and right (subtract one from each for the one degree of freedom)

se = sqrt(s_left^2 / n_left^2 + s_right^2 / n_right^2)
T = (u_left - u_right) / se

You can do this as something like a binary search. Try 10 data points, find the largest two, then try 10 points between those etc. This way you could get a pretty precise transition point. I'm not claiming accuracy. :-)

Let us know how it goes!

P.S. You can compute mean and sd as running sums which reduces the complexity of computing this partition function for every single possibilty this from N^2 to N. Doing this you can probably afford to just compute the T statistic at every possible partition point.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.