function Rate = calc_achievable_rate(h_hat, h, sigma2_n)
%     NMSE = norm(h_hat-h)^2/norm(h)^2; 
%     NMSE = log(norm(1+h_hat'*h/sigma2_n));
%     NMSE = log(norm(1+h'*h_hat/sigma2_n));
w=h_hat/norm(h_hat);
    Rate = log((1+(abs(w'*h))^2/sigma2_n/(norm(w))^2));
%     Rate = log((1+(abs(h_hat'*h))^2/sigma2_n));
end
