DigitalCommunications

DigitalCommunications.AWGNChannelType
mutable struct AWGNChannel

Additive white Gaussian noise channel.

!!! note If tsample and tsymbol are NaN, then the channel operates in the vector channel mode. Otherwise, the channel operates in waveform channel mode.

Fields

  • esno::Float64

    Value of the noise mode(may be SNR, EsNo, EbNo in dB

  • tsample::Float64

    Sampling period of the channel

  • tsymbol::Float64

    Symbol duration if channel operates in waveform channel mode

source
DigitalCommunications.DetectorType
struct Detector{T}

Baseband optimal detector.

Note

If elements of probs are equal to each other, than detector detects symbols in the maximum likelihood (ML) mode. Otherwise, it detects in the maximum a posterior probabilities (MAP) mode.

Fields

  • refs::Any

    Basis reference of the detector

  • probs::Array{Float64,1}

    A priori probabilities of the message symbols

  • N0::Float64

    2 times the power spectral density of channel noise

source
DigitalCommunications.GrayCodingType
struct GrayCoding <: DigitalCommunications.AbstractCoding

Gray coding.

Fields

  • pairs::Dict{Array{Int64,1},Int64}

Example

julia> gc = GrayCoding(2) 
GrayCoding(Dict([0, 1] => 2,[1, 1] => 3,[0, 0] => 1,[1, 0] => 4))
source
DigitalCommunications.ModulatorType
struct Modulator{T<:DigitalCommunications.AbstractScheme, S<:DigitalCommunications.AbstractPulse}

Baseband digital modulator.

!!! note tsample determines the type of modulation. If tsample is NaN, the modulator transmits the vectors whose elements are the coefficients of the expansion of the symbol waveform over the orthogonal basis. Otherwise, the modulator trasmits the symbol waveform sampled by tsample.

Fields

  • scheme::DigitalCommunications.AbstractScheme

    Modulation scheme

  • pulse::DigitalCommunications.AbstractPulse

    Modulation pulse energy

  • tsample::Float64

    Sampling time.

source
DigitalCommunications.RaisedCosinePulseType
struct RaisedCosinePulse <: DigitalCommunications.AbstractPulse

Raised coise pulse shapse of the form,

\[ p(t) = \begin{cases} \drac{A}{2}(1 - cos(w t) & 0 \leq t \leq T \ 0 & othersie \ \end{cases}\]

Fields

  • amplitude::Float64

  • duration::Float64

source
DigitalCommunications.RectangularPulseType
struct RectangularPulse <: DigitalCommunications.AbstractPulse

RectangularPulse pulse shape of the form,

\[ p(t) = \begin{cases} A & 0 \leq t \leq T \ 0 & othersie \ \end{cases}\]

where $A$ is the amplitude and $T$ is the pulse duration.

Fields

  • amplitude::Float64

    Amplitude

  • duration::Float64

    Period

source
DigitalCommunications.alphabetFunction

Returns the alphabet of scheme.

Example

julia> scheme = PSK(4)
4-PSK

julia> alphabet(scheme)
4-element Array{Array{Float64,1},1}:
 [1.0, 0.0]
 [6.123233995736766e-17, 1.0]
 [-1.0, 1.2246467991473532e-16]
 [-1.8369701987210297e-16, -1.0]
source
DigitalCommunications.alphabetMethod
alphabet(scheme)

Returns $[0, 0, \ldots, 1, 0, \ldots, 0], \; m = 1, \ldots, M$ where the index of the nonzero element is $m$ and M is the constellation size of the scheme.

source
DigitalCommunications.alphabetMethod
alphabet(scheme)

Returns $[cos(\theta_m), sin(\theta_m)], \; m = 1, \ldots, M$ where $\theta_m = \dfrac{2\pi(m - 1)}{M}$ and M is the constellation size of the scheme.

source
DigitalCommunications.beraskMethod
berask(γb, M)

Returns the probability of symbol error for the snr per bit γb and constallation size M for ASK and PAM signalling

source
DigitalCommunications.invmapMethod
invmap(coding)

Returns the inverse of the mapping. Inverse mapping maps the levels to bit chunks.

Example

julia> gray = GrayCoding(3)
GrayCoding(Dict([0, 1, 1] => 3,[0, 0, 1] => 2,[1, 1, 0] => 5,[0, 0, 0] => 1,[1, 0, 0] => 8,[1, 0, 1] => 7,[0, 1, 0] => 4,[1, 1, 1] => 6))

julia> invmap(gray)
Dict{Int64,Array{Int64,1}} with 8 entries:
  7 => [1, 0, 1]
  4 => [0, 1, 0]
  2 => [0, 0, 1]
  3 => [0, 1, 1]
  5 => [1, 1, 0]
  8 => [1, 0, 0]
  6 => [1, 1, 1]
  1 => [0, 0, 0]
source
DigitalCommunications.ismlMethod
isml(detector)

Returns true if detector is a maximum likelihood detector, i.e, a priori probabilities of its reference refs are equal.

source
DigitalCommunications.plotberMethod
plotber(; scheme, snr_per_bit_range, krange, pltkwargs...)

Plots the probability of symbol error versus snr per bit for the signaling scheme. snr_per_bit_range is the snr per bit range and krange is the symbol size of the M-ary signalling where $M=2^k$.

source