How do I get my custom radiation pattern to properly make a custom antenna element in the phased array system toolbox?

13 views (last 30 days)
I am trying to import a radiation pattern from COMSOL to create a custom antenna element. I used Matlab to first create a matrix of points at which I want COMSOL to output the radiation pattern. This radiation pattern is then imported back into Matlab to create the custom element. With the original measurement points and new radiation magnitude values, I am able to create a 3D scatter plot that looks exactly how the radiation pattern should look:
(a large main beam with several side lobes) However, when I attempt to use phased.CustomAntennaElement, the resulting pattern is nothing like the intended shape:
I have made sure that all the units are correct (azimuth and elevation angles instead of phi and theta, dB instead of mag) and that the radiation pattern matrix is in the correct order.
I have attached the .m file containing my code, along with the coordinate file created for COMSOL and the data file that COMSOL returns.
Thank you in advance for your help.
  1 Comment
Mike Lee
Mike Lee on 8 Mar 2017
Hi Nick,
I am trying to do something similar as your task and I am really a novice to the Matlab. Do you mind if I ask how you got the scatter plot? I have a set of data including azimuth, elevation, and amplitude and trying to get a scatter plot first.
Thank you

Sign in to comment.

Accepted Answer

Honglei Chen
Honglei Chen on 9 Feb 2016
Hi Nick,
Could you explain your data file a bit? I took a quick look at your script and I noticed that you are using degrees in the input when you invoke sph2cart function in MATLAB. However, the sph2cart function assumes that the inputs are in radians. Therefore, it seems that there is some mismatch there. On the other hand, when you do scatter3 plot, it looks like that you skip the z coordinates and directly uses the pattern data. Therefore, I'm a bit confused about how to interpret the data. Thanks.
  2 Comments
Nick Albertson
Nick Albertson on 10 Feb 2016
Thank you for your response. I did not know that the sph2cart function requires radians instead of degrees; that may be my problem and I will definitely try that first.
To make the scatter plot, I took the magnitude output from COMSOL and plotted it against the azimuth and elevation angles that I input into COMSOL originally. COMSOL output 4 variables: x, y, z, and magnitude in dB. If I had done cart2sph on the x,y,z data from COMSOL, I would have gotten essentially the same thing, but with round off error to the point that it would no longer work with the phased array toolbox.
Nick Albertson
Nick Albertson on 10 Feb 2016
Edited: Nick Albertson on 10 Feb 2016
Thank you so much for pointing out my error! I will have to keep an eye on that in the future. Here is the finished product:

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!