Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

信号コンスタレーションのプロット

16-PSK コンスタレーション ダイアグラムの作成

変調関数を使用するときに PlotConstellation=true を設定して、グレイ符号とバイナリ符号のシンボル マッピングの 16-PSK 変調について、基準コンスタレーション プロットを表示します。ビット信号を入力し、2 つのコンスタレーション間のビット パターンを比較します。隣接するコンスタレーション ポイントのビット パターンは、グレイ符号のシンボル マッピングでは 1 ビットだけ異なりますが、バイナリ符号のシンボル マッピングでは異なりません。

16-PSK 変調のパラメーターを位相オフセットなしに設定します。

M = 16;                   % Modulation alphabet size
bps = log2(M);            % Bits per symbol
phOffset = 0;             % Phase offset
bitdata = int2bit(0,bps); % Generate one symbol to modulate

グレイ符号のシンボル マッピングの基準コンスタレーションをプロットします。グレイ符号のシンボル マッピングの場合、すべての隣接するコンスタレーション ポイントのビット パターンは 1 ビットだけ異なります。

pskmod(bitdata,M,phOffset,InputType="bit",PlotConstellation=true);

Figure contains an axes object. The axes object with title 16-PSK, Gray Mapping, xlabel In-phase Amplitude, ylabel Quadrature Amplitude contains 19 objects of type line, text. One or more of the lines displays its values using only markers

バイナリ符号のシンボル マッピングの基準コンスタレーションをプロットします。バイナリ符号のシンボル マッピングの場合、隣接するコンスタレーション ポイントのビット パターンは常に 1 ビットだけ異なるとは限りません。

pskmod(bitdata,M,phOffset,"bin",InputType="bit",PlotConstellation=true);

Figure contains an axes object. The axes object with title 16-PSK, Binary Mapping, xlabel In-phase Amplitude, ylabel Quadrature Amplitude contains 19 objects of type line, text. One or more of the lines displays its values using only markers

32-QAM コンスタレーション ダイアグラムの作成

変調関数のコンスタレーション プロット機能、comm.ConstellationDiagram System object™、および関数scatterplotを使用して、32-QAM 基準コンスタレーションをプロットします。

関数 qammod を使用して、グレイ符号のシンボル順序で 32-QAM シンボルを生成し、基準コンスタレーションをプロットします。

M = 32;
qammod(0,M,UnitAveragePower=true,PlotConstellation=true);

Figure contains an axes object. The axes object with title 32-QAM, Gray Mapping, UnitAveragePower=true, xlabel In-phase Amplitude, ylabel Quadrature Amplitude contains 35 objects of type line, text. One or more of the lines displays its values using only markers

32-QAM として定義された基準コンスタレーションを使用してコンスタレーション ダイアグラム オブジェクトを作成します。基準コンスタレーション シンボルの 32-QAM 信号をプロットします。

refSym = [0:M-1]';
refC = qammod(refSym,M,UnitAveragePower=true);
cd = comm.ConstellationDiagram(ReferenceConstellation=refC);
cd(refC)

関数 scatterplot を使用して基準コンスタレーションをプロットし、コンスタレーション シンボルの順番にラベルを付けます。

scatterplot(refC,1,0,'r*');
for k = 1:M
    text(real(refC(k))+0.04,imag(refC(k))-0.04, ...
        num2str(refSym(k)),Color='r');
end
axis([-1.5 1.5 -1.5 1.5])

Figure Scatter Plot contains an axes object. The axes object with title Scatter plot, xlabel In-Phase, ylabel Quadrature contains 33 objects of type line, text. One or more of the lines displays its values using only markers This object represents Channel 1.

8-QAM グレイ符号コンスタレーション ダイアグラムの作成

関数 qammod を使用して、グレイ シンボル順序で 8-QAM シンボルを生成します。グレイ符号化は関数 qammod の既定シンボル マップです。

M = 8;
data = 0:M-1;
sym = qammod(data,M);

コンスタレーションをプロットします。コンスタレーション シンボルの順序をラベル付けします。

scatterplot(sym,1,0,'r*');
grid on
for k = 1:M
    text(real(sym(k))-0.4,imag(sym(k))+0.4,num2str(data(k)),Color='r');
end
axis([-4 4 -2 2])

Figure Scatter Plot contains an axes object. The axes object with title Scatter plot, xlabel In-Phase, ylabel Quadrature contains 9 objects of type line, text. One or more of the lines displays its values using only markers This object represents Channel 1.

QAM の三角形コンスタレーションのプロット

コンスタレーション ダイアグラム System object™ を使用して、カスタマイズされた QAM 基準コンスタレーションをプロットします。

コンスタレーションを定義します。

inphase = [1/2 -1/2 1 0 3/2 -3/2 1 -1];
quadr = [1 1 0 2 1 1 2 2]; 
inphase = [inphase; -inphase];
inphase = inphase(:);
quadr = [quadr; -quadr];
quadr = quadr(:);
refConst = inphase + 1i*quadr;

名前と値のペアを使用してコンスタレーション ダイアグラム オブジェクトを作成し、タイトル、座標軸の範囲、参照マーカー タイプ、および参照マーカーの色を指定します。

constDiagram = comm.ConstellationDiagram( ...
    Title='Customized Constellation for QAM', ...
    XLimits=[-3 3], ...
    YLimits=[-3 3], ...
    ReferenceConstellation=refConst, ...
    ReferenceMarker='*', ...
    ReferenceColor=[0 1 0]);

カスタマイズされたコンスタレーションをプロットします。

constDiagram(refConst)
release(constDiagram)

参考