Main Content

azel2phithetapat

将辐射模式从方位和高度coordinates to phi-theta coordinates

Description

example

pat_phitheta= azel2phithetapat(pat_azel,az,el)converts the antenna radiation pattern,pat_azel, from azimuth and elevation coordinates to the pattern,pat_phitheta, in phi and theta coordinates.azandelare the azimuth and elevation angles at which thepat_azelvalues are defined. Thepat_phithetamatrix covers theta values from 0 to 180 degrees and phi values from 0 to 360 degrees in one degree increments. The function interpolates thepat_azelmatrix to estimate the response of the antenna in a given phi-theta direction.

example

pat_phitheta= azel2phithetapat(pat_azel,az,el,phi,theta)also specifiesphiandthetaas the grid at which to samplepat_phitheta. To avoid interpolation errors,phishould cover the range [0,180], andthetashould cover the range [0,360].

example

pat_phitheta= azel2phithetapat(___,'RotateZ2X',rotpatax)also specifiesrotpataxto indicate the boresight direction of the pattern along thex-axis or thez-axis.

example

[pat_phitheta,phi_pat,theta_pat] = azel2phithetapat(___)also returns vectorsphi_patandtheta_patcontaining the phi and theta angles at whichpat_phithetais sampled.

Examples

collapse all

Convert a radiation pattern to φ/θ form, with the φ and θ angles spaced 1 degree apart.

Define the pattern in terms of azimuth and elevation.

az = -180:180; el = -90:90; pat_azel = mag2db(repmat(cosd(el)',1,numel(az)));

Convert the pattern to φ/θ space.

pat_phitheta = azel2phithetapat(pat_azel,az,el);

Plot the result of converting a radiation pattern to ϕ / θ space with the ϕ and θ angles spaced 1 degree apart.

The radiation pattern is the cosine of the elevation.

az = -180:180; el = -90:90; pat_azel = repmat(cosd(el)',1,numel(az));

Convert the pattern to ϕ / θ space. Use the returned ϕ and θ angles for plotting.

[pat_phitheta,phi,theta] = azel2phithetapat(pat_azel,az,el);

Plot the result.

H = surf(phi,theta,mag2db(pat_phitheta)); H.LineStyle ='none'; xlabel('phi (degrees)'); ylabel('theta (degrees)'); zlabel('Pattern');

Figure contains an axes object. The axes object contains an object of type surface.

Convert a radiation pattern to the alternate phi-theta coordinates, with the phi and theta angles spaced one degree apart.

Create a simple radiation pattern in terms of azimuth and elevation. Add an offset to the pattern to suppress taking the logarithm of zero inmag2db.

az = -180:180; el = -90:90; pat_azel = mag2db(cosd(el).^2'*sind(az).^2 + 1); imagesc(az,el,pat_azel) xlabel('Azimuth (deg)') ylabel('Elevation (deg)') colorbar

Figure contains an axes object. The axes object contains an object of type image.

Convert the pattern to phi-theta space.

[pat_phitheta,phi_pat,theta_pat] = azel2phithetapat(pat_azel,az,el,'RotateZ2X',false); imagesc(phi_pat,theta_pat,pat_phitheta) xlabel('Phi (deg)') ylabel('Theta (deg)') colorbar

Figure contains an axes object. The axes object contains an object of type image.

Convert a radiation pattern to ϕ / θ space with ϕ and θ angles spaced 5 degrees apart.

The radiation pattern is the cosine of the elevation.

az = -180:180; el = -90:90; pat_azel = repmat(cosd(el)',1,numel(az));

Define the set of ϕ and θ angles at which to sample the pattern. Then, convert the pattern.

phi = 0:5:360; theta = 0:5:180; pat_phitheta = azel2phithetapat(pat_azel,az,el,phi,theta);

Plot the result.

H = surf(phi,theta,mag2db(pat_phitheta)); H.LineStyle ='none'; xlabel('phi (degrees)'); ylabel('theta (degrees)'); zlabel('Pattern');

Figure contains an axes object. The axes object contains an object of type surface.

Input Arguments

collapse all

Antenna radiation pattern as a function of azimuth and elevation, specified as a real-valuedQ-by-Pmatrix.pat_azelcontains the magnitude pattern.Pis the length of theazvector, andQis the length of theelvector. Units are in dB.

Data Types:double

Azimuth angles at which thepat_azelpattern is sampled, specified as a real-valued length-Pvector. Azimuth angles lie between –180 and 180, inclusive. Units are in degrees.

Data Types:double

Elevation angles at which thepat_azelpattern is sampled, specified as a real-valued length-Qvector. Azimuth angles lie between –90 and 90, inclusive. Units are in degrees.

Data Types:double

Phi angles at which thepat_phithetapattern is sampled, specified as a real-valued length-Lvector. Phi angles lie between 0 and 360, inclusive. Units are in degrees.

Data Types:double

Theta angles at which thepat_phithetapattern is sampled, specified as a real-valued length-Mvector. Theta angles lie between 0 and 180, inclusive. Units are in degrees.

Data Types:double

Pattern boresight direction selector, specified astrueorfalse.

  • Ifrotpataxistrue, the pattern boresight is along thex-axis. In this case, thez-axis of phi-theta space is aligned with thex-axis of azimuth and elevation space. The phi angle is defined from they-axis to thez-axis and the theta angle is defined from thex-axis toward theyz-plane. (SeePhi and Theta Angles).

  • Ifrotpataxisfalse, the phi angle is defined from thex-axis to they-axis and the theta angle is defined from thez-axis toward thexy-plane. (SeeAlternative Definition of Phi and Theta).

Data Types:logical

Output Arguments

collapse all

Antenna radiation pattern in phi-theta coordinates, returned as a real-valuedM-by-Lmatrix.pat_phithetarepresents the magnitude pattern.Lis the length of thephi_patvector, andMis the length of thetheta_patvector. Units are in dB.

Phi angles at which thepat_phithetapattern is sampled, returned as a real-valued lengthLvector. Units are in degrees.

Theta angles at which thepat_phithetapattern is sampled, returned as a real-valued length-Mvector. Units are in degrees.

More About

collapse all

Azimuth and Elevation Angles

Theazimuth angleof a vector is the angle between thex-axis and the orthogonal projection of the vector onto thexyplane. The angle is positive in going from thexaxis toward theyaxis. Azimuth angles lie between –180 and 180 degrees. Theelevation angleis the angle between the vector and its orthogonal projection onto thexy-plane. The angle is positive when going toward the positivez-axis from thexyplane. By default, the boresight direction of an element or array is aligned with the positivex-axis. The boresight direction is the direction of the main lobe of an element or array.

Note

The elevation angle is sometimes defined in the literature as the angle a vector makes with the positivez-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 shown as a green solid line.

Phi and Theta Angles

The phi angle (φ) is the angle from the positivey-axis to the vector’s orthogonal projection onto theyzplane. The angle is positive toward the positivez-axis. The phi angle is between 0 and 360 degrees. The theta angle (θ) is the angle from thex-axis to the vector itself. The angle is positive toward theyzplane. The theta angle is between 0 and 180 degrees.

这个数字说明了一个向量φ和θthat appears as a green solid line.

The coordinate transformations between φ/θ andaz/elare described by the following equations

sin e l = sin ϕ sin θ tan a z = cos ϕ tan θ cos θ = cos e l cos a z tan ϕ = tan e l / sin a z

Alternative Definition of Phi and Theta

The phi angle (φ) is the angle from the positivex-axis to the vector’s orthogonal projection onto thexyplane. The angle is positive toward the positivey-axis. The phi angle is between 0 and 360 degrees. The theta angle (θ) is the angle from thez-axis to the vector itself. The angle is positive toward thexyplane. The theta angle is between 0 and 180 degrees.

The figure illustratesφandθfor a vector that appears as a green solid line.

ϕ = a z θ = 90 e l a z = ϕ e l = 90 θ

Extended Capabilities

Version History

Introduced in R2012a