icon

[Mind+ Training Model] Oscillation State Recognition Based on Mind+ Temporal Pattern Recognition

1. Project Introduction

This project originates from the need to visualize the motion patterns of simple pendulums and conical pendulums in high school physics experiments. In traditional experiments, students find it difficult to intuitively observe the dynamic data characteristics during motion. This project aims to utilize temporal pattern recognition technology to collect pendulum motion data (such as acceleration in the X, Y, and Z directions) through sensors, observe changes in the motion data on a platform, and, after model training, distinguish between the two different motion patterns of simple pendulums and conical pendulums. This helps students gain a deeper understanding of the physical differences between simple harmonic motion and conical pendulums, achieving a visual presentation and interactive exploration of abstract physical concepts.

2. Project Implementation Principles

This project uses temporal pattern recognition technology to automatically identify and simulate the motion patterns of simple pendulums and conical pendulums. The entire implementation process covers the whole process from data acquisition to model reasoning and application.

Specifically, the data collection and model training are first carried out through the Mind+ V2.0 model training platform (using an accelerometer as the data source), constructing a training set containing two types of motion data, and training a time series classification model based on this dataset; then, the model that meets the expectations is exported; the exported model is deployed to the K10 pendulum for inference application: the accelerometer of the K10 pendulum captures the swing motion data in real time, and the deployed time series model performs feature extraction and pattern comparison on the real-time time series data to infer the current swing type (simple pendulum/conical pendulum), realizing a closed-loop application of "data collection - model inference - dynamic feedback".

3. Software and hardware environment preparation

3.1 List of Hardware and Software Equipment

Note: Mind+ version v2.0.4 or higher is required during the model training phase.

3.2 Software Platform Preparation

Download and install Mind+ V2.0.4 or later from the official website . After installation, double-click to open it.

3.3 Hardware Connection

3.4 Data Acquisition

The first step in model training is preparing the dataset of time-series samples. Data collection involves two steps:

1. Enable serial port output (upload mode) for K10 data from the blanking board.

2. Data acquisition (model training) for temporal pattern recognition.

1. Enable serial port output (upload mode) for K10 data from the blanking board.

Open Mind+, select "New Project" in the menu bar, then click "Programming", select "Upload Mode" and click to complete project creation.

Click on "Extensions," find the blank board K10 in "Main Control Extensions," and download it. After downloading, click on the blank board K10 to load the main control. Once the main control is successfully loaded, click "Back" to switch to the programming interface.

Using the built-in accelerometer of the K10 linear motion board, triaxial data (x, y, z) is acquired in real time. The sampling interval is set to 0.1s (i.e., 10Hz), and the acceleration data is output via serial port.

Click Connect Device, select the identified K10 port on the blank board, and complete the connection.

After the device is successfully connected, click "Upload" and wait for the upload to complete.

After the program is successfully uploaded, the device connection needs to be disconnected in time to avoid serial port occupation issues when adding sample data.

2. Data acquisition (model training) for temporal pattern recognition.

Click the "Home" icon to return to the Mind+ V2.0 homepage. In the menu bar, select "New Project," then click "Model Training." In the training options, find "Temporal Pattern Recognition" and click it to complete project creation.

After the project is successfully created, you will be redirected to a new quick experience interface for timing pattern recognition.

Click the "Add Category" button to create the necessary categories for the image classification task. Users can add multiple categories according to project needs for subsequent data collection and model training.

After the category is created, edit the category name to "Pendulum" and add sample data by collecting real-time data directly via serial port.

Click "Collect," then in the serial port settings, click "Get Serial Port." In the pop-up "Select Serial Port Device," select the serial port debugging device.

After the development board's serial port is successfully connected, click "Acquire" to start real-time data acquisition. On the "Real-time Data" interface, you can see a continuously updated line graph, which intuitively displays the time-series changes of the sensor output.

During data acquisition, the connection between the K10 data acquisition board and the computer must not be disconnected. During data acquisition, the K10 data acquisition board must be held handheld while performing the corresponding actions. It is recommended to have at least 10 data samples, and to maintain consistent actions while acquiring data samples. The data acquisition time for each sample should ideally be controlled to 3-5 seconds.

Next, you can add sample data for the "conical pendulum" category in the same way.

3.5 Model Training

After completing the training parameter settings, click "Train Model" to start training (if no settings are made, the system default parameters can be used directly).

3.6 Model Validation

After the model training is complete, the model performance can be tested in the verification area. Hold the K10 handheld device and perform actions, then observe whether the output results match the actual actions to determine the accuracy of the model's recognition.

3.7 Model Export

Once the model validation results meet expectations, the deployment phase can begin.

Click "Export Model" → Name the model → Save.

4. Project Production

Select "New Project" in the menu bar, then click "Programming", select "Upload Mode" and click to complete project creation.

Click on "Extensions," find the blank board K10 in "Main Control Extensions," and download it. After downloading, click on the blank board K10 to load the main control. Once the main control is successfully loaded, click "Back" to switch to the programming interface.

Next, load the timing pattern recognition library in "Module Extension".

After loading is complete, click the "Back" button to return to the programming interface.

Click Connect Device, select the identified K10 port on the blank board, and complete the connection.

After the device is successfully connected, write the following program:

Click upload and wait for the upload to complete.

The core code is analyzed as follows:

The attachment contains the complete model and program files for this project. In Mind+ V2.0, select upload mode, expand "Project", select "Open Project", connect your device and upload to achieve the functionality of this tutorial.

The desired effect is as follows:

5. List of Attachments

Project file link: https://pan.baidu.com/s/1k2UfYv9EhZ5UB49LzIuWbQ?pwd=4u9y

This article is an original work by the Makelog author and may not be reproduced without authorization.

License
All Rights
Reserved
licensBg
Tags Mind+AI
0