Dear my friends. I have some problems with OFDM simulation on AWGN channel.I have 260 bits lenght data After ifft block of OFDM transmitter. I add cyclic prefix and I have 300 bits lenght data. I want to add AWGN noisy signal (sigma*randn(1,300)) on to my signal (y_ps) ynoisy = y_ps+sigma*randn(1,300) my noisy signal became like this but my AWGN noisy signal is bigger than my y_ps signal.I think it is because of ifft we are dividing N to my signal. how do ı normalized my awgn signal. My channel parameters and my signals are below. % Fading amplitude; a=1 in AWGN channel a = 1; for nEN = 1:length(EbN0db) en = 10^(EbN0db(nEN)/10); % convert Eb/N0 from unit db to normal numbers L_c = 4*a*en*rate; % reliability value of the channel %sigma = 1 sigma = 1/sqrt(2*rate*en); % standard deviation of AWGN noise ynoisy = y_ps+sigma*randn(1,300); thanks.
OFDM on AWGN channel performance
Started by ●June 2, 2009
Reply by ●June 2, 20092009-06-02
On Jun 2, 8:44 am, "volkanizma2003" <ozduranvol...@gmail.com> wrote:> Dear my friends. > > I have some problems with OFDM simulation on AWGN channel.I have 260 bits > lenght data > > After ifft block of OFDM transmitter. I add cyclic prefix and I have 300 > bits lenght data. > > I want to add AWGN noisy signal (sigma*randn(1,300)) on to my signal > (y_ps) > > ynoisy = y_ps+sigma*randn(1,300) my noisy signal became like this > > but my AWGN noisy signal is bigger than my y_ps signal.I think it is > because of ifft we are dividing N to my signal. how do ı normalized my > awgn signal. > > My channel parameters and my signals are below. > > % Fading amplitude; a=1 in AWGN channel > a = 1; > > for nEN = 1:length(EbN0db) > en = 10^(EbN0db(nEN)/10); % convert Eb/N0 from unit db to normal > numbers > L_c = 4*a*en*rate; % reliability value of the channel > %sigma = 1 > sigma = 1/sqrt(2*rate*en); % standard deviation of AWGN noise > > ynoisy = y_ps+sigma*randn(1,300); > > thanks.Choose sigma = sqrt(mean(abs(y_ps)^2))/sqrt(2*rate*en) instead. That will make your average SNR=rate*en Thanks, Dilip.
Reply by ●June 3, 20092009-06-03
>On Jun 2, 8:44 am, "volkanizma2003" <ozduranvol...@gmail.com> wrote: >> Dear my friends. >> >> I have some problems with OFDM simulation on AWGN channel.I have 260bits>> lenght data >> >> After ifft block of OFDM transmitter. I add cyclic prefix and I have300>> bits lenght data. >> >> I want to add AWGN noisy signal (sigma*randn(1,300)) on to my signal >> (y_ps) >> >> ynoisy =3D y_ps+sigma*randn(1,300) my noisy signal became like this >> >> but my AWGN noisy signal is bigger than my y_ps signal.I think it is >> because of ifft we are dividing N to my signal. how do =C4=B1normalized=> my >> awgn signal. >> >> My channel parameters and my signals are below. >> >> % Fading amplitude; a=3D1 in AWGN channel >> a =3D 1; >> >> for nEN =3D 1:length(EbN0db) >> en =3D 10^(EbN0db(nEN)/10); % convert Eb/N0 from unit db tonorma=>l >> numbers >> L_c =3D 4*a*en*rate; % reliability value of the channel >> %sigma =3D 1 >> sigma =3D 1/sqrt(2*rate*en); % standard deviation of AWGN noise >> >> ynoisy =3D y_ps+sigma*randn(1,300); >> >> thanks. > >Choose sigma =3D sqrt(mean(abs(y_ps)^2))/sqrt(2*rate*en) instead. >That will make your average SNR=3Drate*en > >Thanks, >Dilip. >Dear DilipThanks for your intereset and your help But I changed my sigma, I wrote yours sigma = sqrt(mean(abs(y_ps)^2))/sqrt(2*rate*en) But matlab gave error ??? Error using ==> mpower Matrix must be square. Error in ==> aes_turbo_ofdm_demo at 320 sigma = sqrt(mean(abs(y_ps)^2))/sqrt(2*rate*en) and at the same time you wrote 3D1 I didnt understant 3D1. I would like to give some info about my codes %%%%%%%OFDM TRANSMITTER%%%%%%%%%%%%%%%%%%%%%%% en_output_sp = reshape(en_output,26,10) %serial to paralel en_output_sp_ifft= ifft(en_output_sp); %%%ifft y=[en_output_sp_ifft(23:26,:); en_output_sp_ifft]; %add cyclic prefix(last 4 bits) y_ps=reshape(y,1,300); %paralel to series %%%%%%%%%%%%%%%%%%%%%%%%%%%%%Channel%%%%%%%%%%%%%%%%%%%%%%% EbN0db = input(' Please enter Eb/N0 in dB : default 1.00] '); if isempty(EbN0db) EbN0db = [1.00]; end % Fading amplitude; a=1 in AWGN channel a = 1; for nEN = 1:length(EbN0db) en = 10^(EbN0db(nEN)/10); % convert Eb/N0 from unit db to normal numbers L_c = 4*a*en*rate; % reliability value of the channel sigma = sqrt(mean(abs(y_ps)^2))/sqrt(2*rate*en) ynoisy = y_ps+sigma*randn(1,300); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%Channel%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%OFDM Receiver%%%%%%%%%%%%%%%%%%%%%%%%%%5 ynoisy_ps = reshape(ynoisy,30,10); %%% serial to paralel ynoisy_ps(1:4,:)=[]; %Remove cyclic prefix y_fft=fft(ynoisy_ps); %%fft Blocks y_fft_ps = reshape(y_fft,1,260); %%Paralel to series r= real(y_fft_ps); % received bits Thanks for your time Best wishes