收藏 分销(赏)

利用MATLAB-仿真偏振控制器(利用邦加球算法).doc

上传人:快乐****生活 文档编号:2311816 上传时间:2024-05-27 格式:DOC 页数:7 大小:45KB 下载积分:6 金币
下载 相关 举报
利用MATLAB-仿真偏振控制器(利用邦加球算法).doc_第1页
第1页 / 共7页
利用MATLAB-仿真偏振控制器(利用邦加球算法).doc_第2页
第2页 / 共7页


点击查看更多>>
资源描述
______________________________________________________________________________________________________________ 利用MATLAB,仿真偏振控制器(利用邦加球算法),验证固定偏振态到任意偏振态的转换,其结果布满整个邦加球-MATLAB simulation using polarimetric controller (with), fixed ball algorithm to any polarization transformation of polarization, and the result is full of whole nations plus the ball clear clc %QHQ subplot(1,2,1) [x,y,z]=sphere; mesh(x,y,z); xlabel('S1') ylabel('S2') zlabel('S3') box on colormap(bone); hold on %入射光 %I=[1;0;0;1]; %右旋圆偏振光(可见) %I=[1;0;0;-1]; %左旋圆偏振光 %I=[1;1;0;0]; %水平线偏振光 %I=[1;-1;0;0]; %垂直线偏振光(可见) %I=[1;0;1;0]; %45度线偏振光 I=[1;0;-1;0]; %-45度线偏振光(可见) %I=[1;-0.2;-0.5;0.8994]; %某一椭圆偏振光 plot3(I(2),I(3),I(4),'*') %画出入射光的偏振态位置 %各波片的方位角 theta1=rand(1,5000)*pi-pi/2; theta2=rand(1,5000)*pi-pi/2; theta3=rand(1,5000)*pi-pi/2; subplot(1,2,2) [x,y,z]=sphere; mesh(x,y,z); xlabel('S1') ylabel('S2') zlabel('S3') axis([-1,1,-1,1,-1,1]); box on colormap(bone); %求出射光的偏振态 hold on for i=1:5000 a=theta1(i); b=theta2(i); c=theta3(i); M3=Muller(a,pi/2); M2=Muller(b,pi); M1=Muller(c,pi/2); M=M3*M2*M1; O=M*I; O_1=O(2); O_2=O(3); O_3=O(4); plot3(O_1,O_2,O_3,'r*') hold on end 1; 偏振控制器,利用绑架球算法对QHQ型进行方位角的误差分析 %已知输入输出,分析方位角误差 clear clc %I=[1;0.2;0.4;0.8944]; %采用斯托克斯方法输入的情况。 %O=[1;0;0;1]; %[I1,I2,I3]=sop_3(I); %[O1,O2,O3]=sop_3(O); %theta_in=atan(I2/I1); %theta_out=atan(O2/O1); %xi_in=asin(I3/sqrt(I1^2+I2^2+I3^2)); %xi_out=asin(O3/sqrt(O1^2+O2^2+O3^2)); theta_in=30*pi/180; %直接输入的情况。 xi_in=45*pi/180; theta_out=135*pi/180; xi_out=22.5*pi/180; Delta_gamma=normrnd(0,0.005,1,1000); %正态分布 均值为0 方差为0.005 Delta_alpha=normrnd(0,0.005,1,1000); Delta_beta=normrnd(0,0.005,1,1000); for i=1:1000 %当波片的方位角有误差存在时,求出其所对应的偏振态 theta_3=theta_out-xi_out-Delta_alpha(i)-atan(tan(xi_in)/cos(Delta_alpha(i)))+xi_in+2*Delta_beta(i); xi_3=-acos(sqrt(cos(Delta_alpha(i))*cos(Delta_alpha(i))*cos(xi_in)*cos(xi_in)+sin(xi_in)*sin(xi_in))); Delta_theta(i)=1/2*(Delta_gamma(i)+atan(tan(xi_3)/cos(theta_out+Delta_gamma(i)-theta_3))); Delta_xi(i)=1/2*(acos(sqrt(cos(theta_out+Delta_gamma(i)-theta_3)*cos(theta_out+Delta_gamma(i)-theta_3)*cos(theta_3)*cos(theta_3)+sin(theta_3)*sin(theta_3)))-xi_out); subplot(2,3,1) xlabel('\Delta\alpha/rad'), ylabel('\Delta\theta/rad'), plot(Delta_alpha(i),Delta_theta(i),'r') hold on subplot(2,3,2) xlabel('\Delta\beta/rad'), ylabel('\Delta\theta/rad'), plot(Delta_beta(i),Delta_theta(i),'g') hold on subplot(2,3,3) xlabel('\Delta\gamma/rad'), ylabel('\Delta\theta/rad'), plot(Delta_gamma(i),Delta_theta(i)) hold on subplot(2,3,4) xlabel('\Delta\alpha/rad'), ylabel('\Delta\epsilon/rad'), plot(Delta_alpha(i),Delta_xi(i),'r') hold on subplot(2,3,5) xlabel('\Delta\beta/rad'), ylabel('\Delta\epsilon/rad'), plot(Delta_beta(i),Delta_xi(i),'g') hold on subplot(2,3,6) xlabel('\Delta\gamma/rad'), ylabel('\Delta\epsilon/rad'), plot(Delta_gamma(i),Delta_xi(i)) hold on end ... 偏振控制器,利用绑架球对QHQ型进行波长误差分析-Polarization... clear clc %I=[1;0.2;0.4;0.8944]; %采用斯托克斯方法输入的情况。 %O=[1;0;0;1]; %[I1,I2,I3]=sop_3(I); %[O1,O2,O3]=sop_3(O); %theta_in=atan(I2/I1); %theta_out=atan(O2/O1); %xi_in=asin(I3/sqrt(I1^2+I2^2+I3^2)); %xi_out=asin(O3/sqrt(O1^2+O2^2+O3^2)); theta_in=30*pi/180; %直接输入的情况。 xi_in=45*pi/180; theta_out=135*pi/180; xi_out=22.5*pi/180; Delta_gamma=normrnd(0,0.005,1,1000); %正态分布 均值为0 方差为0.005 Delta_alpha=normrnd(0,0.005,1,1000); Delta_beta=normrnd(0,0.005,1,1000); for i=1:1000 theta_3=theta_out-xi_out-Delta_alpha(i)-atan(tan(xi_in)/cos(Delta_alpha(i)))+xi_in+2*Delta_beta(i); xi_3=-acos(sqrt(cos(Delta_alpha(i))*cos(Delta_alpha(i))*cos(xi_in)*cos(xi_in)+sin(xi_in)*sin(xi_in))); Delta_theta=1/2*(Delta_gamma(i)+atan(tan(xi_3)/cos(theta_out+Delta_gamma(i)-theta_3))); Delta_xi=1/2*(acos(sqrt(cos(theta_out+Delta_gamma(i)-theta_3)*cos(theta_out+Delta_gamma(i)-theta_3)*cos(theta_3)*cos(theta_3)+sin(theta_3)*sin(theta_3)))-xi_out); subplot(3,2,1) xlabel('\Delta\alpha/rad'), ylabel('\Delta\theta/rad'), plot(Delta_alpha(i),Delta_theta,'r') hold on subplot(3,2,3) xlabel('\Delta\beta/rad'), ylabel('\Delta\theta/rad'), plot(Delta_beta(i),Delta_theta,'g') hold on subplot(3,2,5) xlabel('\Delta\gamma/rad'), ylabel('\Delta\theta/rad'), plot(Delta_gamma(i),Delta_theta) hold on subplot(3,2,2) xlabel('\Delta\alpha/rad'), ylabel('\Delta\epsilon/rad'), plot(Delta_alpha(i),Delta_xi,'r') hold on subplot(3,2,4) xlabel('\Delta\beta/rad'), ylabel('\Delta\epsilon/rad'), plot(Delta_beta(i),Delta_xi,'g') hold on subplot(3,2,6) xlabel('\Delta\gamma/rad'), ylabel('\Delta\epsilon/rad'), plot(Delta_gamma(i),Delta_xi) hold on end ... figure('color','k','Position',[1 31 1280 696]); axes1=axes('position',[0.2 0.6 0.3 0.3]); axis( axes1,'equal'); axis(axes1,'off'); hold on rl=1;rs=0.5; N=30; t1=linspace(0,2*pi,N); xl=rl*cos(t1); yl=rl*sin(t1); t2=linspace(0,2*pi,100); xs=rs*cos(t2); ys=rs*sin(t2); for i=1:N plot(xl(i)+xs,yl(i)+ys); end axes2=axes('position',[0.5 0.6 0.3 0.3]); axis( axes2,'equal'); axis(axes2,'off'); hold on rl=1;rs=1; N=30; t1=linspace(0,2*pi,N); xl=rl*cos(t1); yl=rl*sin(t1); t2=linspace(0,2*pi,100); xs=rs*cos(t2); ys=rs*sin(t2); for i=1:N plot(xl(i)+xs,yl(i)+ys); end axes3=axes('position',[0.35 0.20 0.3 0.3]); axis( axes3,'equal'); axis(axes3,'off'); hold on rl=1;rs=1.5; N=30; t1=linspace(0,2*pi,N); xl=rl*cos(t1); yl=rl*sin(t1); t2=linspace(0,2*pi,100); xs=rs*cos(t2); ys=rs*sin(t2); for i=1:N plot(xl(i)+xs,yl(i)+ys); end %存脚本文件heart.m %%一个半径为R的圆周等分成N份,然后一等分点为圆心,以等分点到该圆垂直直径 %%的距离为半径画圆。 N=90;R=1; t0=(1:N)*2*pi/N; %%中央圆 x0=R*cos(t0); y0=R*sin(t0); t1=linspace(0,2*pi,100); %运动圆 X=cos(t1); Y=sin(t1); figure('color','k'); hold on for i=1:N x=x0(i)+x0(i)*X; y=y0(i)+x0(i)*Y; plot(x,y,'g'); end axis equal axis off Welcome To Download !!! 欢迎您的下载,资料仅供参考! 精品资料
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服