Learn R Programming

rwirelesscom (version 1.4.3)

fqpskdemod: QPSK Demodulator

Description

Receives a vector of complex values, r, corresponding to a QPSK modulated signal transmitted through a communications channel (e.g., signal plus noise). The received signal, r, is mapped to its in-phase (real part) and quadrature parts (imaginary part) and demodulated, such that two binary bits are output for each value of r. If the in-phase part is > 0 then the corresponding output bit value is 1, otherwise 0. Similarly, if the quadrature part (imaginary) > 0 then the corresponding bit value is 1, otherwise 0.

Usage

fqpskdemod(r)

Arguments

r
- received signal plus noise.

Value

returns a vector of 1's and 0's, 2 bits per input element (i.e., QPSK symbol)

See Also

Other rwirelesscom functions: eyediagram; f16pskdemod; f16pskmod; f16qamdemod; f16qammod; f64qamdemod; f64qammod; f8pskdemod; f8pskmod; fNo; fbpskdemod; fbpskmod; iqdensityplot; iqscatterplot; stemplot

Examples

Run this code
M=4
Es=1
Nsymbols=10
Nbits=log2(M)*Nsymbols
Eb=Es/log2(M)
bits <- sample(0:1,Nbits, replace=TRUE)
s <- fqpskmod(bits)
EbNodB=8
No = Eb/(10^(EbNodB/10))
n <- fNo(Nsymbols,No,type="complex")
r <- s+n
bitsr <- fqpskdemod(r)
biterrs<-bits[bitsr!=bits]
Pberr=length(biterrs)/length(bits)

Run the code above in your browser using DataLab