komm.RaisedCosinePulse
Raised cosine pulse. It is a pulse with waveform given by $$ h(t) = \operatorname{sinc}(t) \frac{\cos(\pi \alpha t)}{1 - (2 \alpha t)^2}, $$ where $\alpha$ is the roll-off factor, which must satisfy $0 \leq \alpha \leq 1$. Its spectrum is given by $$ \hat{h}(f) = \begin{cases} 1, & |f| \leq f_1, \\[1ex] \dfrac{1}{2} \left( 1 + \cos \left( \pi \dfrac{|f| - f_1}{f_2 - f_1}\right) \right), & f_1 \leq |f| \leq f_2, \\[1ex] 0, & \text{otherwise}. \end{cases} $$ where $f_1 = (1 - \alpha) / 2$ and $f_2 = (1 + \alpha) / 2$.
The raised cosine pulse is depicted below for $\alpha = 0.25$, and for $\alpha = 0.75$.
For more details, see PS08, Sec. 9.2-1.
Notes
- For $\alpha = 0$ it reduces to the sinc pulse.
- For $\alpha = 1$ it becomes what is known as the full cosine roll-off pulse.
Attributes:
-
rolloff
(float
) –The roll-off factor $\alpha$ of the pulse. Must satisfy $0 \leq \alpha \leq 1$. The default value is
1.0
.
Examples:
>>> pulse = komm.RaisedCosinePulse(rolloff=0.25)
>>> pulse.waveform([-0.75, -0.50, -0.25, 0.00, 0.25, 0.50, 0.75]).round(4)
array([0.2904, 0.6274, 0.897 , 1. , 0.897 , 0.6274, 0.2904])
>>> pulse.spectrum([-0.75, -0.50, -0.25, 0.00, 0.25, 0.50, 0.75])
array([0. , 0.5, 1. , 1. , 1. , 0.5, 0. ])