27 lines
588 B
Python
27 lines
588 B
Python
import numpy as np
|
|
import scipy as sp
|
|
import matplotlib.pyplot as plt
|
|
|
|
# Modulation index
|
|
beta = 2.0
|
|
|
|
# Number of impulses is 2*(beta+1) + 1.
|
|
# For beta=2, the number of impulses is 3 either side of the center frequency
|
|
# plus 1 for the center frequency, for a total of 7 impulses.
|
|
|
|
# Message frequency
|
|
f_m = 15E+3
|
|
|
|
# Transmission bandwidth
|
|
B_T = 2*(beta+1)*f_m
|
|
|
|
n = np.arange(0,10,1)
|
|
bessel_values = sp.special.jv(n,beta)
|
|
bessel_power = np.cumsum(bessel_values)
|
|
plt.stem(n, bessel_values)
|
|
plt.plot(n, bessel_power)
|
|
plt.hlines(0.98*bessel_power[-1], xmin=n[0], xmax=n[-1])
|
|
plt.show()
|
|
|
|
#
|