A physically-based model for simulating inverter type air conditioners/heat pumps