From Simulation to Dataset: Simulation-Based Data Collection for Machine Learning
Summary
This activity introduces students to simulation-based data collection as part of an engineering machine learning workflow. Students use MATLAB to systematically vary the operating parameters of a simulated mechanical system, run multiple simulations, and collect the resulting system responses into a structured dataset. Rather than treating a dataset as something that is simply provided, students make decisions about what variables to vary, what ranges to explore, how many samples to collect, and which simulation outputs should become features or target variables.
Students then visualize and inspect the generated dataset to determine whether it adequately represents the operating space of the simulated system. The resulting dataset can be used in subsequent activities for regression, classification, or other machine learning tasks.
The activity emphasizes the connection between engineering simulation, experimental design, data collection, and machine learning, helping students recognize that the quality and coverage of training data depend on decisions made before a machine learning model is trained.
Students then visualize and inspect the generated dataset to determine whether it adequately represents the operating space of the simulated system. The resulting dataset can be used in subsequent activities for regression, classification, or other machine learning tasks.
The activity emphasizes the connection between engineering simulation, experimental design, data collection, and machine learning, helping students recognize that the quality and coverage of training data depend on decisions made before a machine learning model is trained.
Learning Goals
Students learn how simulation data can be generated and collected for machine learning and how simulation inputs and outputs can become features and targets. They use MATLAB and Simulink to vary input parameters, run simulations, collect results, and visualize the data. The activity also encourages students to think about what parameters to vary, what data to collect, and whether the collected data adequately represent the system, while practicing MATLAB, Simulink, and basic data analysis skills.
Context for Use
This activity is designed for an upper-level undergraduate course for senior students. It is a classroom activity that can be completed in approximately 30–40 minutes. Students should already be familiar with the machine learning workflow and basic data concepts. By showing students how simulation data can be systematically generated and collected, the activity helps them better understand how they can create their own datasets for engineering machine learning applications. Students should be able to read basic MATLAB code and have prior experience using Simulink.
Description and Teaching Materials
Students use an automotive simulation in Simulink to explore how different operating conditions affect vehicle performance. They modify selected input parameters, run the simulation, and use MATLAB to collect and organize the simulation results into a dataset that can later be used for machine learning. Students examine the collected data and consider whether it provides sufficient coverage of the operating conditions. MATLAB and Simulink are used because they provide an integrated environment for simulation, automated data collection, visualization, and machine learning. Similar activities could be completed using other simulation software, but MATLAB and Simulink allow students to complete the full workflow within one environment.
Teaching Notes and Tips
Share your modifications and improvements to this activity through the Community Contribution Tool »