卫星工具箱


卫星通信工具箱

该卫星工具箱用来模拟、分析和测试卫星通信系统和链路。卫星通信工具箱提供了基于标准的工具,用于设计,模拟和验证卫星通信系统和链接。该工具箱使您能够建模和可视化卫星轨道,并执行链接分析和访问计算。您还可以将物理层算法与RF组件和接地站接收器一起设计,生成测试波形并执行黄金参考设计验证。通过工具箱,您可以配置、模拟、测量和分析端到端卫星通信链路。您还可以创建和重用测试,以验证您的设计、原型和实现是否符合卫星通信和导航标准,包括DVB-S2X、DVB-S2、CCSDS和GPS。

1:学习卫星通信工具箱的基础知识

Satellite Scenario Modeling(卫星场景建模)首先第一个例程是建立完整的卫星场景模拟。

1-1卫星场景基础知识

可以使用卫星通信工具箱的函数和对象构建完整的卫星场景模拟。卫星情景模拟的工作流程包括以下五个主要部分:

1:卫星场景对象代表了一个由卫星、地面站以及它们之间的相互作用组成的三维竞技场。利用该对象对卫星星座进行建模,对地面站网络进行建模,对卫星和地面站之间的访问进行分析,并将结果可视化。下面介绍其相关函数以及如何使用:

The satelliteScenario object represents a 3D arena consisting of satellites, ground stations, and the interactions between them. Use this object to model satellite constellations, model ground station networks, perform access analyses between the satellites and the ground stations, and visualize the results.(卫星场景对象代表了一个由卫星、地面站以及它们之间的相互作用组成的3D竞技场。利用该对象对卫星星座进行建模,对地面站网络进行建模,对卫星和地面站之间进行访问分析,并将结果可视化)

1:基本函数:

sc = satelliteScenario #创建一个默认的卫星方案对象。
sc = satelliteScenario(startTime,stopTime,sampleTime)#分别将启动时间,停止时间和Sampletime属性设置为启动时间,停止时间和Sampletime的值。
sc = satelliteScenario(___,'AutoSimulate'=false)#将自动属性设置为指定值。

1:函数中的具体属性:

1:StartTime — Start time of satellite scenario simulation in UTC datetime scalar(UTC中卫星场景模拟的开始时间)

Start time of the satellite scenario simulation in UTC, specified as a datetime scalar. The default StartTime is the current UTC time if no satellites are present in the scenario. Otherwise, it is the earliest value from the current UTC time, the epoch defined in the TLE files, reference time deduced in SEM files, or initial time in the timetable and timeseries. If the StartTime, StopTime, or SampleTime properties are explicitly specified, the StartTime property no longer updates with further additions of satellites.

When the AutoSimulate property is false, you can modify the StartTime property only when the SimulationStatus is NotStarted. You can use the restart function to reset SimulationStatus to NotStarted, but doing so erases the simulation data.

Data Types: datetime

UTC中卫星场景仿真的开始时间,指定为DateTime标量。如果场景中没有卫星,则默认启动时间是当前的UTC时间。否则,它是当前UTC时间的最早值,在TLE文件中定义的时期,SEM文件中推论的参考时间或时间表和时间表中的初始时间。如果明确指定了启动时间,停止时间或Sampletime属性,则不再使用卫星的进一步添加开始启动时间属性。当自动构图为false时,您只能在未启动仿真status时修改启动时间属性。您可以使用重新启动函数来重置仿真status来未经启动,但是这样做会删除仿真数据。

2:StopTime — Stop time of satellite scenario simulation in UTC datetime scalar(停止时间 - UTC中卫星场景模拟的停止时间DateTime标量)

Stop time of the satellite scenario simulation in UTC, specified as a datetime scalar. The default StopTime is StartTime + longest orbital period among the satellites in the scenario. If no satellites are added to the scenario, the default StopTime is the same as the default StartTime. If the StartTime, StopTime, or SampleTime properties are explicitly specified, the StopTime property no longer updates with further additions of satellites.

When the AutoSimulate property is false, you can modify the StopTime property only when the SimulationStatus is NotStarted. You can use the restart function to reset SimulationStatus to NotStarted, but doing so erases the simulation data.

在UTC中停止卫星场景模拟的时间,指定为DateTime标量。默认的停止时间是场景中卫星之间的启动时间 +最长的轨道周期。如果未在场景中添加卫星,则默认停止时间与默认启动时间相同。如果明确指定了启动时间,停止时间或Sampletime属性,则停止时间属性将不再更新卫星。当自动构图为false时,您只能在未启动仿真status时修改停止时间属性。您可以使用重新启动函数来重置仿真status来未经启动,但是这样做会删除仿真数据。

3:SampleTime — Sample time of satellite scenario simulation(卫星场景模拟的样本时间)

Sample time of the satellite scenario simulation, specified as a real-valued scalar. The default sample time is set such that there are 100 samples between StartTime and StopTime. If the default StartTime and StopTime are the same, which is the case when no satellites are added to the scenario, the default SampleTime is 60 seconds. If the StartTime, StopTime, or SampleTime properties are explicitly specified, the SampleTime property no longer updates with further additions of satellites.

When the AutoSimulate property is false, you can modify the SampleTime property only when the SimulationStatus is NotStarted. You can use the restart function to reset SimulationStatus to NotStarted, but doing so erases the simulation data.

Data Types: double

卫星场景模拟的样本时间,指定为实值标量。设置默认的示例时间,以便在开始时间和停止时间之间有100个样本。如果默认的启动时间和停止时间相同,当没有卫星添加到方案中时,默认的采样时间为60秒。如果明确指定了启动时间,停止时间或Sampletime属性,则Sampletime属性将不再更新卫星。当自动构图为false时,只有在未启动仿真status时才可以修改Sampletime属性。您可以使用重新启动函数来重置仿真status来未经启动,但是这样做会删除仿真数据。

4:SimulationTime — Simulation time of satellite scenario in UTC current UTC time (default) | datetime scalar

This property is read-only.Current simulation time of the satellite scenario simulation in UTC, specified as a datetime scalar. Call the restart function to reset the time to StartTime.To enable this property, set AutoSimulate to false.

Data Types:** datetime

此属性仅阅读。UTC中卫星场景模拟的当前仿真时间,指定为DateTime标量。调用重新启动函数以重置启动时间的时间。依赖性要启用此属性,请将自动映射设置为false。数据类型:日期时间

5:SimulationStatus — Simulation status 'NotStarted' | 'InProgress' | 'Completed'

This property is read-only.

Simulation status of the satellite scenario, specified as one of the following:

  • 'NotStarted' — No call to the advance function has been made
  • 'InProgress' — Simulation is running
  • 'Completed' — Simulation is finished

The simulation starts when the first call to the advance function is made. The simulation continues until one of the following occurs:

  • The simulation reaches the StopTime.

  • A new asset is added to the satellite scenario.

  • Certain properties of the asset (satellites, ground stations, gimbals, conical sensors, and so on) have been modified, such as MountingLocation or MountingAngles. Refer to the properties to determine if modifying them can stop the simulation.

  • Call the restart function to restart the simulation, erase the simulation data, and set SimulationStatus to NotStarted.

  • 此属性是只读的。卫星场景的模拟状态,指定为以下之一

1:“未开始” - 没有呼吁提前功能

2:“ inprogress” - 模拟正在运行

3:完成” - 模拟完成

当第一个调用提前功能时,模拟开始。模拟一直持续到以下内容之一:模拟到达StopTime。一个新对象被添加到卫星场景中。该对象的某些属性(卫星、地面站、万向节、锥形传感器等)已被修改,如安装位置或安装角度。请参考属性以确定修改它们是否可以停止模拟。

调用重新启动函数以重新启动仿真,删除仿真数据,并将仿真status设置为未启动。

6:AutoSimulate — Option to simulate satellite scenario automatically true or 1 | false or 0

Option to simulate the satellite scenario automatically, specified as one of these numeric or logical values. 1 (true) — Simulate the satellite scenario automatically on any call to an analysis function, such as states or accessIntervals. 0 (false)— Simulate the satellite scenario only by calling the advance function. Changing the AutoSimulate value erases the previous simulation data. Data Types: double

自动模拟卫星方案的选项,指定为这些数字或逻辑值之一。

1(true) - 在对分析功能(例如状态或访问Intervals)的任何调用中自动模拟卫星方案。

0(false) - 仅通过调用预先函数来模拟卫星方案。

更改自动映射值会删除先前的仿真数据。

7:Satellites — Satellites in the scenario row vector of Satellite objects(卫星 - 场景中的卫星)

This property is read-only.

Satellites in the scenario, returned as a vector of Satellite objects. To add a Satellite object to the satellite scenario, use the satellite object function.

此属性仅阅读。场景中的卫星作为卫星对象的向量返回。要将卫星对象添加到卫星方案中,请使用卫星对象功能。

8:GroundStations — Ground stations in scenario row vector of GroundStation objects Ground stations in the scenario, returned as a row vector of GroundStation objects. To create a GroundStation object and add it to the satellite scenario, see the groundStation object function.

地面站 - 场景中的地面站,地面站对象的行矢量,场景中的地面站作为地面站对象的行矢量返回。要创建一个地面站对象并将其添加到卫星场景中,请参见地面站对象函数。

9:Autoshow — Option to automatically show graphics

true or 1 (default) | false or 0

Option to automatically show graphics, specified as a logical 1 (true) or 0 (false). This property determines if entities added to the scenario are automatically shown in an open satelliteScenarioViewer window.

AutoShow - 可以自动显示图形的选项

true或1(默认)|错误或0

选项自动显示图形,指定为逻辑1(true)或0(false)。该属性确定在打开的SatellitesCenarioviewer窗口中自动显示了添加到方案中的实体。

groundStation Add ground station to satellite scenario

2: 其他添加对象的函数

1:地面基站 Add ground station to satellite scenario

地面站将接地站添加到卫星场景。下面为具体函数:

groundStation(scenario)#将默认地面站对象添加到指定的卫星场景。
groundStation(scenario,lat,lon)#将地面站的纬度和经度特性分别设置为LAT和LON。LAT和LON必须具有相同的长度。此长度指定该函数添加到输入方案的地面站数量。LAT和LON一起指示地面站的位置。
groundStation(___,Name,Value)#除了以前的语法中的任何输入参数组合外,还使用一个或多个名称值参数设置选项。例如,“最小俯仰角” 10指定10度的最小高度角度。
gs = groundStation(___)#returns a vector of handles to the added ground stations. Specify any input argument combination from previous syntaxes. Examples返回添加的地面站的句柄向量。指定前面语法中的任何输入参数组合。

函数中参数:

1:scenario — Satellite scenario satelliteScenario object

Satellite scenario, specified as a satelliteScenario object.卫星场景,指定为一个卫星场景对象。

2:lat, lon — Latitude and longitude real-valued scalar | real-valued vector

Latitude and longitude of the ground station, specified as a real-valued scalar or real-valued vector.

地面站的纬度和经度,指定为实值标量或实值向量。

2:卫星与地面站的仿真例子

Create satellite scenario and add ground stations from latitudes and longitudes.

创建卫星场景并添加来自纬度和经度的地面站。

startTime = datetime(2020, 5, 1, 11, 36, 0);
stopTime = startTime + days(1);
sampleTime = 60;
sc = satelliteScenario(startTime, stopTime, sampleTime);
lat = [10];
lon = [-30];
gs = groundStation(sc, lat, lon);

Add satellites using Keplerian elements.

使用开普勒元素添加卫星。

semiMajorAxis = 10000000;
eccentricity = 0;
inclination = 10; 
rightAscensionOfAscendingNode = 0; 
argumentOfPeriapsis = 0; 
trueAnomaly = 0; 
sat = satellite(sc, semiMajorAxis, eccentricity, inclination, ...
        rightAscensionOfAscendingNode, argumentOfPeriapsis, trueAnomaly);

Add access analysis to the scenario and obtain the table of intervals of access between the satellite and the ground station.将访问分析添加到场景中,并获得卫星和地面站之间的访问间隔表。

ac = access(sat, gs);
intvls = accessIntervals(ac);

Play the scenario to visualize the ground stations.播放这个场景来可视化地面站。

最后如图演示效果:

image-20220711171005751

演示效果如上图所示。下面来仔细分析这个例子所包含的函数关系:

先贴出整体代码:

startTime = datetime(2022, 7, 11, 7, 03, 0);
stopTime = startTime + days(1);
sampleTime = 60;
sc = satelliteScenario(startTime, stopTime, sampleTime);
lat = (10);
lon = (-30);
gs = groundStation(sc, lat, lon);
semiMajorAxis = 10000000;
eccentricity = 0;
inclination = 10; 
rightAscensionOfAscendingNode = 0; 
argumentOfPeriapsis = 0; 
trueAnomaly = 0; 
sat = satellite(sc, semiMajorAxis, eccentricity, inclination, ...
        rightAscensionOfAscendingNode, argumentOfPeriapsis, trueAnomaly);
ac = access(sat, gs);
intvls = accessIntervals(ac);
play(sc);

startTime即开始运行的时间,这里的时间格式是UTC。然后UTC时间和北京时间也就东八区差了八个小时,所以要仿真时候你这里的时间必须根据你当前的时间减去八个小时,stopTime是你仿真停止的时间。sampleTime是采样时间。 satelliteScenario函数根据前面设置好的参数去初始化为卫星对象,lat和lon则是设置地面基站的经度和纬度。 groundStation函数指定入口输入参数为一个卫星场景对象。要明白这个例程还必须也要知道satellite函数相关内容。acess函数就是用来卫星和地面站添加进去,然后accessIntervals返回该值。如下图所示:image-20220712181032783

satellite Add satellites to satellite scenario顾名思义就是将卫星添加到卫星场景中 。想要了解可以看下面的部分来了解这个函数的实际应用。play(sc)则是开始仿真。

2-1satellite函数
satellite(scenario,file)#adds a Satellite object from file to the satellite scenario specified by scenario. The yaw (z) axes of the satellites point toward nadir and the roll (x) axes of the satellites align with their respective inertial velocity vectors.将卫星对象从文件添加到场景指定的卫星方案。卫星的偏航(Z)轴指向Nadir,卫星的滚动(X)轴与它们各自的惯性速度对齐。
satellite(scenario,semimajoraxis,eccentricity,inclination,RAAN,argofperiapsis,trueanomaly)#adds a Satellite object from Keplerian elements defined in the Geocentric Celestial Reference Frame (GCRF) to the satellite scenario.从卫星场景中添加了一个从地理中心天体参考框(GCRF)中定义的开普勒元素的卫星对象。
satellite(scenario,positiontable)#adds a Satellite object from position data specified in positiontable (timetable object) to the scenario. This function creates a Satellite with OrbitPropagator="ephemeris".从位置图(时间表对象)中指定的位置数据中添加一个卫星对象到场景。此功能可以使用OrbitPropagator =“ Esphemeris”创建卫星。
satellite(scenario,positiontable,velocitytable)#adds a Satellite object from position data specified in positiontable (timetable object) and velocity data specified in velocitytable (timetable object) to the scenario. This function creates a Satellite with OrbitPropagator="ephemeris".从位置图(时间表对象)中指定的位置数据VelocityTable(时间表对象)中指定的位置数据添加卫星对象。此功能可以使用OrbitPropagator =“ Esphemeris”创建卫星。
satellite(scenario,positiontimeseries)#adds a Satellite object from position data specified in positiontimeseries to the scenario. This function creates a Satellite with OrbitPropagator="ephemeris".将卫星对象从位置图中指定的位置数据添加到场景中。此功能可以使用OrbitPropagator =“ Esphemeris”创建卫星。
satellite(scenario,positiontimeseries,velocitytimeseries)#adds a Satellite object to the scenario from position (in meters) data specified in positiontimeseries (timeseries object) and velocity (in meters/second) data specified in velocitytimeseries (timeseries object). This function creates a Satellite with OrbitPropagator="ephemeris".从位置(米)数据(时间段对象)和速度(以米/每秒为单位)中指定的位置数据(以米为单位)数据添加卫星对象。此功能可以使用OrbitPropagator =“ Esphemeris”创建卫星。
satellite(___,Name,Value)
sat = satellite(___)#returns a vector of handles to the added satellites. Specify any input argument combination from previous syntaxes.将手柄向量返回到添加的卫星。指定先前语法中的任何输入参数组合。

该函数提供了这样的例程:

2-2access函数

将访问分析对象添加到卫星场景

语法:

access(asset1,asset2,...)#adds Access analysis objects defined by nodes asset1, asset2, and so on.添加由节点Asset1,Asset2等定义的访问分析对象。
ac = access(___,'Viewer',Viewer)#sets the viewer in addition to any input argument combination from previous syntaxes. For example, 'Viewer',v1 picks the viewer v1.除了先前的语法中的任何输入参数组合外,还设置查看器。例如,“查看器”,V1选择查看器V1。
ac = access(___)#returns added access analysis objects in the row vector ac.返回行中添加了访问分析对象。

Add access analysis to the scenario and obtain the table of intervals of access between the satellite and the ground station.将访问分析添加到场景中,并获得卫星和地面站之间的访问间隔表。

2-3satelliteScenarioViewer函数

Create viewer for satellite scenario意思为卫星场景创建一个观察器,

函数语法:

satelliteScenarioViewer(scenario)#creates a 3-D or 2-D satellite scenario viewer for the specified satellite scenario. Satellite Scenario Viewer is a 3-D map display and requires hardware graphics support for WebGL™.为指定的卫星场景创建3-D或2-D卫星场景查看器。卫星场景查看器是一个3D地图显示器,需要WebGL™的硬件图形支持。
satelliteScenarioViewer(scenario,Name,Value)
v = satelliteScenarioViewer(scenario)

3:更多的仿真例子:

1:从位置时间表中添加四个卫星并可视化其轨迹:

%从位置时间表中添加四个卫星并可视化其轨迹
sc = satelliteScenario;
load("timetableSatelliteTrajectory.mat","positionTT");
sat = satellite(sc,positionTT);
play(sc);

具体效果如下图所示:

image-20220713094605371

2:下一个代码类似这种效果

%可视化卫星轨迹
sc = satelliteScenario;
load("timetableSatelliteTrajectory.mat","positionTT","velocityTT");
sat = satellite(sc,positionTT,velocityTT,"CoordinateFrame","ecef");
play(sc);

3:采用开普勒元素的方式添加卫星

sampleTime = 60;
sc = satelliteScenario(startTime,stopTime,sampleTime);
semiMajorAxis = [10000000; 15000000];
eccentricity = [0.01; 0.02];
inclination = [0; 10];
rightAscensionOfAscendingNode = [0; 15];
argumentOfPeriapsis = [0; 30];
trueAnomaly = [0; 20];

sat = satellite(sc, semiMajorAxis, eccentricity, inclination, ...
    rightAscensionOfAscendingNode, argumentOfPeriapsis, trueAnomaly);
show(sat);
groundTrack(sat,'LeadTime',3600);
play(sc);

image-20220713094827358

3:Matlab给的官网例程没有跑通。缺少其相关的TXT文件。暂时先挖个坑,之后再填。


文章作者: WYW
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 WYW !
评论
 本篇
卫星工具箱 卫星工具箱
卫星通信工具箱该卫星工具箱用来模拟、分析和测试卫星通信系统和链路。卫星通信工具箱提供了基于标准的工具,用于设计,模拟和验证卫星通信系统和链接。该工具箱使您能够建模和可视化卫星轨道,并执行链接分析和访问计算。您还可以将物理层算法与RF组件和接
2022-07-10 WYW
下一篇 
C++编译理解 C++编译理解
c++编译器工作原理 我们写程序通常情况要考虑如何将文本转化为可执行文件,在这里编译器所执行的工作就是完成compliling和linking。而c++编译器所要做的就是把文本变为中继格式,也就是obj文件 ,然后obj文件 会传入lin
2022-07-05
  目录