  5G and beyond mobile networks will support heterogeneous use cases at an
unprecedented scale, thus demanding automated control and optimization of
network functionalities customized to the needs of individual users. Such
fine-grained control of the Radio Access Network (RAN) is not possible with the
current cellular architecture. To fill this gap, the Open RAN paradigm and its
specification introduce an open architecture with abstractions that enable
closed-loop control and provide data-driven, and intelligent optimization of
the RAN at the user level. This is obtained through custom RAN control
applications (i.e., xApps) deployed on near-real-time RAN Intelligent
Controller (near-RT RIC) at the edge of the network. Despite these premises, as
of today the research community lacks a sandbox to build data-driven xApps, and
create large-scale datasets for effective AI training. In this paper, we
address this by introducing ns-O-RAN, a software framework that integrates a
real-world, production-grade near-RT RIC with a 3GPP-based simulated
environment on ns-3, enabling the development of xApps and automated
large-scale data collection and testing of Deep Reinforcement Learning-driven
control policies for the optimization at the user-level. In addition, we
propose the first user-specific O-RAN Traffic Steering (TS) intelligent
handover framework. It uses Random Ensemble Mixture, combined with a
state-of-the-art Convolutional Neural Network architecture, to optimally assign
a serving base station to each user in the network. Our TS xApp, trained with
more than 40 million data points collected by ns-O-RAN, runs on the near-RT RIC
and controls its base stations. We evaluate the performance on a large-scale
deployment, showing that the xApp-based handover improves throughput and
spectral efficiency by an average of 50% over traditional handover heuristics,
with less mobility overhead.
