Defining microgrids: from technology to law