Learn R Programming

rwirelesscom (version 1.4.3)

fbpskdemod: BPSK Demodulator

Description

Receives a vector of real values, corresponding to a BPSK modulated signal transmitted through a communications channel (e.g., signal plus noise). An input value < 1 is mapped to an output value of 0, otherwise to a value of 1.

Usage

fbpskdemod(r)

Arguments

r
- received signal vector

Value

returns a vector of 1's and 0's corresponding to BPSK demodulation of the input vector

See Also

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

Examples

Run this code
Eb=1
Nbits=10
bits <- sample(0:1,Nbits, replace=TRUE)
s <- fbpskmod(bits)
EbNodB=8
No = Eb/(10^(EbNodB/10))
n <- fNo(Nbits,No)
r <- s+n
bitsr <- fbpskdemod(r)
biterrs<-bits[bitsr!=bits]
Pberr=length(biterrs)/length(bits)

Run the code above in your browser using DataLab