State of charge estimation of thermal storages for distributed generation systems