FWGN model implementation vs explaination (textbook pages attached)

I came across the FWGN model for multipath channel simulation in the book: "MIMO-OFDM Wireless Comuunications with MATLAB"

Here is an explanation about Clarke/Gans model: Some code to generate a Chanel using this model is also in the book: here is some of it:

function [h,Nfft,Nifft,doppler_coeff]=FWGN_model(fm,fs,N)
% FWGN (Clarke/Gan) Model
% Input: fm= Maximum Doppler frquency
% fs= Sampling frequency, N = Number of samples
% Output: h = Complex fading channel
Nfft = 2^max(3,nextpow2(2*fm/fs*N)); % Nfft=2^n
Nifft = ceil(Nfft*fs/(2*fm));
% Generate the independent complex Gaussian random process
GI = randn(1,Nfft); GQ = randn(1,Nfft);
% Take FFT of real signal in order to make hermitian symmetric
CGI = fft(GI); CGQ = fft(GQ);
% Nfft sample Doppler spectrum generation
doppler_coeff = Doppler_spectrum(fm,Nfft);
% Do the filtering of the Gaussian random variables here
f_CGI = CGI.*sqrt(doppler_coeff); f_CGQ = CGQ.*sqrt(doppler_coeff);  % <--- Why sqrt ?
% Adjust sample size to take IFFT by (Nifft-Nfft) sample zero-padding
Filtered_CGI=[f_CGI(1:Nfft/2) zeros(1,Nifft-Nfft) f_CGI(Nfft/2+1:Nfft)];
Filtered_CGQ=[f_CGQ(1:Nfft/2) zeros(1,Nifft-Nfft) f_CGQ(Nfft/2+1:Nfft)];
hI = ifft(Filtered_CGI); hQ= ifft(Filtered_CGQ);
% Take the magnitude squared of the I and Q components and add them
rayEnvelope = sqrt(abs(hI).^2 + abs(hQ).^2);
% Compute the root mean squared value and normalize the envelope
rayRMS = sqrt(mean(rayEnvelope(1:N).*rayEnvelope(1:N)));
h = complex(real(hI(1:N)),-real(hQ(1:N)))/rayRMS;

I have noticed that this implementation multiplies the noise with a square root of the filter response in the frequency domain, why did the writer use the square root of the doppler spectrum ?

A similar representation is also present here.

EDIT: Another thing, the text doesn't mention the $-\pi/2$ phase shift nor does it implement it in the code. Why is that ? Is that just multiplication by -j ? If so, why negative ?

In formulas, if a random process $X(t)$ with power spectrum $S_X(\omega)$ is filtered by an LTI system with frequency response $H(\omega)$, the power spectrum $S_Y(\omega)$ of the output signal $Y(t)$ is given by
$$S_Y(\omega)=S_X(\omega)|H(\omega)|^2$$
• Than what is actually computed is:$$\sqrt{S_Y(\omega)}=\sqrt{S_X(\omega)}|H(\omega)|$$ am I right ? Also, I have edited the original question with another tiny question: Is the -pi/2 phase shift operation just the same as multiplying by -j ? If so, why negative ? – Mike Jan 5 '16 at 13:56
• Yes. And indeed, multiplying by $-j$ is equivalent to a phase shift of $-\pi/2$, because $-j=e^{-j\pi/2}$. – Matt L. Jan 5 '16 at 14:30
• Any specific reason why its a negative phase shift ? and multiplication by -j ? doesnt $h(t)=h_I(t) - jh_Q(t)$ than ? – Mike Jan 5 '16 at 15:12
• @Mike: Now that I look more closely at the diagram, I think the phase shift is redundant, it's actually just a multiplication by $j$ in the time domain, at least that's what they're doing in the matlab program. Furthermore, in matlab, they actually have $h(t)=h_I(t)-jh_Q(t)$ instead of the 'plus' sign in the diagram. – Matt L. Jan 5 '16 at 16:35