###### Abstract
As a result, each O-RAN network instance managed by the models deployed as Non-RT RIC Applications (rApps) and Extended Applications (xApps) will have the capability to regulate the admission of RAN-level slices and ensure the maintenance of QoS in environments characterized by diverse traffic profiles. This approach is intended to safeguard the security of user data while ensuring operational efficiency. The key contributions of this paper are the following:  
* **Integration of FL with the O-RAN**: The design and implementation of an FL system leveraging the deployment of rApps and xApps aim to address dynamic resource allocation in O-RAN. This approach ensures data privacy and minimizes communication overhead by exchanging model updates instead of raw data. * **Adaptability and Scalability**: The proposed system enables slicing admission control and QoS maintenance across diverse O-RAN instances with varying resource request distributions, demonstrating flexibility in handling heterogeneous network conditions. * **Performance Evaluation and Comparative Analysis**: The Federated Deep Reinforcement Learning (FDRL) framework has been rigorously evaluated against centralized systems, demonstrating superior learning efficiency, bandwidth consumption, and resiliency in distributed environments, including multi-client systems and loss-of-synchronization scenarios. In this case, it is understood that each client in the federated system corresponds to an O-RAN instance. * **Case Study Validation**: A case study simulating realistic traffic profiles validates the efficacy of the proposed framework in dynamically managing radio and computational resources, highlighting its superiority over centralized approaches. * **Theoretical and Empirical Contribution**: This work bridges the gap between theoretical and empirical studies by proposing an FDRL framework that is both conceptually grounded in the limitations of centralized ML for O-RAN and experimentally validated through performance evaluation in diverse network scenarios. Unlike prior studies that either focused on theoretical models or purely centralized learning approaches, our framework demonstrates practical feasibility and improvements in learning efficiency, bandwidth consumption, and resilience in real-world-inspired conditions. Furthermore, we have developed a theoretical model based on an Integer Linear Programming (ILP) solution to compare and validate the goodness of the proposed FDRL solution. This article builds on these ideas to explore the role of FL in improving the intelligence and adaptability of future cellular networks. It continues with Section 2 dedicated to provide an overview of existing research on the 5G RAN and MEC ML-based resource allocation related to the O-RAN and federated learning. Section 3 describes the system model of the proposed solution, including the implementation scenario where its foundational technologies are integrated and the Deep Q-Network (DQN) models deployed as xApps within the O-RAN framework. In addition, this section details the configuration selected to carry out the simulation stage and the results of the tests performed under various scenarios to validate the correct operation. Section 4 shows the results of applying the proposed system in a realistic smart city use case, where different RAN instances are deployed throughout the city and face various simulated traffic profiles. Finally, the paper concludes by summarizing the key findings and outlining future research directions.