Optimal power allocation for cognitive radio based on a virtual noise threshold