Reply by illywhacker November 18, 20132013-11-18
On Wednesday, September 11, 2013 2:16:54 PM UTC+2, LVitya wrote:
> I have a signal from sensor. It look like upper part of this pictures > > http://postimg.org/image/l51neenup/ > > http://postimg.org/image/ddkxfujpd/ > > > > I need to recognize two oposite forms of signal: 1) when it goes up then > > down; 2) when it goes down then up. For example > > http://postimg.org/image/vxuhwk611/ > > On this picture 1st forms are marked, 2nd is unmarked. > > > > I tried to use cross-correlation (xcorr in Matlab). The 2nd (reference) > > signal for correlation looks like > > http://postimg.org/image/8pq93yzyr/ > > It has 2nd form. > > The results are presented on the lower part of pictures. It is useful in > > most cases. But sometimes it is wrong. For example > > http://postimg.org/image/f1kg2px7r/ > > On this waveform marked place have 2nd form, same as reference. So positive > > value of correlation must be higner than negative. But it is not. > > Does anyone have any suggestion how to make algoritm that always work > > correct? It can be something different than correlation or maybe improvment > > of this.
What is the variability in your signal? The general approach to such problems (indeed any problem) is Bayesian: P(signal present | data, K) \propto P(data | signal present) P(signal present | K) , where K is the knowledge you have about the situation. You build probabilistic models summarizing this knowledge and then you calculate/compute. illywhacker;
Reply by LVitya September 18, 20132013-09-18
Ok, Clay. I run it thru slope filter, which have coefficients from formula
(8), N = 50.
http://postimg.org/image/feycm1u8p/
But I can not understand how it can help.
	 

_____________________________		
Posted through www.DSPRelated.com
Reply by September 13, 20132013-09-13
On Friday, September 13, 2013 2:56:35 AM UTC-4, LVitya wrote:
> >> _____________________________ > > >> > > >> Posted through www.DSPRelated.com > > > > > > > > >Pick the length of the filter to be longer than the narrow spikes you are > > trying to ignore. > > > > > >Clay > > > > > > > What narrow spikes you are saying about? Could you mark them on my images? > > > > > > _____________________________ > > Posted through www.DSPRelated.com
Narrow is a relative term, but I'm referring to the spikes that are around 20 to 30 units wide on your graph. Let the slope filter span for example 50 units worth of data. By unit I'm referring to the scale of your horizontal axis. I'm assuming what you want is the average slope of the portions in between the spikes. Clay
Reply by LVitya September 13, 20132013-09-13
>> _____________________________ >> >> Posted through www.DSPRelated.com > > >Pick the length of the filter to be longer than the narrow spikes you are
trying to ignore.
> >Clay >
What narrow spikes you are saying about? Could you mark them on my images? _____________________________ Posted through www.DSPRelated.com
Reply by September 12, 20132013-09-12
On Thursday, September 12, 2013 11:06:37 AM UTC-4, LVitya wrote:
> >Run your signal through a slope filter > > > > > >See: > > > > > >http://www.claysturner.com/dsp/FIR_Regression.pdf > > > > > >Eqn 8 gives you the coefs for your filter. > > > > > >IHTH, > > > > > >Clay > > > > > > > > > > I will try to do it in Matlab. But first I need to understand how to do it. > > I'm not familiar with slope filtering. > > > > _____________________________ > > Posted through www.DSPRelated.com
Pick the length of the filter to be longer than the narrow spikes you are trying to ignore. Clay
Reply by LVitya September 12, 20132013-09-12
>Run your signal through a slope filter > >See: > >http://www.claysturner.com/dsp/FIR_Regression.pdf > >Eqn 8 gives you the coefs for your filter. > >IHTH, > >Clay > >
I will try to do it in Matlab. But first I need to understand how to do it. I'm not familiar with slope filtering. _____________________________ Posted through www.DSPRelated.com
Reply by September 12, 20132013-09-12
On Wednesday, September 11, 2013 11:21:17 AM UTC-4, LVitya wrote:
> >LVitya wrote: > > >> I have a signal from sensor. It look like upper part of this pictures > > >> [snip] > > > > > >I think you should give a hint as to signal source. > > >Your plot reminds me somewhat of signal inside servo amp of a > > >malfunctioning dual beam UV or Visible spectrometer from 50 years > > >ago. > > > > > > > The source of the signal is infrared sensor. First it comes into analog > > filter, then gains in PGA and digitizes by ADC. > > > > _____________________________ > > Posted through www.DSPRelated.com
Run your signal through a slope filter See: http://www.claysturner.com/dsp/FIR_Regression.pdf Eqn 8 gives you the coefs for your filter. IHTH, Clay
Reply by LVitya September 12, 20132013-09-12
>> The source of the signal is infrared sensor. First it comes into analog >> filter, then gains in PGA and digitizes by ADC. >> > >But what is sensor sensing? >To paraphrase an old saying "the leaves on the trees are >obscuring the forest". >
Sensor senses direction of human movement. _____________________________ Posted through www.DSPRelated.com
Reply by Richard Owlett September 12, 20132013-09-12
LVitya wrote:
>> LVitya wrote: >>> I have a signal from sensor. It look like upper part of this pictures >>> [snip] >> >> I think you should give a hint as to signal source. >> Your plot reminds me somewhat of signal inside servo amp of a >> malfunctioning dual beam UV or Visible spectrometer from 50 years >> ago. >> > > The source of the signal is infrared sensor. First it comes into analog > filter, then gains in PGA and digitizes by ADC. >
But what is sensor sensing? To paraphrase an old saying "the leaves on the trees are obscuring the forest".
Reply by September 11, 20132013-09-11
On Thursday, September 12, 2013 12:16:54 AM UTC+12, LVitya wrote:
> I have a signal from sensor. It look like upper part of this pictures > > http://postimg.org/image/l51neenup/ > > http://postimg.org/image/ddkxfujpd/ > > > > I need to recognize two oposite forms of signal: 1) when it goes up then > > down; 2) when it goes down then up. For example > > http://postimg.org/image/vxuhwk611/ > > On this picture 1st forms are marked, 2nd is unmarked. > > > > I tried to use cross-correlation (xcorr in Matlab). The 2nd (reference) > > signal for correlation looks like > > http://postimg.org/image/8pq93yzyr/ > > It has 2nd form. > > The results are presented on the lower part of pictures. It is useful in > > most cases. But sometimes it is wrong. For example > > http://postimg.org/image/f1kg2px7r/ > > On this waveform marked place have 2nd form, same as reference. So positive > > value of correlation must be higner than negative. But it is not. > > > > Does anyone have any suggestion how to make algoritm that always work > > correct? It can be something different than correlation or maybe improvment > > of this. > > > > > > > > _____________________________ > > Posted through www.DSPRelated.com
If I see a signal like that I normally think something is faulty!