Continue to Site

# Archimdean Spiral antenna MATLAB code

Status
Not open for further replies.

#### bacurrie45

##### Newbie level 4
Hi there i just finished a master's project designing an Archimedean spiral antenna and would like to upload my MATLAB code to help others in the future who may need it. The code will ask you to define the number of turns you want and your outer radius based on your lower frequency then will calculate your inner radius,spacing,width and growth rate or proportionality constant and generate your spiral for you with two arms. This generates a set of x and y coordinates which can be exported to another package e.g MATLAB,CST etc. All dimensions have been set up in MATLAB as millimeters.

Code:
clear all
N = 10;
rout = 126e-3;
rin = rout/(4*N+1);
spacing = (rout-rin)/(4*N)
width = spacing
a = 2*width/pi

theta = [0:pi/1000:2*pi*N];
r1 =  rin+a*theta;
x1 = r1.*cos(theta);
y1 = r1.*sin(theta);

r2 = 2*rin+ a*theta;
x2 = r2.*cos(theta);
y2 = r2.*sin(theta);

theta2 = theta + pi;
r3 =  rin+a*theta;
x3 = r3.*cos(theta2);
y3 = r3.*sin(theta2);

r4 = 2*rin+ a*theta;
x4 = r4.*cos(theta2);
y4 = r4.*sin(theta2);

plot(x1, y1 ,'r', 'LineWidth', 4); grid on; hold on;

plot(x2, y2 ,'r', 'LineWidth', 4); grid on; hold on;

plot(x3, y3, 'LineWidth', 4); grid on; hold on;

plot(x4, y4 , 'LineWidth', 4); grid on; hold on;
axis ('equal')
rotate3d on
z = [x1,y1,x2,y2];
z = [x3,y3,x4,y4];

Last edited by a moderator:

Status
Not open for further replies.