Generating the gain values of a steered ULA

Hi all,
I'm just checking whether there's any way to get the gain values of a steered ULA.
i.e: I create a steerd array using following code
pattern(array,fc,-90:90,0,'PropagationSpeed',vp,'Type','powerdb','CoordinateSystem','polar','Weights',s_vec,'Normalize',false);
This will visualize the steered array and hovering the mouse, I can see the gain values. Now I need to print them in the code.
I tried to get the gain from a specific angle using following. Since I'm not providing the steering vector, I'm not getting the correct value I can see in the steered beams.
gain = phased.ArrayGain('SensorArray',array,'Weights',s_vec);
arraygain = gain(fc,[45;0]);
fprintf('%i\n', arraygain);
Is there any other ways of generating this.
Thanks a lot!

Answers (1)

Hi,
As per my understanding, you want to get the gain values from the ‘pattern’ function of your code.
You can simply assign a variable to the pattern to get the gain values of your model.
You can refer to the below example,
c = physconst('LightSpeed');
fc = 3e8;
lambda = c/fc;
ang = [-30,-20,-10,0,10,20,30; 0,0,0,0,0,0,0];
myAnt1 = phased.IsotropicAntennaElement;
myArray1 = phased.ULA(10,lambda/2,'Element',myAnt1);
w = steervec(getElementPosition(myArray1)/lambda,[30;0]);
pattern(myArray1,fc,-90:90,0,'PropagationSpeed',c,'Type','powerdb','CoordinateSystem','polar','Weights',w,'Normalize',false);
% To generate Gain values
gainval=pattern(myArray1,fc,-90:90,0,'PropagationSpeed',c,'Type','powerdb','CoordinateSystem','polar','Weights',w,'Normalize',false)
gainval = 181×1
3.0103 3.0082 3.0016 2.9896 2.9708 2.9432 2.9040 2.8501 2.7776 2.6821
I hope this resolves your issue

Answered:

on 24 Apr 2023

Community Treasure Hunt

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

Start Hunting!