Traffic forecast is a critical aspect of effective traffic management and planning in cyber-physical systems (CPS). In this study, we present a novel approach to traffic prediction and regulation within cyber-physical systems (CPS), introducing the Gradient Rule based Fuzzy Controller. This innovative methodology utilizes dynamic fuzzy logic control enhanced with gradient-based rules to adapt signal timings in real-time, effectively addressing the variable nature of traffic. Our results demonstrate significant improvements in reducing total queue length and delay at intersections, with reductions of up to 91.23%. Furthermore, extensive simulations and evaluations underscore the superiority of our approach compared to state-of-the-art models, highlighting its flexibility and adaptability to diverse traffic scenarios. This research emphasizes the novelty of integrating gradient-based rules into fuzzy control techniques, offering a promising avenue for advancing traffic management systems in CPS environments.