Hi Graeme,
To extract the electromagnetic field pattern in the form of a complex array response from a Uniform Linear Array (ULA) or Uniform Rectangular Array (URA) in MATLAB, you can use the array's steering vector and element patterns.
While the pattern() function provides power and other field patterns, it doesn't directly return the complex field patterns.
Please follow this example MATLAB code below to extract complex array response:
- Define the Array: Use MATLAB's Phased Array System Toolbox to define your ULA or URA.
c = physconst('LightSpeed');
ula = phased.ULA('NumElements', numElements, 'ElementSpacing', d);
The steering vector represents the phase shifts required for the array elements to focus on a particular direction.
steeringVector = phased.SteeringVector('SensorArray', ula, 'PropagationSpeed', c);
sv = steeringVector(fc, [azimuthAngles; elevationAngle * ones(size(azimuthAngles))]);
- Element E-Field Patterns: If available, use the element pattern to account for individual element responses.
elementPattern = ones(size(sv));
- Combine Responses: Multiply the steering vector with the element pattern to get the complex array response.
complexArrayResponse = sv .* elementPattern;
plot(azimuthAngles, 20*log10(abs(complexArrayResponse)));
xlabel('Azimuth Angle (degrees)');
ylabel('Magnitude (dB)');
title('Complex Array Response Magnitude');
plot(azimuthAngles, angle(complexArrayResponse));
xlabel('Azimuth Angle (degrees)');
ylabel('Phase (radians)');
title('Complex Array Response Phase');
This approach provides a framework for extracting complex electromagnetic patterns from an array.
I hope this helps!