Sample Final: Problem 4

E172sfa4
Sample Final: Problem 4
SJSU, May 10, 2003. EE172, Sample Final
Line Plots
For the simple half-wave dipole (or something similar), the element pattern is:
{ note: the dipole is in the vertical position here }
PatternPlot[fcn_, {var_,srt_,fin_}, opts___Rule] :=
PolarPlot[Evaluate[Abs[fcn /.var -> var + Pi/2]],
{var, srt, fin}, opts]
elementxzfactor[theta_, length_] :=
Cos[Pi length (Cos[theta])]/Sin[theta]
half = PatternPlot[elementxzfactor[theta, 0.5],
{theta, -Pi, Pi}, PlotStyle -> {{Dashing[{0.02}], Red}},
PlotLabel -> "Half-wave Dipole"]
Half-wave Dipole
0.4
0.2
-1
-0.5
0.5
-0.2
1
-0.4
-GraphicsFor the fun of it, let's construct an 1x4 array directly......
array[psi_, number_]:=Abs[Sin[number*psi/2]/(number*Sin[psi/2])]
Plot[array[psi,4],{psi,-2 Pi,2 Pi}, PlotRange -> All, Frame -> True]
1
0.8
0.6
0.4
0.2
0
-6
-4
-2
0
2
4
6
-Graphics-
1
E172sfa4
With phase = 0, L=lamda/4 (beta*d=Pi/2), psi = phase + beta*d*cos(theta)....
{ note: the array is along the horizontal direction }
arrayfactor[theta_, spacing_, number_, phase_]:=
array[phase + 2 Pi spacing Cos[theta],number]
arrayxz = PolarPlot[arrayfactor[theta, 0.25, 4, 0],
{theta, -Pi, Pi}, PlotStyle -> {{Dashing[{0.02}], Brown}},
PlotLabel -> "1x4 Array d=L/4"]
1x4 Array d=L/4
1
0.5
-0.3
-0.2
-0.1 0.1
0.2
0.3
-0.5
-1
-Graphics-
2
E172sfa4
total radiation pattern = element pattern * array pattern
{ for this 1 x 4 array. Again, the elements are half-wave dipole pointing in the vertical direction,
and the array element is lined up along the horizontal direction }
xzpattern[theta_] := Abs[
elementxzfactor[theta+Pi/2,0.5] * arrayfactor[theta,0.25,4,0]]
total4arrayxz = PolarPlot[xzpattern[theta],{theta, -Pi, Pi},
PlotStyle -> {{Dashing[{0.02}], Blue}},
PlotLabel -> "1x4 Dipole - xz view"]
1x4 Dipole - xz view
0.2
0.1
-0.15
-0.1
-0.05
0.050.10.15
-0.1
-0.2
-GraphicsTo see the effect of 90 degree phase shift from a pair of dipoles, we need to go back & construct the
pattern for 2 elements array first.
xz2pattern[theta_] := Abs[
elementxzfactor[theta+Pi/2,0.5] * arrayfactor[theta,0.25,2,0]]
array2xz = PolarPlot[xz2pattern[theta],{theta, -Pi, Pi},
PlotStyle -> {{Dashing[{0.02}], Blue}},
PlotLabel -> "1x2 Dipole - xz view"]
1x2 Dipole - xz view
0.3
0.2
0.1
-0.6 -0.4 -0.2
-0.1
-0.2
-0.3
0.2 0.4 0.6
-Graphics-
3
E172sfa4
Next we put 2 of this arrays together at lamda/2 apart (this is the array distance, even though all
elements are still lamda/4 apart). We also put a 90 degree phase shift between this 2 arrays. This
1x2 array pattern (with 90 deg & lamda/2) is....
arrayxz2 = PolarPlot[arrayfactor[theta, 0.5, 2, Pi/2],
{theta,-Pi,Pi},
PlotStyle-> {{Dashing[{0.02}],Brown}},
PlotLabel-> "1x2 90-deg. Array d=L/2"]
1x2 90-deg. Array d=L/2
0.75
0.5
0.25
-0.6-0.4-0.2
0.2 0.4 0.6
-0.25
-0.5
-0.75
-GraphicsFinally, the 90-degree phase shift on the last 2 dipoles change the radiation pattern to....
array4pattern[theta_] :=
Abs[xz2pattern[theta] * arrayfactor[theta, 0.5, 2, Pi/2]]
total22arrayxz = PolarPlot[array4pattern[theta],{theta,-Pi,Pi},
PlotStyle-> {{Dashing[{0.02}],Blue}},
PlotLabel-> "1x4 90-deg.Array d=L/2"]
1x4 90-deg.Array d=L/2
0.3
0.2
0.1
-0.4
-0.2
-0.1
0.2
0.4
-0.2
-0.3
-GraphicsOne needs to repeat this in other views as well. This is basically all we can do without doing detail
calculations. To see the full extend of the pattern, I enclosed the 3D view of this pattern below as a
reference.
Three-Dimensional Plots
4
E172sfa4
Once again, we look at the half-wave dipole along the vertical direction. We'll call this x-axis in this
section. i.e. the element pattern is symmetical about the x-axis.
elementpattern[theta_, phi_] :=
Cos[(Pi/2) Sin[theta] Cos[phi]]/Sqrt[1-Sin[theta]^2 Cos[phi]^2]
elementpat = SphericalPlot3D[Evaluate[N[Abs[
elementpattern[theta, phi]]]],{theta, 0, Pi},{phi, -Pi, Pi},
PlotRange -> All, PlotPoints -> 30,
AxesLabel -> {"x","y","z"}, ViewVertical -> {1,0,0}]
0.4
0.2
0 x
-0.2
-0.4
-1
1
0.5
-0.5
y 0
-0.5
0.5
-1 1
0
z
-Graphics3DThe 1x4 array is along the horizontal (z) direction, with 0 phasing, and lamda/4 spacing.
arraypattern[theta_, phi_, spacing_, phaseshift_, elements_] :=
With[{psi = 2 Pi spacing Cos[theta] + phaseshift},
Sin[elements psi/2]/(elements Sin[psi/2])]
array4pat = SphericalPlot3D[Evaluate[N[Abs[
arraypattern[theta,phi,0.25,0,4]]]],
{theta,0,Pi},{phi,-Pi,Pi}, PlotRange -> All, PlotPoints ->30,
AxesLabel -> {"x","y","z"}, ViewVertical -> {1,0,0}]
1
0.5
y
0
-0.5
-1
1
0.5
0
x
-0.5
-1
-0.2
0
0.2
z
-Graphics3D-
5
E172sfa4
Together, we have a radiation pattern for a 1 x 4 array of half-wave dipoles.
Pay attention to the relative magnitude. More directivity along the y-axis.
fieldpat4 = SphericalPlot3D[Evaluate[N[Abs[
elementpattern[theta,phi]*arraypattern[theta,phi,0.25,0,4]]]],
{theta, 0,Pi}, {phi,-Pi,Pi}, PlotRange -> All, PlotPoints ->30,
AxesLabel -> {"x","y","z"}, ViewVertical -> {1,0,0}]
0.4
0.2
0
1
x
-0.2
0.5
0
y
-0.4
-0.5
0
-10.2 z
-0.2
-Graphics3DAgain, to see the effect of the 90 degree phase shift on 2 elements, we go back to construct an 1x2
array first. The total 2-dipole array pattern is....
pat2[theta_, phi_]=N[Abs[elementpattern[theta, phi]
* arraypattern[theta, phi, 0.25, 0, 2]]];
fieldpat2 = SphericalPlot3D[Evaluate[pat2[theta, phi]],
{theta, 0, Pi},
{phi, -Pi, Pi}, PlotRange -> All, PlotPoints -> 30,
AxesLabel -> {"x","y","z"}, ViewVertical -> {1,0,0}]
0.4
0.2
0 x
-0.2
-0.4
1
0.5
0
y -0.5
-0.5
-1
0.5
0
z
-Graphics3D-
6
E172sfa4
PlotPoints -> 30,
6.2
E172sfa4
The array pattern for N=2, d=lamda/2 with 90-degree phase shift is....
array2pat = SphericalPlot3D[Evaluate[N[Abs[
arraypattern[theta, phi, 0.5, Pi/2, 2]]]], {theta, 0, Pi},
{phi, -Pi, Pi}, PlotRange -> All, PlotPoints -> 30,
AxesLabel -> {"x","y","z"}, ViewVertical -> {1,0,0}]
0.5
0
x
-0.5
0.5
y
0
-0.5
-0.5
0.5
0
z
-Graphics3DSo altogether with the 2-dipole "element" & an N=2, 90-deg, lamda/2 array,
the total radiation pattern is....
fieldpat22 = SphericalPlot3D[Evaluate[N[Abs[
pat2[theta, phi]*arraypattern[theta, phi, 0.5, Pi/2, 2]]]],
{theta, 0,Pi}, {phi,-Pi,Pi}, PlotRange -> All, PlotPoints ->30,
AxesLabel -> {"x","y","z"}, ViewVertical -> {1,0,0}]
0.4
0.2
0 x
-0.2
0.5
0
y
-0.4
-0.5
-0.25
0
-0.5
0.25 z
0.5
-Graphics3D-
7
E172sfa4
Another view....
Show[Graphics3D[First[fieldpat22],ViewPoint->{1,1,-3},PlotRange->All]]
-Graphics3DShow[Graphics3D[First[fieldpat22],ViewPoint->{1,1,-1},PlotRange->All]]
-Graphics3D-
8