Improving the efficiency of renewable energy assets by optimizing the matching of supply and demand using a smart control algorithm