{"id":1711,"date":"2012-05-02T09:31:54","date_gmt":"2012-05-02T09:31:54","guid":{"rendered":"http:\/\/www.raymaps.com\/?p=1711"},"modified":"2012-05-02T10:08:33","modified_gmt":"2012-05-02T10:08:33","slug":"detecting-sinusoids-in-noise","status":"publish","type":"post","link":"https:\/\/www.raymaps.com\/index.php\/detecting-sinusoids-in-noise\/","title":{"rendered":"Detecting Sinusoids in Noise"},"content":{"rendered":"<p style=\"text-align: justify;\">We have previously discussed the problem of detecting two closely spaced sinusoids using the Discrete Fourier Transform (DFT). We assumed that the data set we got was pure i.e. there was no noise. However, in reality this is seldom the case. There is always some noise, corrupting the signal. Let us now see how it effects the detection problem.<\/p>\n<p style=\"text-align: justify;\">We consider Additive White Gaussian Noise (AWGN) as the corrupting source. The noise power is set equal to the power of the two sinusoids i.e. we have an SNR of 0 dB. This is quite a severe case, the noise power is usually a few dB below the signal power. We are also bounded by the number of samples, N=64, giving us a resolution of 15.87 Hz.<\/p>\n<pre lang=\"matlab\">clear all\r\nclose all\r\n\r\nfm1=100;\r\nfm2=120;\r\nfs=1000;\r\nTs=1\/fs;\r\nN=64;\r\nt=0:Ts:(N-1)*Ts;\r\n\r\nx1=sqrt(2)*cos(2*pi*fm1*t);\r\nx2=sqrt(2)*cos(2*pi*fm2*t);\r\nwn=randn(1,N);\r\nx=x1+x2+wn;\r\nW=exp(-j*2*pi\/N);\r\n\r\nn=0:N-1;\r\nk=0:N-1;\r\n\r\nX=x*(W.^(n'*k));\r\n\r\nplot(k\/N,20*log10(abs(X)))\r\nxlabel ('Normalized Frequency')\r\nylabel ('X(dB)')<\/pre>\n<p style=\"text-align: justify;\">The data is plotted on a logarithmic scale so that we can compare the signal and noise \u00a0power levels.<\/p>\n<figure id=\"attachment_1717\" aria-describedby=\"caption-attachment-1717\" style=\"width: 560px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.raymaps.com\/index.php\/detecting-sinusoids-in-noise\/two_tones_in_noise\/\" rel=\"attachment wp-att-1717\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1717\" title=\"DFT of Two Tones in Noise\" src=\"http:\/\/www.raymaps.com\/wp-content\/uploads\/2012\/05\/two_tones_in_noise.jpg\" alt=\"DFT of Two Tones in Noise\" width=\"560\" height=\"420\" srcset=\"https:\/\/www.raymaps.com\/wp-content\/uploads\/2012\/05\/two_tones_in_noise.jpg 560w, https:\/\/www.raymaps.com\/wp-content\/uploads\/2012\/05\/two_tones_in_noise-300x225.jpg 300w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/a><figcaption id=\"caption-attachment-1717\" class=\"wp-caption-text\">DFT of Two Tones in Noise<\/figcaption><\/figure>\n<p style=\"text-align: justify;\">It is observed that we still have two peaks around the required frequency bins but there are also a number of false peaks. These peaks are around 10 dB lower than the signal peaks and should not cause a false detection. So the signal to noise ratio of 0 dB in the time domain is translated to a signal to noise ratio of about 10 dB in the frequency domain (this can be realized using an appropriate filter).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have previously discussed the problem of detecting two closely spaced sinusoids using the Discrete Fourier Transform (DFT). We assumed that the data set we got was pure i.e. there was no noise. However, in reality this is seldom the case. There is always some noise, corrupting the signal. Let us now see how it effects the detection problem. We consider Additive White Gaussian Noise (AWGN) as the corrupting source. The noise power is set equal to the power of the two sinusoids i.e. we have an SNR of 0 dB. This is quite a severe case, the noise power [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[81],"tags":[77,83,82,84,51],"class_list":["post-1711","post","type-post","status-publish","format-standard","hentry","category-fundamentals","tag-awgn","tag-dft","tag-fft","tag-noise","tag-ofdm"],"_links":{"self":[{"href":"https:\/\/www.raymaps.com\/index.php\/wp-json\/wp\/v2\/posts\/1711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.raymaps.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.raymaps.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.raymaps.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.raymaps.com\/index.php\/wp-json\/wp\/v2\/comments?post=1711"}],"version-history":[{"count":11,"href":"https:\/\/www.raymaps.com\/index.php\/wp-json\/wp\/v2\/posts\/1711\/revisions"}],"predecessor-version":[{"id":1724,"href":"https:\/\/www.raymaps.com\/index.php\/wp-json\/wp\/v2\/posts\/1711\/revisions\/1724"}],"wp:attachment":[{"href":"https:\/\/www.raymaps.com\/index.php\/wp-json\/wp\/v2\/media?parent=1711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.raymaps.com\/index.php\/wp-json\/wp\/v2\/categories?post=1711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.raymaps.com\/index.php\/wp-json\/wp\/v2\/tags?post=1711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}