The integration of cognitive radio and Ultra wideband (UWB) networks has attracted lots of research interests. Cognitive UWB networks not only provide very high data rates but also guarantee the uninterrupted communication of primary system operated in the same frequency band. In this work, the problem of the capacity analyses of cognitive UWB networks is investigated. Different from the conventional cognitive spectrum sharing model which can only utilize the idle spectrum hole, the cognitive UWB system can operate adaptively based on spectrum sensing results. Taking into account several factors such as the transmission power constraint of UWB, the interference constraint of the receivers in primary systems, the secondary UWB network capacity problem is modeled as a convex optimization problem over the transmission power. The optimal power allocation strategy and algorithm are derived based on this optimization problem. Two cases (Perfect Spectrum Sensing and Imperfect Spectrum Sensing) are studied in the paper. Numerical simulation results show that the proposed adaptive power allocationscheme improves the ergodic and outage capacity under both transmission power and interference constraints compared with constant transmission power scheme.