Learn R Programming

rwirelesscom (version 1.4.3)

f16pskmod: 16-PSK Modulator

Description

Receives a vector of bits (1's and 0's). The received vector is mapped to in-phase (real) and quadrature (imaginary) components, according to a Binary Reflective Gray Code (BRGC, see reference). Each received pair of bits are are mapped to 16-PSK symbols, with Es (symbol energy) = 1.The bit to symbol mapping is illustrated in the following table.
input
output
0000
$ 0 $
0001
$ \pi/8 $
0011
$ \pi/4$
0010
$ 3\pi/8$
0110
$ \pi/2$
0111
$ 5 \pi/8$
0101
$ 3 \pi/4$
0100
$ 7 \pi/8$
1100
$ -1 $
1101
$ -7 \pi/8 $
1111
$ -3\pi/4$
1110
$ -5 \pi/8$
1010
$ - \pi/2$
1011
$ -3 \pi/8$
1001
$ - \pi/4$
Reference: E. Agrell, J Lassing, E. Strom, and T. Ottosson, Gray Coding for Multilevel Constellations In Gaussian Noise, IEEE Transactions on Communications, Vol. 53, No. 1, January 2007

Usage

f16pskmod(bits, Ns = 1, p = 1)

Arguments

bits
- vector of bits (0's and 1's).
Ns
- N samples per symbol (default, Ns = 1)
p
- a vector defining the pulse shape of the transmitted waveform (default, p = 1)

Value

Returns a complex vector of length of 8-PSK symbols. If Ns > 1 then the returned signal is shaped with pulse shape, p.

See Also

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

Examples

Run this code
M=16
Nsymbols=20
Nbits=log2(M)*Nsymbols
bits <- sample(0:1,Nbits, replace=TRUE)
s <- f16pskmod(bits)

Run the code above in your browser using DataLab