Engee documentation
Notebook

Antenna patterns (part 1)

The example deals with setting and building directional patterns (DN) of various antenna elements using system objects (SOs) of EngeePhased library.

Initial parameters of the antenna element

Before plotting, let's choose the type of graph: gr() - static, plotlyjs() - dynamic.

In [ ]:
is_dinamic_plot = false # динамический график (true или false)
is_dinamic_plot ? plotlyjs() : gr()
Out[0]:
Plots.GRBackend()

Let's set the basic parameters of antenna elements:

In [ ]:
fc = 500e6 # частота излучения антенны
freq_rng = [50e6 1000e6] # частотный диапазон антенны

azim_ang = reshape(Vector(-180:180),1,:) # диапазон азимутальных углов
elev_ang = reshape(Vector(-90:90),1,:); # диапазон по углу места

1. Isotropic radiator

All antenna elements are located in the built-in library "EngeePhased". To set the system object of the isotropic antenna element it is necessary to call the function EngeePhased.IsotropicAntennaElement, within which define the necessary parameters of the element:

In [ ]:
# Содание антенного элемента
iso_element = EngeePhased.IsotropicAntennaElement(
    FrequencyRange=freq_rng, # частотный диапазон
    BackBaffled=false # обратное отражение
)
Out[0]:
IsotropicAntennaElement: FrequencyRange=[5.0e7 1.0e9] BackBaffled=false

To build the DN, call the function pattern with input arguments in the following order:

In [ ]:
pattern(
    iso_element, # антенный элемента
    fc, # частота излучения антенны
    azim_ang, # диапазон азимутальных углов
    elev_ang # диапазон по углу места
)
title!(" ДН изотропного элемента")
plot!(colorbar_title="КНД (дБи)")
Out[0]:

2 Cosine radiator

Analytically, the expression for the DN of this antenna is as follows: $\begin{align} f(az,el)=cos(az)^m cos(el)^n, \end{align}$ where $f-$ is the DNF function; $az$ - azimuth angle; $el$ - angle of position; $m,n$ - cosine degree exponents (real numbers greater than and equal to zero)

The cosine element is programmatically defined using the function CosineAntennaElement:

In [ ]:
cos_element = EngeePhased.CosineAntennaElement(
    FrequencyRange=[50e6 1000e6], # частотный диапазон
    CosinePower=[1.5 1.5] # показатели степени функции косинуса
)
Out[0]:
CosineAntennaElement: FrequencyRange=[5.0e7 1.0e9] CosinePower=[1.5 1.5]

Let's construct the DN for the new antenna element

In [ ]:
pattern(cos_element,fc,azim_ang,elev_ang)
title!(" ДН косинусной антенны")
plot!(colorbar_title="КНД (дБи)")
Out[0]:

3 Cardioid antenna element

The antenna element is formed using the function CardioidAntennaElement To specify the direction of the minimum of the antenna element, you must specify the axis and its direction using the parameter NullAxisDirection:

In [ ]:
cardiod_element = EngeePhased.CardioidAntennaElement(
    FrequencyRange=freq_rng, # частотный дипазон
    NullAxisDirection="-x" # направление минимума антенны
)
Out[0]:
CardioidAntennaElement: FrequencyRange=[5.0e7 1.0e9] NullAxisDirection=-x

Depending on the parameter NullAxisDirection, the antenna element DN characteristic will be represented by the expression:

| "-x" | "-y" | "-z" | | --------- | -------- | | $\begin{align}f(az,el)=\frac{\sin(\frac{\pi}{2}\sin(az-90^\circ)\cos(el)+\frac{\pi}{2})}{2\sin(\frac{1}{2}(\frac{\pi}{2}\sin(az-90^\circ)cos(el)+\frac{\pi}{2}))}\end{align}$ | $\begin{align}f(az,el)=\frac{\sin(\frac{\pi}{2}\sin(az-180^\circ)\cos(el)+\frac{\pi}{2})}{2\sin(\frac{1}{2}(\frac{\pi}{2}\sin(az-180^\circ)cos(el)+\frac{\pi}{2}))}\end{align}$ | $\begin{align}f(az,el)=\frac{\sin(\frac{\pi}{2}\sin(-el)+\frac{\pi}{2})}{2\sin(\frac{1}{2}(\frac{\pi}{2}\sin(-el)+\frac{\pi}{2}))}\end{align}$

| ♪ "+x" ♪ "+y" ♪ "+z" ♪ | --------- | -------- | | $\begin{align}f(az,el)=\frac{\sin(\frac{\pi}{2}\sin(az+90^\circ)\cos(el)+\frac{\pi}{2})}{2\sin(\frac{1}{2}(\frac{\pi}{2}\sin(az+90^\circ)cos(el)+\frac{\pi}{2}))}\end{align}$ | $\begin{align}f(az,el)=\frac{\sin(\frac{\pi}{2}\sin(az)\cos(el)+\frac{\pi}{2})}{2\sin(\frac{1}{2}(\frac{\pi}{2}\sin(az)cos(el)+\frac{\pi}{2}))}\end{align}$ | $\begin{align}f(az,el)=\frac{\sin(\frac{\pi}{2}\sin(el)+\frac{\pi}{2})}{2\sin(\frac{1}{2}(\frac{\pi}{2}\sin(el)+\frac{\pi}{2}))}\end{align}$

Let's build the antenna element

In [ ]:
pattern(cardiod_element,fc) 
title!("Диаграмма направленности кардиоидной антенны")
plot!(colorbar_title="КНД (дБи)")
Out[0]:

4. Custom antenna element

In addition to the known antenna elements, it is also possible to create a custom antenna element with a custom directional pattern.

Let's assume that we need an antenna element with DN given by Gaussian function. Let's set the surface using the function gauss:

In [ ]:
gauss(x,y) = exp.(-(x.^2 .+ y.^2))

x_grid = LinRange(-4,4,361) # сетка по оси x
y_grid = LinRange(-2,2,181) # сетка по оси y
custom_pattern = gauss(x_grid',y_grid);

Visualise the surface in Cartesian coordinates:

In [ ]:
surface(
    x_grid,y_grid,custom_pattern,
    title="Повехность функции гаусса",
    xlabel="x",ylabel="y",
    zlabel="z",xlims=(-2,2)
)
Out[0]:

Now, using the system object EngeePhased.CustomAntennaElement, let's form a custom antenna element:

In [ ]:
custom_element = EngeePhased.CustomAntennaElement(
    MagnitudePattern = custom_pattern
);
In [ ]:
fig2 = pattern(custom_element,fc)
plot!(fig2,title="ДН пользовательской антенны",
    colorbar_title="КНД, дБи"
)
Out[0]:

As a result of applying the custom antenna element, we have achieved a more directional DND.

Conclusion

The example demonstrates the construction and analysis of characteristics of antenna elements using the built-in library EngeePhased. Using this library it is possible to build ready-made elements or to define your own antenna element with arbitrary directivity diagram.