Smoothing a noisy signal

조회 수: 3 (최근 30일)
David Polcari
David Polcari 2012년 6월 13일
Hey everyone,
I need some help smoothing out a noisy signal. I know of one or two methods but I am not sure what the best way of doing it is. Can someone tell me what is the most efficient way of smoothing?
Thanks for the help!
  댓글 수: 1
David Polcari
David Polcari 2012년 6월 13일
Here is my dataset:
voltage_B1 = [1.0110
1.0110
1.0134
1.0134
1.0122
1.0122
1.0122
1.0134
1.0122
1.0134
1.0122
1.0134
1.0098
1.0134
1.0122
1.0134
1.0122
1.0110
1.0122
1.0134
1.0122
1.0122
1.0122
1.0134
1.0122
1.0122
1.0122
1.0122
1.0122
1.0122
1.0122
1.0134
1.0122
1.0110
1.0110
1.0110
1.0122
1.0134
1.0134
1.0122
1.0122
1.0122
1.0122
1.0122
1.0122
1.0134
1.0147
1.0122
1.0122
1.0122
1.0122
1.0134
1.0110
1.0122
1.0122
1.0122
1.0122
1.0122
1.0147
1.0134
1.0134
1.0147
1.0134
1.0134
1.0147
1.0147
1.0134
1.0134
1.0134
1.0134
1.0134
1.0122
1.0134
1.0147
1.0147
1.0159
1.0134
1.0134
1.0147
1.0134
1.0147
1.0134
1.0147
1.0122
1.0134
1.0147
1.0159
1.0159
1.0147
1.0147
1.0147
1.0134
1.0159
1.0147
1.0134
1.0134
1.0122
1.0122
1.0122
1.0134
1.0134
1.0134
1.0147
1.0122
1.0134
1.0159
1.0122
1.0122
1.0122
1.0122
1.0122
1.0122
1.0098
1.0134
1.0122
1.0098
1.0122
1.0122
1.0098
1.0110
1.0122
1.0122
1.0098
1.0122
1.0110
1.0122
1.0122
1.0122
1.0098
1.0134
1.0110
1.0122
1.0110
1.0122
1.0122
1.0098
1.0110
1.0122
1.0110
1.0122
1.0134
1.0122
1.0122
1.0110
1.0122
1.0110
1.0122
1.0122
1.0134
1.0159
1.0110
1.0110
1.0134
1.0134
1.0122
1.0122
1.0122
1.0134
1.0122
1.0134
1.0122
1.0134
1.0098
1.0134
1.0122
1.0134
1.0122
1.0110
1.0122
1.0134
1.0122
1.0122
1.0122
1.0134
1.0122
1.0122
1.0122
1.0122
1.0122
1.0122
1.0122
1.0134
1.0122
1.0110
1.0110
1.0110
1.0122
1.0134
1.0134
1.0122
1.0122
1.0122
1.0122
1.0122
1.0122
1.0134
1.0147
1.0122
1.0122
1.0122
1.0122
1.0134
1.0110
1.0122
1.0122
1.0122
1.0122
1.0122
1.0147
1.0134
1.0134
1.0147
1.0134
1.0134
1.0147
1.0147
1.0134
1.0134
1.0134
1.0134
1.0134
1.0122
1.0134
1.0147
1.0147
1.0159
1.0134
1.0134
1.0147
1.0134
1.0147
1.0134
1.0147
1.0122
1.0134
1.0147
1.0159
1.0159
1.0147
1.0147
1.0147
1.0134
1.0159
1.0147
1.0134
1.0134
1.0122
1.0122
1.0122
1.0134
1.0134
1.0134
1.0147
1.0122
1.0134
1.0159
1.0122
1.0122
1.0122
1.0122
1.0122
1.0122
1.0098
1.0134
1.0122
1.0098
1.0122
1.0122
1.0098
1.0110
1.0122
1.0122
1.0098
1.0122
1.0110
1.0122
1.0122
1.0122
1.0098
1.0134
1.0110
1.0122
1.0110
1.0122
1.0122
1.0098
1.0110
1.0122
1.0110
1.0122
1.0134
1.0122
1.0122
1.0110
1.0122
1.0110
1.0122
1.0122
1.0134
1.0159
1.0122
1.0122
1.0122
1.0134
1.0134
1.0134
1.0134
1.0134
1.0147
1.0147
1.0134
1.0147
1.0147
1.0122
1.0122
1.0122
1.0122
1.0122
1.0122
1.0147
1.0134
1.0122
1.0147
1.0147
1.0134
1.0122
1.0134
1.0122
1.0147
1.0134
1.0134
1.0122
1.0134
1.0122
1.0134
1.0134
1.0122
1.0134
1.0134
1.0147
1.0134
1.0122
1.0122
1.0134
1.0147
1.0122
1.0134
1.0122
1.0134
1.0134
1.0134
1.0122
1.0134
1.0122
1.0122
1.0122
1.0134
1.0122
1.0134
1.0171
1.0134
1.0122
1.0110
1.0122
1.0122
1.0122
1.0134
1.0134
1.0134
1.0134
1.0122
1.0134
1.0134
1.0122
1.0122
1.0134
1.0122
1.0134
1.0134
1.0134
1.0134
1.0134
1.0110
1.0147
1.0159
1.0122
1.0134
1.0122
1.0159
1.0147
1.0147
1.0147
1.0159
1.0147
1.0134
1.0134
1.0159
1.0122
1.0122
1.0147
1.0110
1.0134
1.0147
1.0134
1.0134
1.0134
1.0147
1.0134
1.0159
1.0122
1.0147
1.0134
1.0147
1.0147
1.0134
1.0134
1.0147
1.0122
1.0159
1.0159
1.0147
1.0134
1.0147
1.0147
1.0147
1.0147
1.0159
1.0147
1.0147
1.0147
1.0147
1.0159
1.0147
1.0159
1.0159
1.0159
1.0147
1.0159
1.0159
1.0159
1.0147
1.0159
1.0159
1.0171
1.0171
1.0134
1.0159
1.0159
1.0159
1.0134
1.0159
1.0159
1.0159
1.0147
1.0159
1.0147
1.0159
1.0159
1.0159
1.0159
1.0159
1.0171
1.0171
1.0159
1.0171
1.0171
1.0171
1.0159
1.0159
1.0147
1.0159
1.0134
1.0171
1.0159
1.0159
1.0171
1.0159
1.0171
1.0171
1.0147
1.0171
1.0147
1.0171
1.0159
1.0183
1.0195
1.0171
1.0183
1.0134
1.0171
1.0134
1.0122
1.0134
1.0122
1.0122
1.0122
1.0134
1.0122
1.0134
1.0171
1.0134
1.0122
1.0110
1.0122
1.0122
1.0122
1.0134
1.0134
1.0134
1.0134
1.0122
1.0134
1.0134
1.0122
1.0122
1.0134
1.0122
1.0134
1.0134
1.0134
1.0134
1.0134
1.0110
1.0147
1.0159
1.0122
1.0134
1.0122
1.0159
1.0147
1.0147
1.0147
1.0159
1.0147
1.0134
1.0134
1.0159
1.0122
1.0122
1.0147];

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2012년 6월 15일
The most efficient way of smoothing is to leave the data untouched.
conv(signal, ones(1,3)/3) is fairly efficient computationally, but you could probably do better if you created a custom mex routine.
If you were instead perhaps wondering about the most effective way of smoothing, then you need to define your goals for the results.

추가 답변 (1개)

Sandarva Khanal
Sandarva Khanal 2012년 6월 15일
Like Walter said, you need to define your goals for the results. One simple way can be to use a running average of may be about 3 - 5 data from your data set.
For example, if you are interested in finding the running average of 3 data-points from your data set, your 2nd data could be the average of first three data-points. Your 3rd data will be the average of data-point indexed 2 to 4, and so on....remember that in this case, you will not usually change the first data-point.
  댓글 수: 1
Walter Roberson
Walter Roberson 2012년 6월 15일
conv(signal, ones(1,3)/3) is one method of implementing a 3 point running average.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Signal Generation and Preprocessing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by