Code covered by the BSD License  

Highlights from
phase shift keying function

image thumbnail

phase shift keying function

by

 

03 Nov 2010 (Updated )

functions here return you the envelope of the signal there is option for frequency and power input

psk_op(binary_data_input,carrier_frequency,signal_power)
function [ signal,time ] = psk_op(binary_data_input,carrier_frequency,signal_power)
% psk generation


A=sqrt(2*signal_power);
f=carrier_frequency;
x=binary_data_input;

t=0.001 : .001 : 1;


d1 = A*sin(2*pi*f*t);

d0 = -1*A*sin(2*pi*f*t);

n = length(x);



for i=1:n
    if (x(1,i) == 1)
        sig(i,:)=d1;
    else
        sig(i,:)=d0;
    end
   
end 


signal=column_to_row(sig);
time=0.001:0.001:n;
end

Contact us