komm.ASKModulation
Amplitude-shift keying (ASK) modulation. It is a complex modulation scheme in which the points of the constellation symbols are uniformly arranged in a ray. More precisely, the $i$-th constellation symbol is given by $$ x_i = iA \exp(\mathrm{j}\phi), \quad i \in [0 : M), $$ where $M$ is the order (a power of $2$), $A$ is the base amplitude, and $\phi$ is the phase offset of the modulation. The ASK constellation is depicted below for $M = 4$.
Parameters:
-
order
(int
) –The order $M$ of the modulation. It must be a power of $2$.
-
base_amplitude
(float
) –The base amplitude $A$ of the constellation. The default value is
1.0
. -
phase_offset
(float
) –The phase offset $\phi$ of the constellation. The default value is
0.0
. -
labeling
(Literal['natural', 'reflected'] | ArrayLike
) –The binary labeling of the modulation. Can be specified either as a 2D-array of integers (see base class for details), or as a string. In the latter case, the string must be either
'natural'
or'reflected'
. The default value is'reflected'
, corresponding to the Gray labeling.
Examples:
The ASK modulation with order $M = 4$, base amplitude $A = 1$, and Gray labeling is depicted below.
>>> ask = komm.ASKModulation(4)
>>> ask.constellation
array([0.+0.j, 1.+0.j, 2.+0.j, 3.+0.j])
>>> ask.labeling
array([[0, 0],
[1, 0],
[1, 1],
[0, 1]])
>>> ask.modulate([0, 0, 1, 1, 0, 0, 1, 0, 1, 0])
array([0.+0.j, 2.+0.j, 0.+0.j, 1.+0.j, 1.+0.j])