0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【MATLAB】QPSK変復調用の関数

Posted at

QPSK変調用の関数

入力ベクトルは{$-1,1$}のBPSK変調信号の系列としてください。

function [ TX_qpsk ] = bit_2_QPSK( TX )

TX_qpsk = (TX(:,1:2:end) + 1j*TX(:,2:2:end))/sqrt(2);

end

QPSK変調の受信信号に対する硬判定用の関数

function [ output_args ] = QPSK_2_symbol( input_args )

Real_RX = real(input_args);
Imag_RX = imag(input_args);

Real_RX(Real_RX > 0) = 1/sqrt(2); 
Real_RX(Real_RX < 0) = -1/sqrt(2); 

Imag_RX(Imag_RX > 0) = 1j/sqrt(2); 
Imag_RX(Imag_RX < 0) = -1j/sqrt(2); 

output_args = Real_RX + Imag_RX;

end

硬判定されたQPSK受信信号をBPSK信号に直すための関数


function [ output_args ] = symbol_2_bit_QPSK( input_args )

temp_size = size(input_args);

output_args = zeros(temp_size(1),temp_size(2)*2);

RX_Real = real(input_args)*sqrt(2);
RX_Imag = imag(input_args)*sqrt(2);
output_args(:,1:2:end) = RX_Real;
output_args(:,2:2:end) = RX_Imag;

end
0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?