Cognitive radio networks have achieved higher efficiency in terms of spectrum usage; however they do not readily solve any competition for access among secondary users. Optimisation is applied to an underlay network to obtain the optimal solution for at least two secondary users operating simultaneously on the same channel. Performance measures are used as the target for optimisation. However, the objective function is difficult to obtain in closed form. For the performance measures, queueing theory, particularly weighted processor sharing techniques are employed to model the system dynamics and behaviour. Transmission power and the interference temperature limit are used to allocate weights to the secondary users. Queue length and waiting time functions obtained from the queuing models are used for optimisation. After establishing that the objective function can be considered to be pseudo‐convex, convex programming is then deployed to obtain the optimised solution. The results suggest that there is indeed an improvement in network performance after optimisation. The immediate benefits of such a system are firstly improved spectrum utilisation through adding multiple secondary users and secondly, through optimisation, higher performance that can be achieved by the secondary users.