이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
BER OF M-ary PSK and M-ary QAM
조회 수: 7 (최근 30일)
이전 댓글 표시
ABDUL
2020년 10월 1일
Dear All....
I am trying to write a program for the implementation of MIMO-OFDMby using wavelets transfrom . when i plot the BER Curve i am getting a straight line i am not able to get as a standard curve . any help will be appreciated.
Regards
Abdul Azeez
댓글 수: 11
ABDUL
2020년 10월 12일
편집: ABDUL
2020년 10월 12일
hi.... find attached below code which i am trying to implement for the ofdm by using the wavelet transforms to plot the BER V/s SNR graph and the Peak to Average Power Ratio (PAPR) for the same . i am trying to plot the BER V/s SNR graph for which i am getting a straight line
Regards
Abdul Azeez
clc
clear all;
close all;
M = 4; % QPSK signal constellatio
N = 64; % number of subcarriers
fft_size = N; % have 128 data poexitint
nbits = 100;
nDWTsym = ceil(nbits/N) ;% number of symbols for DWT system
nsym = nbits;
snr = 0:8;
% ------------------%
% TRANSMITTER
% ------------------%
data_source=randsrc(1, fft_size*(nsym-2), 0:M-1); %the data source
sp = reshape(data_source,fft_size,nsym-2).';% s/p
% sp = reshape(qpsk_mod , fft_size, nsym-2);% s/p
[rdwt,cdwt] = size (sp);
tx_dwt= [];
for i=2:nsym-1
for uu=1:cdwt
qpsk_mod=pskmod(sp,M);
DATADWT=qpsk_mod;
AC = DATADWT(1:rdwt/2,uu); % approximation coefficients
DC = DATADWT(rdwt/2+1:rdwt,uu); % detailed (wavelet) coefficients
IDWT=idwt(AC,DC,'haar'); % IDWT process
TXDWT(:,uu)= IDWT; % transmitted data for DWT
end
%%% parallel to serial =======> to the channel
ps1 = reshape( TXDWT,1,[]);
ofdm_signal_dwt=TXDWT;
pilot = zeros(size(TXDWT));
Signal_Power_dwt = abs(ofdm_signal_dwt.^2);
Peak_Power = max(Signal_Power_dwt,[],2);
Mean_Power = mean(Signal_Power_dwt,2);
PAPR_dwt = 10*log10(Peak_Power./Mean_Power);
tx_dwt = [tx_dwt ofdm_signal_dwt];
end
figure (1)
[cdf0,PAPR0] = ccdf(PAPR_dwt,0.1);
semilogy(PAPR0,cdf0,'-b')
legend('DWT based MIMO OFDM System')
xlabel('PAPR0 [dB]');
ylabel('CCDF (Pr[PAPR>PAPR0])');
tt_dwt=reshape(TXDWT,1,[]);
tt_dwt =[ pilot tx_dwt pilot];
x_abs_dwt=abs(tt_dwt);
papr_dwt=10*log(max(x_abs_dwt.^2)/mean(x_abs_dwt.^2));
% ------------
% CHANNEL
% ------------
% ---------------
% RECEIVER
% ------------
no_of_error_dwt=[];
ratio_dwt=[];
for ii=1:length(snr)
rx_dwt= [];
rx_signal_matrix_dwt = reshape(ps1,rdwt,cdwt).';%98x64, 64x98
[~, c] = size(rx_signal_matrix_dwt);
for j=1:cdwt
A1=[];
received_symbol=[];
received_symbol_1=[];
con_dwt=[];
received_symbol_1=[];
DWT=[];
cd=[];
RXDWT=[];
channel = 1/sqrt(2)*[randn(1,length(rx_signal_matrix_dwt))+sqrt(-1)*randn(1,length(rx_signal_matrix_dwt))];
%%% the transmitted signal is corrupted with addtive noise
A1=channel.*rx_signal_matrix_dwt(j,:);
received_symbol = awgn(A1, snr(ii));
% equalization:
received_symbol = conj(channel).* received_symbol;
% Convert Data back to "parallel" form to perform IDWT
con_dwt=reshape(received_symbol, 1,rdwt);
[DWT,cd]=dwt(con_dwt,'haar');%% DWT
RXDWT=[DWT cd];% recieved data for DWT
%%% parallel to serial
RXDWT1 = reshape(RXDWT.',1,[]);% at DWT
qpsk_demod=pskdemod(RXDWT,M);
rx_dwt =[rx_dwt qpsk_demod];
end
% counting the errors and ratio
[nDWT,rDWT]=biterr(data_source, rx_dwt);
simBerDWT(ii)=rDWT;%% DWT system
end
figure (2)
theory_Pb_BPSK = (1/2)*erfc(sqrt(10.^(snr/10)));
semilogy(snr,theory_Pb_BPSK,'bs-','LineWidth',2);
hold on
semilogy(snr,simBerDWT,'mx-','LineWidth',2);
axis([0 8 10^-6 1]); grid on
legend('theory', 'simulation for DWT(Haar)','simulation for FFT');
xlabel('SNR, dB') ; ylabel('Bit Error Rate')
title('BER for qpsk using DWT based ofdm ')
Walter Roberson
2020년 10월 12일
qpsk_mod=pskmod(sp,M);
pskmod returns complex values.
DATADWT=qpsk_mod;
AC = DATADWT(1:rdwt/2,uu); % approximation coefficients
DC = DATADWT(rdwt/2+1:rdwt,uu); % detailed (wavelet) coefficients
So AC and DC are complex values
IDWT=idwt(AC,DC,'haar'); % IDWT process
idwt() is restricted to operating on real values.
Your code cannot generate any line; it crashes long before the plotting.
ABDUL
2020년 10월 12일
편집: ABDUL
2020년 10월 12일
is it possible to take ony real values for the qpsk modulated data and implement the wavelet transforms or by taking the absolute values of the psk mod values. is there any method by which i can implement the OFDM technique by using the wavelet transforms ?.
Walter Roberson
2020년 10월 13일
Of course you can take real() or imag() or abs() of the qpsk modulated data, and do a wavelet transform on that.
The question would be whether you would get anything useful out of doing that.
qpsk uses constellations. With M = 16, you end up with 8 different real() values (4 unique values and their negatives), and cannot tell the difference between the two cases involving A +/- B*1i . And with a constellation, all of the values have the same absolute value: they all have the same magnitude, just with different vector rotations.
You would be safer taking real() and imag() and forming a vector twice as long. Possibly even doing dwt separately on the two parts.
... But I have no idea how this relates to OFDM.
ABDUL
2020년 10월 13일
편집: ABDUL
2020년 10월 13일
when i try to implement the complex data of size 1x64 , by separting the real and imag parts the and computing the idwt of the data i will be getting the data of twice the size i.e., 1x64 for the real values and 1 x 64 for the imag values when i concatenate it i will be getting the data of size 1x 128 after performing the idwt operation how do i change the data to original data of size 1x 64 ?
Walter Roberson
2020년 10월 13일
편집: Walter Roberson
2020년 10월 13일
ireal = idwt(real(AC), real(DC), 'haar');
icpx = idwt(imag(AC), imag(AC), 'haar');
IDWT = complex(ireal, icpx);
ABDUL
2020년 10월 13일
how we go ahead with the implemenation of the dwt as we have 1x98 data samples which are complex ?
Walter Roberson
2020년 10월 13일
I do not understand where you got the 98 data samples from? You have been talking about 1 x 64.
ABDUL
2020년 11월 5일
hi...
if i change the wavelet to other wavelets like db2,db3, sym2, sym3 my data is getting reduced for eg if i have a data of 1x64 , Ac will have 1x32 and Dc will have 1x32 through haar wavelet i will be getting a size of 1x64 but when i use other wavelet like db2 i will be getting the size for 1x30 for Ac and for Dc i will be getting 1x30 the total size of the data will be 1x60 how to retain the same size as 1x64 only when i use the wavelet of db2 and other wavelets
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Signal Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
아시아 태평양
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)