Steps for Implementing QPSK Transmitter and Receiver with USRP Hardware
1. Connect one USRP to a virtual machine which acts as a transmitter whereas the other USRP to another virtual machine which acts as a receiver. In addition to this, connect a spectrum analyzer at the receiver side.
2. Copy 'sdruQPSKTransmitter.m', ‘runSDRuQPSKTransmitter.m’, ‘sdruqpsktransmitter_init.m’, ‘QPSKTransmitter.m’ and ‘QPSKBitsGenerator.m’ MATLAB scripts on the transmitter machine and 'sdruQPSKReceiver.m', ‘runSDRuQPSKReceiver.m’, ’sdruqpskreceiver_init.m’ and ‘QPSKReceiver.m’ at the receiver machine, respectively.
3. In the ‘sdruqpsktransmitter_init.m’ and ’sdruqpskreceiver_init.m’ script, check for the USRP Center Frequency(SimParams.USRPCenterFrequency) to be 915MHz. In ‘QPSKReceiver.m’ script, change 'TimingErrorDetector' from 'Gardner (non-data-aided)' to ‘Zero-Crossing (decision-directed)’ in comm.SymbolSynchronizer.
4. Type ‘findsdru’ in the command window at both transmitter and receiver end. The status should be ‘Success’ as shown in the screenshot below.
5. Run the 'sdruQPSKTransmitter.m' and then ‘sdruQPSKReceiver.m' scripts simultaneously.
6. Check the transmitted signal on the spectrum analyzer as shown in the figure below. The signal should be centered at 915MHz.
7. The transmitter keeps sending ‘Hello World’ messages which are centered at 915MHz frequency. The received messages are decoded and printed out in the MATLAB command window while the simulation is running. BER information is also shown at the end of the script execution. The calculation of the BER value includes the first received frames, when some of the adaptive components in the QPSK receiver still have not converged. During this period, the BER is quite high. Once the transient period is over, the receiver is able to estimate the transmitted frame and the BER dramatically improves.
8. To increase the simulation duration and obtain lower BER values, you can change the SimParams.StopTime variable in the receiver initialization file.
References: https://www.mathworks.com/help/supportpkg/usrpradio/examples/qpsk-transmitter-with-usrp-r-hardware.html
https://www.mathworks.com/help/supportpkg/usrpradio/examples/qpsk-receiver-with-usrp-r-hardware.html