Wide Band Spectrum Sensing Using Window Based Energy Detector For AWGN And Rayleigh Channels