Linear Frequency ModulationΒΆ

This example shows how PyTFTB is used to generate a signal with linear frequency modulation. Such a signal is also called a chirp.

Figure 1.1 from the tutorial.

../_images/sphx_glr_plot_1_3_1_chirp_001.png
from tftb.generators import fmlin
import matplotlib.pyplot as plt
import numpy as np

# Generate a chirp signal

n_points = 128
fmin, fmax = 0.0, 0.5

signal, _ = fmlin(n_points, fmin, fmax)
plt.plot(np.real(signal))
plt.xlim(0, n_points)
plt.title('Linear Frequency Modulation')
plt.ylabel('Real Part')
plt.xlabel('Time')
plt.grid()
plt.show()

Total running time of the script: ( 0 minutes 0.242 seconds)

Gallery generated by Sphinx-Gallery