function o = F(  pu ,pd, h_ud , h_hat, hu, hd , lamda, gama  , noise_var )
o = log10(noise_var^2 + h_ud*pu + hd*pd) - lamda*pd/log(2) + log10(noise_var^2 + hu*pu + h_hat *pd) - gama*pu/log(2); 

