# Documentation

### This is machine translation

Translated by
Mouse over text to see original. Click the button below to return to the English verison of the page.

## Spherical Coordinates

### Support for Spherical Coordinates

Spherical coordinates describe a vector or point in space with a distance and two angles. The distance, R, is the usual Euclidean norm. There are multiple conventions regarding the specification of the two angles. They include:

• Azimuth and elevation angles

• Phi and theta angles

• u and v coordinates

Phased Array System Toolbox™ software natively supports the azimuth/elevation representation. The software also provides functions for converting between the azimuth/elevation representation and the other representations. See Phi and Theta Angles and U and V Coordinates.

### Azimuth and Elevation Angles

In Phased Array System Toolbox software, the predominant convention for spherical coordinates is as follows:

• Use the azimuth angle, az, and the elevation angle, el, to define the location of a point on the unit sphere.

• Specify all angles in degrees.

• List coordinates in the sequence (az,el,R).

The azimuth angle is the angle from the positive x-axis toward the positive y-axis, to the vector's orthogonal projection onto the xy plane. The azimuth angle is between –180 and 180 degrees. The elevation angle is the angle from the vector's orthogonal projection onto the xy plane toward the positive z-axis, to the vector. The elevation angle is between –90 and 90 degrees. These definitions assume the boresight direction is the positive x-axis.

 Note:   The elevation angle is sometimes defined in the literature as the angle a vector makes with the positive z-axis. The MATLAB® and Phased Array System Toolbox products do not use this definition.

This figure illustrates the azimuth angle and elevation angle for a vector that appears as a green solid line. The coordinate system is relative to the center of a uniform linear array, whose elements appear as blue circles.

### Phi and Theta Angles

As an alternative to azimuth and elevation angles, you can use angles denoted by φ and θ to express the location of a point on the unit sphere. To convert the φ/θ representation to and from the corresponding azimuth/elevation representation, use coordinate conversion functions, `phitheta2azel` and `azel2phitheta`.

The φ angle is the angle from the positive y-axis toward the positive z-axis, to the vector's orthogonal projection onto the yz plane. The φ angle is between 0 and 360 degrees. The θ angle is the angle from the x-axis toward the yz plane, to the vector itself. The θ angle is between 0 and 180 degrees.

The figure illustrates φ and θ for a vector that appears as a green solid line. The coordinate system is relative to the center of a uniform linear array, whose elements appear as blue circles.

The coordinate transformations between φ/θ and az/el are described by the following equations

`$\begin{array}{l}\mathrm{sin}\left(\text{el}\right)=\mathrm{sin}\varphi \mathrm{sin}\theta \hfill \\ \mathrm{tan}\left(\text{az}\right)=\mathrm{cos}\varphi \mathrm{tan}\theta \hfill \\ \hfill \\ \mathrm{cos}\theta =\mathrm{cos}\left(\text{el}\right)\mathrm{cos}\left(\text{az}\right)\hfill \\ \mathrm{tan}\varphi =\mathrm{tan}\left(\text{el}\right)/\mathrm{sin}\left(\text{az}\right)\hfill \end{array}$`

### U and V Coordinates

In radar applications, it is often useful to parameterize the hemisphere x ≥ 0 using coordinates denoted by u and v.

You can define u and v in terms of φ and θ:

`$\begin{array}{l}u=\mathrm{sin}\theta \mathrm{cos}\varphi \\ v=\mathrm{sin}\theta \mathrm{sin}\varphi \end{array}$`

In these expressions, φ and θ are the phi and theta angles, respectively.

In terms of azimuth and elevation, the u and v coordinates are

`$\begin{array}{l}u=\mathrm{cos}el\mathrm{sin}az\\ v=\mathrm{sin}el\end{array}$`

The values of u and v satisfy the inequalities

`$\begin{array}{l}-1\le u\le 1\\ -1\le v\le 1\\ {u}^{2}+{v}^{2}\le 1\end{array}$`

Conversely, the phi and theta angles can be written in terms of u and v using

`$\begin{array}{l}\mathrm{tan}\varphi =u/v\\ \mathrm{sin}\theta =\sqrt{{u}^{2}+{v}^{2}}\end{array}$`

The azimuth and elevation angles can also be written in terms of u and v

`$\begin{array}{l}\mathrm{sin}el=v\\ \mathrm{tan}az=\frac{u}{\sqrt{1-{u}^{2}-{v}^{2}}}\end{array}$`

### Conversion between Rectangular and Spherical Coordinates

The following equations define the relationships between rectangular coordinates and the (az,el,R) representation used in Phased Array System Toolbox software.

To convert rectangular coordinates to (az,el,R):

`$\begin{array}{l}R=\sqrt{{x}^{2}+{y}^{2}+{z}^{2}}\\ az={\mathrm{tan}}^{-1}\left(y/x\right)\\ el={\mathrm{tan}}^{-1}\left(z/\sqrt{{x}^{2}+{y}^{2}}\right)\end{array}$`

To convert (az,el,R) to rectangular coordinates:

`$\begin{array}{l}x=R\mathrm{cos}\left(el\right)\mathrm{cos}\left(az\right)\\ y=R\mathrm{cos}\left(el\right)\mathrm{sin}\left(az\right)\\ z=R\mathrm{sin}\left(el\right)\end{array}$`

When specifying a target's location with respect to a phased array, it is common to refer to its distance and direction from the array. The distance from the array corresponds to R in spherical coordinates. The direction corresponds to the azimuth and elevation angles.

 Tip   To convert between rectangular coordinates and (az,el,R), use the MATLAB functions `cart2sph` and `sph2cart`. These functions specify angles in radians. To convert between degrees and radians, use `deg2rad` and `rad2deg`.

The special case of the uniform linear arrays (ULA) uses the concept of the broadside angle. The broadside angle is the angle measured from array normal direction projected onto the plane determined by the signal incident direction and the array axis to the signal incident direction. Broadside angles assume values in the interval [–90,90] degrees. The following figure illustrates the definition of the broadside angle.

The shaded gray area in the figure is the plane determined by the signal incident direction and the array axis. The broadside angle is positive when measured toward the positive direction of the array axis. A number of algorithms for ULA's use the broadside angle instead of the azimuth and elevation angles. The algorithms do so because the broadside angle more accurately describes the ability to discern direction of arrival with this geometry.

Phased Array System Toolbox software provides functions `az2broadside` and `broadside2az` for converting between azimuth and broadside angles. The following equation determines the broadside angle, β, from the azimuth and elevation angles, az and el:

`$\beta ={\mathrm{sin}}^{-1}\left(\mathrm{sin}\left(az\right)\mathrm{cos}\left(el\right)\right)$`

Expressing the broadside angle in terms of the azimuth and elevation angles reveals a number of important characteristics, including:

• For an elevation angle of zero degrees, the broadside angle is equal to the azimuth angle.

• Elevation angles equally above and below the xy plane result in identical broadside angles.

The following figure depicts a ULA with elements spaced d meters apart. The ULA is illuminated by a plane wave emitted from a point source in the far field. For convenience, the elevation angle is zero degrees. The plane determined by the signal incident direction and the array axis is the xy plane. The broadside angle reduces to the azimuth angle.

Because of the angle of arrival, the array elements are not simultaneously illuminated by the plane wave. The additional distance the incident wave travels between array elements is d sin(β) where d is the distance between array elements. Therefore, the constant time delay between array elements is:

`$\tau =\frac{d\mathrm{sin}\left(\beta \right)}{c},$`

where c is the speed of the wave.

For broadside angles of ±90 degrees, the plane wave is incident on the array along the array axis and the time delay between sensors reduces to ±d/c. For a broadside angle of 0 degrees, the plane wave illuminates all elements of the ULA simultaneously and the time delay between elements is zero.

The following examples show the use of the utility functions `az2broadside` and `broadside2az`:

A target is located at an azimuth angle of 45 degrees and elevation angle of 60 degrees relative to a ULA. Determine the corresponding broadside angle:

```bsang = az2broadside(45,60) % approximately 21 degrees```

Calculate the azimuth corresponding to a broadside angle of 45 degrees and an elevation of 20 degrees:

```az = broadside2az(45,20) % approximately 49 degrees```