to get the proper scatter plot

4 ビュー (過去 30 日間)
ABDUL
ABDUL 2021 年 3 月 25 日
コメント済み: ABDUL 2021 年 4 月 4 日
Hi...
How do i map the random symbols after binary to symbol mapping to get the constellation diagram of M-ary QAM correctly . i am getting the incorrect constellation diagram.
clc;
close all;
clear all;
M=64; % QAM Signal Constellation
fft_size=64;
fspacing=15000;
fs=15000*64;
Ts = 1/fs; % Sampling period of channel
Fd = 0; % Max Doppler frequency shift
k = log2(M); % Number of bits per symbol
nbits=k*fft_size;
nsym = fft_size*2; %1000
cp_length=round(0.06*fft_size); % length of cyclic prefix
xbits = randi([0 1],1,nbits); % Random binary data stream
% mappedData = wlanConstellationMap(xbits,k);
xsym = bi2de(reshape(xbits,k,(length(xbits)/k)).','left-msb');
tx=[];
% QAM Modulation
QAM_Modulation=qammod(xsym,M,'PlotConstellation',true);
% scatterplot(QAM_Modulation);

採用された回答

Sriram Tadavarty
Sriram Tadavarty 2021 年 4 月 1 日
Hi Abdul,
The scatterplot usage is correct itself. May i know why do you feel the constellation is incorrect?
Since, xbits are random, possibly, same number of bits might make a symbol, leading to partial constellation while looking from scatterplot.
Try this:
M=64; % QAM Signal Constellation
fft_size=64;
fspacing=15000;
fs=15000*64;
Ts = 1/fs; % Sampling period of channel
Fd = 0; % Max Doppler frequency shift
k = log2(M); % Number of bits per symbol
nbits=k*fft_size;
nsym = fft_size*2; %1000
cp_length=round(0.06*fft_size); % length of cyclic prefix
xbits = randi([0 1],1,nbits*10); % Random binary data stream (Updated with 10 times the previous length)
% mappedData = wlanConstellationMap(xbits,k);
xsym = bi2de(reshape(xbits,k,(length(xbits)/k)).','left-msb');
tx=[];
% QAM Modulation
QAM_Modulation=qammod(xsym,M,'PlotConstellation',true);
scatterplot(QAM_Modulation)
Hope this helps.
Regards,
Sriram
  1 件のコメント
ABDUL
ABDUL 2021 年 4 月 4 日
thank you sriram

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeQAM についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by