The alteration of natural land cover to impervious surfaces during development increases stormwater runoff. Stormwater Control Measures (SCMs) are used to manage water quantity and enhance water quality by restoring the hydrologic cycle altered by development. Often, SCMs have an outflow pipe to handle overflows or to manage the release of water detained when infiltration is not possible. Traditionally, these are static controls (e.g. a small orifice is used to restrict the volume of outflow), however, these systems can be improved by instituting real-time controls (RTC). RTC improve the functionality of SCMs by dynamically controlling outflows to adjust to environmental conditions. A major impediment to the widespread implementation of RTC is the high cost of installation and operation. This study utilized machine learning methods to develop a forecasting approach for the implementation of low-cost RTC that were implemented on a programmable gate of the outlet structure of a multi-stage basin in southeastern Pennsylvania. The goals were to decrease the peak flow exiting the basin during rain events, increase the volume of water detained, decrease the number of overtopping events, maintain healthy vegetation in the basin, and protect the downstream vegetation from erosion. Multiple popular data science algorithms were evaluated including multiple linear regression and long short-term memory. These algorithms were used with a dataset, which consisted of four years of historical sensor data, collected in 5-minute intervals, to train models to predict water levels to optimize operations. The accuracy of 30 models with three different methods of handling missing values were compared. A long short-term memory model configured with a 30-minute lead time produced the best results. Having an approximate same lag time of 30 minutes for the contributing drainage area of the SCM provided a sufficient RTC functioning period to improve the performance of the outlet structure.