Engee documentation
Notebook

Adaptive beamforming under the influence of interference

This example demonstrates the application of the MVDR and LCMV adaptive beamforming algorithms under two interfering signals.

Auxiliary Functions

In [ ]:
# запуск симуляцик системной модели
function run_model( name_model, path_to_folder ) # определение функции для прогона модели
    Path = path_to_folder * "/" * name_model * ".engee"
    if name_model in [m.name for m in engee.get_all_models()] # Проверка условия загрузки модели в ядро
        model = engee.open( name_model ) # Открыть модель
        model_output = engee.run( model, verbose=true ); # Запустить модель
        engee.close( name_model, force=true ); # Закрыть модель
    else
        model = engee.load( Path, force=true ) # Загрузить модель
        model_output = engee.run( model, verbose=true ); # Запустить модель
        engee.close( name_model, force=true ); # Закрыть модель
    end
    return model_output
end;

# считывание выходных данных
function calc_array_out(out, name)
    array = zeros(eltype(out[name].value[1]),size(out[name].value[1],1),size(out[name].value[2],2),length(out[name].value))
    [array[:,:,i] = collect(out[name].value[i]) for i in eachindex(out[name].value)]
    return array
end

# построение выходных графиков
default(titlefontsize=11,top_margin=-1Plots.mm,guidefont=10,
   fontfamily = "Computer Modern",colorbar_titlefontsize=8,bottom_margin = -6Plots.mm
)

function plot_result(out, title, number, t_step = 0.3)
    t = Vector(0:t_step/size(out, 1):t_step*(1-1/size(out, 1)))*1e3 # сетка времени в мс
    plot(t, out[:, 1, number], label = title, title = title,size=(500,150))
    plot!(t, out_ref_pulse[:, 1, number], label = "Эталонный сигнал", 
        xlabel = "Время (мс)", уlabel = "Амплитуда (В)"
    )
end;

1. description of the model structure

The model illustrates beamforming in the presence of two interfering signals coming from azimuth angles of 30 and 50 degrees. The amplitudes of the interfering signals are much larger than the pulse amplitude. The noise level is set to -50 dBW to emphasise only the influence of the interfering signals. PhaseShift, MVDR and LCMV beamforming algorithms are applied to the received signal and their results are compared.


The structure diagram of the model is based on the example model classical beamforming with the addition of new blocks:

    • PSP generator - simulate the interference component having a normal distribution law
    • Direction of propagation - sets the direction of reception of useful signal and interfering signals in the block Receiving antenna array
    • MVDR shaper - implements the algorithm of MVDR shaping in the specified direction;
        • LCMV* shaper - implements the algorithm of LCMV shaping with a given weight matrix in a given direction;

The structural diagram of the system is given below.

image_3.png

2 Initialisation of model parameters

The model parameters are set in the file ParamBeamformarI.jl using the auxiliary function calcParamBeamformerI. This function is executed once when the model is loaded. It exports to the workspace a structure whose fields are referenced by the dialogue boxes in the model. To change any parameters, either change the values in the structure from the command line, or edit the helper function and restart it to update the parameter structure.

Model parameters

### radar parameters
propSpeed = physconst("LightSpeed") # Propagation speed (m/s)
fc = 100e6 # Carrier frequency (Hz)
lambda = propSpeed/fc # Wavelength (m)

# Antenna array parameters
NumElements = 10 # number of elements
ElementSpacing = 0.5*lambda # element spacing (m)
Antenna = EngeePhased.ULA(NumElements=10,ElementSpacing=0.5*lambda)

# Probing signal parameters
fs = 1000; # sampling frequency 1 kHz
prf = 1/0.3; # pulse repetition rate (Hz)

# Receiving device
NoisePower = 1/db2pow(50); # Noise Power (W)
Gain = 0.0; # Gain (dB))
LossFactor = 0.0 # Receiver Loss (dB)

# Weighting matrix for LCMV beamformer
steeringvec = EngeePhased.SteeringVector(SensorArray=Antenna)
cMatrix = steeringvec(fc,[43 45 47])
In [ ]:
# подключение файла с параметрами модели
include("$(@__DIR__)/ParamBeamformerI.jl");

3. Running the model

Use the function run_model to run a simulation of the system model Beamformer_Interference. The logged simulation results will be written to the variable out.

In [ ]:
out = run_model("Beamformer_Interference", @__DIR__) # запуск модели
Building...
Progress 0%
Progress 10%
Progress 20%
Progress 60%
Progress 100%
Progress 100%
Out[0]:
SimulationResult(
    "PhaseShift" => WorkspaceArray{Matrix{Float64}}("Beamformer_Interference/PhaseShift")
,
    "LCMV" => WorkspaceArray{Matrix{Float64}}("Beamformer_Interference/LCMV")
,
    "MVDR" => WorkspaceArray{Matrix{Float64}}("Beamformer_Interference/MVDR")
,
    "ReferencePulse" => WorkspaceArray{Vector{Float64}}("Beamformer_Interference/ReferencePulse")

)

4. Reading the output data

Use the function calc_array_out to read data from the variable out for each logged output.

In [ ]:
out_ref_pulse = calc_array_out(out, "ReferencePulse") # Эталонный импульс
out_lcmv = calc_array_out(out, "LCMV") # Формиватель луча LCMV
out_mvdr = calc_array_out(out, "MVDR") # Формиватель луча MVDR
out_phase_shift = calc_array_out(out, "PhaseShift"); # Формиватель луча PhaseShift

5. Visualisation of the model results

Visualisation of the results is possible in two ways:

  • in the "graphs" tab (by selecting the "array plotting" type of graphs)
  • in a script using the data obtained as a result of simulation

Using the first method we will visualise the model result for the outputs with and without beam forming:

beam_interf.png

The figures show the output of 3 specified beamformers: PhaseShift, MVDR and LCMV. It can be seen that the classical phase-shift beamformer does not cope with the task of target detection against the background of interference, because the interference amplitude is much larger than the useful signal and simply increasing the signal-to-noise ratio is not enough.

The output graph changes if MVDR and LCMV beamforming algorithm is used: after signal processing a peak is formed corresponding to the true position of the target.

Similarly, you can visualise the simulation results using the second method. For plotting in the script we will use the auxiliary function plot_result:

In [ ]:
num_puls = length(collect(out["ReferencePulse"]).time) # извлечение номера последнего импульса
plot_result(out_phase_shift, "Формиватель PhaseShift", num_puls, t_step) |> display
plot_result(out_mvdr, "Формиватель MVDR", num_puls, t_step) |> display
plot_result(out_lcmv, "Формиватель LCMV", num_puls, t_step)
Out[0]:

Comparing the obtained plots, we can notice that the resulting images are identical

Conclusion

In this example, a comparison of a simple and adaptive beamformer was carried out against a strong interference component. The results showed that a simple "PhaseShift Beamformer" is not able to detect a useful signal, in such cases it is necessary to resort to more advanced shaping algorithms "MVDR " or "LCMV ".

Blocks used in example