VLSI homework 10, ECOMMS homework 3

This commit is contained in:
2024-11-11 09:22:09 -05:00
parent faa05b88f9
commit 660744cf30
11 changed files with 171 additions and 12 deletions

View File

@@ -4,21 +4,41 @@ import matplotlib.pyplot as plt
f_c = 1
f_m = f_c/4
f_s = 8E3
T_s = 1/f_s
A_c = 1
omega_m = 2*np.pi*f_m
omega_c = 2*np.pi*f_c
T_c = f_c
t = np.arange(0,10,T_c/10)
# Time samples to 10 seconds at a samplig frequency of 8kHz
t = np.arange(0,10,T_s)
m = np.cos(omega_m * t)
plt.plot(t, m)
plt.show()
plt.subplot(311)
plt.plot(t, m, label="$m(t)$")
plt.ylabel("$m(t)$")
D_p = np.pi
D_f = np.pi
S_p = np.cos(omega_c + D_p*m)
# The phase modulated signal
S_p = np.cos(omega_c*t + D_p*m)
plt.subplot(312)
plt.ylabel("$S_p(t)$")
plt.xlabel("t (seconds)")
plt.plot(t,S_p)
# The time integral of the mesage signal
M = np.sin(omega_m * t) / omega_m
# The frequency modulated signal
S_f = np.cos(omega_c*t + D_f*M)
plt.subplot(414)
plt.ylabel("$S_f(t)$")
plt.xlabel("t (seconds)")
plt.plot(t,S_f)
plt.show()