Cognitive radio is an important technology developed by the next generation of wireless networks to effectively use limited spectrum resources and meet the rapidly growing demand for wireless applications and services. However, reliability is very important but not well-resolved problem in cognitive wireless networks. In this paper, we focus on the algorithm of interference avoidance in the presence of secondary user with traditional power control capabilities. Using the reinforcement learning algorithm based on proximal policy optimization, and adjusting its own transmit power, secondary user achieves its own quality of service requirements. Through experiments, it is proved that the algorithm used in this paper can not only deal with different secondary user power control strategies, but also show good stability in the changes of wireless environment noise and small amount data of the environment.