How to get correct bit stream at receiver side of simple wireless communication without communication channel
4 ビュー (過去 30 日間)
古いコメントを表示
Hello experts,
I am trying to send the data(bitstream) by modulation using DBPSK and RRC match filter for both Tx and Rx. as following MATLAB code
% Parameters
bitstream = [0 1 1 0 1 0 1 0]; % Sample bitstream to be transmitted
fSpan=4;
%add filter
txfilter = comm.RaisedCosineTransmitFilter(...
'OutputSamplesPerSymbol',4,RolloffFactor=0.05,FilterSpanInSymbols=fSpan);
rxfilter = comm.RaisedCosineReceiveFilter(...
'InputSamplesPerSymbol',4,'DecimationFactor',4,RolloffFactor=0.05,FilterSpanInSymbols=fSpan);
% DBPSK modulation
dbpskmod=comm.DBPSKModulator(0,"OutputDataType","double");
dbpskdemod=comm.DBPSKDemodulator;
mod=dbpskmod(bitstream');
tFilter=txfilter(mod);
rFilter=rxfilter(tFilter);
demod=dbpskdemod(rFilter);
% Display received bitstream
disp('Sent Bitstream:');
disp(bitstream);
disp('Received Bitstream:');
disp(demod');
My expectation is to get Received Bitstream same as the sent. but it turned out that Tx and Rx bit stream is not same as below result.
Sent Bitstream:
0 1 1 0 1 0 1 0
Received Bitstream:
0 0 1 1 0 1 1 0
Anyway, if I am not using the RRC filter. receiver side can decode the sent Bitsteam correctly as below MATLAB code and result.
% Parameters
bitstream = [0 1 1 0 1 0 1 0]; % Sample bitstream to be transmitted
fSpan=4;
%add filter
txfilter = comm.RaisedCosineTransmitFilter(...
'OutputSamplesPerSymbol',4,RolloffFactor=0.05,FilterSpanInSymbols=fSpan);
rxfilter = comm.RaisedCosineReceiveFilter(...
'InputSamplesPerSymbol',4,'DecimationFactor',4,RolloffFactor=0.05,FilterSpanInSymbols=fSpan);
% DBPSK modulation
dbpskmod=comm.DBPSKModulator(0,"OutputDataType","double");
dbpskdemod=comm.DBPSKDemodulator;
mod=dbpskmod(bitstream');
% tFilter=txfilter(mod);
% rFilter=rxfilter(tFilter);
demod=dbpskdemod(mod);
Sent Bitstream:
0 1 1 0 1 0 1 0
Received Bitstream:
0 1 1 0 1 0 1 0
Is there any way to ensure the Rx accurately decodes the Tx bitstream when the RRC filter is added to the system?
Best Regards,
Fumihiko Sato
0 件のコメント
採用された回答
Pooja Kumari
2023 年 9 月 6 日
Dear Fumihiko,
I understand that you are experiencing an issue with simple wireless communication using modulation techniques like DBPSK and RRC filter. Specifically, you are noticing a discrepancy between the transmitted and received bitstreams.
There are a few factors that could contribute to the difference between the transmitted and received bitstreams:
1. Filter design parameters: The performance of the Root Raised-Cosine (RRC) filters can impact the accuracy of the demodulated bitstream. It is important to ensure that the filter parameters, such as the roll-off factor, filter span, and samples per symbol, are chosen appropriately to match the characteristics of your communication system.
2. The comm.RaisedCosineReceiveFilter System object™ applies pulse shaping by decimating an input signal using a raised-cosine finite impulse response (FIR) filter. This process can introduce some distortion, which may affect the received bitstream.
To get a better understanding of RRC filters, you can refer to the documentation below: https://in.mathworks.com/help/comm/ref/comm.raisedcosinereceivefilter-system-object.html
In your code, after generating the modulated signal, you should interpolate the signal using the SRRC transmit filter object. The filter delay should be equal to the filter span. Here is a sample code for your reference:
% Parameters
bitstream = [0 1 1 0 1 0 1 0]; % Sample bitstream to be transmitted
fSpan = 1; % Set the filter span as 1 for a filter delay of 1
% Add filters
txfilter = comm.RaisedCosineTransmitFilter(...
'Shape', 'Normal', 'OutputSamplesPerSymbol', 2, 'FilterSpanInSymbols', fSpan);
rxfilter = comm.RaisedCosineReceiveFilter(...
'Shape', 'Normal', 'InputSamplesPerSymbol', 2, 'DecimationFactor', 2, 'FilterSpanInSymbols', fSpan);
% DBPSK modulation
dbpskmod=comm.DBPSKModulator(0,"OutputDataType","double");
dbpskdemod=comm.DBPSKDemodulator;
mod=dbpskmod(bitstream');
tFilter=txfilter(mod);
rFilter=rxfilter(tFilter);
% Demodulation
demod = dbpskdemod(rFilter)';
delay = txfilter.FilterSpanInSymbols;
disp("delay in Received Bits : ");
disp(delay)
x = (1:(length(bitstream)-delay));
% Display received bitstream
disp('Sent Bitstream:');
disp(bitstream(1:end));
disp('Received Bitstream:');
disp(demod(delay+1:end));
Please note that the received bitstream is delayed by fSpan due to the filter delay. You can refer to the below documentation for more information about the Root Raised-Cosine Transmit filter: https://in.mathworks.com/help/comm/ref/comm.raisedcosinetransmitfilter-system-object.html
I hope this helps!
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Propagation and Channel Models についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!