How to get discrete values from a nosiy data set that have a trend? I have a sensor that produces values over time (appr. 50/sec). I visualized these values (X axis is the time), this can be seen on the picture, measurement A and B - these are two independent measurements.

I'm a total beginner, I don't even know how to phrase the question. I just need to get... I don't know... "discrete" (?) values from this noisy data set.

I need something like this (this is happening say under 10 seconds):

Up... Up... Up... Up - I'm only interested in the "ups".

I was thinking of summarizing the values and when it's positive that's an up and when it's negative that's a down. But I don't know where to start and until when do I have to summarize the values...

or if is there (I'm sure there is) any other methodology that is used for this kind of problems.



UPDATE:

After talking with Dan Boschen and applying what he recommended (moving average), I got lot smoother result:



Still got difficulties to ignore the false movements, but this is a one-step-forward. I'll continue this topic in a different question.
From the comments you are most interested in counting the number of clear up areas over a certain duration of time, and you point out that you will have occasional erroneous negative spikes even during the up intervals.

You obviously want to filter but you also suggested little knowledge in this space so I will keep it very simple in what should provide a reasonable result.

My suggestion is to do a moving average over the minimum duration you ever expect for an up interval. Pass your waveform through the moving average, and then on the filtered output set a threshold detector with hysteresis (two thresholds) such that you increment your Up counter when passing the upper threshold and then allow your counter to trigger again once your lower threshold is set. Adjust your threshold levels for best results based on your actual signal cases.