Tutorials: use new calcPort power calculation
Signed-off-by: Thorsten Liebig <Thorsten.Liebig@gmx.de>
This commit is contained in:
parent
4fd8eee902
commit
390bd9f478
@ -143,12 +143,11 @@ disp( 'calculating 3D far field pattern...' );
|
||||
nf2ff = CalcNF2FF(nf2ff, Sim_Path, f_rad, theta*pi/180, phi*pi/180, 'Outfile','3D_Pattern.h5', 'Mode', 0,'Verbose',1);
|
||||
|
||||
%%
|
||||
P_in = 0.5*port{1}.uf.inc .* conj( port{1}.if.inc ); % accepted antenna feed power
|
||||
P_in = interp1(f, P_in, f_rad);
|
||||
P_in = interp1(f, port.P_acc, f_rad);
|
||||
|
||||
figure()
|
||||
|
||||
[AX,H1,H2] = plotyy(f_rad/1e9,nf2ff.Dmax',f_rad/1e9,100*nf2ff.Prad'./real(P_in),'plot');
|
||||
[AX,H1,H2] = plotyy(f_rad/1e9,nf2ff.Dmax',f_rad/1e9,100*nf2ff.Prad'./P_in,'plot');
|
||||
grid on
|
||||
xlabel( 'frequency (GHz)' );
|
||||
set(get(AX(1),'Ylabel'),'String','directivity (dBi)')
|
||||
|
@ -122,8 +122,6 @@ port = calcPort(port, Sim_Path, freq);
|
||||
|
||||
Zin = port.uf.tot ./ port.if.tot;
|
||||
s11 = port.uf.ref ./ port.uf.inc;
|
||||
P_in = 0.5 * port.uf.inc .* conj( port.if.inc ); % antenna feed power
|
||||
|
||||
|
||||
% plot reflection coefficient S11
|
||||
figure
|
||||
|
@ -151,8 +151,7 @@ port = calcPort(port, Sim_Path, freq);
|
||||
s11 = port.uf.ref./port.uf.inc;
|
||||
Zin = port.uf.tot./port.if.tot;
|
||||
|
||||
Pin = real(0.5*port.uf.tot.*conj(port.if.tot));
|
||||
Pin_f0 = interp1(freq, Pin, f0);
|
||||
Pin_f0 = interp1(freq, port.P_acc, f0);
|
||||
|
||||
%%
|
||||
% plot feed point impedance
|
||||
|
@ -134,7 +134,6 @@ port = calcPort(port, Sim_Path, freq);
|
||||
|
||||
Zin = port.uf.tot ./ port.if.tot;
|
||||
s11 = port.uf.ref ./ port.uf.inc;
|
||||
P_in = 0.5*real(port.uf.tot).*conj(port.if.tot); % accepted antenna feed power
|
||||
|
||||
% plot feed point impedance
|
||||
figure
|
||||
@ -162,7 +161,7 @@ drawnow
|
||||
f_res = f0;
|
||||
|
||||
% get accepted antenna power at frequency f0
|
||||
P_in_0 = interp1(freq, P_in, f0);
|
||||
P_in_0 = interp1(freq, port.P_acc, f0);
|
||||
|
||||
% calculate the far field at phi=0 degrees and at phi=90 degrees
|
||||
thetaRange = unique([0:0.5:90 90:180]);
|
||||
@ -176,7 +175,7 @@ theta_HPBW = interp1(nf2ff.E_norm{1}(:,1)/max(nf2ff.E_norm{1}(:,1)),thetaRange,1
|
||||
% display power and directivity
|
||||
disp( ['radiated power: Prad = ' num2str(nf2ff.Prad) ' Watt']);
|
||||
disp( ['directivity: Dmax = ' num2str(nf2ff.Dmax) ' (' num2str(10*log10(nf2ff.Dmax)) ' dBi)'] );
|
||||
disp( ['efficiency: nu_rad = ' num2str(100*nf2ff.Prad./real(P_in_0)) ' %']);
|
||||
disp( ['efficiency: nu_rad = ' num2str(100*nf2ff.Prad./P_in_0) ' %']);
|
||||
disp( ['theta_HPBW = ' num2str(theta_HPBW) ' °']);
|
||||
|
||||
|
||||
|
@ -146,7 +146,6 @@ port = calcPort(port, Sim_Path, freq);
|
||||
|
||||
Zin = port.uf.tot ./ port.if.tot;
|
||||
s11 = port.uf.ref ./ port.uf.inc;
|
||||
P_in = 0.5 * port.uf.inc .* conj( port.if.inc ); % antenna feed power
|
||||
|
||||
plot( freq/1e9, 20*log10(abs(s11)), 'k-', 'Linewidth', 2 );
|
||||
ylim([-60 0]);
|
||||
|
@ -205,10 +205,8 @@ port = calcPort(port, Sim_Path, freq);
|
||||
Zin = port.uf.tot ./ port.if.tot;
|
||||
s11 = port.uf.ref ./ port.uf.inc;
|
||||
|
||||
P_in = real(0.5 * port.uf.tot .* conj(port.if.tot)); % antenna feed power
|
||||
|
||||
% get the feeding power for frequency f0
|
||||
P0_in = interp1(freq, P_in, f0);
|
||||
P0_in = interp1(freq, port.P_acc, f0);
|
||||
|
||||
%%
|
||||
% plot reflection coefficient S11
|
||||
|
@ -117,7 +117,6 @@ port = calcPort(port, Sim_Path, freq);
|
||||
|
||||
Zin = port.uf.tot ./ port.if.tot;
|
||||
s11 = port.uf.ref ./ port.uf.inc;
|
||||
P_in = 0.5 * port.uf.inc .* conj( port.if.inc ); % antenna feed power
|
||||
|
||||
% plot feed point impedance
|
||||
figure
|
||||
@ -153,7 +152,7 @@ nf2ff = CalcNF2FF(nf2ff, Sim_Path, f_res, [-180:2:180]*pi/180, [0 90]*pi/180);
|
||||
% display power and directivity
|
||||
disp( ['radiated power: Prad = ' num2str(nf2ff.Prad) ' Watt']);
|
||||
disp( ['directivity: Dmax = ' num2str(nf2ff.Dmax) ' (' num2str(10*log10(nf2ff.Dmax)) ' dBi)'] );
|
||||
disp( ['efficiency: nu_rad = ' num2str(100*nf2ff.Prad./real(P_in(f_res_ind))) ' %']);
|
||||
disp( ['efficiency: nu_rad = ' num2str(100*nf2ff.Prad./port.P_inc(f_res_ind)) ' %']);
|
||||
|
||||
% normalized directivity as polar plot
|
||||
figure
|
||||
|
Loading…
Reference in New Issue
Block a user