eyediagram: Eye Diagram

Description Usage Arguments See Also Examples

Description

Receives a vector x of real or complex points and plots the Re or Im part of x in the form of an "eyediagram." The symbol period is indicated by the input Ns (samples per symbol) and horizontal sweep Np indicates the the number of symbol periods to plot along the horizontal access. The eyediagram is useful for evaluating inter-symbol interference associated with the in-phase or quadrature part of a modulated signal.

Usage

1
2
eyediagram(x, Ns = 1, Np = 3, No = 1, iq = "r", pch = 19, cex = 0.1,
  ...)

Arguments

x

vector of real or complex points

Ns

number of samples per symbol period

Np

number of symbol periods to plot along the horizontal axis

No

offset (n points) alignment of the eyediagram along the horizontal asis

iq

parameter indicates whether to plot the in-phase Re(x) (iq="r" default) or quadrature Im(x) (iq="q")

pch

Graphical parameter pch (plotting character) set to 19 by default ("point")

cex

Graphical parameter cex magnificaiton of plotting symbols relative to 1 default set to 0.1.

...

graphical environment parameters are input to eyediagram

See Also

Other rwireless: f16pskdemod, f16pskmod, f16qamdemod, f16qammod, f64qamdemod, f64qammod, f8pskdemod, f8pskmod, fNo, fbpskdemod, fbpskmod, fqpskdemod, fqpskmod, iqdensityplot, iqscatterplot, stemplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Step 1: generate random set of bits
M=4
Nsymbols=10000
Nbits=log2(M)*Nsymbols
bits <- sample(0:1,Nbits, replace=TRUE)

# Step 2: Generate a BPSK modulated signal including raised cosine
#  pulse shaping sampled at 64 samples per symbol period and roll-off
#  factor of 0.5.
Ns=64
B=0.5
hx=seq(-4*Ns,4*Ns,by=1)
h=rcosine(hx,B,Ns)
s <- fqpskmod(bits,Ns,h)

# Step 3: Plot the transmitted waveform with the eyediagram function.
#    Remove the initial 1000 and tail points for a cleaner diagram, i.e.
#    without startup and tail artifacts
Np=3
No=27

# real part (in-phase)
eyediagram(s[1000:60000],Ns,Np,No,iq="r",xlab="Ts",ylab="I")
# imaginary part (quadrature)
eyediagram(s[1000:60000],Ns,Np,No,iq="q",xlab="Ts",ylab="Q")

algutier1/rwirelesscom documentation built on May 12, 2019, 10:06 a.m.