Opensolar Battery Modeling And Algorithm