{"id":450,"date":"2011-08-30T09:06:14","date_gmt":"2011-08-30T09:06:14","guid":{"rendered":"http:\/\/www.raymaps.com\/?p=450"},"modified":"2022-05-31T08:43:41","modified_gmt":"2022-05-31T08:43:41","slug":"ofdm-modulation-and-demodulation-awgn","status":"publish","type":"post","link":"https:\/\/www.raymaps.com\/index.php\/ofdm-modulation-and-demodulation-awgn\/","title":{"rendered":"OFDM Modulation and Demodulation (AWGN)"},"content":{"rendered":"<p style=\"text-align: justify;\">OFDM modulation works on the principle of converting a&nbsp;serial symbol stream to a parallel symbol stream with&nbsp;each symbol from the parallel set modulating a seperate&nbsp;carrier. The spacing between the carriers is 1\/T where&nbsp;T is the duration of the OFDM symbols (without cyclic prefix). This&nbsp;guarantees orthogonality of the carriers i.e. there is&nbsp;no interference between carriers. The addition of&nbsp;orthogonal carriers modulated by parallel symbol&nbsp;streams is equivalent to taking the IFFT of the&nbsp;parallel symbol set. At the receiver the inverse&nbsp;operation of FFT is performed and the parallel symbol&nbsp;streams are converted to serial symbol streams.<\/p>\n<p style=\"text-align: justify;\">The main advantage of this scheme is that one carrier&nbsp;(or set of carriers) may undergo severe fading but&nbsp;other carriers would be able to carry data.&nbsp;Equalization on these narrowband channels is also much&nbsp;easier than equalization of one wideband channel.&nbsp;Intersymbol Interference (ISI) which effects the signal&nbsp;in the time domain is removed by adding a guard period&nbsp;between symbols, called cyclic prefix (which we will&nbsp;discuss later).<\/p>\n<figure id=\"attachment_451\" aria-describedby=\"caption-attachment-451\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.raymaps.com\/index.php\/ofdm-modulation-and-demodulation-awgn\/ofdm\/\" rel=\"attachment wp-att-451\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-451\" title=\"OFDM Modulator Demodulator\" src=\"http:\/\/www.raymaps.com\/wp-content\/uploads\/2011\/08\/ofdm.gif\" alt=\"\" width=\"620\" height=\"172\" srcset=\"https:\/\/www.raymaps.com\/wp-content\/uploads\/2011\/08\/ofdm.gif 620w, https:\/\/www.raymaps.com\/wp-content\/uploads\/2011\/08\/ofdm-300x83.gif 300w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/a><figcaption id=\"caption-attachment-451\" class=\"wp-caption-text\">OFDM Modulator Demodulator<\/figcaption><\/figure>\n<p style=\"text-align: justify;\">We demonstrate the performance of OFDM with QPSK modulation in a simple AWGN channel. Although the true benefits of OFDM are really visible when we have a fading channel but this simple example would serve as a good starting point.<\/p>\n<pre lang=\"matlab\">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n% FUNCTION TO CALCULATE BER OF OFDM IN AWGN\n% seq_len: Input, number of OFDM symbols\n% n_carr: Input, number of subcarriers \n% EbNo: Input, energy per bit to noise PSD\n% ber: Output, bit error rate\n% Copyright RAYmaps (www.raymaps.com)\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\nfunction[ber]=OFDM_err(seq_len,n_carr,EbNo)\nfor n=1:seq_len\nsi=2*(round(rand(1,n_carr))-0.5);\nsq=2*(round(rand(1,n_carr))-0.5);\ns=si+j*sq;\ns_ofdm=sqrt(n_carr)*ifft(s,n_carr);\nwn=(1\/sqrt(2*10^(EbNo\/10)))*(randn(1,n_carr)+j*randn(1,n_carr));\nr=s_ofdm+wn;\ns_est=fft(r,n_carr);\nsi_est=sign(real(s_est));\nsq_est=sign(imag(s_est));\nber1(n)=(n_carr-sum(si==si_est))\/n_carr;\nber2(n)=(n_carr-sum(sq==sq_est))\/n_carr;\nend\nber=mean([ber1 ber2]); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \nreturn\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n<\/pre>\n<figure id=\"attachment_452\" aria-describedby=\"caption-attachment-452\" style=\"width: 558px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.raymaps.com\/index.php\/ofdm-modulation-and-demodulation-awgn\/ofdm_ber_awgn\/\" rel=\"attachment wp-att-452\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-452\" title=\"OFDM BER AWGN\" src=\"http:\/\/www.raymaps.com\/wp-content\/uploads\/2011\/08\/ofdm_ber_awgn.jpg\" alt=\"\" width=\"558\" height=\"419\" srcset=\"https:\/\/www.raymaps.com\/wp-content\/uploads\/2011\/08\/ofdm_ber_awgn.jpg 558w, https:\/\/www.raymaps.com\/wp-content\/uploads\/2011\/08\/ofdm_ber_awgn-300x225.jpg 300w\" sizes=\"auto, (max-width: 558px) 100vw, 558px\" \/><\/a><figcaption id=\"caption-attachment-452\" class=\"wp-caption-text\">OFDM BER AWGN<\/figcaption><\/figure>\n<p style=\"text-align: justify;\">As expected in an AWGN channel the BER performance of OFDM is simply the BER performance of QPSK in AWGN. With cyclic prefix, some of the transmitted energy would be wasted and the BER performance would be a bit worse (to be discussed in future posts).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OFDM modulation works on the principle of converting a&nbsp;serial symbol stream to a parallel symbol stream with&nbsp;each symbol from the parallel set modulating a seperate&nbsp;carrier. The spacing between the carriers is 1\/T where&nbsp;T is the duration of the OFDM symbols (without cyclic prefix). This&nbsp;guarantees orthogonality of the carriers i.e. there is&nbsp;no interference between carriers. The addition of&nbsp;orthogonal carriers modulated by parallel symbol&nbsp;streams is equivalent to taking the IFFT of the&nbsp;parallel symbol set. At the receiver the inverse&nbsp;operation of FFT is performed and the parallel symbol&nbsp;streams are converted to serial symbol streams. The main advantage of this scheme is that one [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[189,11,18,219,15],"tags":[34,114,51],"class_list":["post-450","post","type-post","status-publish","format-standard","hentry","category-5g","category-berp","category-lte","category-modulation","category-wimax","tag-ber","tag-lte","tag-ofdm"],"_links":{"self":[{"href":"https:\/\/www.raymaps.com\/index.php\/wp-json\/wp\/v2\/posts\/450","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=450"}],"version-history":[{"count":39,"href":"https:\/\/www.raymaps.com\/index.php\/wp-json\/wp\/v2\/posts\/450\/revisions"}],"predecessor-version":[{"id":4249,"href":"https:\/\/www.raymaps.com\/index.php\/wp-json\/wp\/v2\/posts\/450\/revisions\/4249"}],"wp:attachment":[{"href":"https:\/\/www.raymaps.com\/index.php\/wp-json\/wp\/v2\/media?parent=450"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.raymaps.com\/index.php\/wp-json\/wp\/v2\/categories?post=450"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.raymaps.com\/index.php\/wp-json\/wp\/v2\/tags?post=450"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}