plotting Antenna pattern considering special relativity

syms x y z t v
assume(t==0);
c=3*(10^8);
assume(v<=c);
gama=1/sqrt(1-((v/c)^2));
r=sqrt((y^2)+(z^2)+((gama*(x-(v*t)))^2));
teta=acosd(z/r);
phi=acosd((gama*(x-(v*t)))/((y^2)+((gama*(x-(v*t)))^2)));
eta=377;
meo=4*(10^-7);
Iz=1;
l=1;
E_nor=gama*(((-1*eta*meo*Iz*cosd((pi/2)*cosd(teta))*sind(teta))/((2*pi)*r*sind(teta)))-((v*meo*Iz*cosd((pi/2)*cosd(teta))*cosd(phi))/(c*(2*pi)*r*sind(teta))));
H_nor=gama*(((meo*Iz*cosd((pi/2)*cosd(teta))*cosd(phi))/((2*pi)*r*sind(teta)))+((v*eta*meo*Iz*cosd((pi/2)*cosd(teta))*sind(teta))/(c*(2*pi)*r*sind(teta))));
E_par=(1i*eta*meo*Iz*cosd((pi/2)*cosd(teta))*sind(teta)*cosd(phi))/((2*pi)*r*sind(teta));
H_par=(1i*meo*Iz*cosd((pi/2)*cosd(teta))*sind(phi))/((2*pi)*r*sind(teta));
this is my a part of my code to plot antenna pattern in polar cordinates.
as it is obvious, teta and phi are dependet on x,y,z,v,t. to simplify the question i assumed that the moving antenna is in (0,0,0) by t=0 and velocity vector is parrarel to x-axe. the rest is easy .E_norm is the electric field perpendicular to velocity vector.
I just don't know how to use new phi and teta which has been intriduced in the code to plot the pattern.
I will appriciate, if anyone could help me.

回答(1 个)

The transformed angles must be evaluated numerically before you can plot the radiation pattern. In your code, theta and phi are symbolic expressions that depend on x, y, z, v, and t, so they cannot be used directly in a polar plot. Below code, removed the symbolic variables entirely and computed the transformed coordinates and angles directly on a numerical observation grid.
clear;
clc;
close all;
%% Constants
c = 3e8;
v = 0.9*c; % Velocity
gamma = 1/sqrt(1-(v/c)^2);
eta0 = 377;
mu0 = 4*pi*1e-7;
Iz = 1;
%% Angular observation grid
theta = linspace(1e-3,pi-1e-3,181);
phi = linspace(-pi,pi,361);
[THETA,PHI] = meshgrid(theta,phi);
%% Observation sphere
R = 100;
t = 0;
x = R*sin(THETA).*cos(PHI);
y = R*sin(THETA).*sin(PHI);
z = R*cos(THETA);
%% Lorentz transformation
xp = gamma*(x-v*t);
yp = y;
zp = z;
r = sqrt(xp.^2 + yp.^2 + zp.^2);
%% Angles in moving frame
thetaP = acos(zp./r);
phiP = atan2(yp,xp);
%% Avoid singularity
sintheta = sin(thetaP);
sintheta(abs(sintheta)<1e-8) = 1e-8;
%% Dipole pattern factor
F = cos((pi/2)*cos(thetaP))./sintheta;
%% Field components
E_normal = gamma .* ( ...
(-eta0*mu0*Iz.*F)./(2*pi.*r) ...
- (v*mu0*Iz.*F.*cos(phiP))./(c*2*pi.*r) );
E_parallel = ( ...
1j*eta0*mu0*Iz.*F.*cos(phiP) ...
)./(2*pi.*r);
%% Total field magnitude
Emag = sqrt(abs(E_normal).^2 + abs(E_parallel).^2);
%% Normalize
Emag = Emag./max(Emag(:));
%% 3-D pattern
figure
patternCustom(Emag,rad2deg(theta),rad2deg(phi))
title('Relativistic Radiation Pattern')

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by