Spacecraft trajectory optimization with GA in Matlab (on/off constant thrust)
9 次查看(过去 30 天)
显示 更早的评论
Hello.
I would like to kindly ask for support or any advice on how to implement my problem in Matlab, perhaps using the (Global) Optimization Toolbox, and whether it is even possible.
My goal is to find a time-history of control (σ,
) during a fuel-optimal spacecraft rendezous with constant low-thrust.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1102840/image.png)
Problem description:
The control variables are defined as:
- σ - total thrust acceleration
- thrust acceleration projections
And the state vector is:
The objective is to minimise:
subject to:
- The state equations in state-space representation (CW equations):
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1102890/image.png)
- Control variables constraint:
and σ can be equal to either 0 or
(on/off)
- Initial conditions:
given
- Terminal constraints:
given
- Final time inequality constraint:
As I understand, this problem can be categorised as a dynamical optimization problem, that involves integer programming. Could it be solved in Matlab, perhaps using the Genetic Algorithms which I believe allow for integer programming?
Are there any available examples on how to implement a spacecraft (or not necessarily spacecraft) trajectory optimization problem in Matlab, using GA? I have been looking for examples for a very long time, but I could not find any. In fact, I could not find any examples even without the on/off thursting constraints, and I would be grateful if anyone could direct me to other spacecraft trajectory optimization implementations in Matlab, perhaps using the fmincon function.
Thank you very much.
4 个评论
Sam Chak
2022-8-25
I'm looking deeper into your problem. Do you expect GA to return a constant integer value for sigma σ from
to
using the following command?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1107555/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1107560/image.png)
sigma = ga(fun, nvars, A, b, Aeq, beq, lb, ub, nonlcon, intcon, options)
Sam Chak
2022-8-25
I'm just testing on the dynamics, and I want to see what objective function would I choose if I want to optimize the trajectory in terms of fastest arrival time, minimum error, minimum
effort, subject to the constraint:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1107680/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1107685/image.png)
[t, x] = ode45(@system, [0 10], [0.9; 0.6; 0.3; 0; 0; 0]);
plot(t, x(:,1:3), 'linewidth', 1.5)
grid on, xlabel('t'), ylabel('y(t)'), % ylim([-0.2 1.2])
function dxdt = system(t, x)
dxdt = zeros(6, 1);
% parameters
xf = 0.6; % final x-position
yf = 0.3; % final y-position
zf = 0.9; % final z-position
n = 1;
sigma = 1;
ux = - 2*x(4) - (x(1) - xf) - (2*n*x(5) + 3*(n^2)*x(1));
uy = - 2*x(5) - (x(2) - yf) - (-2*n*x(4));
uz = - 2*x(6) - (x(3) - zf) - (-(n^2)*x(3));
% the dynamics
dxdt(1) = x(4);
dxdt(2) = x(5);
dxdt(3) = x(6);
dxdt(4) = 2*n*x(5) + 3*(n^2)*x(1) + sigma*ux;
dxdt(5) = -2*n*x(4) + sigma*uy;
dxdt(6) = -(n^2)*x(3) + sigma*uz;
end
回答(1 个)
Alan Weiss
2022-8-21
You might be interested in this example: Discretized Optimal Trajectory, Problem-Based. The problem formulation is different than yours, so it is probably not directly applicable, but you might be able to make it work for you. One thing to note: I recently found out that this sort of optimal trajectory problem works better when you lower the optimality tolerance, as described here: https://www.mathworks.com/matlabcentral/answers/1774135-possible-bug-with-coneprog.
Alan Weiss
MATLAB mathematical toolbox documentation
10 个评论
Sam Chak
2022-8-25
Can you test if the GA is capable of producing a result for a simple system that is similar to Hohmann maneuver?
If it works, perhaps the code can be modified to solve your case.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surrogate Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!