# Wireless_Communication_System-HW2-Rayleigh_fading_channel_simulator **Repository Path**: eric_kay/Wireless_Communication_System-HW2-Rayleigh_fading_channel_simulator ## Basic Information - **Project Name**: Wireless_Communication_System-HW2-Rayleigh_fading_channel_simulator - **Description**: Simulate Rayleigh fading channel by Filtered Gaussian Noise Method and Sum of Sinusoids Methods - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2020-04-18 - **Last Updated**: 2021-09-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Wireless_Communication_System-HW2-Rayleigh_fading_channel_simulator This is the homework from COM5170 Wireless Communication in National Tsing Hua University. We are going to implement a multipath fading channel simulator. There are two parts in this HW:
1. Implement a Rayleigh fading channel simulator based on the Filtered Gaussian Noise method * Plot the channel output for fmT = 0.01, 0.1 and 0.5 (t/T = 0 ~ 300) * Plot the channel output autocorrelation for fmT = 0.01, 0.1 and 0.5 (fm $\tau$ = 0 ~ 10) 2. Implement a Rayleigh fading channel simulator based on the Sum of Sinusoids method * Plot the channel output for M = 8 and 16 (fmT = 0.01, 0.1, 0.5 and t/T = 0 ~ 300) * Plot the channel output autocorrelation for M = 8 and 16 (fm $\tau$ = 0 ~10) ## Algorithm ### Filtered Gaussian Noise Method The following picture is the block diagram of Filtered Gaussain Noise Method. ![FGN_Block_diagram](https://github.com/ChenBlue/Wireless_Communication_System-HW2-Rayleigh_fading_channel_simulator/blob/master/FIG/filtered_gaussian_block_diagram.JPG)
Two Gaussian noise source are independent with zero mean and variance $\sigma ^2$. Low-pass filter is first-order low-pass filter. The equation is shown as following: $$ (g_{I,k+1},g_{Q,k+1})=\xi (g_{I,k},g_{Q,k})+(1-\xi )(w_{I,k},w_{Q,k}) $$ where $(w_{I,k},w_{Q,k})$ are filter input generated by Gaussian noise source.
The coefficient $\xi$ can be derived by following equation: $$ \xi =2-cos(\frac{\pi f_m T}{2})-\sqrt{(2-cos(\pi f_m T/2))^2 -1} $$ And the variance of Gaussian noise source can be derived by following equation: $$ \sigma ^2=\frac{1+\xi }{1-\xi }\frac{\Omega _p}{2} $$ where $\Omega _p/2$ is the power spectral densities of noise sources.
After generating g(t), I derive Envelope of the g(t) in dB-scale by $10\times log(\sqrt{g_I (t)^2 +g_Q (t)^2})$. ### Sum of Sinusoids method Assume channel is stationary and equal strength of multipath components- $$ g(t)=\sum ^N _{n=1} e ^{j(2\pi f_m tcos\theta _n + \hat{\phi}_n)} $$ For an isotropic scattering environment, assume that the incident angles are uniformly distributed: $$ \theta _n =\frac{2\pi n}{N}, n=1,2,...,N $$ ![frequency_pair](https://github.com/ChenBlue/Wireless_Communication_System-HW2-Rayleigh_fading_channel_simulator/blob/master/FIG/freq_pair.JPG)
Based on the figure above, we can see that some frequencies are the same. Therefore, we can rewrite the equation as following. $$ g(t)=g_I (t)+jg_Q (t)=\sqrt{2}([2\sum ^M _{n=1}(cos\beta _n cos2\pi f_n t)+\sqrt{2}cos\alpha cos2\pi f_m t]+j[2\sum ^M _{n=1} (sin\beta _n cos2\pi f_n t)+\sqrt{2} sin\alpha cos2\pi f_m t]) $$ where $ \alpha =\hat{\phi }_N =-\hat{\phi }\_{-N}$, $\beta _n =\hat{\phi}_n =-\hat{\phi}\_{-N}$, $M=\frac{1}{2}(\frac{N}{2}-1) $ ## Result The following figures are the result of my program. ### Filtered Gaussian Noise Method ![Filtered_gaussian_output](https://github.com/ChenBlue/Wireless_Communication_System-HW2-Rayleigh_fading_channel_simulator/blob/master/FIG/Filtered_Gaussian_Noise_Method_Output.jpg) ![Filtered_gaussian_autocorrelation](https://github.com/ChenBlue/Wireless_Communication_System-HW2-Rayleigh_fading_channel_simulator/blob/master/FIG/Filtered_Gaussian_Noise_Method_Autocorrelation.jpg) ### Sum of Sinusoids method #### M=8 ![Sum_sin_output8](https://github.com/ChenBlue/Wireless_Communication_System-HW2-Rayleigh_fading_channel_simulator/blob/master/FIG/Sum_of_Sinusoids_Output8.jpg) ![Sum_sin_autocorrelation8](https://github.com/ChenBlue/Wireless_Communication_System-HW2-Rayleigh_fading_channel_simulator/blob/master/FIG/Sum_of_Sinusoids_Autocorrelation8.jpg) #### M=16 ![Sum_sin_output16](https://github.com/ChenBlue/Wireless_Communication_System-HW2-Rayleigh_fading_channel_simulator/blob/master/FIG/Sum_of_Sinusoids_Output_16.jpg) ![Sum_sin_autocorrelation16](https://github.com/ChenBlue/Wireless_Communication_System-HW2-Rayleigh_fading_channel_simulator/blob/master/FIG/Sum_of_Sinusoids_Autocorrelation16.jpg)