The greater demand variability caused by the high penetration of Distributed Generation (DG) challenges the LV grids. Although the DG supports the local load demand, its intermittent nature (i.e. renewables) can create undesired conditions: reverse power flow from the Low (LV) to Medium Voltage (MV) grid in case of low load demand and high power production, or overloading of the substation transformer in case of low power production and high load demand. The Smart Transformer (ST) offers the possibility to decouple under certain extents the Low Voltage (LV) grid from the MV grid, when a multiple stage configuration is chosen. In the LV side, the ST can change the grid frequency in order to modify the DG power production. Following a frequency variation, the DG P/f droop controllers adapt the injected power to the new frequency value, providing locally the power demanded by the loads. In this work, this feature is used for avoiding the reverse power flow in the MV grids. Approaching the zero power flow condition, the ST increases the frequency in order to curtail the DG production. However, this method may affect the conventional ST controller, originally designed for working at 50 Hz, that must be optimally designed for working under variable frequency condition. In this work, the Fractional-Order Repetitive Control (FORC) has been proposed as ST controller in order to deal with the frequency change, offering better performance than the Proportional-Resonant (PR) and Conventional Repetitive Controllers (CRC). The effectiveness of this method has been proved using the Control-Hardware-In-Loop (CHIL) evaluation by means of a Real Time Digital Simulator (RTDS).