资源描述:
《风速时程模拟自回归法空间20个点-AR模型.doc》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、%风速时程模拟自回归法空间20个点-AR模型%自回归模型阶p=4,模拟空间20个点,时间步长ti=0.1,频率步长f=0.001,%空间相干系数采用与频率无关的shiotani相关系数,脉动风速谱为Davenport谱cleartick=0.005;v10=25;n=0.001:0.001:10;xn=1200*n./v10;s1=4*k*25^2*xn.^2./n./(1+xn.^2).^(4/3);%Davenport谱%产生空间点坐标fori=1:20x(i)=5+i;z(i)=8+i;end%求R矩阵symsfR0
2、=zeros(20);fori=1:20forj=i:20H0=inline('(4*1200^2*f*k)./(1+(1200*f/v10).^2).^(4/3)','f','k','v10');k=0.005;%地面粗糙度长度v10=25;R0(i,j)=quadl(H0,0.001,10,0.001,0,k,v10);R0(j,i)=R0(i,j);endendR1=zeros(20);fori=1:20forj=i:20H1=inline('(4*1200^2*f*k).*exp(-sqrt(dx^2/50^2+d
3、z^2/60^2)).*cos(2*pi*f*ti)./(1+(1200*f/v10).^2).^(4/3)','f','k','dx','dz','ti','v10');k=0.005;ti=0.1;%时间步长v10=25;dx=x(i)-x(j);dz=z(i)-z(j);R1(i,j)=quadl(H1,0.001,10,0.001,0,k,dx,dz,ti,v10);R1(j,i)=R1(i,j);endendR2=zeros(20);fori=1:20forj=i:20H2=inline('(4*1200^2*f
4、*k).*exp(-sqrt(dx^2/50^2+dz^2/60^2)).*cos(2*pi*f*2*ti)./(1+(1200*f/v10).^2).^(4/3)','f','k','dx','dz','ti','v10');k=0.005;ti=0.1;v10=25;dx=x(i)-x(j);dz=z(i)-z(j);R2(i,j)=quadl(H2,0.001,10,0.001,0,k,dx,dz,ti,v10);R2(j,i)=R2(i,j);endendR3=zeros(20);fori=1:20forj=i:2
5、0H3=inline('(4*1200^2*f*k).*exp(-sqrt(dx^2/50^2+dz^2/60^2)).*cos(2*pi*f*3*ti)./(1+(1200*f/v10).^2).^(4/3)','f','k','dx','dz','ti','v10');k=0.005;ti=0.1;v10=25;dx=x(i)-x(j);dz=z(i)-z(j);R3(i,j)=quadl(H3,0.001,10,0.001,0,k,dx,dz,ti,v10);R3(j,i)=R3(i,j);endendR4=zero
6、s(20);fori=1:20forj=i:20H4=inline('(4*1200^2*f*k).*exp(-sqrt(dx^2/50^2+dz^2/60^2)).*cos(2*pi*f*4*ti)./(1+(1200*f/v10).^2).^(4/3)','f','k','dx','dz','ti','v10');k=0.005;ti=0.1;v10=25;dx=x(i)-x(j);dz=z(i)-z(j);R4(i,j)=quadl(H4,0.001,10,0.001,0,k,dx,dz,ti,v10);R4(j,i
7、)=R4(i,j);endendQ1=zeros(20);Q2=zeros(20);Q3=zeros(20);Q4=zeros(20);A=[R0R1R2R3;R1R2R3R0;R2R3R0R1;R3R0R1R2];%80X80矩阵B=[R1;R2;R3;R4];%80X20矩阵X=AB;%此式相当于A*X=B,X(80×20矩阵)为自回归系数Ψq1=X(1:20,:);%取X的第一个20×20矩阵q2=X(20+1:2*20,:);%取X的第二个20×20矩阵q3=X(2*20+1:3*20,:);%取X的第三个20×
8、20矩阵q4=X(3*20+1:4*20,:);%取X的第四个20×20矩阵Q1=q1';Q2=q2';Q3=q3';Q4=q4';RN=R0+Q1*R1+Q2*R2+Q3*R3+Q4*R4;%对RN进行cholesky分解L=zeros(20);L=chol(RN);L=L';a=zeros(20,2