This is the Graduate Thesis Project for the department of Energy Systems Engineering