Phase shift keying demodulation
z = pskdemod(y,M)
z = pskdemod(y,M,ini_phase)
z = pskdemod(y,M,ini_phase,symbol_order)
z = pskdemod(y,M) demodulates the complex envelope y of a PSK modulated signal. M is the alphabet size and must be an integer power of 2. The initial phase of the modulation is zero. If y is a matrix with multiple rows and columns, the function processes the columns independently.
z = pskdemod(y,M,ini_phase,symbol_order) specifies how the function assigns binary words to corresponding integers. If symbol_order is set to 'bin' (default), the function uses a natural binary-coded ordering. If symbol_order is set to 'gray', it uses a Gray-coded ordering.
The example below compares PSK and PAM (phase amplitude modulation) to show that PSK is more sensitive to phase noise. This is the expected result because the PSK constellation is circular, and the PAM constellation is linear.
len = 10000; % Number of symbols M = 16; % Size of alphabet msg = randi([0 M-1],len,1); % Original signal % Modulate using both PSK and PAM, % to compare the two methods. txpsk = pskmod(msg,M); txpam = pammod(msg,M); % Perturb the phase of the modulated signals. phasenoise = randn(len,1)*.015; rxpsk = txpsk.*exp(j*2*pi*phasenoise); rxpam = txpam.*exp(j*2*pi*phasenoise); % Create a scatter plot of the received signals. scatterplot(rxpsk); title('Noisy PSK Scatter Plot') scatterplot(rxpam); title('Noisy PAM Scatter Plot') % Demodulate the received signals. recovpsk = pskdemod(rxpsk,M); recovpam = pamdemod(rxpam,M); % Compute number of symbol errors in each case. numerrs_psk = symerr(msg,recovpsk) numerrs_pam = symerr(msg,recovpam)
The output and scatter plots are below. Your results might vary because this example uses random numbers.
numerrs_psk = 374 numerrs_pam = 1