Construction Of A System For The Production Of Green Electricity With Optimization And Control Of Energy Resources