hey guys
i’m trying to solve a problem about the "Convex programming approach to powered descent guidance for soft landing "
but the CVX returns Status:Failed always.
and I have tried use SeDuMi and Mosek to solve it, they both returned that:Infeasilbe.
so I want to know what’s the problem.Or how can I modify the model.
thanks!
startpos=[40000000;0;0;0;7350;0];
endpos=[-21082000;36515000;0;-2660;-1540;0];
J2=1.0826*10^(-9);Re=6378000;m0=1000;
Isp=300;ge=9.8;miu=398603*10^9;
Tm=100;
T=25000;Tc=50;
N=T/Tc;
z0=zeros(1,N+2);
xr0= [startpos,[linspace(startpos(1), endpos(1), N); ...
linspace(startpos(2), endpos(2), N);linspace(startpos(3),endpos(3), N);
linspace(startpos(4), endpos(4), N);linspace(startpos(5), endpos(5), N);
linspace(startpos(6), endpos(6), N)],endpos];
xr=xr0;
%cvx_solver sedumi or SDPT3 or Mosek
cvx_begin
%variable eta(N+2)
%variable tau(N+2)
variable x(7,N+2)
variable u(4,N+2)%
variable xdot(7,N+2)
expression us(N+2)
x(:,1)==[startpos;m0];x(:,2)==[startpos;m0];
x(1:6,N+2)==[endpos];x(1:6,N+2)==[endpos];
for t=2:N+1
t1=xr(1,t);t2=xr(2,t);t3=xr(3,t);
I=eye(7,7);
r=(t1^2+t2^2+t3^2)^0.5;
Q=[miu/(r^3)+1.5*J2*(Re^2)/(r^5),0,0;
0,miu/(r^3)+1.5*J2*(Re^2)/(r^5),0;
0,0,miu/(r^3)+4.5*J2*(Re^2)/(r^5)];
A1=[zeros(3,3),eye(3),zeros(3,1);
-Q,zeros(3,3),zeros(3,1);
zeros(1,3),zeros(1,3),0];
B1=[zeros(3,3),zeros(3,1);eye(3),zeros(3,1);zeros(1,3),1/(Isp*ge)];
A=Tc*A1+I;
B=Tc*B1;
xdot(:,t)==(x(:,t)-x(:,t-1))/Tc;
xdot(:,t)-A*x(:,t)-B*u(:,t)==0;
z0(t)=log(m0-Tm/(Isp*ge)*(t-2)*Tc);
u(1,t)<=u(2,t);
u(2,:)>=0;
%us(t)=Tm*exp(-z0(t))*(1-x(7,t)-z0(t));
u(2,t)<=Tm;%*exp(-z0(t))*(1-x(7,t)-z0(t));
end
minimize sum(Tc*(x(2,:)))
cvx_end