TH方程学习(5)

一、内容介绍

在本节中,将会利用TH方程的状态转移矩阵,求解双脉冲轨道转移问题:给定转移时间T,通过状态转移矩阵求解初始速度增量\Delta \boldsymbol{v}_{1}和末端速度\Delta \boldsymbol{v}_{2},使得追踪星在初始速度增量\Delta \boldsymbol{v}_{1}的作用下转移到目标位置\boldsymbol{r_{f}},追踪星到达\boldsymbol{r_{f}}后,在\Delta \boldsymbol{v}_{2}的作用下达到期望的相对速度\boldsymbol{v_{f}}

在第四节中,在给定目标星初始偏心率,近地点高度,真近地点角以及转移时间的情况下,可以求出其状态转移矩阵\Phi_{}。根据状态转移矩阵的性质,可以写为如下形式

\begin{bmatrix} \boldsymbol{r}_f\\\boldsymbol{v}_f \end{bmatrix}=\begin{bmatrix} \boldsymbol{\Phi}_{rr} & \boldsymbol{\Phi}_{rv}\\\boldsymbol{\Phi}_{vr} & \boldsymbol{\Phi}_{vv} \end{bmatrix}\begin{bmatrix} \boldsymbol{r}_0\\\boldsymbol{v}_0 \end{bmatrix}

因此,对于第一次需要的脉冲,可以通过

\boldsymbol{r}_{f}=\boldsymbol{\Phi}_{rr}\boldsymbol{r}_0+\boldsymbol{\Phi}_{rv}\boldsymbol{v}_0^{+}\\ \boldsymbol{v}_0^{+}=\boldsymbol{\Phi}_{rv}^{-1}(\boldsymbol{r}_f-\boldsymbol{\Phi}_{rr}\boldsymbol{r}_0)\\ \Delta \boldsymbol{v}_{1}=\boldsymbol{v}_0^{+}-\boldsymbol{v}_0

对于第二次需要施加的脉冲,可以得到

\boldsymbol{v}_f^{-}=\boldsymbol{\Phi}_{vr}\boldsymbol{r}_0+\boldsymbol{\Phi}_{vv}\boldsymbol{v}_0^{+}\\\Delta \boldsymbol{v}_2=\boldsymbol{v}_f-\boldsymbol{v}_f^{-}

二、案例仿真

本文使用STK进行了一次案例仿真,代码如下:TH_solver函数在第四节给出

% 使用STK验证VVLH坐标系
clc;clear
uiApplication = actxGetRunningServer('STK12.application');
root = uiApplication.Personality2;
checkempty = root.Children.Count;
if checkempty ~= 0
    root.CurrentScenario.Unload
    root.CloseScenario;
end
root.NewScenario('VVLH');
StartTime = '26 Jan 2024 04:00:00.000';    % 场景开始时间
StopTime = '10 Feb 2024 04:00:00.000';     % 场景结束时间
root.ExecuteCommand(['SetAnalysisTimePeriod * "',StartTime,'" "',StopTime,'"']);
root.ExecuteCommand(' Animate * Reset');
SatName = 'Target';       %  SAR_   GX_   Sat_  GX_1_  SAR_1_
satellite = root.CurrentScenario.Children.New('eSatellite', SatName);
satellite.SetPropagatorType('ePropagatorAstrogator');   %  不设置的时候默认为二体模型  ePropagatorJ4Perturbation
satellite.Propagator;
% 目标星初始状态
Perigee = 500;
T       = 60;
% 追踪星在VVLH坐下的相对位置
delta_r = [0.1;0.01;0.01];
delta_v = [0.0001;0.0001;0.0001];
Perige  = 6378.137+Perigee;
ecc     = 0.1;
sma     = Perige/(1-ecc);
Inc     = 30;
w       = 0;
RAAN    = 0;
TA      = 45;
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList Initial_State Propagate']);
InitialState=satellite.Propagator.MainSequence.Item(0);
%% 初始化卫星参数
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList.Initial_State.CoordinateType Modified Keplerian']);
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList.Initial_State.InitialState.Epoch ',StartTime,' UTCG']);
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList.Initial_State.InitialState.Keplerian.sma ',num2str(sma),' km']);
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList.Initial_State.InitialState.Keplerian.ecc ',num2str(ecc)]);
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList.Initial_State.InitialState.Keplerian.inc ',num2str(Inc),' deg']);
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList.Initial_State.InitialState.Keplerian.w ',num2str(w),' deg']);
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList.Initial_State.InitialState.Keplerian.RAAN ',num2str(RAAN),' deg']);
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' SetValue MainSequence.SegmentList.Initial_State.InitialState.Keplerian.TA ',num2str(TA),' deg']);
%% 二体传播
Propagate=satellite.Propagator.MainSequence.Item(1);
Propagate.PropagatorName='Earth Point Mass';
root.ExecuteCommand(['Astrogator */Satellite/',SatName,' RunMCS']);

% 插入目标星
SatName2 = 'Chaser';       
satellite2 = root.CurrentScenario.Children.New('eSatellite', SatName2);
satellite2.SetPropagatorType('ePropagatorAstrogator');   %  不设置的时候默认为二体模型  ePropagatorJ4Perturbation
satellite2.Propagator;
InitialState2=satellite2.Propagator.MainSequence.Item(0);
InitialState2.CoordSystemName='Satellite/Target VVLH';
InitialState2.Element.X=delta_r(1);
InitialState2.Element.Y=delta_r(2);
InitialState2.Element.Z=delta_r(3);
InitialState2.Element.Vx=delta_v(1);
InitialState2.Element.Vy=delta_v(2);
InitialState2.Element.Vz=delta_v(3);
Propagate2=satellite2.Propagator.MainSequence.Item(1);
Propagate2.PropagatorName='Earth Point Mass';
satellite2.Propagator.MainSequence.Insert('eVASegmentTypeManeuver','Maneuver1','Propagate');
Maneuver=satellite2.Propagator.MainSequence.Item(1);
root.ExecuteCommand(['Astrogator */Satellite/',SatName2,' SetValue MainSequence.SegmentList.Maneuver1.ImpulsiveMnvr.AttitudeControl Thrust Vector']);
Maneuver.Maneuver.AttitudeControl.ThrustAxesName='Satellite VVLH.Axes';


satellite2.Propagator.MainSequence.Insert('eVASegmentTypeManeuver','Maneuver2','Propagate');
satellite2.Propagator.MainSequence.Insert('eVASegmentTypePropagate','Propagate1','Maneuver2');
Propagate3=satellite2.Propagator.MainSequence.Item(2);
Propagate3.PropagatorName='Earth Point Mass';
Propagate3.Properties.Color=255;
Propagate3.StoppingConditions.Item(0).Properties.Trip = T;
root.ExecuteCommand(['Astrogator */Satellite/',SatName2,' SetValue MainSequence.SegmentList.Maneuver2.ImpulsiveMnvr.AttitudeControl Thrust Vector']);
Maneuver2=satellite2.Propagator.MainSequence.Item(3);
Maneuver2.Maneuver.AttitudeControl.ThrustAxesName='Satellite VVLH.Axes';
%% 本代码旨在使用TH方程求解双脉冲转移问题

% 期望到达的位置
r_f     =    zeros(3,1);
v_f     =    zeros(3,1);
% TH求出状态转移矩阵
[v,Phi,vv]=TH_solver(ecc,Perigee,TA,delta_r,delta_v,T);
% 求出状态转移矩阵的每个部分
Phi_rr    =  Phi(1:3,1:3);
Phi_rv    =  Phi(1:3,4:6);
Phi_vr    =  Phi(4:6,1:3);
Phi_vv    =  Phi(4:6,4:6);
% 求出第一次脉冲施加的大小
vv_0      =  inv(Phi_rv)*(r_f-Phi_rr*delta_r);
dv1       =  vv_0-delta_v;
% 求出第二次施加脉冲的大小
vv_f      =  Phi_vr*delta_r+Phi_vv*vv_0;
dv2       =  v_f-vv_f;
Maneuver.Maneuver.AttitudeControl.X=dv1(1)*1000;
Maneuver.Maneuver.AttitudeControl.Y=dv1(2)*1000;
Maneuver.Maneuver.AttitudeControl.Z=dv1(3)*1000;
Maneuver2.Maneuver.AttitudeControl.X=dv2(1)*1000;
Maneuver2.Maneuver.AttitudeControl.Y=dv2(2)*1000;
Maneuver2.Maneuver.AttitudeControl.Z=dv2(3)*1000;
root.ExecuteCommand(['Astrogator */Satellite/',SatName2,' RunMCS']);
% 报告二颗卫星的三维关系
satellite.VO.OrbitSystems.InertialByWindow.IsVisible=0;
satellite2.VO.OrbitSystems.InertialByWindow.IsVisible=0;
satellite2.VO.OrbitSystems.Add('Satellite/Target VVLH System')
satellite.VO.Vector.RefCrdns.Item(2).Visible=1;

targetdata=root.ExecuteCommand(['Report_RM */Satellite/Target  Style "VVLH" TimePeriod "26 Jan 2024 04:00:00.000" "26 Jan 2024 16:00:00.000" TimeStep 10']);
Num=targetdata.Count;
root.ExecuteCommand('Astrogator */Satellite/Target ClearDWCGraphics');
root.ExecuteCommand('Astrogator */Satellite/Chaser ClearDWCGraphics');
for j=1:Num-2
    struct=regexp(targetdata.Item(j),',','split');
    Tar_x(j)=str2double(struct{2});
    Tar_y(j)=str2double(struct{3});
    Tar_z(j)=str2double(struct{4});
end

figure(1)
plot3(Tar_x(1:12),Tar_y(1:12),Tar_z(1:12),'LineWidth',1);
axis([-0.1 0.1 -0.1 0.1 -0.1 0.1])
set(gca,'XDir','reverse');
set(gca,'YDir','reverse');
set(gca,'ZDir','reverse');
xlabel('X axis(km)','FontName','Times New Roman')
ylabel('Y axis(km)','FontName','Times New Roman')
zlabel('Z axis(km)','FontName','Times New Roman')
title('e=0.1,Perigee=500km','FontName','Times New Roman')
grid on
hold on
plot3(0,0,0,'g.')
plot3(delta_r(1),delta_r(2),delta_r(3),'r.')
legend('transfer trajectory(TH)','Original','Final','Location','Northeast')

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值