Real genetic algorithm optimization for beamforming design in a cognitive radio