Automatic real-time spectrum sensing using energy detection in software defined radio