h = phased.ConformalArray();
t= 1/2*(1+sqrt(14));
n=32;
c= ones(n,1)';
c(:)=1:32;
h.ElementPosition = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;(sqrt(c).*cos(2*pi*t*c))*0.02655;(sqrt(c).*sin(2*pi*t*c))*0.02655];
h.ElementNormal = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;0 0 0 0 0 ...
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0];
h.Element = ...
phased.OmnidirectionalMicrophoneElement('BackBaffled',true,'FrequencyRange',[48e3 580e3]);
fs= 999e3;
t=0:1/20e6:3e-4;
c = 343;
fc = 500000;
hc = phased.WidebandCollector('Sensor',h,...
'PropagationSpeed',c,'SampleRate',fs,...
'ModulatedInput',true,'CarrierFrequency',fc);
A=1:32;
B=1:32;
A(A>0)=-1.5708;
B(B>0)=1.5508;
ang=[A;B];
x=step(hc,recon,ang);
hbf = phased.TimeDelayBeamformer('SensorArray',h,...
'DirectionSource',Property,'Direction',ang,...
'PropagationSpeed',c,...
'SampleRate',fs,'SubbandsOutputPort',true,...
'WeightsOutputPort',true);
[y,w] = step(hbf,x);
figure;
plot(t(1:6001),real(x(1:6001,2)),'r:',t(1:6001),real(y(1:6001)));
xlabel('Time'); ylabel('Amplitude');
legend('Original','Beamformed');
title('MVDR Beamformer');