Design And Optimization Of Energy Systems With Effective Carbon Control