BME AI-Studio Documentation BME AI-Studio Documentation Document revision 1.0 Document release date March 2021 Document number BST-BME688-AN001-00 Sales Part Number 0 273 017 016 Notes Data and descriptions in this document are subject to change without notice. Product photos and pictures are for illustration purposes only and may differ from the real product appearance.
Bosch Sensortec | BME AI-Studio Documentation 2 | 49 Table of Contents A. Overview ........................................................................................................................................................................ 5 1. 2. 3. Getting started ....................................................................................................................................................... 5 1.1 The BME688 Gas Sensor................................................
Bosch Sensortec | BME AI-Studio Documentation 2. 3. 4. 5. 3 | 49 Record Data ........................................................................................................................................................ 26 2.1 Overview ................................................................................................................................................. 26 2.2 Start recording ........................................................................................
Bosch Sensortec | BME AI-Studio Documentation 6. 4 | 49 5.11 Max. Training Rounds ............................................................................................................................. 44 5.12 Data Splitting .......................................................................................................................................... 44 Evaluate Algorithms ................................................................................................................
Bosch Sensortec | BME AI-Studio Documentation A. Overview 1. Getting started 5 | 49 Welcome to our “Getting Started” section of the Bosch BME AI-Studio. The BME AI-Studio brings together our BME board x8 (equipped with the new BME688 gas sensor) and our BME library. This section will give you a short introduction and a hands-on example on how to use the application. Click To Watch Full Video 1.1 The BME688 Gas Sensor See: "0:25 - The BME688 Gas Sensor" The BME688 gas sensor is like a digital nose.
Bosch Sensortec | BME AI-Studio Documentation 1.3 6 | 49 A Few Things To Keep In Mind See: "1:26 - A Few Things To Keep In Mind" Before we start with the measurements, there are three things to keep in mind: If you have a brand new BME board, you should stabilize the sensors on the board before taking any measurements. To do so, connect the board to power with a micro USB cable and let it run for at least 24 hours.
Bosch Sensortec | BME AI-Studio Documentation 1.7 7 | 49 Step 4: Record Filter Coffee See: "3:36 - Step 4: Record Filter Coffee" Finally, let us record the last specimen: filter coffee. Same procedure as with the espresso coffee: Place the filter coffee in a second container, press “Button 1” on the board and place it in the container along with the coffee. Again, record the gas composition for 30 minutes.
Bosch Sensortec | BME AI-Studio Documentation 1.9 8 | 49 Step 6: Create New Algorithm and Classes See: "5:37 - Step 6: Create New Algorithm And Classes" Now that we have recorded and imported the data into the specimen collection, it is finally time to create and train an algorithm. Switch to My Algorithms and select New algorithm. We can give this algorithm a name, let us call it “Coffee or Not”. In our exemplary use case, we wanted to detect when coffee is present.
Bosch Sensortec | BME AI-Studio Documentation 1.11 9 | 49 Step 8: Export The Algorithm See: "8:55 - Step 8: Export The Algorithm" As a last step, if you are happy with the result, you can export the algorithm as a BSEC Configuration File for the BME library (BSEC). This config file can be used together with the BME library (BSEC) in your project. 1.
Bosch Sensortec | BME AI-Studio Documentation 2. 10 | 49 Introduction The combination of BME AI-Studio with the BME board allows you to explore the great possibilities of the BME688 and the BME library (BSEC). It helps you validate gas sensor use cases for your product or application. Try and find out how well your gas sensing application can be fulfilled by the BME688. 2.
Bosch Sensortec | BME AI-Studio Documentation 11 | 49 BME AI-Studio BME board Photo software Camera V Train algorithm with labeled specimens Teach a child with labeled photos VI Evaluate and test algorithm Ask the child what he/she has learned 2.
Bosch Sensortec | BME AI-Studio Documentation 12 | 49 Human nose Sensor capability Digital nose blind for slow and steady changes reproducible precision absolute nose sensitive to special gases sensitive for different gases complementary nose individual sensitivity calibrated sensitivity objective nose highly emotional sober and rational not my own nose 2.
Bosch Sensortec | BME AI-Studio Documentation 2.5 13 | 49 How can I evaluate BME688 performance for a specific use case? The BME AI-Studio is the perfect tool to support you in the quest of finding out whether a specific use case can be tackled with the BME688 gas sensor.
Bosch Sensortec | BME AI-Studio Documentation 14 | 49 Before starting the measurement, it is wise to spend some thoughts on the right testing environment. This also means choosing how controlled your setup should be. The two kinds of measurements are: Lab recording where the gas atmosphere is fully controlled. These measurements make it easy for the algorithm to distinguish between different gas compositions and are therefore ideal to test first.
Bosch Sensortec | BME AI-Studio Documentation 15 | 49 2.5.3 Phase III: Duty Cycle Exploration – balancing power consumption and performance A duty cycle exploration is important if you want to optimize power consumption of the BME688 for your application. Therefore, the purpose of duty cycle exploration is to find the best duty cycle for your use case – it is the one that uses a minimum amount of energy while still providing very good performance.
Bosch Sensortec | BME AI-Studio Documentation 3. Glossary 3.1 Sensor Board 16 | 49 BME board An experimental board with BME688 sensors. The BME board x8 comes with eight BME688 sensors. BME board configuration The board configuration states which sensor runs which sensor mode. HP/RDC combination Each sensor can operate with a specific setting that consists of Heater profile (HP) Duty cycle (RDC) Hence, the term HP/RDC combination.
Bosch Sensortec | BME AI-Studio Documentation 17 | 49 Please note The duration of a step of a heater profile is calculated with a time base of 140 ms. That means e.g. a duration of 2 will result in a duration of 2 * 140 ms = 280 ms.
Bosch Sensortec | BME AI-Studio Documentation 18 | 49 Duty cycle Repeated sequence of a defined number of scanning cycles followed by a defined number of sleeping cycles. E.g. duty cycle with 5 scanning cycles and 10 sleeping cycles (RDC-5-10): Each scanning cycle can be viewed as one iteration of a heater profile. Therefore, the duration of each scanning cycle is derived from the duration of the heater profile used. The duration of each sleeping cycle is always equal to the duration of a scanning cycle.
Bosch Sensortec | BME AI-Studio Documentation 19 | 49 Tea Specimen One specific gas composition that the sensors on the BME board are exposed to during measurement (e.g. an object, a specific situation, a smell, gas, etc.). Session raw data / raw data The raw data recorded during a measurement session, which is saved to the SD card. This includes data from all eight sensors on the BME board x8.
Bosch Sensortec | BME AI-Studio Documentation 3.3 20 | 49 Algorithm Algorithm A neural net for classification, including multiple classes with added specimens, as well as machine learning settings and results. The specimen data of the added specimens are split and used for training and verification of the neural net (training and test data). Training result consists of a confusion matrix and performance indicators, e.g. accuracy.
Bosch Sensortec | BME AI-Studio Documentation B. Process Steps 1. Configure Board 1.1 Overview 21 | 49 The first step in the process of using a BME board with the BMEAI-Studio is to configure the board. This step prepares the boards with a proper configuration for recording. The configuration is first defined within the application and then saved as a configuration file that has to be transferred onto the SD card of the BME board.
Bosch Sensortec | BME AI-Studio Documentation 22 | 49 It is important to pay attention to individual combinations of heater profiles (HP) and duty Cycles (RDC), so called HP/RDC combinations. Each sensor runs in a specific HP/RDC combination that determines the behavior how data is recorded. Not only is this important to the configuration of the boards and the recording of the data, but also for creating and training algorithms. One algorithm can use only identical HP/RDC combinations for training. 1.
Bosch Sensortec | BME AI-Studio Documentation 23 | 49 Other board types coming soon In a future release of BME AI-Studio, we plan to have the possibility to choose other BME boards. 1.3 Board Mode The board mode can be set to different modes, depending on your goal. Warning Fabric-new boards need to undergo a stabilization procedure. For stabilization, you can use any board mode as long as you let it run for 24 hours. Sensor board Default HP/RDC is used to perform standard measurements.
Bosch Sensortec | BME AI-Studio Documentation 24 | 49 Review heater profiles Once you have selected your desired heater profiles, you will see them in the corresponding table. To quickly remove heater profiles from the list, you can click on X. Please note If you have chosen "Sensor board Default HP/RDC" for board mode you cannot choose any heater profile. The standard profile is selected automatically.
Bosch Sensortec | BME AI-Studio Documentation 1.6 25 | 49 Board Layout This option determines how the HP/RDC combinations are distributed over the available sensors on the BME board. You can choose between three options: Grouped places the combinations in a grouped way on the board. This can be thought of as sequentially picking the sensors combination by combining and placing them on the board. It is the most obvious and easy to understand distribution.
Bosch Sensortec | BME AI-Studio Documentation 2. Record Data 2.1 Overview 26 | 49 Once you configured your BME board, you are ready to make some measurements and record data. During this step, you do not need the BME AI-Studio application. You can record data with just the BME board. In order to produce meaningful data, you should pay attention to the following important points: Try to capture realistic situations The data that you record will later be used to train algorithms.
Bosch Sensortec | BME AI-Studio Documentation 2.2 27 | 49 Start recording Insert the SD card into the BME board. The SD card slot is on the top side of the BME board. Insert the card with its contacts facing towards the upper circuit board. Connect the BME board to power with an micro USB cable. Once the board is connected to power, it will automatically turn on and start recording. The red LED next to the USB connector should blink every two seconds. If it blinks rapidly, the board is not recording.
Bosch Sensortec | BME AI-Studio Documentation 28 | 49 Best practice The BME board x8 has an internal battery to keep track of time, but it is good practice to note down the exact date and time when you start your recording, so you can verify the data later. Using BME board with a battery pack For recordings in closed environments, you can use a battery pack to power the sensor board. A battery pack with 10.
Bosch Sensortec | BME AI-Studio Documentation 29 | 49 Define specimens manually during data import You can also add specimen definitions manually during import. See 3. Import Data for further details. Best practice As with the start of your recording, we recommend keeping notes of which specimens were recorded with the exact date and time for each specimen. 2.4 End recording Once you are finished recording your specimens, you can simply unplug the power.
Bosch Sensortec | BME AI-Studio Documentation 3. Import Data 3.1 Overview 30 | 49 After you recorded data with the BME board, it is now time to import the data into the application. During import, you can verify the data and define your specimens. You can import several measurements and collect everything in your specimen collection, before later proceeding to train algorithms. You can import data into a new project or into existing projects.
Bosch Sensortec | BME AI-Studio Documentation 31 | 49 Now, to import data, click Import Data. A file dialogue opens. You can … select the raw data file directly from the SD card. first copy the raw data file from the SD card onto your computer hard drive, and then select the file from your hard drive. Once you selected the raw data file, the data is being imported into your project and stored within the project folder of your project.
Bosch Sensortec | BME AI-Studio Documentation 3.3 32 | 49 Board ID This indicates which BME board has been used to record the data. Each board has a unique ID that is permanently stored on the board itself, which makes it uniquely identifiable. 3.4 Board Type This indicates the type of BME board used to record the data. 3.5 Board Mode This indicates the board mode in which the BME board was configured in when used to record the data. 3.
Bosch Sensortec | BME AI-Studio Documentation 33 | 49 Data plot You can view the specimen data in a visual plot. You can switch between: Four data channels Gas Data Channel Humidity Data Channel Temperature Data Channel Barometric Pressure Data Channel each sensor on the BME board Define specimens during measurement via on-board buttons During measurement, you can use the two buttons on the BME board x8 to mark specific moments as a new specimen.
Bosch Sensortec | BME AI-Studio Documentation 34 | 49 Label specimens You can label your recorded specimens either here during Import, or later within the Specimen Collection (see 4. Collect Specimens). Delete a specimen definition You can easily delete a specimen definition by clicking the X button.
Bosch Sensortec | BME AI-Studio Documentation 4. Collect Specimens 4.1 Overview 35 | 49 Once you imported the raw data files from your measurements, you find the imported data as individual specimens in your Specimen Collection. The specimens in this list are grouped by measurement session and sorted by import date by default. You can organize all your data here, before later proceeding to train algorithms.
Bosch Sensortec | BME AI-Studio Documentation 36 | 49 Search specimens You can search for specific specimens within the specimen collection via the search field above the list. Once you entered a search term, the list below will be filtered according to your search and show only specimens matching your search. Measurement session settings After importing measurement raw data into your specimen collection, you can always come back to the settings of each measurement session.
Bosch Sensortec | BME AI-Studio Documentation 37 | 49 Delete specimens Once you select one or multiple specimens, you can delete these specimens from your specimen Collection. BME AIStudio will ask you to confirm the action before deleting the specimens. The action cannot be undone, however only the definition of the specimen (e.g. its start and end time, its Label, etc.) is deleted.
Bosch Sensortec | BME AI-Studio Documentation 4.5 38 | 49 Start & End Time This indicates the date and time the selected specimen has been recorded within the respective measurement session. Within the Raw Data, the time information is stored in Coordinated Universal Time (UTC) and is here automatically displayed in your respective local time zone. 4.6 Duration This indicates the length of the measurement of the selected specimen, according to its start and end time. 4.
Bosch Sensortec | BME AI-Studio Documentation 39 | 49 The heater profile or list of heater profiles used to record the data of the selected specimen. If multiple heater profiles have been used, you can click Show Heater Profiles to see additional details of each heater profile. Duty cycle The duty cycle or list of duty cycles used to record the data of the selected specimen. If multiple duty cycles have been used, you can click Show Duty Cycles to see additional details of each duty cycle.
Bosch Sensortec | BME AI-Studio Documentation 5. Train Algorithms 5.1 Overview 40 | 49 Within the section My Algorithms you are able to use the data collected in your specimen collection to train (classification) algorithms. You are able to create multiple algorithms with a different data basis as well as various settings. Once trained you can compare the performance of the different algorithms and choose the one algorithm that fits best your use case (see Evaluate algorithms).
Bosch Sensortec | BME AI-Studio Documentation 41 | 49 Once you created a class, you can then select specimens from your specimen collection to add to that class. For example, if you recorded data from five different apples, you would add these specimens to your apple class. Those specimens where oranges were recorded, you would add to your oranges class. 5.5 Class Name & Color Give your class a name that describes the gas composition you want to distinguish.
Bosch Sensortec | BME AI-Studio Documentation 5.7 42 | 49 Data Balance This indicates how the data for your algorithm training is distributed over your classes. Ideally, the distribution should be balanced. If there is a little checkmark, everything is OK and the data is balanced enough for training. How data balance is calculated Each class consists of multiple specimens and each specimen has a duration.
Bosch Sensortec | BME AI-Studio Documentation 43 | 49 Please note Be aware that including the temperature data channel and humidity data channel needs careful attention, since the temperature and relative humidity may not directly reflect the environmental conditions. This is because both values are measured inside the metal packaging, which can be affected by self-heating effects of the BME688.
Bosch Sensortec | BME AI-Studio Documentation 5.11 44 | 49 Max. Training Rounds Choose the maximum number of training rounds for the training. Please note This is an expert setting. If you want to know more about training rounds, please get in touch with us. 5.12 Data Splitting Choose how much data should be used for training and testing respectively. Please note This is an expert setting. If you want to know more about data splitting, please get in touch with us.
Bosch Sensortec | BME AI-Studio Documentation 6. Evaluate Algorithms 6.1 Overview 45 | 49 The evaluation process of Machine Learning algorithms is maybe the most important part of all. It is about evaluating the performance of the different neural nets trained for each HP/RDC combination. Not only does the evaluation tell you how good the predictions of the algorithm are, but you also get information on how robust and stable the algorithm will operate in the field.
Bosch Sensortec | BME AI-Studio Documentation 46 | 49 The confusion matrix also helps you evaluate how severe errors are for your specific use case. False alarms in one or the other direction may be very different in their impact on your use case.
Bosch Sensortec | BME AI-Studio Documentation 47 | 49 It is based on the recall and precision, two quantities that relate the true positive case with its false alarms. Recall relates between all correctly predicted elements to a given class and all elements that actually belong to this class. While Precision relates between all correctly predicted elements to a given class and all elements that were predicted to this class.
Bosch Sensortec | BME AI-Studio Documentation 6.8 48 | 49 Additional Testing After training your algorithm, you can perform further tests of your algorithm using additional data from your specimen collection. These tests are meant to be conducted with specimen data, which has not been used during the original training of the algorithm, in order to give insight on how the algorithm performs with previously unknown or completely different data that you do not want to include in the training process.
Bosch Sensortec | BME AI-Studio Documentation 49 | 49 Bosch Sensortec GmbH Gerhard-Kindler-Straße 9 72770 Reutlingen / Germany contact@bosch-sensortec.com www.bosch-sensortec.