Optimization And Control Of Smart Renewable Energy Systems