| View previous topic :: View next topic |
| Author |
Message |
Faust Antenna-Theory.com Newbie
Joined: 24 Mar 2020 Posts: 3
|
Posted: Tue Mar 24, 2020 9:52 am Post subject: About Directivity |
|
|
Hi guys,
I searched in forum but couldnt find a proper answer.
I am trying to calculate the directivity as stated in this websitehttp://www.antenna-theory.com/basics/directivity.php.
However, when I tried it on matlab, I found 1.3188 for antenna 1 and 2.9616 for antenna 2 which are not same as described.
I used below code. Could you please help me with this?
| Code: |
clc
clear all
close all
Degree = 0:180;
for i = 1:length(Degree)
Antenna1(i) = sqrt(sin(deg2rad(Degree(i))));
Antenna2(i) = (sin(deg2rad(Degree(i))))^5;
end
Antenna1 = Antenna1./max(Antenna1); % Normalization
Antenna2 = Antenna2./max(Antenna2); % Normalization
Directivity1 = max(Antenna1)/mean(Antenna1);
Directivity2 = max(Antenna2)/mean(Antenna2); |
Ps: I have also opened a similar topic in here but nobody replied. I would be pleased if you check it
https://stackoverflow.com/questions/58050453/how-to-calculate-antenna-directivity-in-matlab |
|
| Back to top |
|
 |
admin Site Admin
Joined: 03 Jan 2007 Posts: 247
|
|
| Back to top |
|
 |
Faust Antenna-Theory.com Newbie
Joined: 24 Mar 2020 Posts: 3
|
Posted: Thu Mar 26, 2020 6:44 am Post subject: |
|
|
Thank you very much for reply.
I have written the code like that since "This equation then is just a measure of the peak value of radiated power divided by the average, which gives the directivity of the antenna". is written in the link that i shared in previous post.
In this case, how should I correct my code? |
|
| Back to top |
|
 |
admin Site Admin
Joined: 03 Jan 2007 Posts: 247
|
Posted: Sat Mar 28, 2020 4:33 pm Post subject: |
|
|
for i = 1:length(Degree)
Antenna1(i) = sin(deg2rad(Degree(i))) * sqrt(sin(deg2rad(Degree(i))));
Antenna2(i) = sin(deg2rad(Degree(i))) * (sin(deg2rad(Degree(i))))^5;
end
Integrals in spherical coordinates must be weighted by sin(theta) |
|
| Back to top |
|
 |
Faust Antenna-Theory.com Newbie
Joined: 24 Mar 2020 Posts: 3
|
Posted: Sun Mar 29, 2020 11:03 am Post subject: |
|
|
| admin wrote: | for i = 1:length(Degree)
Antenna1(i) = sin(deg2rad(Degree(i))) * sqrt(sin(deg2rad(Degree(i))));
Antenna2(i) = sin(deg2rad(Degree(i))) * (sin(deg2rad(Degree(i))))^5;
end
Integrals in spherical coordinates must be weighted by sin(theta) |
Already did it but not gave the same results.
I calculated correctly by using built-in integral function of matlab as below;
| Code: |
fun1 = @(x) sin(x).*((abs(sqrt(sin(x)))).^2);
fun2 = @(x) sin(x).*(abs((sin(x)).^5)).^2;
Antenna1 = integral(fun1,0,pi); % first integral
Directivity1 = 1/(Antenna1/2); % second integral
Antenna2 = integral(fun2,0,pi); % first integral
Directivity2 = 1/(Antenna2/2); % second integral
|
However, this method is not applicable for complex array factor equations that includes double or triple summations.
That's why, any alternative calculation method would be really helpful. |
|
| Back to top |
|
 |
|