Skip to content

komm.ManchesterPulse

Manchester pulse. It is a pulse with waveform given by $$ p(t) = \begin{cases} -1, & 0 \leq t < 1/2, \\ 1, & 1/2 \leq t < 1, \\ 0, & \text{otherwise}, \end{cases} $$

The waveform of the Manchester pulse is depicted below.

Manchester pulse.

Attributes:

(No attributes)

waveform()

The waveform $p(t)$ of the pulse.

For the Manchester pulse, it is given by $$ p(t) = -\rect\left(\frac{t - 1/4}{1/2}\right) + \rect\left(\frac{t - 3/4}{1/2}\right). $$

Examples:

>>> pulse = komm.ManchesterPulse()
>>> pulse.waveform(
...     [-1.0, -0.75, -0.5, -0.25, 0.0, 0.25, 0.5, 0.75, 1.0],
... )
array([ 0.,  0.,  0.,  0., -1., -1.,  1.,  1.,  0.])

spectrum()

The spectrum $\hat{p}(f)$ of the pulse.

For the Manchester pulse, it is given by $$ \hat{p}(f) = \sinc \left( \frac{f}{2} \right) \, \sin \left( 2 \pi \frac{f}{4} \right) \mathrm{e}^{-\mathrm{j} 2 \pi (f/2\,+\,1/4)}. $$

Examples:

>>> pulse = komm.ManchesterPulse()
>>> np.abs(pulse.spectrum(
...     [-1.0, -0.75, -0.5, -0.25, 0.0, 0.25, 0.5, 0.75, 1.0],
... )).round(3)
array([0.637, 0.725, 0.637, 0.373, 0.   , 0.373, 0.637, 0.725, 0.637])

autocorrelation()

The autocorrelation function $R(\tau)$ of the pulse.

For the Manchester pulse, it is given $$ R(\tau) = \tri \left( \frac{\tau}{1/2} \right) - \frac{1}{2} \tri \left( \frac{\tau + 1/2}{1/2} \right) - \frac{1}{2} \tri \left( \frac{\tau - 1/2}{1/2} \right). $$

Examples:

>>> pulse = komm.ManchesterPulse()
>>> pulse.autocorrelation(
...     [-1.0, -0.75, -0.5, -0.25, 0.0, 0.25, 0.5, 0.75, 1.0],
... )
array([ 0.  , -0.25, -0.5 ,  0.25,  1.  ,  0.25, -0.5 , -0.25,  0.  ])

energy_density_spectrum()

The energy density spectrum $S(f)$ of the pulse.

For the Manchester pulse, it is given by $$ S(f) = \sinc^2 \left( \frac{f}{2} \right) \, \sin^2 \left( 2 \pi \frac{f}{4} \right). $$

Examples:

>>> pulse = komm.ManchesterPulse()
>>> pulse.energy_density_spectrum(
...     [-1.0, -0.75, -0.5, -0.25, 0.0, 0.25, 0.5, 0.75, 1.0],
... ).round(3)
array([0.405, 0.525, 0.405, 0.139, 0.   , 0.139, 0.405, 0.525, 0.405])