利用MATLAB-仿真偏振控制器(利用邦加球算法)_第1页
利用MATLAB-仿真偏振控制器(利用邦加球算法)_第2页
利用MATLAB-仿真偏振控制器(利用邦加球算法)_第3页
利用MATLAB-仿真偏振控制器(利用邦加球算法)_第4页
利用MATLAB-仿真偏振控制器(利用邦加球算法)_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

利用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 ballclearclc %QHQ subplot(1,2,1)x,y,z=sphere;mesh(x,y,z);xlabel(S1)ylabel(S2)zlabel(S3)box oncolormap(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 oncolormap(bone);%求出射光的偏振态hold onfor 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 onend1;偏振控制器,利用绑架球算法对QHQ型进行方位角的误差分析%已知输入输出,分析方位角误差clearclc%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(I12+I22+I32);%xi_out=asin(O3/sqrt(O12+O22+O32);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.005Delta_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(Deltaalpha/rad), ylabel(Deltatheta/rad),plot(Delta_alpha(i),Delta_theta(i),r)hold onsubplot(2,3,2)xlabel(Deltabeta/rad), ylabel(Deltatheta/rad),plot(Delta_beta(i),Delta_theta(i),g)hold on subplot(2,3,3)xlabel(Deltagamma/rad), ylabel(Deltatheta/rad),plot(Delta_gamma(i),Delta_theta(i)hold onsubplot(2,3,4)xlabel(Deltaalpha/rad), ylabel(Deltaepsilon/rad),plot(Delta_alpha(i),Delta_xi(i),r)hold onsubplot(2,3,5)xlabel(Deltabeta/rad), ylabel(Deltaepsilon/rad),plot(Delta_beta(i),Delta_xi(i),g)hold on subplot(2,3,6)xlabel(Deltagamma/rad), ylabel(Deltaepsilon/rad),plot(Delta_gamma(i),Delta_xi(i)hold onend .偏振控制器,利用绑架球对QHQ型进行波长误差分析-Polarization.clearclc%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(I12+I22+I32);%xi_out=asin(O3/sqrt(O12+O22+O32);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.005Delta_alpha=normrnd(0,0.005,1,1000);Delta_beta=normrnd(0,0.005,1,1000);for i=1:1000theta_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(Deltaalpha/rad), ylabel(Deltatheta/rad),plot(Delta_alpha(i),Delta_theta,r)hold onsubplot(3,2,3)xlabel(Deltabeta/rad), ylabel(Deltatheta/rad),plot(Delta_beta(i),Delta_theta,g)hold on subplot(3,2,5)xlabel(Deltagamma/rad), ylabel(Deltatheta/rad),plot(Delta_gamma(i),Delta_theta)hold onsubplot(3,2,2)xlabel(Deltaalpha/rad), ylabel(Deltaepsilon/rad),plot(Delta_alpha(i),Delta_xi,r)hold onsubplot(3,2,4)xlabel(Deltabeta/rad), ylabel(Deltaepsilon/rad),plot(Delta_beta(i),Delta_xi,g)hold on subplot(3,2,6)xlabel(Deltagamma/rad), ylabel(Deltaepsilon/rad),plot(Delta_gamma(i),Delta_xi)hold onend .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);endaxes2=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);endaxes3=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

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论