Optimization of a 10-DOF Vehicle model in Simulink
7 次查看(过去 30 天)
显示 更早的评论
I have built a 10-DOF vehicle model for estimation of the lateral dynamics. Next task is to optimize it. For example, I want to find the optimal values of the Yaw moment of inertia (input) that maintain the Yaw Rate under a certain threshold for a given maneuver (Step steer).
The problem is that since the model is very complex, there is not a transfer function between these two.
Ideally, I want to use a genetic algorithm for these task.
Any suggestions on how to resolve this?
6 个评论
Aquatris
2024-8-1
So you create your simulation such that it gets the design parameter as input and output a cost function that relates to minimizing the resulting yaw rate. Then you give this function to a solver you desire. One simple cost function is the maximum yaw rate magnitude:
function y = myCost(Cphif)
%% simulate the model using Cphif and the predetermined manevour to get yaw rate
yawRate = mysim(Cphif);
%% define a cost function based on what you want
y = max(abs(yawRate));
end
This might not be exactly what you want since this indicates that the yaw rate might be constant throughout the whole manevour, for some odd reason :D. So you might want to add the 2-norm of the yaw rate signal, which is the sqrt of the integral of the yaw rate signal that represent a form of size as:
y = max(abs(yawRate))+norm(yawRate,2);
However the order of magnitude of maximum of the yaw rate and norm of the yaw rate might be quite different, e.g., maximum might be around 10 where as norm is around 10k, then you would need to use weights to adjust their contribution to the cost function so that solver does not favor one of them.
y = w1*max(abs(yawRate))+w2*norm(yawRate,2);
Since this is a complex problem, the form of your cost function will probably require some iteration to come up with a good solution..
Sam Chak
2024-8-1
Hi @PanPan
If you and your research team wish to investigate how the front damping coefficient affects the Yaw Rate , it would be prudent to run multiple simulations across a range of reasonable values. From the results, you should be able to observe the minimum and maximum Yaw Rates that correspond to the values.
For instance, you could run the simulation iteratively for values ranging from 1 to 10, with a step size of 1. If the minimum Yaw Rate in the dataset corresponds to a particular value , you can then use @Aquatris's suggested Cost Function to search for the "best" by setting the lower and upper bounds on the design variable.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Genetic Algorithm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!