Main Content

rangeangle

范围和角度计算

描述

这functionrangeangledetermines the propagation path length and path direction of a signal from a source point or set of source points to a reference point. The function supports two propagation models – thefree space模型和two-ray模型。这free space模型是从源点到参考点的单一视线路径。这two-ray多路径模型生成两个路径。第一个路径遵循自由空间路径。第二个路径是在边界平面上的反射路径z = 0。定义路径方向可行er the global coordinate system at the reference point or a local coordinate system at the reference point. Distances and angles at the reference point do not depend upon which direction the signal is travelling along the path.

example

[rng,ang] = rangeangle(pos)returns the propagation path length,rng, and direction angles,ang, of a signal path from a source point or set of source points,pos, to the origin of the global coordinate system. The direction angles are the azimuth and elevation with respect to the global coordinate axes at the origin. Signals follow a line-of-sight path from the source point to the origin. The line-of-sight path corresponds to the geometric straight line between the points.

example

[rng,ang] = rangeangle(pos,refpos)also specifies a reference point or set of reference points,refposrng现在包含从源点到参考点的传播路径长度。方向角是相对于参考点的全局坐标轴的方位角和高程。您可以指定多个点和多个参考点。

example

[rng,ang] = rangeangle(pos,refpos,refaxes)还指定局部坐标系轴,refaxes,在参考点。方向角是相对于焦虑的局部坐标轴的方位角和抬高refpos

example

[rng,ang] = rangeangle(___,模型),还指定了一个传播模型。什么时候模型is set to'可用空间', the signal propagates along a line-of-sight path from source point to reception point. When模型is set to“两射线”, the signal propagates along two paths from source point to reception point. The first path is the line-of-sight path. The second path is the reflecting path. In this case, the function returns the distances and angles for two paths for each source point and corresponding reference point.

输入参数

pos

源点位置,指定为实值3 x-1矢量或实现的3乘N矩阵。矩阵表示多个源点。这些列包含笛卡尔的坐标Npoints in the form[x; y; z]

什么时候pos是3乘Nmatrix, you must specifyrefpos作为3乘Nmatrix forNreference positions. If all the reference points are identical, you can specifyrefposby a single 3-by-1 vector.

位置单位是仪表。

refpos

Reference point position, specified as a real-valued 3-by-1 vector or a real-valued 3-by-N矩阵。A matrix represents multiple reference points. The columns contain the Cartesian coordinates ofN点ins the Form[x; y; z]

什么时候refpos是3乘Nmatrix, you must specifypos作为3乘Nmatrix forNsource positions. If all the source points are identical, you can specifyposby a single 3-by-1 vector.

位置单位是仪表。

Default:[0; 0; 0]

refaxes

Local coordinate system axes, specified as a real-valued 3-by-3 matrix or a 3-by-3-by-Narray. For an array, each page corresponds to a local coordinate axes at each reference point. The columns inrefaxesspecify the direction of the coordinate axes for the local coordinate system in Cartesian coordinates.N必须匹配posorrefpos当这些维度大于一个时。

Default:[1 0 0;0 1 0;0 0 1]

模型

Propagation model, specified as'可用空间'or“两射线”。Choosing'可用空间'invokes the free space propagation model. Choosing“两射线”invokes the two-ray propagation model.

Default:'可用空间'

Output Arguments

rng

繁殖范围,作为一个实价1乘-1的返回Nvector or real-valued 1-by-2N向量。

什么时候模型is set to'可用空间', 的大小rngis 1-by-N。这propagation range is the length of the direct path from the position defined inposto the corresponding reference position defined inrefpos

什么时候模型is set to“两射线”,rngcontains the ranges for the direct path and the reflected path. Alternate columns ofrngrefer to the line-of-sight path and reflected path, respectively for the same source-reference point pair. Position units are meters.

ang

方位角和高度角,returned as a 2-by-N矩阵或2 by-2N矩阵。每列代表形式的方向角度[方位角;高程]

什么时候模型is set to'可用空间',angis a 2-by-Nmatrix and represents the angle of the path from a source point to a reference point.

什么时候模型is set to“两射线”,angis a 2-by-2N矩阵。Alternate columns ofangrefer to the line-of-sight path and reflected path, respectively.

Angle units are in degrees.

例子

全部收缩

计算位于位置的目标的范围和角度(1000,2000,50)meters from the origin.

TargetLoc = [1000;2000;50]; [tgtrng,tgtang] = rangeangle(TargetLoc)
tgtrng = 2.2366e+03
tgtang =2×163.4349 1.2810

计算位于位置的目标的范围和角度(1000,2000,50)meters with respect to a local origin at(100,100,10)meters.

TargetLoc = [1000;2000;50]; Origin = [100;100;10]; [tgtrng,tgtang] = rangeangle(TargetLoc,Origin)
tgtrng = 2.1028e+03
tgtang =2×164.6538 1.0900

计算位于位置的目标的范围和角度(1000,2000,50)meters but with respect to a local coordinate system origin at(100,100,10)meters. Choose a local coordinate reference frame that is rotated about the z-axis by 45° from the global coordinate axes.

targetPos = [1000; 2000; 50];原点= [100; 100; 10];refaxes = [1/sqrt(2)-1/sqrt(2)0;1/sqrt(2)1/sqrt(2)0;0 0 1];[tgtrng,tgtang] = rangeangle(targetpos,origin,rebaxes)
tgtrng = 2.1028e+03
tgtang =2×119.6538 1.0900

Compute the two-ray propagation distances and arrival angles of rays from a source located at(1000,1000,500)meters from the origin. The receiver is located at(100,100,200)meters from the origin.

sourceLoc = [1000;1000;500]; receiverLoc = [100;100;200]; [sourcerngs,sourceangs] = rangeangle(sourceLoc,receiverLoc,“两射线”)
sourcerngs =1×2103×1.3077 1.4526
Sourceangs =2×245.0000 45.0000 13.2627 -28.8096

Find the range and angle of the same target with the same origin but with respect to a local coordinate axes. The local coordinate axes are rotated around the z-axis by 45 degrees from the global coordinate axes.

refaxes = rotz(45); [sourcerngs,sourceangs] = rangeangle(sourceLoc,receiverLoc,refaxes,“两射线”)
sourcerngs =1×2103×1.3077 1.4526
Sourceangs =2×20 0 13.2627 -28.8096

Compute the ranges and angles of two targets located at (1000,200,500) and (2500,80,-100) meters with respect to two local origins at (100,300,-40) and (500,-60,10) meters. Specify two different sets of local axes.

targetPos = [1000,2500; 200,80; 500,-100];原始= [100,500; 300,-60; -40,10];ax(::,:,1)= rotx(40)*rotz(10);ax(::,:,2)= roty(5)*rotx(10);[tgtrng,tgtang] = rangeangle(targetpos,origins,ax)
tgtrng =1×2103×1.0543 2.0079
tgtang =2×26.7285 4.2597 26.9567 1.1254

More About

全部收缩

Angles in Local and Global Coordinate Systems

rangeanglefunction returns the path distance and path angles in either the global or local coordinate systems.每个天线或麦克风元件和阵列都有一个增益模式,在方位角和抬高的局部角坐标中表达。随着元素或阵列的移动或旋转,增益模式随之携带。为了确定信号的强度,您必须知道信号路径相对于元件或阵列的局部角坐标所产生的角度。默认情况下,rangeangle函数确定信号路径相对于整体坐标的角度。如果添加refaxes论点,您可以计算有关局部坐标的角度。作为例证,该图显示了从全局坐标旋转的5 x-5均匀矩形阵列(URA)(xyz)usingrefaxes。这x'局部坐标系的轴(x'y'z')is aligned with the main axis of the array and moves as the array moves. The path length is independent of orientation. The global coordinate system defines the azimuth and elevations angles(Φ,θ)局部坐标系定义方位角和高程角度(Φ',θ')

Local and Global Coordinate Axes

Free Space Propagation Model

自由空间信号传播模型指出,在同质的各向同性介质中从一个点传播到另一点的信号在直线上行驶,称为line-of-sightor直接路径。直线由从辐射源到目的地的几何矢量定义。Similar assumptions are made for sonar but the termisovelocitychannel is used in place of free space.

Two-Ray Propagation Model

A two-ray propagation channel is the next step up in complexity from a free-space channel and is the simplest case of a multipath propagation environment. The free-space channel models a straight-lineline-of-sight从点1到点2的路径。在两射线通道中,介质被指定为具有反射平面边界的均质的各向同性介质。边界始终设置在z = 0。这re are at most two rays propagating from point 1 to point 2. The first ray path propagates along the same line-of-sight path as in the free-space channel(请参阅分阶段System object™)。这line-of-sight path is often called the直接路径。这second ray reflects off the boundary before propagating to point 2. According to the Law of Reflection , the angle of reflection equals the angle of incidence. In short-range simulations such as cellular communications systems and automotive radars, you can assume that the reflecting surface, the ground or ocean surface, is flat.

这figure illustrates two propagation paths. From the source position,ss和接收器位置,sr, you can compute the arrival angles of both paths,θ'洛斯andθ'rp。这arrival angles are the elevation and azimuth angles of the arriving radiation with respect to a local coordinate system. In this case, the local coordinate system coincides with the global coordinate system. You can also compute the transmitting angles,θ洛斯andθrp。In the global coordinates, the angle of reflection at the boundary is the same as the anglesθrpandθ'rp。这reflection angle is important to know when you use angle-dependent reflection-loss data. You can determine the reflection angle by using therangeangle功能并将参考轴设置为全局坐标系。视线路径的总路径长度显示在图中R洛斯等于源和接收器之间的几何距离。反射路径的总路径长度为Rrp= r1+ R2。这quantityLis the ground range between source and receiver.

You can easily derive exact formulas for path lengths and angles in terms of the ground range and object heights in the global coordinate system.

R = x s x r R l o s = | R | = ( z r z s ) 2 + L 2 R 1 = z r z r + z z ( z r + z s ) 2 + L 2 R 2 = z s z s + z r ( z r + z s ) 2 + L 2 R r p = R 1 + R 2 = ( z r + z s ) 2 + L 2 tan θ l o s = ( z s z r ) L tan θ r p = ( z s + z r ) L θ l o s = θ l o s θ r p = θ r p

Extended Capabilities

在R2011a中引入