ess4ee
A Jupyter Notebook-based template that simplifies the creation of expert systems for improving energy efficiency in manufacturing.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.1%) to scientific vocabulary
Repository
A Jupyter Notebook-based template that simplifies the creation of expert systems for improving energy efficiency in manufacturing.
Basic Info
- Host: GitHub
- Owner: Borika95
- License: mit
- Language: Jupyter Notebook
- Default Branch: main
- Size: 129 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Expert System Shell for Energy Efficiency (ESS4EE)
This is the README file for the expert system shell. It contains all the information necessary to understand and use the project.
Make sure to keep this file up to date so that anyone who wants to use the project can easily understand how to use it and what it does. Please follow the template provided in this file when adding new content to it to ensure that the README file continues to be easy to read and understand.
What is an expert system?
An expert system is a computer program designed to simulate the decision-making abilities of a human expert in a specific domain. These systems apply knowledge and inference rules to analyze data and provide conclusions, recommendations, or solutions to problems.
The Expert System Shell for Energy Efficiency (ESS4EE) enables users with minimal programming expertise to create their own expert systems for improving energy efficiency in manufactruing. It provides them with a predefined structure and easy-to-understand examples to guide them through the implementation process.
Table of Contents
- Detailed Description
- Installation Guide
- User Guide
- License
- Contributors
## Detailed Description
This Expert System Shell is divided into several components that work together to create an expert system after being filled.
In the following sections, each component is explained to help understand how they work together. ### Interaction Overview
### Knowledge Base
The Knowledge Base acts as a convenient display of information relevant to the machine and its energy consumption. Not all of these components are relevant for the results of the expert system, and the ones that are have links to the components where they are actually implemented. The knowledge base consists of 8 components:
- Machine description: contains an image that visualizes the machine and how it works, may have a link to website for further clarification.
- Data point definition: defines the data points that are relevant for the machine's energy consumption.
- EnPI definition: defines the Energy Performance Indicators (EnPIs), that are used for the expert system.
- Energy information: displays other kinds of information, concerning energy consumption of the machine.
- Fuzzy rule base definition: defines fuzzy rules that are used to assess the energy performance of the machine.
- Sample data: displays sample data that demonstrate the required structure of measurement data for successfully utilizing the expert system.
- Case knowledge: displays case-specific knowledge for the expert system.
- Result: displays results of the expert system stored in results.txt. ### Process Interface The Process Interface serves as the bridge between the Main User Interface and external machine data sources. It collects data through connectors, which is then used by the Knowledge Base and Inference Engine for further processing and visualization. The Process Interface includes the following component:
- Connectors: The Process Interface includes connectors that facilitate communication between the expert system and external data sources, such as a server with machine data. These connectors enable the retrieval of real-time or stored data for further processing.
Data Flow: The Process Interface collects and organizes machine-related data, which is then passed to the Helpers module. The Helpers module consists of data point adresses, algorithms, machine learning models, and visualizers that assist in analyzing and interpreting the information. Once processed, the data is sent to the Inference Engine, which applies Fuzzy Inference Systems (FIS) and Energy Performance Indicators (EnPIs) to generate meaningful insights.
For more details, check the process_interface.ipynb file.
Helpers
The Helpers component is a key part of the ESS4EE, supporting the analysis of input data through the integration of Machine Learning models, algorithms, and visualization functions. It also manages data point adresses to connect the system to the machines for data retrieval. The Helpers component consists of four subcomponents: 1. Data Point Addresses: This subcomponent manages the configuration for the OPC UA server, including the server URL and node IDs. These addresses are essential for the connectors in the Process Interface to establish connections with machines and retrieve data. 2. Machine Learning Models: The ML models subcomponent integrates machine learning capabilities into the system, enabling advanced tasks such as prediction, classification, and anomaly detection. It allows users to incorporate pre-trained or custom models, enhancing the system's intelligence and analytic capabilities. 3. Algorithms: This subcomponent handles the logic and processes necessary for data analysis, decision-making, and preprocessing. 4. Visualization Functions: The visualization functions create charts, graphs, and other visualizations to present data and results clearly. These visuals help users analyze trends, monitor system performance, and interpret the outcomes of computations, improving the overall understanding and usability of the system.
For more details, check the helpers.ipynb file.
Code Library
Additionally, the Helpers component includes a Code Library, which contains a collection of preexisting code examples for the subcomponents. These code snippets can be easily integrated into the shell, offering ready-made solutions for tasks related to the expert system. Users can also add their own custom code examples to the library, enabling the system to expand with personalized functions for future use.
For more details, check the code_library.ipynb file.
Inference Engine
The Inference Engine is responsible for applying rules and algorithms to the data provided by the Knowledge Base and Process Interface. It uses Fuzzy Inference Systems (FIS) and Energy Performance Indicators (EnPIs) to analyze the data, simulate decision-making processes, and generate recommendations for energy optimization.
For more details, check the inference_engine.ipynb file.
Main User Interface
The Main User Interface (UI) is the front-end component of the expert system that allows users to interact with the expert system. It provides a interface for data input, viewing results, and visualizing energy optimization recommendations. The UI offers both online and offline modes, allowing users to work with real-time or stored data. It also includes visualization tools to display the expert system’s output.
For more details, check the mainuserinterface.ipynb file.
Installation Guide
This installation guide will help you clone the project to your machine running Windows and open it in JupyterLab to start working on it.
Make sure you have git and Python 3.12 installed on your machine.
To check this, open a terminal and type the following commands:
bash
git --version
python --version
In case you don't have them installed, you can use the following links to download them:
- Git
- Python
You will need pip to install the required packages. It should be installed automatically with Python.
To check if pip is installed on your machine, type the following command in the terminal:
bash
python -m pip --version
This installation guide will include a general version which requires no IDE and a version for PyCharm.
General Version
Open a terminal and navigate to the directory where you want to clone the repository.
Then type the following commands:
bash
git clone https://github.com/Borika95/ESS4EE.git
cd ESS4EE
Now, to create and activate a virtual environment:
bash
python -m venv venv
venv/Scripts/activate
With the virtual environment activated, you can now install the required packages:
bash
pip install -r requirements.txt
Wait for the required packages to be installed. Once the installation is complete, you can start working on the project.
To open the project in JupyterLab, type the following command:
bash
jupyter lab
This will open JupyterLab in your default browser. You can now start working on the project.
PyCharm Version
Before cloning the repository, make sure your GitHub account is linked to PyCharm. To do this, go to:
File -> Settings -> Version Control -> GitHub
Click on the + sign and enter your GitHub credentials. Once you have linked your GitHub account to PyCharm,
you can clone the repository. To do this, go to:
File -> Project from Version Control, enter the following URL:
https://github.com/Borika95/ESS4EE.git and choose the directory where you want the project to be cloned.
Once the project is cloned, open a terminal and create a virtual environment:
bash
python -m venv venv
venv/Scripts/activate
With the virtual environment activated, you can now install the required packages:
bash
pip install -r requirements.txt
Wait for the required packages to be installed.
Now you need to set up a python interpreter. To do this, go to:
File -> Settings -> Project: [Your Project Name] -> Python Interpreter
Click Add Interpreter -> Add local Interpreter, choose Select existing and
add the path <path-to-your-project>/venv/Scripts/python.exe. Click OK to save the changes.
Now you are all set up to start working on the project.
If you prefer JupyterLab over PyCharm, open the terminal and type:
bash
jupyter lab
This will open JupyterLab in your default browser.
User Guide
This section will guide you through the process of creating an expert system using the ESS4EE.
After setting up the project as described in the Installation Guide, you should start by filling in the components of the knowledge base jupyter notebook
file. You can find the file here.
You will notice that the file is designed in a way that guides you through the process by providing you with examples and explanations for each component, as well as links to the relevant files.
With the knowledge base file completed, you already have implemented a big part of the expert system. The next step is to fill in the remaining components of the helpers, namely the
algorithms.py file.
You can directly edit the file by implementing your own algorithms or use one of the algorithms provided in the [code library](./ES-Shell/Helpers/CodeLibrary/codelibrary.ipynb).
With that, you are ready to implement the final component of the expert system, the main user interface.
You can find the file here.
The knowledge acquisition part of the component is already implemented, so you only need to complete the results block and the visualization afterward.
The results block is where you will define how the expert system should act when asked to return a result.
We distinguish between an offline and an online mode, which can be chosen by the user via a dropdown window.
Of your interest are the following lines of code:
- line 11: The path to the offline data which should point to the .csv file containing offline data you want to use. If your system does not have offline data, you can ignore this part.
- lines 18-20: This part of the code calls the readopcuavalues function, which reads the data from the OPC UA server with the server URL and node ID defined in the datapointdefinition.py file located in the helpers component.
- lines 33-53: This part of the code is where the output of your expert system is calculated.
The rest of the code block creates the dropdown window and makes sure that the output block always displays the correct results (e.g. results for offline data if chosen mode is offline). If you don't want to use the dropdown window,
feel free to remove all the code from the code block except lines 33-53 and either line 11, when using offline data, or lines 18-20, when using online data.
You can use the last code block in the file to visualize the results of your expert system.
If you're done, you can run your mainuserinterface.ipynb file, and it should display the results of your expert system and write them to the results.txt file.
You can also refer to the TO-DO list to ensure you complete every step without missing anything.
For additional information and more detailed instructions on individual components, please refer to the Detailed Description
section or the Jupyter Notebook files located in the directory of each respective component.
License
The project uses the MIT License, so feel free to use it for your own projects.
Contributors
Owner
- Login: Borika95
- Kind: user
- Repositories: 1
- Profile: https://github.com/Borika95
Citation (CITATION.cff)
cff-version: 1.0.0 message: "If you use this software, please cite it as below." authors: - family-names: "Ioshchikhes" given-names: "Borys" orcid: "0000-0003-2798-4276" - family-names: "Yoldas" given-names: "Cekim" - family-names: "Horn" given-names: "Lukas" - family-names: "Asl" given-names: "Narges Ahmadi" - family-names: "Zimmer" given-names: "Lasse" - family-names: "Wigandt" given-names: "Andre" title: "Expert System Shell for Energy Efficiency (ESS4EE)" version: 1.0.0 doi: tba date-released: 2025-01-30 url: "https://github.com/Borika95/ESS4EE"
GitHub Events
Total
- Release event: 1
- Push event: 9
- Create event: 3
Last Year
- Release event: 1
- Push event: 9
- Create event: 3