Not receiving correct FSK modulated signal [N210 USRP]
I have set up two N210 USRPs to transmit/receive simple FSK modulated signals. My code is very similar to the examples in the documentation (https://se.mathworks.com/help/supportpkg/usrpradio/ug/comm.sdrutransmitter-system-object.html and https://se.mathworks.com/help/supportpkg/usrpradio/ug/comm.sdrureceiver-system-object.html) but for the different modulation approach. The two USRPs are connected to two separate computers. One runs a script to repeatedly transmit my signal while the other runs a script to repeatedly scan for a received signal, which it then demodulates and returns to the user. Unfortunately, the received and demodulated signal does not resemble the transmitted signal at all.
I have experimented with different antennas, different gains and different centre frequencies.
What could possibly be causing this?
Transmitter code:
% Message
barkerCode = [1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0]’;
message = ones(20, 1);
frame = [barkerCode; message];
% Modulation
H = comm.FSKModulator(‘ModulationOrder’, 2);
messageIQ = H(frame);
% Transmitter
center_frequency = 434e6;
gain = 30;
radio = comm.SDRuTransmitter(…
‘Platform’, ‘N200/N210/USRP2’, …
‘IPAddress’, ‘192.168.10.2’, …
‘CenterFrequency’, center_frequency, …
‘Gain’, gain);
% Transmit
fprintf(‘Transmitting now…n’)
stop = 1000;
i = 0;
while i < stop
underrun = radio(messageIQ);
if (underrun ~= 0)
fprintf(‘Iteration: %i, underrun: %in’, i, underrun);
end
i = i + 1;
end
fprintf(‘Donen’)
release(radio)
Receiver code:
% Radio
center_frequency = 434e6;
gain = 30;
radio = comm.SDRuReceiver(…
‘Platform’, ‘N200/N210/USRP2’, …
‘IPAddress’, ‘192.168.10.2’, …
‘CenterFrequency’, center_frequency, …
‘Gain’, gain);
% Demodulator
D = comm.FSKDemodulator(‘ModulationOrder’, 2);
% Receive signal
len = 0;
while len == 0
[rcvdSignal, len] = step(radio);
demodSignal = D(rcvdSignal);
end
plot(debudSignal);I have set up two N210 USRPs to transmit/receive simple FSK modulated signals. My code is very similar to the examples in the documentation (https://se.mathworks.com/help/supportpkg/usrpradio/ug/comm.sdrutransmitter-system-object.html and https://se.mathworks.com/help/supportpkg/usrpradio/ug/comm.sdrureceiver-system-object.html) but for the different modulation approach. The two USRPs are connected to two separate computers. One runs a script to repeatedly transmit my signal while the other runs a script to repeatedly scan for a received signal, which it then demodulates and returns to the user. Unfortunately, the received and demodulated signal does not resemble the transmitted signal at all.
I have experimented with different antennas, different gains and different centre frequencies.
What could possibly be causing this?
Transmitter code:
% Message
barkerCode = [1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0]’;
message = ones(20, 1);
frame = [barkerCode; message];
% Modulation
H = comm.FSKModulator(‘ModulationOrder’, 2);
messageIQ = H(frame);
% Transmitter
center_frequency = 434e6;
gain = 30;
radio = comm.SDRuTransmitter(…
‘Platform’, ‘N200/N210/USRP2’, …
‘IPAddress’, ‘192.168.10.2’, …
‘CenterFrequency’, center_frequency, …
‘Gain’, gain);
% Transmit
fprintf(‘Transmitting now…n’)
stop = 1000;
i = 0;
while i < stop
underrun = radio(messageIQ);
if (underrun ~= 0)
fprintf(‘Iteration: %i, underrun: %in’, i, underrun);
end
i = i + 1;
end
fprintf(‘Donen’)
release(radio)
Receiver code:
% Radio
center_frequency = 434e6;
gain = 30;
radio = comm.SDRuReceiver(…
‘Platform’, ‘N200/N210/USRP2’, …
‘IPAddress’, ‘192.168.10.2’, …
‘CenterFrequency’, center_frequency, …
‘Gain’, gain);
% Demodulator
D = comm.FSKDemodulator(‘ModulationOrder’, 2);
% Receive signal
len = 0;
while len == 0
[rcvdSignal, len] = step(radio);
demodSignal = D(rcvdSignal);
end
plot(debudSignal); I have set up two N210 USRPs to transmit/receive simple FSK modulated signals. My code is very similar to the examples in the documentation (https://se.mathworks.com/help/supportpkg/usrpradio/ug/comm.sdrutransmitter-system-object.html and https://se.mathworks.com/help/supportpkg/usrpradio/ug/comm.sdrureceiver-system-object.html) but for the different modulation approach. The two USRPs are connected to two separate computers. One runs a script to repeatedly transmit my signal while the other runs a script to repeatedly scan for a received signal, which it then demodulates and returns to the user. Unfortunately, the received and demodulated signal does not resemble the transmitted signal at all.
I have experimented with different antennas, different gains and different centre frequencies.
What could possibly be causing this?
Transmitter code:
% Message
barkerCode = [1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0]’;
message = ones(20, 1);
frame = [barkerCode; message];
% Modulation
H = comm.FSKModulator(‘ModulationOrder’, 2);
messageIQ = H(frame);
% Transmitter
center_frequency = 434e6;
gain = 30;
radio = comm.SDRuTransmitter(…
‘Platform’, ‘N200/N210/USRP2’, …
‘IPAddress’, ‘192.168.10.2’, …
‘CenterFrequency’, center_frequency, …
‘Gain’, gain);
% Transmit
fprintf(‘Transmitting now…n’)
stop = 1000;
i = 0;
while i < stop
underrun = radio(messageIQ);
if (underrun ~= 0)
fprintf(‘Iteration: %i, underrun: %in’, i, underrun);
end
i = i + 1;
end
fprintf(‘Donen’)
release(radio)
Receiver code:
% Radio
center_frequency = 434e6;
gain = 30;
radio = comm.SDRuReceiver(…
‘Platform’, ‘N200/N210/USRP2’, …
‘IPAddress’, ‘192.168.10.2’, …
‘CenterFrequency’, center_frequency, …
‘Gain’, gain);
% Demodulator
D = comm.FSKDemodulator(‘ModulationOrder’, 2);
% Receive signal
len = 0;
while len == 0
[rcvdSignal, len] = step(radio);
demodSignal = D(rcvdSignal);
end
plot(debudSignal); usrp, communications toolbox support package, n210 MATLAB Answers — New Questions