Towards a Smart Home Framework Moody Alam Agents, Interaction & Complexity (AIC) Group, School of Electronics and Computer Science, University of Southampton What is a smart home? Visions from the past Future Vision! The Present Green + Wired The Future Home, The Jetsons, 1962 The Smart Home, The Jetsons, 1962 Connected devices Home automation Sensors Future Homes, 1969 [A robot serving beer!] Future Homes, 1969 [A robot serving beer!] What is a smart home? • No agreed definition! • The IBM’s vision: 1. Instrumented 2. Interconnected 3. Intelligent Why is the Smart Home important? home comfort Renewable energy lights home automation home care electricity gas water, etc. Zero Carbon Homes Energy management chronicle diseases presence home hospitalization 5.38 Million Smart Homes by 2015 [Berg Insight] Smart home is an active research area • Academia • All top 10 Engi. & Tech Universities [Times higher Education]. • Caltech, MIT, Princeton, Cali-Berkeley, Southampton* • Industry • Governments – US, UK, Aus, Canada, China, EU, • Hundreds of companies- Microsoft, IBM, British Gas.. • Numerous sub-domains: home automation, energy conservation, elderly living. • We are interested in those sub-domains which require developing a software model of smart home. Typical workflow in such domains Modify/ Conclude Hypothesis Form a Hypothesis Analyse Results Build a Model Simulate /Optimise Typical workflow in such domains Modify/ Conclude Hypothesis Battery reduces cost True / False Compare costs Matlab / Java code Minimise cost given battery Form a Hypothesis Analyse Results Build a Model Simulate /Optimise Typical workflow in such domains Modify/ Conclude Hypothesis Battery reduces cost True / False Compare costs Matlab / Java code Minimise cost given battery Form a Hypothesis Analyse Results Build a Model Simulate /Optimise What is the problem? Problem: These three phases (modelling, simulation and analysis) take up the most time. Solution: We propose our Smart Home Framework to speed up these phases. We are not the only smart people to have realised this problem! • Industry has the proprietary software toolkits. – – – – • Cost and Licenses! Platform-dependency! Limited interoperability between platforms. Focused on the company’s business. Academia has very few open-source toolkits: – Focused on narrow research issues – Models are not general and thus not extendable in other related domain Why is SH Framework a good idea? • Open-source and free of cost! • SHF has three core components each focused on a single phase: – Model Classes Model building phase – Optimiser Optimisation / Simulation phase – Visualiser Analyse Results Smart Home Framework Building a Model Optimisation Analysis Smart Home Framework Building a Model Optimisation Analysis SHF: Model Classes: Overview • We take a bottom-up modelling approach: – Smart Home is made of different components (e.g. appliances and storage). – We provide general models for these components. – These components can be integrated to create a smart home. • This general model of a smart home: – Has an understanding of its components and how are they related – Can be extended to specific models • These smart homes can be connected together to form a smart community. Modelling a smart home Generation Appliances • A collection of: – Appliances – Generators – Storage – Electric Vehicle • Relationships: EVs Storage Grid – Between all above – Grid (Tariff) – Other Smart homes Grid Modelling a smart home • SH Framework contains – Interfaces – Abstract classes – And Implementation of abstract classes • To model – – – – Generation Storage Appliances Appliances’ Use SHF: Modelling Generation & Storage • Modelling Generation Sources – Microgeneration (e.g. Solar Panels / Wind Turbine) – Grid • Modelling Storage Facilities – Electric Batteries – EV Batteries SHF: Appliances and their usage • Support to model appliances (i.e. Loads): – SHF already have implementation of common home devices (e.g. TV, Oven) – Abstract classes to include new appliances • Modelling appliances’ usage (i.e. Load Events): – – – – – Deferrable and Non-Deferrable Interruptible and Non-Interruptable Critical Baseload Combination of above (e.g. a deferrable interruptible critical load event) SHF: Modelling implicit understanding of devices and their relationships • Consumption + Battery Charging = Generation • Battery has a limited number of charging cycles. • EV battery is available only certain times a day. Modelling is easy: Code Snippets • Adding renewable generation and/or grid is easy: – agent.addEnergySource(new SolarPanel(1.5kW)); – agent.addEnergySource(new WindTurbine(2kW)); – agent.addEnergySource(new Grid(tariff)); • Creating appliances and Load Events: – TV tv = new TV(0.3kW) – agent.addEvent(new onDeferrableLoadEvent(tv,start,end); • Adding storage – agent.addStorage(new Battery( 2kWh, 0.5kW, 10%loss)); Smart Home Framework Building a Model Optimisation Analysis SHF: Optimisation in a smart home • Optimisation depends on the structure or formation of your smart home model: – Generally speaking, you may be solving a convex or non-convex problem to answer your research question. – Your choice of optimiser will depend on the structure of your problem. • SHF architecture allows you to plug-in any optimiser of your choice! SHF comes with a default optimiser • IBM’s CPLEX Optimiser is available as the default plug-in optimiser: – Free of cost to academia. – Supports LP, MIP and Convex optimisation – Catch: License needed for commercial use. • So if your optimisation problem falls under LP, IP, MIP or certain convex subclasses, then you can use the default optimiser! • This optimiser is sufficient for the common optimisation problems. For advanced and complex optimisation problems (e.g. non-convex) you can just plug-in a general solver of your choice. SHF and IBM CPLEX • An optimisation problem can be expressed as a: – Model (variables, and constraints.) – Objective function • SHF already have a smart home CPLEX model (Java code). • Commonly used objective functions are already implemented, e.g. – Maximise Preference, Minimise Cost/Carbon • If your objective function is not already implemented, you can just write a new objective function and use the existing CPLEX home model! Smart Home Framework Building a Model Optimisation Analysis SHF: Analysing results • SHF comes with a visualiser. • Code is there to visualise common devices / events in a smart home. – Plots for generation, consumption, battery usage • Visualiser is extendible, easy to include new plots etc. • Results available in XML, CSV formats Smart Home Demo: Modelling, Optimisation and Analysis Beyond a single smart home: Smart communities • The framework has all the building blocks to create a community of connected homes. • A small community be readily modelled to test different communal aspects: – Energy Exchange – Electric vehicle charging – Battery Usage minimisation – Coalition formation for group buying Smart Community Demo: Reducing the battery usage through energy exchange Questions?? Thank you!