Modeling prosumer behavior in the smart grid and implementing privacy design in IoT