Performance analysis and optimization of wireless access in cognitive and heterogeneous networks