Learn R Programming

rwirelesscom (version 1.4.3)

f16pskdemod: 16-PSK Demodulator

Description

Receives a vector of complex values, r, corresponding to an 8-PSK modulated signal transmitted through a communications channel (e.g., signal plus noise). Three bits are output for each received symbol according to the following decision rules
input
output
$ -\pi/16 \ge Arg(r) < \pi/16$
0000
$ \pi/16 \ge Arg(r) < 3 \pi/16$
0001
$ 3 \pi/16 \ge Arg(r) < 5 \pi/16$
0011
$ 5 \pi/16 \ge Arg(r) < 7 \pi/16$
0010
$ 7 \pi/16 \ge Arg(r) < 9 \pi/16$
0110
$ 9 \pi/16 \ge Arg(r) < 11 \pi/16$
0111
$ 11 \pi/16 \ge Arg(r) < 13 \pi/16$
0101
$ 13 \pi/16 \ge Arg(r) < 15 \pi/16$
0100
$ 15 \pi/16 \ge Arg(r) < 17 \pi/16$
1100
$ -15 \pi/16 \ge Arg(r) < -13 \pi/16$
1101
$ -13 \pi/16 \ge Arg(r) < -11 \pi/16$
1111
$ -11 \pi/16 \ge Arg(r) < -9 \pi/16$
1110
$ -9 \pi/16 \ge Arg(r) < -7 \pi/16$
1010
$ -7 \pi/16 \ge Arg(r) < -5 \pi/16$
1011
$ -5 \pi/16 \ge Arg(r) < -3 \pi/16$
1001

Usage

f16pskdemod(r)

Arguments

r
- received signal

Value

returns a vector of 1's and 0's, 3 bits per input element (i.e., 8-PSK symbol)

See Also

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

Examples

Run this code
M=16
Es=1
Eb = Es/log2(M)
Nsymbols=20
Nbits=log2(M)*Nsymbols
bits <- sample(0:1,Nbits, replace=TRUE)
s <- f16pskmod(bits)
EbNodB=7
No = Eb/(10^(EbNodB/10))
n <- fNo(Nsymbols,No,type="complex")
r <- s+n
bitsr <- f16pskdemod(r)
biterrs<-bits[bitsr!=bits]
b<-factor(bits)
Pberr=length(biterrs)/length(bits)

Run the code above in your browser using DataLab