Functions and technologies for energy optimization of users and districts: lab test | IEEE Conference Publication | IEEE Xplore