⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mpsk.m

📁 simulation of mpsk modulation technick and demonstation of constellation in noisy arean and non-noi
💻 M
字号:
clear all;
clc;
k=6;
M=2^k;
Fs=200;
Fd=1; % baud - symbol/second
N=1000; %num of symbol
Ts=1/Fd; %time of sym
Es=1; %symbol's energy
A=sqrt(2*Es/Ts); % amplitude
fc=2;
SNR=25;
sig=randint(1,N,M); % randomize  numbers 0-31 
t=0:1/Fs:Ts;
for n = 1:4; %number of symbols
    s=A*cos(2*pi*fc*t).*cos(2*pi*sig(n)/M)-A*sin(2*pi*fc*t).*sin(2*pi*sig(n)/M);
    plot(t,s);
    title(['The modulated signal in time domain(Wave form for ' num2str(M) '-PSK)']);
    xlabel('time[sec]');
    ylabel('Amp[volt]');
    hold on;
    t=t(length(t)):1/Fs:t(length(t))+Ts;
end
mod_sig=pskmod(sig,M);
scatterplot(mod_sig);
noisy=awgn(mod_sig, SNR);
scatterplot(noisy);
title('constellation of 32 psk with noise');
demod_sig=pskdemod(noisy,M);
[number_of_err, SER]=symerr(sig,demod_sig);
BER_sym=SER/k;
SER_sym=SER;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -