# Least square error channel estimation in the presence of AWGN noise

I want to implement Least Square (LS) channel estimation method in the presense of AWGN noise in MATLAB.

$$y(n) = x(n) * h(n)$$

$$Y(k) = X(k)H(K)$$

Y(k) is the received signal in frequency domain. According to LS algorithm, to estimate the channel

$$H_{estimate} = Y(k)/X(k)$$

Mean square error (MSE) is used to measure the performance of the estimator. MSE is defined as

MSE = $$E(|H(k) - H_{estimate}|^2)$$

Question is, how to get the value of $$H(k)$$ of white noise?

I wrote the following code in matlab, but it doesn't produce constant values in frequency.

 white_noise_time_domain = sqrt(1/2)*(randn(N,1)+1i*randn(n,1));
white_noise_freq_response = fftshift(fft(white_noise_time_domain));


white_noise_freq_response doesn't give flat response. I guess this is not the right way to calculate the frequency responce of white noise. Could someone explain me how to get frequency response of white noise in MATLAB?

• You seem to be saying that $h(n)$ is white noise, and that $y(n)$ is the convolution of the transmitted signal and the noise. If I understand correctly, you have a misconception: the noise is never convolved with the transmitted signal. – MBaz Mar 6 '20 at 21:59
• please see this post including code for a common approach for channel estimation: dsp.stackexchange.com/questions/63141/… – Dan Boschen Mar 7 '20 at 14:51
• @MBaz, Why do you say input signal is not convolved with white noise. In general, input signal is convoluted with channel response, assuming any channel. Why the same reasoning cannot be extended in white noise case? I'm aware that AWGN noise is added in time domain. Can you please elaborate what is it that i'm missing? – spectre Mar 8 '20 at 7:47
• @spectre The discrete-time model of a communications system is $r = s \ast h + n$, where $r$ is the received signal, $s$ the transmitted signal, $h$ the (FIR) channel model, and $n$ the noise. There is no convolution with the noise anywhere. Of course, you can convolve with noise if you want to, but why would you do it? – MBaz Mar 8 '20 at 18:38
• @MBaz, the reason I want to write it in convolution form is because, convolution becomes multiplication in freq domain. To compare the performance of channel estimator using MSE, I need frequency response of noise/awgn channel. MSE = E(H(k)-Hestimate(k)).^2 – spectre Mar 8 '20 at 21:06