Borrar filtros
Borrar filtros

How to modify FPGA-Based Beamforming in Simulink: Algorithm Design

1 visualización (últimos 30 días)
Hello, I would like to change the number of antenna elements from 10 to 5 in this example: https://www.mathworks.com/help/dsphdl/ug/design-an-hdl-beamforming-algorithm-in-simulink.html
I run the simulation and I get an error that inside HDL_Algorithm/Angle2SteeringVector/CalulateDelay/GetElementPos/y_spacing is a 1x10 constant that had data already populated inside it. I don't know where this data came from. Am I able to change this to 1x5 so I can try this example with 5 instead of 10 antenna elements? Also there any documentation of how the phase shift beamforming simulink block was implemented into the HDL_Algorithm with HDL_coder compatible simulink blocks?

Respuesta aceptada

George
George el 22 de Feb. de 2024
Hello,
As far as changing the example to work with 5 elements, it looks like the data for the example gets initialized in a couple of the Model Callbacks. These callbacks are Matlab code that gets called in different parts of the Simulink model lifecycle. You can find more information on Model Callbacks here:
Specifically, if you open the Model Properties and navigate to the Callbacks tab, it looks like the setup happens in PreLoadFcn and InitFcn. You will need to update this for 5 antennas instead of 10. You will probably also need to make other modifications depending on the operating frequency of your system, array geometry, PRF, etc.
For example, the existing PreLoadFcn is:
prop_speed = physconst('LightSpeed'); % Propagation speed
fc = 100e6; % Operating frequency
lambda = prop_speed/fc; % Wavelength
paramBeamformer.propSpeed = prop_speed;
paramBeamformer.fc = fc;
% Antenna
paramBeamformer.Antenna = phased.ULA('NumElements',10,'ElementSpacing',0.5*lambda);
% Pulse
paramBeamformer.fs = 1000; %1khz
paramBeamformer.prf = 1/.3;
EleSpacing = (paramBeamformer.propSpeed/paramBeamformer.fc)/2;
SpeedofProp = paramBeamformer.propSpeed;
SamplingFreq = paramBeamformer.fc;
y_spacing = ([1:10] - 5.5).*EleSpacing;
addDelay1=4;
addDelay2=3;
addDelay3=3;
addDelay4=3;
addDelay5=3;
Something like the following changes will be required for you, there may be more changes required, this will require your investigation:
prop_speed = physconst('LightSpeed'); % Propagation speed
fc = 100e6; % Operating frequency
lambda = prop_speed/fc; % Wavelength
paramBeamformer.propSpeed = prop_speed;
paramBeamformer.fc = fc;
% Antenna
paramBeamformer.numElements = 5;
paramBeamformer.eleSpacing = 0.5*lambda;
paramBeamformer.Antenna = phased.ULA('NumElements',paramBeamformer.numElements,'ElementSpacing',paramBeamformer.eleSpacing);
% Pulse
paramBeamformer.fs = 1000; %1khz
paramBeamformer.prf = 1/.3;
EleSpacing = paramBeamformer.eleSpacing;
SpeedofProp = paramBeamformer.propSpeed;
SamplingFreq = paramBeamformer.fc;
y_spacing = ([1:paramBeamformer.numElements] - (paramBeamformer.numElements+1)/2).*paramBeamformer.eleSpacing;
addDelay1=4;
addDelay2=3;
addDelay3=3;
addDelay4=3;
addDelay5=3;
Similarly, you might need to update the InitFcn:
EleSpacing = (paramBeamformer.propSpeed/paramBeamformer.fc)/2;
SpeedofProp = paramBeamformer.propSpeed;
SamplingFreq = paramBeamformer.fc;
y_spacing = ([1:10] - 5.5).*EleSpacing;
to
EleSpacing = paramBeamformer.eleSpacing;
SpeedofProp = paramBeamformer.propSpeed;
SamplingFreq = paramBeamformer.fc;
y_spacing = ([1:paramBeamformer.numElements] - (paramBeamformer.numElements+1)/2).*paramBeamformer.eleSpacing;
So those changes are pretty straightforward. However, to update the Simulink model blocks is going to be more difficult, this gets to the second part of your question. Essentially, it looks like the beamforming algorithm is just reimplemented using Simulink blocks that support HDL Code generation, so different delays are inserted into each channel to shift the phase of the sample accordingly. You will need to at least make the following updates to the model, maybe more:
  1. Update the concatenation in HDL Algorithm/Angle2SteeringVec/Calculate Delay/getElemPos so that both constants are zeros(1,5) instead of zeros(1,10).
  2. In HDL Algorithm/MAC, there is an assumption that there are 10 receive channels. You will need to update this model with your 5 element assumption. So it looks like you would change the number of outputs from the Demux blocks from 10 to 5, and remove some of the delay line blocks accordingly.
  3. Etc.
You will basically need to keep updating the model like in steps 1 and 2 until all of the 10 element assumptions are gone. This might be somewhat tricky, but hopefully this gets you started, feel free to post again if you run into any issues.
  1 comentario
Nicole Dulieu
Nicole Dulieu el 8 de Mzo. de 2024
Hi,
Thank you so much for all your help and I have made some changes. I also tried to make sure I understood the differance in delays of the HDL_Algorithm for 5 vs 10 antenna elements. However, my 5 element HDL Algorithm beamformed signal is not correct and varies greatly from the behavioral beamformed signal. Can you please take a look at the .slx file and the changes I made and let me know how I can get the beamformed signal for the 5 elements? Also there is a pdf I made of the differences in delays between 5 and 10 element algorithms if you don't mind double checking this or editing it I would really appreciate it. Thank you so much.

Iniciar sesión para comentar.

Más respuestas (0)

Productos


Versión

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by