Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
edited tags; edited title
Link
Royi
  • 20.5k
  • 4
  • 199
  • 240

How canCan I detect peaksDetect Peaks and regionsRegions of highest varianceHighest Variance in a 1D signalSignal?

Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 854 characters in body
Source Link
hadsed
  • 161
  • 4

I'm not a signal processing person at all so hopefully I'm not asking an obvious question (if I am, I'd appreciate any resources that would help give more context).

I have a 1D vector where the values give temperature at some position. I want to find out where the regions of greatest change are and then mark off those regions for future sampling.

My current method is to take the gradient of the signal and either convolve that gradient with some window or average past signals (in time) with this current one. Both approaches are in an effort to reduce noise and/or overfitting to one particular signal in time. Once I get this smoothed signal, I fit a Gaussian function to it and mark off the regions that are within 4 standard deviations of the mean. (If there are multiple peaks, the hope is that the smoothing or convolution will make it smoothed enough so that the Gaussian will capture both peaks, but this fails sometimes which is why I'm looking for something more robust. An extension to this would be to try and fit multiple Gaussians as well, if it is a sensible idea in general.)

Here's a quick plot I was using to compare the different smoothing windows (the original signal is real data that I'm working with, which usually only has one large peak but may have more).

Plot of original signal and convolution with multiple different windows.

(Also, the convolution seems to center the peaks away from where they actually are. If there are no better solutions, how can I stop that from happening? EDIT: Peter K.'s comment helped me fix this silly error.)

But this is a pretty noob approach that I just came up with. Is there a better way? The places I want to sample around are obviously regions around local maxima, but defining what local maxima means seems to be tricky, and it doesn't always give great results. In general, though, I will want to sample continuously around the regions of peaks, i.e. if I have two peaks, one at 5m and one at 10m, I want to sample between, say, 2m and 13m, not chopping it in the middle. It may be worth noting that these signals are a snapshot in time, so perhaps I can take advantage of past signals as well somehow?

EDIT: As per @Phonon's suggestion, I thought I'd add some more detail about the problem. The signal is actually coming from a sensor that samples along a water column in a lake (the x-axis of the graph is depth, up to 40 meters). Seasonal changes and other variables (like wind speed, humidity, etc.) will create changes in this water column. What I'm trying to do is to figure out how to catch the most pertinent information using the least amount of energy (the sensor has to move up and down). So hence the approach to find the maximum gradient and threshold around it for sampling. However, I wonder if there is a better way. Another one I can think of is to look at how much the signal varies at various depths over time, and sample those regions. I was mainly wondering if there existed some standard methods to do this sort of thing already.

I'm not a signal processing person at all so hopefully I'm not asking an obvious question (if I am, I'd appreciate any resources that would help give more context).

I have a 1D vector where the values give temperature at some position. I want to find out where the regions of greatest change are and then mark off those regions for future sampling.

My current method is to take the gradient of the signal and either convolve that gradient with some window or average past signals (in time) with this current one. Both approaches are in an effort to reduce noise and/or overfitting to one particular signal in time. Once I get this smoothed signal, I fit a Gaussian function to it and mark off the regions that are within 4 standard deviations of the mean. (If there are multiple peaks, the hope is that the smoothing or convolution will make it smoothed enough so that the Gaussian will capture both peaks, but this fails sometimes which is why I'm looking for something more robust. An extension to this would be to try and fit multiple Gaussians as well, if it is a sensible idea in general.)

Here's a quick plot I was using to compare the different smoothing windows (the original signal is real data that I'm working with, which usually only has one large peak but may have more).

Plot of original signal and convolution with multiple different windows.

(Also, the convolution seems to center the peaks away from where they actually are. If there are no better solutions, how can I stop that from happening? EDIT: Peter K.'s comment helped me fix this silly error.)

But this is a pretty noob approach that I just came up with. Is there a better way? The places I want to sample around are obviously regions around local maxima, but defining what local maxima means seems to be tricky, and it doesn't always give great results. In general, though, I will want to sample continuously around the regions of peaks, i.e. if I have two peaks, one at 5m and one at 10m, I want to sample between, say, 2m and 13m, not chopping it in the middle. It may be worth noting that these signals are a snapshot in time, so perhaps I can take advantage of past signals as well somehow?

I'm not a signal processing person at all so hopefully I'm not asking an obvious question (if I am, I'd appreciate any resources that would help give more context).

I have a 1D vector where the values give temperature at some position. I want to find out where the regions of greatest change are and then mark off those regions for future sampling.

My current method is to take the gradient of the signal and either convolve that gradient with some window or average past signals (in time) with this current one. Both approaches are in an effort to reduce noise and/or overfitting to one particular signal in time. Once I get this smoothed signal, I fit a Gaussian function to it and mark off the regions that are within 4 standard deviations of the mean. (If there are multiple peaks, the hope is that the smoothing or convolution will make it smoothed enough so that the Gaussian will capture both peaks, but this fails sometimes which is why I'm looking for something more robust. An extension to this would be to try and fit multiple Gaussians as well, if it is a sensible idea in general.)

Here's a quick plot I was using to compare the different smoothing windows (the original signal is real data that I'm working with, which usually only has one large peak but may have more).

Plot of original signal and convolution with multiple different windows.

(Also, the convolution seems to center the peaks away from where they actually are. If there are no better solutions, how can I stop that from happening? EDIT: Peter K.'s comment helped me fix this silly error.)

But this is a pretty noob approach that I just came up with. Is there a better way? The places I want to sample around are obviously regions around local maxima, but defining what local maxima means seems to be tricky, and it doesn't always give great results. In general, though, I will want to sample continuously around the regions of peaks, i.e. if I have two peaks, one at 5m and one at 10m, I want to sample between, say, 2m and 13m, not chopping it in the middle. It may be worth noting that these signals are a snapshot in time, so perhaps I can take advantage of past signals as well somehow?

EDIT: As per @Phonon's suggestion, I thought I'd add some more detail about the problem. The signal is actually coming from a sensor that samples along a water column in a lake (the x-axis of the graph is depth, up to 40 meters). Seasonal changes and other variables (like wind speed, humidity, etc.) will create changes in this water column. What I'm trying to do is to figure out how to catch the most pertinent information using the least amount of energy (the sensor has to move up and down). So hence the approach to find the maximum gradient and threshold around it for sampling. However, I wonder if there is a better way. Another one I can think of is to look at how much the signal varies at various depths over time, and sample those regions. I was mainly wondering if there existed some standard methods to do this sort of thing already.

Tweeted twitter.com/#!/StackSignals/status/375729172444090368
added 114 characters in body
Source Link
hadsed
  • 161
  • 4

I'm not a signal processing person at all so hopefully I'm not asking an obvious question (if I am, I'd appreciate any resources that would help give more context).

I have a 1D vector where the values give temperature at some position. I want to find out where the regions of greatest change are and then mark off those regions for future sampling.

My current method is to take the gradient of the signal and either convolve that gradient with some window or average past signals (in time) with this current one. Both approaches are in an effort to reduce noise and/or overfitting to one particular signal in time. Once I get this smoothed signal, I fit a Gaussian function to it and mark off the regions that are within 4 standard deviations of the mean. (If there are multiple peaks, the hope is that the smoothing or convolution will make it smoothed enough so that the Gaussian will capture both peaks, but this fails sometimes which is why I'm looking for something more robust. An extension to this would be to try and fit multiple Gaussians as well, if it is a sensible idea in general.)

Here's a quick plot I was using to compare the different smoothing windows (the original signal is real data that I'm working with, which usually only has one large peak but may have more).

Plot of original signal and convolution with multiple different windows.

(Also, the convolution seems to center the peaks away from where they actually are. If there are no better solutions, how can I stop that from happening? EDIT: Peter K.'s comment helped me fix this silly error.)

But this is a pretty noob approach that I just came up with. Is there a better way? The places I want to sample around are obviously regions around local maxima, but defining what local maxima means seems to be tricky, and it doesn't always give great results. In general, though, I will want to sample continuously around the regions of peaks, i.e. if I have two peaks, one at 5m and one at 10m, I want to sample between, say, 2m and 13m, not chopping it in the middle. It may be worth noting that these signals are a snapshot in time, so perhaps I can take advantage of past signals as well somehow?

I'm not a signal processing person at all so hopefully I'm not asking an obvious question (if I am, I'd appreciate any resources that would help give more context).

I have a 1D vector where the values give temperature at some position. I want to find out where the regions of greatest change are and then mark off those regions for future sampling.

My current method is to take the gradient of the signal and either convolve that gradient with some window or average past signals (in time) with this current one. Both approaches are in an effort to reduce noise and/or overfitting to one particular signal in time. Once I get this smoothed signal, I fit a Gaussian function to it and mark off the regions that are within 4 standard deviations of the mean. (If there are multiple peaks, the hope is that the smoothing or convolution will make it smoothed enough so that the Gaussian will capture both peaks, but this fails sometimes which is why I'm looking for something more robust. An extension to this would be to try and fit multiple Gaussians as well, if it is a sensible idea in general.)

Here's a quick plot I was using to compare the different smoothing windows.

Plot of original signal and convolution with multiple different windows.

(Also, the convolution seems to center the peaks away from where they actually are. If there are no better solutions, how can I stop that from happening? EDIT: Peter K.'s comment helped me fix this silly error.)

But this is a pretty noob approach that I just came up with. Is there a better way? The places I want to sample around are obviously regions around local maxima, but defining what local maxima means seems to be tricky, and it doesn't always give great results. In general, though, I will want to sample continuously around the regions of peaks, i.e. if I have two peaks, one at 5m and one at 10m, I want to sample between, say, 2m and 13m, not chopping it in the middle. It may be worth noting that these signals are a snapshot in time, so perhaps I can take advantage of past signals as well somehow?

I'm not a signal processing person at all so hopefully I'm not asking an obvious question (if I am, I'd appreciate any resources that would help give more context).

I have a 1D vector where the values give temperature at some position. I want to find out where the regions of greatest change are and then mark off those regions for future sampling.

My current method is to take the gradient of the signal and either convolve that gradient with some window or average past signals (in time) with this current one. Both approaches are in an effort to reduce noise and/or overfitting to one particular signal in time. Once I get this smoothed signal, I fit a Gaussian function to it and mark off the regions that are within 4 standard deviations of the mean. (If there are multiple peaks, the hope is that the smoothing or convolution will make it smoothed enough so that the Gaussian will capture both peaks, but this fails sometimes which is why I'm looking for something more robust. An extension to this would be to try and fit multiple Gaussians as well, if it is a sensible idea in general.)

Here's a quick plot I was using to compare the different smoothing windows (the original signal is real data that I'm working with, which usually only has one large peak but may have more).

Plot of original signal and convolution with multiple different windows.

(Also, the convolution seems to center the peaks away from where they actually are. If there are no better solutions, how can I stop that from happening? EDIT: Peter K.'s comment helped me fix this silly error.)

But this is a pretty noob approach that I just came up with. Is there a better way? The places I want to sample around are obviously regions around local maxima, but defining what local maxima means seems to be tricky, and it doesn't always give great results. In general, though, I will want to sample continuously around the regions of peaks, i.e. if I have two peaks, one at 5m and one at 10m, I want to sample between, say, 2m and 13m, not chopping it in the middle. It may be worth noting that these signals are a snapshot in time, so perhaps I can take advantage of past signals as well somehow?

added 61 characters in body
Source Link
hadsed
  • 161
  • 4
Loading
edited title
Link
hadsed
  • 161
  • 4
Loading
Source Link
hadsed
  • 161
  • 4
Loading