Beruflich Dokumente
Kultur Dokumente
EXAMPLE 1.3
Click any to open the MATLAB script solving this exercise. Run script to read question and calculate solution.
On 1st run, the exercise is solved and the results are stored in .mat file. Parameters can be modified to solve
exercise variations. MATLAB student licences are cheap and there is a type that does not even require to be
registered in any university or college. All comments welcome.
To download and install MATLAB as well as review help on specific commands click any MATLAB icon:
Contents
BACKGROUND
Literature References
Notes
[SPL0] List of Spectroscopy applications:
[BRKL] break-down field (a.k.a. dielectric strength) values for a few materials
______________________________________________________________________________________________________________________________
John Bofarull Guix jgb2012@sky.com attached: -- 1 / 13
POZAR chapter 01: example 03 31/12/2020 04:57:36.
BACKGROUND
example_group_static_charges.m [NTR1]
% charges coordinates
x=[-5 0 5]*1e-3
y=[-5 5 -5]*1e-3
z=[0 0 0]*1e-3
% distances
r=((xp-x).^2+(yp-y).^2+(zp-z).^2).^.5
% director
ux=(xp-x)./r
uy=(yp-y)./r
uz=(zp-z)./r
uVec=[ux;uy;uz]
% force
F=(ones(3,1)*(Q./(4*pi*eps0*r.^2))).*uVec
Ftot=sum(F,2)
Fmag=sqrt(sum(Ftot.^2))
Fuv=(Ftot/Fmag)
figure(1)
plot3(0,0,0,'k')
hold on
for i=1:1:numel(x)
plot3(x(i),y(i),z(i),'o','MarkerSize',10,'MarkerFaceColor','b')
line([xp x(i)],[yp y(i)],[zp z(i)],'LineStyle',':')
hold on
vecPlot3D([xp yp zp],[xp yp zp]+F(:,i)',1/Fmag/100,[1 .6 .6],0)
hold on
end
grid on
vecPlot3D([xp yp zp],[xp yp zp]+Ftot',1/Fmag/100,'r',0)
% text(1.1*xp,1.1*yp,1.1*zp,'Total Electric Force','Color','r')
hold off
axis equal
xlabel('x');ylabel('y');zlabel('z')
______________________________________________________________________________________________________________________________
John Bofarull Guix jgb2012@sky.com attached: -- 2 / 13
POZAR chapter 01: example 03 31/12/2020 04:57:36.
Some literature sources wrongly refer to B as magnetic field. example_current_wire.m (B: magnetic flux, H=B/ magnetic field) [RAO1]
hf4=figure(4);ax4=gca;ax4.FontSize=14
Moving electrical charges at constant velocity are an electrical current that quiver(zp,yp,BZ,BY,2)
generates an magnetic field. grid on;axis([1 30 -25 25])
xlabel('Z-axis','fontsize',14);ylabel('Y-axis','fontsize',14)
title('B-field Vector flow','fontsize',14)
ax4.DataAspectRatio=[1 1 1]
______________________________________________________________________________________________________________________________
John Bofarull Guix jgb2012@sky.com attached: -- 3 / 13
POZAR chapter 01: example 03 31/12/2020 04:57:36.
1 [m] is distance travelled by light in 1/299792458 -th of 1 second in vacuum. Note that [RAO1] uses =1.
______________________________________________________________________________________________________________________________
John Bofarull Guix jgb2012@sky.com attached: -- 4 / 13
POZAR chapter 01: example 03 31/12/2020 04:57:36.
Sheet currents may be present along interfaces between different materials. Another close enough real thing to sheet currents are coils conducting
currents, that can be seen as a sheet current over a cylindrical surface.
Modifying [RAO1] one can simulate B generated by Nw parallel wires carrying I currents. Placing parallel wires close enough one can approximate a sheet
current as defined in the question of this example 1.3.
pozar_01_example_03.m
%% DEFINE CURRENTS
%% SPACE
u0=1; % permeability
Nx=11;
Nz=11;
Ny=11;
xp(1:Nx)=-(Nx-1)/2:(Nx-1)/2;
yp(1:Ny)=-(Ny-1)/2:(Ny-1)/2;
zp(1:Nz)=-(Nz-1)/2:(Nz-1)/2;
X(1:Nx,1:Ny,1:Nz)=0;
Y(1:Nx,1:Ny,1:Nz)=0;
Z(1:Nx,1:Ny,1:Nz)=0;
%% WIRES
Xw=zeros(N+1,Nw);
Yw=zeros(N+1,Nw);
Zw=zeros(N+1,Nw);
for k=1:1:Nw
Xw(:,k)=(floor(-N/2):floor(N/2));
Yw(:,k)=y0(k)*ones(N+1,1);
Zw(:,k)=zeros(N+1,1);
end
%% WIRE 1
%% WIRE 2
%% B1 from WIRE 1
for k=1:1:Nw
[B1X B1Y
B1Z]=generate_B(X,Y,Z,Xw(:,k),Yw(:,k),Zw(:,k),Nx,Ny,Nz,N,I(k),u0);
B(:,:,:,1,k)=B1X;B(:,:,:,2,k)=B1Y;B(:,:,:,3,k)=B1Z;
end
%% RESULTING B
% B=B1+B2
BXt=squeeze(B(:,:,:,1,:))
BYt=squeeze(B(:,:,:,2,:))
______________________________________________________________________________________________________________________________
John Bofarull Guix jgb2012@sky.com attached: -- 5 / 13
POZAR chapter 01: example 03 31/12/2020 04:57:36.
BZt=squeeze(B(:,:,:,3,:))
BX=sum(BXt,4);
BY=sum(BYt,4);
BZ=sum(BZt,4);
%% VISUALIZE RESULT
hf1=figure(1)
ax1=gca
quiver3(X,Y,Z,BX,BY,BZ,2);
hold on
for k=1:1:Nw
line([-5 5],[y0(k) y0(k)], [0 0],'linewidth',3,'color','r');
end
axis([-5 5 -5 5 -5 5])
xlabel('X-axis','fontsize',14)
ylabel('Y-axis','fontsize',14)
zlabel('Z-axis','fontsize',14)
grid on
title('B [T]','fontsize',14)
ax1.DataAspectRatioMode='manual'
ax1.DataAspectRatio=[1 1 1]
..
y0=[0 .25 .5 .75 1 1.25 1.5 1.75 2 2.25 2.5 2.75 3 3.25 3.5 3.75] % wires locations along Y axis
..
______________________________________________________________________________________________________________________________
John Bofarull Guix jgb2012@sky.com attached: -- 6 / 13
POZAR chapter 01: example 03 31/12/2020 04:57:36.
..
y0=[-3.75 -3.5 -3.25 -3 -2.75 -2.5 -2.25 -2 -1.75 -1.5 -1.25 -1 -.75 -.5 -.25 ...
0 .25 .5 .75 1 1.25 1.5 1.75 2 2.25 2.5 2.75 3 3.25 3.5 3.75] % wires locations along Y axis
..
Since [RAO1] single wire and the modified script for Nw wires both use u0=1, actually the obtained field is already H .
There may be E without H (static electric charges), but there's no H without E. There are electric monopoles me, but not magnetic monopoles mn;
although mn used on paper to make equations symmetric, magnetic monopoles do not exist.
Therefore, since the current sheet flows on x axis and H direction is y axis, E associated to H has to be x axis too.
example_current_loop.m [RAO2]
______________________________________________________________________________________________________________________________
John Bofarull Guix jgb2012@sky.com attached: -- 7 / 13
POZAR chapter 01: example 03 31/12/2020 04:57:36.
[RAMO] analytically and [LNN1][NTR1] with MATLAB go through some well known simple yet instructive electro-static and magneto-static cases: single
point charge, multiple point charges, charged void metal sphere, straight wire current, loop current among others.
To electrically disrupt air one needs 3e6 V/m, out of direct testing
[RAMO] pg115.
To generate such air break E field one can time swing quickly
enough the current along a coil.
1D Faraday's: 2*pi*R*E=pi*R^2*dB/dt
set B to 10 Tesla
Step-up transformers are used in stun guns and Cathode Ray Tubes
https://www.electroschematics.com/stun-gun-simple-schematic/ https://xraykamarul.files.wordpress.com/2011/11/lecture10.pdf
Be aware, I knew of through-wall radar as iPhone accessory (Vayyar Imaging, Vayyar retail, BBC Click, January 13th 2017) but it turns out there's even a
stun gun accessory for the successful Apple iPhone 5/5S models called Yellow Jacket for $120.
______________________________________________________________________________________________________________________________
John Bofarull Guix jgb2012@sky.com attached: -- 8 / 13
POZAR chapter 01: example 03 31/12/2020 04:57:36.
f = c0/(2*dipole1.Length);
current(dipole1, f);
view(90,0);
EHfields(dipole1,1e9)
Now, out of EHfields one has in blue electric field and in red magnetic field. It's appreciated that the radiated electric field is parallel to the dipole, in any
point. Therefore, out of [RAO1] single wire and the modified script with Nw wires, E field is parallel to currents, x axis direction and etha0 times obtained
H . etha0=377 % [ohm] .
______________________________________________________________________________________________________________________________
John Bofarull Guix jgb2012@sky.com attached: -- 9 / 13
POZAR chapter 01: example 03 31/12/2020 04:57:36.
Literature References
by S. Rao
https://uk.mathworks.com/matlabcentral/fileexchange/47368-3d-magnetic-field-computation-of-a-straight-wire-of-finite-length-using-biot-savart-s-law
by S. Rao
https://uk.mathworks.com/matlabcentral/fileexchange/42329-magnetic-field-of-a-circular-current-loop-using-biot-savart-s-law
ed: Pearson
by B.Notaros
3rd ed
[LNN1]
Tan Jun-Tian1, Zhang Shu-Fang2, †, Qian Ming-Can1, Luo Hai-Jun1, 3, ‡, Wu Fang1, Long Xing-Ming3, Fang Liang1, §, Wei Da-Peng4, Hu Bao-Shan5
http://cpb.iphy.ac.cn/article/2018/1962/cpb_27_11_114401.html
https://www.spectroscopyonline.com/view/essentials-heavy-metal-testing-cannabis-and-hemp
C.G. Atkins, K. Buckley, M. W. Blades, R.F.B. Turner. First Published April 11, 2017
[10TG]
https://pubmed.ncbi.nlm.nih.gov/22559572/
______________________________________________________________________________________________________________________________
John Bofarull Guix jgb2012@sky.com attached: -- 10 / 13
POZAR chapter 01: example 03 31/12/2020 04:57:36.
Design and test of a flat-top magnetic field system driven by capacitor banks
Fan Jiang, Tao Peng, Houxiu Xiao, Jianlong Zhao, Yuan Pan, Fritz Herlach, Liang Li
https://pubmed.ncbi.nlm.nih.gov/24784658/
https://pubmed.ncbi.nlm.nih.gov/20590259/
Notes
[SPL0] List of Spectroscopy applications:
https://andor.oxinst.com/products/?families=kymera-and-shamrock-spectrographs%2Cholospec-imaging-spectrograph%2Cmechelle-
spectrograph%2Cintensified-camera-series%2Cidus-spectroscopy-cameras%2Cnewton-ccd-and-emccd-cameras
______________________________________________________________________________________________________________________________
John Bofarull Guix jgb2012@sky.com attached: -- 11 / 13
POZAR chapter 01: example 03 31/12/2020 04:57:36.
[BRKL] break-down field (a.k.a. dielectric strength) values for a few materials
Dielectric strength
Substance
[MV/m]
Helium (relative to nitrogen)
0.15
Air 1.5-3
Sulfur hexafluoride 8.5–9.8
Alumina 13.4
Window glass 9.8–13.8
______________________________________________________________________________________________________________________________
John Bofarull Guix jgb2012@sky.com attached: -- 12 / 13
POZAR chapter 01: example 03 31/12/2020 04:57:36.
This exercise is part of the collection of exercises Microwave Engineering POZAR 4th ed solved with MATLAB available in this website:
https://jgb2012.wixsite.com/microwave-eng-matlab
______________________________________________________________________________________________________________________________
John Bofarull Guix jgb2012@sky.com attached: -- 13 / 13