SPARC: Solar Powered Advanced Renewable Control

SPARC: Solar Powered Advanced Renewable Control

SPARC: Solar Powered Advanced Renewable Control, aims to address the challenge faced by homeowners with solar panels: reducing reliance on non-renewable energy like coal, gas, and nuclear power. However, this often requires costly smart devices and vendor-specific energy management systems. Moreover, connecting household appliances to external platforms raises concerns about potential errors and data security.

The core objective of SPARC is straightforward. Each morning, users should receive phone notifications with optimal scheduling times for appliances like dishwashers and washing machines. This allows for preparation and delayed execution before leaving for work. Furthermore, users can pose specific queries such as: "When is the best time today for my oven's self-cleaning cycle?" or "What is the projected energy output for the next five days?"

Implementation

Source data

The SPARC system leverages the capabilities of the HTTP Client module to interact with external data providers. Specifically, it connects to Solcast, a service specializing in solar resource and forecasting data. Through this connection, SPARC acquires critical irradiance power metrics, which are essential for understanding and predicting solar energy availability.

The retrieved data is not immediately utilized; instead, it undergoes a storage process. This storage solution is InfluxDB, a robust and highly efficient open-source timeseries database designed to handle large volumes of time-stamped data. The choice of InfluxDB ensures that the solar resource data is organized and readily accessible. Once stored, the data becomes available for retrieval by Drupal.

This entire process is handled via the ECA module, creating a separate model that connects the available actions.

The allocation algorithms

Basically, the system uses a bunch of complex algorithms to manage and distribute renewable energy efficiently. It relies on three specific types of allocation, each with its own unique features and optimization methods.:

  • Best-Fit Allocation: This method prioritizes minimizing residual energy after allocation. The system meticulously analyzes the available energy blocks and seeks to identify the block whose capacity most closely matches the required energy demand. By selecting the "best-fit," SPARC aims to reduce energy waste and optimize utilization, ensuring minimal excess energy remains unallocated. This approach is particularly effective in scenarios where energy resources are limited or when precise matching is critical.
  • Worst-Fit Allocation: In contrast to best-fit, worst-fit allocation consistently selects the largest available energy block for any request, regardless of the actual requirement. This strategy might seem counterintuitive, but it can be advantageous in specific contexts. By maximizing the size of the allocated block, worst-fit aims to leave larger contiguous blocks of energy available for future requests, preventing fragmentation and maintaining flexibility. This approach can be beneficial when future energy demands are unpredictable or when large, uninterrupted blocks of energy are anticipated.
  • First-Fit Allocation: The first-fit allocation strategy follows a straightforward sequential approach. The system scans the available energy blocks in a predefined order (e.g., by address or index) and allocates the first block encountered that meets the specified energy requirements. This method prioritizes speed and simplicity, making it suitable for scenarios where allocation decisions need to be made rapidly. While it may not always yield the most optimal energy utilization, first-fit provides a reliable and efficient way to assign resources.

These three allocation strategies—best-fit, worst-fit, and first-fit—provide SPARC with a flexible and adaptable framework for managing energy distribution. The selection of the most appropriate allocation type depends on various factors, including the nature of the energy demand, the availability of resources, and the specific operational goals of the system.

Notification System

The SPARC system utilizes Discord as its primary platform for outputting real-time data and disseminating important messages.

To interface with Discord's functionalities, the system leverages DiscordPHP. This library acts as an intermediary, effectively wrapping both the Discord REST API, enabling programmatic interactions with Discord's data and resources, and the WebSocket APIs, facilitating continuous, bi-directional communication for instant updates and notifications.

A contrib Drupal module acts as the crucial bridge between the Discord ecosystem and Drupal, facilitated by a specific package. This integration module enables smooth data exchange and command execution, ensuring a seamless connection between the Drupal-based system and the Discord platform.

The Drupal module plays a vital role in processing incoming messages from Discord. When messages arrive, the module triggers specific events designed for Event-Condition-Action (ECA) models within the system. This mechanism enables the system to react dynamically to Discord messages and execute pre-defined actions based on their content.

Furthermore, the SPARC system can be actively controlled and managed through Discord. Users can issue commands directly via Discord messages to initiate the execution of complex calculation algorithms. This capability provides a convenient and accessible way to interact with the system's core functionality, triggering computations and retrieving results in real-time.

The future

Integration of Forecast.solar as an additional data source:

Explore and implement the integration of Forecast.solar's API to incorporate real-time and predictive solar irradiance and weather data into SPARC. This will provide another set of valuable insights for optimizing energy management and resource allocation.

Utilization of EPREL API for device metrics lookup

  • Develop a module that leverages the European Product Registry for Energy Labelling (EPREL) API in conjunction with Drupal's Entity API. This will enable the retrieval of detailed energy metrics and specifications for appliances registered in the EPREL database.
  • Implement a user interface within the application, allowing users to search for devices and access relevant metrics.

Creation of personalized allocation templates

  • Design and implement a feature that allows users to create customized energy allocation templates. These templates should be based on individual preferences, usage patterns, and priorities.
  • Provide a flexible and intuitive interface where users can define rules, schedules, and thresholds for energy distribution among different devices and applications.
  • Consider implementing predefined templates as a starting point for users.

Transition from EPREL to local appliance consumption data

  • Develop a mechanism to collect and utilize real-time, locally gathered appliance consumption data as the primary source for energy usage analysis. This entails integrating with smart meters, IoT devices, or other data collection points to capture precise and granular consumption data.
  • Create a system for data aggregation, processing, and visualization to enable users to track and manage their energy consumption effectively.
  • Plan for a phased approach to replace EPREL data, ensuring a smooth transition and data integrity.

ENTSO-E: Powering Algorithm Changes

Integrate real-time energy price data sourced from ENTSO-E, a leading association for European transmission system operators. This data feed provides up-to-the-minute market prices for electricity. 

Instead of a fixed consumption-based allocation strategy, SPARC employs a dynamic cost-based optimization approach. This means that energy allocation shifts from meeting a pre-determined demand to minimizing expenditure. The real-time price data directly influences appliance scheduling decisions. 

The SPARC algorithm will be designed to analyze the incoming price signals and strategically schedule appliance operations during periods of lower energy costs. By prioritizing these lower-cost energy windows, SPARC aims to significantly reduce overall energy expenses for the user or organization. The system effectively leverages market fluctuations to optimize energy consumption patterns and achieve cost savings.

Summary

In essence, SPARC is a system designed to optimize solar energy usage through data management, intelligent scheduling algorithms, and user interaction via Discord, with plans for future expansion and integration with additional data sources.

Learn more about SPARC through these slides.

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please reach out to us at #thedroptimes channel on Drupal Slack and we will try to address the issue as best we can.

Related Organizations

Upcoming Events

Latest Opportunities