フィルターのクリア

How to use Genetic Algorithm to solve discrete data for optimization?

3 ビュー (過去 30 日間)
Jay Talreja
Jay Talreja 2021 年 5 月 24 日
回答済み: arushi 2024 年 8 月 20 日
Hello Everyone,
I have a question regarding Genetic Algorithm.
I have a data set for muffler optimisation in which I have calculated Transmission loss for various changes in muffler such as Inlet dia meter change and 5 other parameters for various frequiencies ranging from 60 Hz to 2000Hz. Each parameter is calculated for -15% to +15%.
change = [-15 , -10 , -5 , 0 , 5 , 10 , 15]; % Variable
input_length_RMSTL = [16.74 , 19.38 , 20.06 , 20.90 , 19.43 , 18.71 , 18.62];
output_length_RMSTL = [21.01 , 19.81 , 19.36 , 20.90 , 20.68 , 20.42 , 20.12];
muffler_length_RMSTL = [18.89 , 18.92 , 18.97 , 20.90 , 19.84 , 20.02 , 19.93];
input_dia_RMSTL = [18.77 , 19.47 , 18.98 , 20.90 , 19.56 , 19.68 , 19.99];
muffler_dia_RMSTL = [18.89 , 19.55 , 19.50 , 20.90 , 19.39 , 19.19 , 19.13];
output_dia_RMSTL = [18.99 , 19.24 , 19.49 , 20.90 , 19.46 , 19.52 , 19.77];
I have to optimise it using genetic algorithm. I have created function using curve fitting tool but this does seem to help as the curve is not properly fitting to all data points.
Can anybody help me with this problem?
Thanks in Advance.

回答 (1 件)

arushi
arushi 2024 年 8 月 20 日
Hi Jay,
Optimizing a muffler design using Genetic Algorithms (GAs) involves several steps, including defining the optimization problem, setting up the GA, and evaluating the fitness function. Here's a step-by-step guide to help you optimize the transmission loss using GAs:
Step 1: Define the Optimization Problem - You need to define what you're optimizing. In this case, it seems you're trying to optimize the transmission loss by varying several parameters. Your parameters are:
- Input length
- Output length
- Muffler length
- Input diameter
- Muffler diameter
- Output diameter
Each parameter can vary by \([-15\%, -10\%, -5\%, 0\%, 5\%, 10\%, 15\%]\).
Step 2: Define the Fitness Function
The fitness function should evaluate how well a particular set of parameters performs in terms of transmission loss. If you have a curve-fitting model, you can use it to predict the transmission loss for given parameters. The fitness function could be the negative of the transmission loss (if you want to maximize it) or simply the transmission loss (if you want to minimize it).
Step 3: Set Up the Genetic Algorithm
You can use MATLAB's Genetic Algorithm Toolbox or Python's DEAP library. Here’s an example in MATLAB.
Step 4: Evaluate and Iterate
- Evaluate Results: Once the GA has run, evaluate the optimized parameters to see if they meet your design goals.
- Refine Model: If the curve-fitting model does not fit well, consider using a more sophisticated model or additional data points to improve accuracy.
- Iterate: Adjust GA parameters such as population size, mutation rate, and crossover rate to improve optimization performance.
Step 5: Troubleshoot Curve Fitting
If the curve-fitting tool is not fitting the data well, consider:
- Polynomial Degree: Increase the degree of the polynomial or try different types of fitting models.
- Data Preprocessing: Normalize or scale your data to improve fitting.
- Model Selection: Use different models like Gaussian processes, neural networks, or support vector machines for better fitting.
Hope this helps.

カテゴリ

Help Center および File ExchangeGenetic Algorithm についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by