HOW CAN I CALCULATE THE SIGNAL TO NOISE RATIO(SNR) OF A CHIRP SIGNAL

I have a signal which is comprised of 4 chirp signals and an additive noise with the same sampling frequency and size is generated now i need to calculate the SNR of the signal and noise . Also if I am correct to vary the signal to noise ratio is it ok if I vary the amplitudes of chirp signals and also the noise by multiplying it with a factor : ex:
noise = randn(size(t));
where t = 0:1e-4:1;
and to increase the noise
{new noise = 2*noise ;}
is this correct?? and to increase the amplitudes of the signal is this the way to change the signal to noise ratio:
y3 = 5* chirp(t,600,t1,800,'linear');
​​​​​​​y4 = 3.5*chirp(t,900,t1,980,'linear');

 採用された回答

Geoff
Geoff 2021 年 7 月 7 日
編集済み: MathWorks Support Team 2021 年 7 月 7 日

0 投票

NR = Psignal / Pnoise = (Asignal / Anoise)^2
Where P is power, and A is amplitude. I would calculate the RMS amplitudes and use those in the above formula.
RMS means Root-Mean-Square. That is, you square your signal, calculate the mean of that, and take the square root. Just define a wee anonymous function for clarity:
RMS = @(x) sqrt(mean(x.^2));
Now you can compute your ratio like so:
RMS = @(x) sqrt(mean(x.^2));

10 件のコメント

raj
raj 2012 年 4 月 16 日
for suppose there are 4 chirp signal and noise n
y1 = 12*chirp(t,100,t1,150,'linear');
y2 = 10*chirp(t,250,t1,350,'linear');
y3 = 5* chirp(t,600,t1,800,'linear');
y4 = 3*chirp(t,900,t1,980,'linear');
x = y1+ y2+y3 + y4;
how to calculate rms in matlab please explain
Geoff
Geoff 2012 年 4 月 17 日
I have edited my answer to include this information.
raj
raj 2012 年 4 月 17 日
should log be applied???
Geoff
Geoff 2012 年 4 月 17 日
This isn't really a MatLab question anymore. You might need to brush up on the theory of exactly what you are trying to do.
Like it says on that Wikipedia link I gave you that you surely have read, you take the log (base 10) if you want your SNR expressed in decibels.
So only you can answer the question of whether to apply log, because only you know whether you want the SNR in decibels or not.
x_snr_db = 20 * log10( RMS(x) / RMS(n) );
raj
raj 2012 年 4 月 17 日
thanks for ur help
Geoff
Geoff 2012 年 4 月 17 日
no worries =)
Tahariet Sharon
Tahariet Sharon 2017 年 11 月 25 日
@Geoff: why "20"? in "20 * log10( RMS(x) / RMS(n) );"
Seema Sud
Seema Sud 2019 年 10 月 28 日
編集済み: Seema Sud 2019 年 10 月 28 日
Note the square (^2). i.e. 10*log10(RMS(x)/RMS(n))^2
This is the same as 20*log10(RMS(x)/RMS(n)). No square here.
Rule of logarithms log(a^b) = b*log(a)
Lesiba Amos
Lesiba Amos 2020 年 9 月 28 日
Lol why is the RMS(x)/RMS(n) squared?
Rohan Patni
Rohan Patni 2020 年 10 月 3 日
Because power of a signal is directly proportonal to the square of the said RMS amplitude

サインインしてコメントする。

その他の回答 (1 件)

Wayne King
Wayne King 2012 年 4 月 16 日

1 投票

You can increase the SNR by increasing the amplitude of the signal and by decreasing the variance of the noise. You have to remember that if you want to increase the variance of the noise by 2, you should multiply randn() by sqrt(2), not 2. Multiplying by two increases the variance by a factor of 4.
x = randn(100,1); % variance is 1
x = sqrt(2)*randn(100,1) % variance is 2

1 件のコメント

raj
raj 2012 年 4 月 16 日
how should i calculate SNR is it by calculating the variance of signal and noise and dividing them and then applyng log to it

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeSignal Processing についてさらに検索

タグ

タグが未入力です。

質問済み:

raj
2012 年 4 月 16 日

編集済み:

2021 年 7 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by