I have to find the FM and PM waves corresponding to this sawtooth signal:
I have found out the PM wave as:
I am getting the FM wave as this :
I have plotted this using Python. Can anyone please tell me whether these plots are correct? I think I have got the correct PM wave but shouldn't the FM wave frequency change depending on the positive and negative peaks of the message signal (sawtooth wave)? The time period of the sawtooth signal is 0.001 s
The code for the FM part:
f = 1000;
T = 1/f;
t = np.linspace(0, 10*(T), 1000);
sawtooth_wave = np.zeros([len(t),]);
for i in range(0,len(t)):
sawtooth_wave[i,] = signal.sawtooth(2*(np.pi)*f*t[i,]);
fc = 1*10**6;
kp = np.pi/4;
kf = 2000;
fm_wave = np.zeros([len(t),]);
for i in range(0,len(t)):
fm_wave[i,] = math.cos(2*(np.pi)*fc*t[i,]+2*(np.pi)*kf*scipy.integrate.trapz(sawtooth_wave[0:i,],dx=0.2E-6));
I have a little confusion in integrating the message signal in the FM part of the code.