diff --git a/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/1.png b/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/1.png new file mode 100644 index 0000000..d039729 Binary files /dev/null and b/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/1.png differ diff --git a/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/1a.png b/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/1a.png new file mode 100644 index 0000000..4c57fb9 Binary files /dev/null and b/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/1a.png differ diff --git a/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/2.png b/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/2.png new file mode 100644 index 0000000..8c9a3fb Binary files /dev/null and b/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/2.png differ diff --git a/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/HW 3.pdf b/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/HW 3.pdf new file mode 100644 index 0000000..8e6f625 Binary files /dev/null and b/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/HW 3.pdf differ diff --git a/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/homework-3.md b/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/homework-3.md new file mode 100644 index 0000000..15c958f --- /dev/null +++ b/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/homework-3.md @@ -0,0 +1,95 @@ +# ECOMMS Homework 3 - Aidan Sharpe + +## Problem 1 +A sinusoidal signal $m(t) = \cos(2\pi f_m t)$ is the input to an angle-modulated transmitter, $A_c = 1$, and the carrier frequency is $f_c = 1$ Hz and $f_m = f_c/4$. Plot $m(t)$, and the corresponding phase and frequency modulated signals, $S_p(t)$ and $S_f(t)$ respecively. $D_p = \pi$ and $D_f = \pi$. + +```python +f_c = 1 +f_m = f_c/4 + +f_s = 8E3 +T_s = 1/f_s + +A_c = 1 +D_p = np.pi +D_f = np.pi + +omega_m = 2*np.pi*f_m +omega_c = 2*np.pi*f_c + +# Time samples from to 10 seconds with a sampling frequency of 8kHz. +t = np.arange(0,10,T_s) + +# The message signal +m = np.cos(omega_m * t) + +# The phase modulated signal +S_p = np.cos(omega_c*t + D_p*m) + +# 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) +``` + +![](1.png) + +## Problem 2 +An FM signal has sinusoidal modulation with a frequency of $f_m = 15$kHz and a modulation index of $\beta = 2.0$. Find the transmission bandwidth by using Carson's rule, and find the percentage of total FM signal power that lies within the Carson rule bandwidth. + +```python +# Modulation index +beta = 2.0 + +# Message frequency +f_m = 15E+3 + +# Transmission bandwidth +B_T = 2*(beta+1)*f_m +``` + +$\boxed{B_T = 90\text{kHz}}$ + +```python +A_c = 1 +n = np.arange(-3,4,1) + +# Evaluate the Bessel function at values in Carson rule bandwidth +bessel_values = np.abs(sp.special.jv(n,beta)) + +P_C = 0.5 * A_c**2 * np.sum(bessel_values**2)) +P = 0.5 * A_c**2 +``` + +\boxed{P_c = 0.9976 P} + +## Problem 3 +A modulated RF waveform is given by $500\cos(\omega_c t + 20\cos(\omega_1 t))$, where $\omega_1 = 2\pi f_1$, $f_1 = 1$kHz, $\omega_c = 2\pi f_c$, and $f_c = 100$MHz. + +### 3a +If the phase sensitivity $D_p = 100$ rad/V, find the mathematical expression for the corresponding phase modulation voltage $m(t)$. What is its peak value and frequency? + +$m(t) = \frac{20\cos(\omega_1 t)}{D_p} = 0.2\cos(\omega_1 t)$ + +Peak value: $2 \times 10^{-1}$ + +Frequency: 1kHz + +### 3b +If the frequency deviation constant $D_f = 10^6$rad/Vs, find the mathematical expression for the corresponding FM voltage $m(t)$. What is its peak value and its frequency? + +$\theta(t) = 20\cos(\omega_1 t)$ + +$m(t) = \frac{1}{D_f} \frac{d \theta(t)}{dt} = -2 \times 10^{-5} \omega_1 \sin(\omega_1 t)$ + +Peak value: $2 \times 10^{-5}$ + +Frequency: 1kHz + +### 3c +If the RF waveform appears across a 50$\Omega$ load, determine the average power and the PEP. + +The average power of the signal is: +$$\langle s^2(t) \rangle = \frac{1}{T} \int\limits_{-T/2}^{T/2} 500\cos(\omega_c t + 20\cos(\omega_1 t)) dt$$ + diff --git a/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/homework-3.pdf b/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/homework-3.pdf new file mode 100644 index 0000000..0b4d604 Binary files /dev/null and b/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/homework-3.pdf differ diff --git a/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/problem-1.py b/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/problem-1.py index 74c077e..c262dbc 100644 --- a/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/problem-1.py +++ b/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/problem-1.py @@ -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() diff --git a/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/problem-2.py b/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/problem-2.py index e334439..9681438 100644 --- a/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/problem-2.py +++ b/7th-Semester-Fall-2024/ECOMMS/homework/homework-3/problem-2.py @@ -4,6 +4,7 @@ import matplotlib.pyplot as plt # Modulation index beta = 2.0 +A_c = 1 # Number of impulses is 2*(beta+1) + 1. # For beta=2, the number of impulses is 3 either side of the center frequency @@ -15,12 +16,20 @@ 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) +print(B_T) + +n = np.arange(-3,4,1) +bessel_values = np.abs(sp.special.jv(n,beta)) + +N = np.arange(-100,100) +bessel_power = np.sum(np.abs(sp.special.jv(N,beta))) plt.stem(n, bessel_values) -plt.plot(n, bessel_power) -plt.hlines(0.98*bessel_power[-1], xmin=n[0], xmax=n[-1]) +plt.plot(n, np.cumsum(bessel_values**2), label="Cumulative power in Carson rule bandwidth", color="red") +#plt.plot(n, bessel_power) +plt.hlines(0.98, xmin=n[0], xmax=n[-1], label="98% of total power", color="orange") +plt.legend() plt.show() -# +P_C = 0.5 * A_c**2 * np.sum(bessel_values**2) +P = 0.5 * A_c**2 +print("Percent of total power:", P_C / P) diff --git a/7th-Semester-Fall-2024/VLSI/homework/homework-10/homework-10.md b/7th-Semester-Fall-2024/VLSI/homework/homework-10/homework-10.md new file mode 100644 index 0000000..2576ba9 --- /dev/null +++ b/7th-Semester-Fall-2024/VLSI/homework/homework-10/homework-10.md @@ -0,0 +1,23 @@ +# VLSI Homework 10 - Aidan Sharpe + +## Problem 1 +You are synthesizing a chip composed of random logic with an average activity factor of $\alpha = 0.1$. You are using a standard cell process with an average switching capacitance of $C_\text{avg} = 450$[pF/mm$^2$]. Estimate the dynamic power consumption of your chip if it has an area of 70[mm$^2$] and runs at 450[MHz] at $V_{DD} = 0.9$[V]. + +$P_\text{dynamic} = C_\text{sw} V_{DD}^2 f_\text{sw}$ + +```python +alpha = 0.1 # Activity factor +C_avg = 450E-12 # Average switching capacitance [F / mm^2] +A = 70 # Chip area [mm^2] +f = 450E+6 # Clock frequency [Hz] +V_DD = 0.9 # Supply voltage [V] + +C_sw = C_avg * A # Total switching capacitance [F] +f_sw = alpha * f # Switching frequency [Hz] + +P_sw = C_sw * V_DD**2 * f_sw # Dynamic power [W] + +print(f"Dynamic Power: {P_sw}") +``` + +$\boxed{P_\text{dynamic} = 1.148175\text{[W]}}$ diff --git a/7th-Semester-Fall-2024/VLSI/homework/homework-10/homework-10.pdf b/7th-Semester-Fall-2024/VLSI/homework/homework-10/homework-10.pdf new file mode 100644 index 0000000..8357743 Binary files /dev/null and b/7th-Semester-Fall-2024/VLSI/homework/homework-10/homework-10.pdf differ diff --git a/7th-Semester-Fall-2024/VLSI/homework/homework-10/homework-10.py b/7th-Semester-Fall-2024/VLSI/homework/homework-10/homework-10.py new file mode 100644 index 0000000..6710130 --- /dev/null +++ b/7th-Semester-Fall-2024/VLSI/homework/homework-10/homework-10.py @@ -0,0 +1,12 @@ +alpha = 0.1 # Activity factor +C_avg = 450E-12 # Average switching capacitance [F / mm^2] +A = 70 # Chip area [mm^2] +f = 450E+6 # Clock frequency [Hz] +V_DD = 0.9 # Supply voltage [V] + +C_sw = C_avg * A # Total switching capacitance [F] +f_sw = alpha * f # Switching frequency [Hz] + +P_sw = C_sw * V_DD**2 * f_sw # Dynamic power [W] + +print(f"Dynamic Power: {P_sw}")