




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、disp( )disp( srs.m ver 2.0 July 3, 2006)disp( by Tom Irvine Email: )disp( )disp( This program calculates the shock response spectrum)disp( of an acceleration time history, which is pre-loaded into Matlab.)disp( The time history must have two columns: time(sec) & acceleration)disp( )%
2、clear t;clear y;clear yy;clear n;clear fn;clear a1;clear a2clear b1;clear b2;clear jnum;clear THM;clear resp;clear x_pos;clear x_neg;%iunit=input( Enter acceleration unit: 1= G 2= m/sec2 );%disp( )disp( Select file input method );disp( 1=external ASCII file );disp( 2=file preloaded into Matlab );fil
3、e_choice = input();%if(file_choice=1) filename, pathname = uigetfile(*.*); filename = fullfile(pathname, filename);% fid = fopen(filename,r); THM = fscanf(fid,%g %g,2 inf); THM=THM;else THM = input( Enter the matrix name: );end%t=double(THM(:,1);y=double(THM(:,2);%tmx=max(t);tmi=min(t);n = length(y)
4、;%out1 = sprintf(n %d samples n,n);disp(out1)%dt=(tmx-tmi)/(n-1);sr=1./dt;%out1 = sprintf( SR = %g samples/sec dt = %g sec n,sr,dt);disp(out1)%fn(1)=input( Enter the starting frequency (Hz) );if fn(1)sr/30. fn(1)=sr/30.;end%idamp=input( Enter damping format: 1= damping ratio 2= Q );%disp( )if(idamp=
5、1) damp=input( Enter damping ratio (typically 0.05) );else Q=input( Enter the amplification factor (typically Q=10) ); damp=1./(2.*Q);end%disp( )disp( Select algorithm: )disp( 1=Kelly-Richman 2=Smallwood );ialgorithm=input( );%tmax=(tmx-tmi) + 1./fn(1);limit = round( tmax/dt );n=limit;yy=zeros(1,lim
6、it);for i=1:length(y) yy(i)=y(i);end %disp( )disp( Calculating response. )% SRS engine%for j=1:1000% omega=2.*pi*fn(j); omegad=omega*sqrt(1.-(damp2); cosd=cos(omegad*dt); sind=sin(omegad*dt); domegadt=damp*omega*dt;% if(ialgorithm=1) a1(j)=2.*exp(-domegadt)*cosd; a2(j)=-exp(-2.*domegadt); b1(j)=2.*d
7、omegadt; b2(j)=omega*dt*exp(-domegadt); b2(j)=b2(j)*( (omega/omegad)*(1.-2.*(damp2)*sind -2.*damp*cosd ); b3(j)=0;% else E=exp(-damp*omega*dt);K=omegad*dt;C=E*cos(K);S=E*sin(K);Sp=S/K;% a1(j)=2*C;a2(j)=-E2;b1(j)=1.-Sp;b2(j)=2.*(Sp-C);b3(j)=E2-Sp; end forward= b1(j), b2(j), b3(j) ; back = 1, -a1(j),
8、-a2(j) ; % resp=filter(forward,back,yy);% x_pos(j)= max(resp); x_neg(j)= min(resp);% jnum=j; if fn(j) sr/8. break end fn(j+1)=fn(1)*(2. (j*(1./12.); end% Output options%disp( )disp( Select output option );choice=input( 1=plot only 2=plot & output text file );disp( )%if choice = 2 % writefname, write
9、pname = uiputfile(*,Save SRS data as); writepfname = fullfile(writepname, writefname); writedata = fn x_pos (abs(x_neg) ; fid = fopen(writepfname,w); fprintf(fid, %g %g %gn,writedata); fclose(fid);% disp( Enter output filename );% SRS_filename = input( ,s);% fid = fopen(SRS_filename,w);% for j=1:jnu
10、m% fprintf(fid,%7.2f %10.3f %10.3f n,fn(j),x_pos(j),abs(x_neg(j);% end% fclose(fid);end% Plot SRS%disp( )disp( Plotting output. )% Find limits for plot%srs_max = max(x_pos);if max( abs(x_neg) ) srs_max srs_max = max( abs(x_neg );endsrs_min = min(x_pos);if min( abs(x_neg) ) = 0.1 fmin=0.1;endif fn(1)
11、 = 1 fmin=1;endif fn(1) = 10 fmin=10;endif fn(1) = 100 fmin=100;endaxis(fmin,fmax,ymin,ymax);%disp( )disp( Plot pseudo velocity? );vchoice=input( 1=yes 2=no );if(vchoice=1)figure(2);% Convert to pseudo velocity%for j=1:jnum if iunit=1 x_pos(j)=386.*x_pos(j)/(2.*pi*fn(j); x_neg(j)=386.*x_neg(j)/(2.*p
12、i*fn(j); else x_pos(j)=x_pos(j)/(2.*pi*fn(j); x_neg(j)=x_neg(j)/(2.*pi*fn(j); endend %srs_max = max(x_pos);if max( abs(x_neg) ) srs_max srs_max = max( abs(x_neg );endsrs_min = min(x_pos);if min( abs(x_neg) ) srs_min srs_min = min( abs(x_neg );end %plot(fn,x_pos,fn,abs(x_neg),-.);%if iunit=1 ylabel(Velocity (in/sec);else ylabel(Velocity (m/sec); endxlabel(Natural Frequency (Hz);Q=1./(2.*damp);out5 = sprintf( Pseudo Velocity Shock Response Spectrum Q=%g ,Q);title(out5);grid;set
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 景區(qū)行政執(zhí)法管理辦法
- 核酸混合試劑管理辦法
- 電力大數(shù)據(jù)助力金融智能化風(fēng)控
- 供熱設(shè)備檢修管理辦法
- 公共衛(wèi)生中心管理辦法
- 物流行業(yè)的集聚效應(yīng)、技術(shù)創(chuàng)新與高質(zhì)量發(fā)展路徑
- 培訓(xùn)機構(gòu)審批管理辦法
- 普貨運輸安全生產(chǎn)管理制度
- 教師培訓(xùn)方案:有效處理幼兒告狀行為的策略探討
- 大學(xué)生國防安全教育心得體會1500字
- 2023-2024學(xué)年山東省日照市高二下學(xué)期期末考試數(shù)學(xué)試題(解析版)
- 2024年 北京市公務(wù)員考試(行測)考試真題試題(附答案)
- 既有建筑地基基礎(chǔ)加固技術(shù)規(guī)范 JGJ 123-2012知識培訓(xùn)
- 2025至2030中國改裝車行業(yè)深度發(fā)展研究與企業(yè)投資戰(zhàn)略規(guī)劃報告
- 中醫(yī)執(zhí)業(yè)醫(yī)師歷年真題及解答
- MT/T 1222-2024液壓支架再制造工程設(shè)計指南
- 2025年7月浙江省普通高中學(xué)業(yè)水平考試歷史仿真模擬卷01(含答案)
- 2024-2025學(xué)年人教版PEP六年級下學(xué)期期末試卷(含答案含聽力原文無音頻)
- 2025-2030年中國聚脲涂料行業(yè)市場現(xiàn)狀供需分析及投資評估規(guī)劃分析研究報告
- 一級建造師考試安全管理試題及答案
- 鍍鋅板知識課件
評論
0/150
提交評論