Understanding SNR matlab syntax

조회 수: 6 (최근 30일)
Impala
Impala 2020년 4월 14일
답변: Mathieu NOE 2020년 10월 30일
Hi,
I'm trying to determine the SNR for a noisy set of data - my data is actually trajectory data (x, y, z) measuring motion. I've attached a mat file (Traj.mat) containing two variables - the first variable is noisy trajectory data (pos_noise) and the second is relatively clean (pos_clean) showing some motion although there is still some noise superimposed on the signal.
Visually, I can tell the two datasets apart but I'm trying to quantify the level of noise in each dataset to described its quality.
So I'm looking at the SNR - the problem is that I don't really have a reference noise signal in this case but I noticed the following syntax in the matlab help files for snr: r = snr(x) and when I use this on my datasets, I appear to get a positive, large magnitude value for my cleaner dataset and generally negative value, lower magnitude for my noisy dataset. What does this mean? Is it the correct way to use this function as I always thought you need a reference noise signal to estimate the SNR.
Using just snr(x) gives me a plot of the spectrum and again, what I notice is that the spectrum (fundamental frequencies etc) of the noisy signal is generally below zero while the spectrum for the cleaner signal is above zero - again, I don't quite understand what this means.
I did wonder if I can estimate the noise in the signal by looking at its spectrum - I used the signal analyser app to compare the z-trajectories of the clean and noise data (see attached pic - left panel noisy data, right panel cleaner data) but I'm not sure how to extract it or whether it is possible to do so.
Thank you for your help in advance!
  댓글 수: 2
Impala
Impala 2020년 5월 4일
Hi,
I'm still stuck on this problem - can anyone help?
Thanks!
Shekh Md Mahmudul Islam
Shekh Md Mahmudul Islam 2020년 10월 30일
Similar things I also wondered before what really mean by snr function of matlab?

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

답변 (1개)

Mathieu NOE
Mathieu NOE 2020년 10월 30일
hi
I agree that without a "clean" reference signal , the built in snr function of matlab is of little help
so I decided to do it my way - see code attached
There is only one thing to decide , the frequency range that you estimate for your "clean" (useful signal) data
according to what you provided , I decided that above fc = 0.25 (normalised freq) you have only the noise floor. I extrapolated the same psd of noise for the freq range where you have the useful signal so the computation of the power ratio is doable
I got roughly 10 dB SNR whatever I choose for fc between 0.1 and 0.3. So the cut off frequency choice is not that critical. The spectrum plot should be there to help you decide where to put the cursor
hope it helps

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by