يا صاحبه القلب الطيب الله يكرمك فضلا منك احتاج اكواد البايثون التي تخص بحث جيل الخامس للاتصالات لاسكليه المشروح في قناتك هنا....اود ان افهم مبدأها حتي انطلق منها كمرجع في تطوير ما اريد علي حسب سيناريوهات بحثي, اكون جدا ممتن لحضرتك
@Zabt_NawiaАй бұрын
import numpy as np import matplotlib.pyplot as plt # Shannon-Hartley Theorem def shannon_capacity(B, S_N): return B * np.log2(1 + S_N) # Log-Distance Path Loss Model def path_loss(d, d_0, PL_d0, n): return PL_d0 + 10 * n * np.log10(d / d_0) # Beamforming equation def beamforming_weight(d, wavelength, theta): return np.exp(-1j * 2 * np.pi * d / wavelength * np.sin(theta)) # OFDM Signal def ofdm_signal(a_k, f_k, t): signal = np.zeros_like(t, dtype=complex) for i in range(len(a_k)): signal += a_k[i] * np.exp(1j * 2 * np.pi * f_k[i] * t) return signal # MIMO Capacity Equation def mimo_capacity(P, N_0, H): return np.log2(np.linalg.det(np.eye(H.shape[0]) + (P / N_0) * np.dot(H, H.T))) # Energy Efficiency def energy_efficiency(data_rate, power_consumption): return data_rate / power_consumption # Example values for testing the functions # Shannon-Hartley Theorem B = 1e6 # 1 MHz bandwidth S_N = 10 # Signal-to-noise ratio C = shannon_capacity(B, S_N) # Path Loss Model d = np.array([10, 50, 100, 200]) # distances in meters d_0 = 1 # reference distance PL_d0 = 100 # Path loss at d_0 n = 2 # Path loss exponent PL = path_loss(d, d_0, PL_d0, n) # Beamforming d_beam = 0.5 # distance between antenna elements wavelength = 0.03 # wavelength in meters theta = np.pi / 4 # 45 degrees beam_weight = beamforming_weight(d_beam, wavelength, theta) # OFDM signal a_k = np.array([1, 0.8, 1.2]) # amplitudes of subcarriers f_k = np.array([1e6, 1.5e6, 2e6]) # frequencies of subcarriers t = np.linspace(0, 1, 1000) # time array ofdm_signal_vals = ofdm_signal(a_k, f_k, t) # MIMO Capacity P = 100 # Transmit power N_0 = 10 # Noise power H = np.array([[1, 2], [3, 4]]) # Example channel matrix mimo_cap = mimo_capacity(P, N_0, H) # Energy Efficiency data_rate = 100 # Mbps power_consumption = 50 # Watts ee = energy_efficiency(data_rate, power_consumption) # Plotting the results # Path loss graph plt.figure(figsize=(6, 4)) plt.plot(d, PL, label="Path Loss") plt.title("Path Loss vs Distance") plt.xlabel("Distance (meters)") plt.ylabel("Path Loss (dB)") plt.grid(True) plt.legend() plt.show() # OFDM signal plot plt.figure(figsize=(6, 4)) plt.plot(t, np.real(ofdm_signal_vals), label="Real part of OFDM signal") plt.title("OFDM Signal") plt.xlabel("Time (s)") plt.ylabel("Amplitude") plt.grid(True) plt.legend() plt.show() # Print the results print(f"Shannon Capacity: {C} bps") print(f"Path Loss: {PL}") print(f"Beamforming Weight: {beam_weight}") print(f"MIMO Capacity: {mimo_cap} bps") print(f"Energy Efficiency: {ee} Mbps/Watt")
@bstanis1237Ай бұрын
@@Zabt_Nawia هل ممكن ايميلك اتواصل مع حضرتك ضروري الله يكرمك
@bstanis1237Ай бұрын
@@Zabt_Nawia الله يكرمك يارب ويفرح قلبك هل الكود كامل؟ مافيه كودات اخري؟ فضلا منك هل فيه ملفات اخري؟ فقط حتي لا اتوه ويكون عندي تنفيذ صحيح ومتكامل وعلي حسب ما اود تطويره وتغييره !
@Zabt_NawiaАй бұрын
@@bstanis1237 yes it is all we use
@bstanis1237Ай бұрын
@@Zabt_Nawia Allah bless you, but, please what about atoll files? Could you please also deliver them! I'm trying to gather all things as a big picture to move forward for developing my own system scenario, I mean it hard to crate those files by myself from scratch