DBPSK Demodulation in Simulink using Xilinx blockset
I am trying to build a DBPSK demodulator using Simulink and Xilinx blockset. I calculate the Phase Difference of the Successive samples like this :
So, now I need to map these Phase Difference to Symbol 0 or 1 depending on whether the Phase difference is 0 or pi.
% ----------------------------------------
% | Bit input | Phase change (+j*pi) |
% ----------------------------------------
% | 0 | 0 |
% ----------------------------------------
% | 1 | pi |
% ----------------------------------------
I am not sure how I can do Phase to Symbol mapping in Simulink(Xilinx). BTW, here is the Matlab version :
demod_symbol=abs(round(DBPSK_Signal/pi));
for i=1:length(demod_symbol)
if(demod_symbol(i)==2)
demod_symbol(i)=0;
end
end
P开发者_如何转开发lease let me know, if my approach is correct and how to proceed further
Take the output of your subtractor and feed it to a "greater-than" compare block with the other input set to pi/2. The output of that will be the bit you need.
Be aware, you'll be creating quite a lot of logic in those atan blocks - there's almost definitely a more efficient way of doing this, but it doesn't spring to mind right at this minute.
精彩评论