用matlab分析四桿機(jī)構(gòu)_第1頁
用matlab分析四桿機(jī)構(gòu)_第2頁
用matlab分析四桿機(jī)構(gòu)_第3頁
用matlab分析四桿機(jī)構(gòu)_第4頁
用matlab分析四桿機(jī)構(gòu)_第5頁
已閱讀5頁,還剩6頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、首先創(chuàng)建函數(shù)foutbarposition,函數(shù)fsolve通過他確定。function t=fourbarposition(th,th2,l2,l3,l4,l1)t=l2*cos(th2)+l3*cos(th(1 )-l4*cos(th(2)-l1 l2*sin(th2)+l3*sin(th(1)-l4*sin(th(2);主程序如下:disp *平面四桿機(jī)構(gòu)的運(yùn)動(dòng)分析*l1=304.8;l2=101.6;l3=254.0;l4=177.8; %給定己知量,各桿長(zhǎng) l1 丄2丄3丄4 th2=0:1/6:2*pi;%曲柄輸入角度從0至360度,步長(zhǎng)為pi/6th34=zeros(length

2、(th2),2);%建立一個(gè)n行2列的零矩陣,第一列存放options=optimset('displaytoff);%9_3,第二列存放 0_3for m=1:length(th2)%建立 for 循環(huán),求解 0_3, 0_4th34(m,:)=fsolve('fourbarposition,1 1,.%調(diào)用 fsove 函數(shù)求解關(guān)丁 8_3, 0_4options,th2(m),l2,l3,l4,l1);%的非線性超越方程,結(jié)果保存在th34中endy=l2*sin(th2)+l3*sin(th34(:,1 )*);%連桿 3 的 d 端點(diǎn) 丫 坐標(biāo)值x=l2*cos(th

3、2)+l3*cos(th34(:,iy); %連桿 3 的 d 端點(diǎn) x 坐標(biāo)值 xx=l2*cos(th2);%連桿3的c端點(diǎn)x坐標(biāo)侑yy=l2*sin(th2);%連桿3的c端點(diǎn)丫坐標(biāo)值figure(1)plot(x;xx,y;yy/k0 l1,0 0,. %繪制連桿 3 的幾個(gè)位置點(diǎn)'k-.x.y/koxx.yy/ks*)title。連桿3的幾個(gè)位置點(diǎn)')xlabef水平方向')ylabel(唾直方向')axis equal %xy坐標(biāo)均衡th2=0:2/72:2*pi; %重新細(xì)分曲柄輸入角度8_2,步長(zhǎng)為5度th34=zeros(length(th2)

4、,2);options 二 optimset('displaytoff);for m=1:length(th2)th34(m,:)=fsolve('fourbarposition,1 1,.options,th2(m),l2,l3 ,l4,l1 );endfigure(2)plot(th2*180/pi,th34(:,1 ),th2*180/pi,th34(:,2) %繪制連桿 3 的角位移關(guān)于曲柄 2 的角位移 圖plot(th2*180/pi,th34(:,1 )*180/pi,.th2*180/pi,th34(:,2)*180/pi) %繪制搖桿4的角位移關(guān)于曲柄2的角位

5、移圖axis(o 360 0 170) %確定 xy 邊界值grid %圖形加網(wǎng)格xlabel('主動(dòng)件轉(zhuǎn)角 theta_2(度)')ylabelc從動(dòng)件角位移(度)')title。角位移線圖)text(120,120/§桿 4 角位移?text(150,40,連桿 3 角位移')w2=250; %設(shè)定曲柄角速度for i=1:length(th2)a=-l3*sin(th34(i,1) l4*sin(th34(i,2);.l3*cos(th34(i,1) -l4*cos(th34(i,2);b=w2*l2*sin(th2(i); -w2*l2*cos

6、(th2(i);w=inv(a)*b;w3(i)=w(1);w4(i)=w(2);endfigure(3)plot(th2*180/pi,w3,th2*180/pi,w4); %繪制角速度線圖axis(0 360-175 200)text(50,160;搖桿 4 角速度(omega_4)1)text(220,130;連桿 3 角速度(omega_3)1)gridxlabef主動(dòng)件轉(zhuǎn)角theta_2(度)')ylabef 從動(dòng)件角速度(radcdot sa-1)*)title。角速度線圖jfor i=1:length(th2)c=-l3*sin(th34(i,1) l4*sin(th34

7、(i,2);.l3*cos(th34(i,1) -l4*cos(th34(i,2);d=w2a2*l2*cos(th2(i)+w3(i)a2*l3*cos(th34(i,1)-w4(i)a2*l4*cos(th34(i,2);.w2a2*l2*sin(th2(i)+w3(i)a2*l3*sin(th34(i,1)-w4(i)a2*l4*sin(th34(i,2);a=inv(c)*d;a3(i)=a(1);a4(i)=a(2);endfigure (4)plot(th2*180/pi,a3,th2*180/pi,a4);% 繪制角加速度線圖axis(0 360 -70000 65000)tex

8、t(50,50000,'搖桿 4 角加速度(alpha_4)f)text(220,12000;連桿 3 角加速度(alpha_3)1)gridxlabelc從動(dòng)件角加速度')ylabef 從動(dòng)件角加速度(radcdot sa-2)')title。角加速度線圖jdisp,曲柄轉(zhuǎn)角連桿轉(zhuǎn)角搖桿轉(zhuǎn)角連桿角速度搖桿角速度連桿加速度搖桿加速度,ydcs=th2,*180/pi,th34(:,1)*180/pi,th34(:,2)*180/pi,w3,w4',a3,a4,;disp(ydcs)» *平面四桿機(jī)構(gòu)的運(yùn)動(dòng)分析*曲柄轉(zhuǎn)角連桿轉(zhuǎn)角搖桿轉(zhuǎn)角連桿角速度搖桿角速

9、度連桿加速度搖桿加速度1.0e+004* 0 0.0044 0.0097 -0.0125 -0.0125 -0.5478 4.84580.0005 0.0042 0.0094 -0.0126 -0.0107 0.2300 5.56300.00100.00390.0092-0.0124-0.00860.89466.05200.00150.00370.0091-0.0119-0.00651.41436.29820.00200.00340.0090-0.0114-0.00431.78016.31740.00250.00320.0089-0.0107-0.00212.00276.14670.00300

10、.00300.0089-0.01000.00002.10465.83390.00350.00280.0089-0.00930.00202.11345.42720.00400.00260.0090-0.00850.00382.05664.96870.00450.00250.0091-0.00780.00541.95784.49180.00500.00230.0092-0.00720.00691.83564.01980.00550.00220.0093-0.00650.00821.70403.56800.00600.00210.0095-0.00600.00941.57253.14500.0065

11、0.00190.0097-0.00550.01041.44742.75450.00700.00180.0099-0.00500.01131.33282.39680.00750.00170.0102-0.00450.01211.23072.07020.00800.00170.0104-0.00410.01281.14251.77160.00850.00160.0107-0.00370.01341.06871.49710.00900.00150.0110-0.00340.01381.00951.24260.00950.00140.0112-0.00300.01420.96531.00350.010

12、00.00140.0115-0.00270.01450.93640.77520.01050.00130.0118-0.00240.01480.92320.55300.01100.00130.0121-0.00200.01490.92690.33190.01150.00130.0124-0.00170.01500.94850.10690.01200.00120.0127-0.00140.01500.9899-0.12760.01250.00120.0130-0.00100.01491.0530-0.37730.01300.00120.0133-0.00060.01471.1404-0.64810

13、.01350.00120.0136-0.00020.01451.2544-0.94550.01400.00120.01390.00020.01411.3967-1.27430.0145 0.0012 0.0142 0.0008 0.0136 1.5677 -1.63680.0150 0.0012 0.0144 0.0013 0.0129 1.7648 2.03140.01550.00120.01470.00200.01211.9807 -2.44950.01600.00130.01490.00270.01122.2018 -2.87350.01650.00130.01510.00350.010

14、12.4071 -3.27540.01700.00140.01530.00440.00892.5697 -3.61860.01750.00150.01550.00530.00762.6616 -3.86500.01800.00160.01560.00630.00632.6609 -3.98490.01850.00180.01570.00720.00492.5591 -3.96740.01900.00190.01580.00800.00352.3638 -3.82440.01950.00210.01590.00880.00222.0959 -3.58660.02000.00230.01590.0

15、0950.00101.7823 -3.29310.02050.00250.01590.0100-0.00011.4487 -2.98150.02100.00270.01590.0105-0.00111.1152 -2.68090.02150.00290.01590.0108-0.00200.7942 -2.41030.02200.00310.01580.0111-0.00280.4916 -2.17940.02250.00330.01580.0112-0.00350.2086 -1.99130.02300.00360.01570.0112-0.0042-0.0565 -1.84500.0235

16、0.00380.01560.0111-0.0048-0.3071 -1.73750.02400.00400.01550.0110-0.0054-0.5475 -1.66500.02450.00420.01540.0108-0.0060-0.7817 -1.62330.02500.00440.01530.0104-0.0065-1.0139 -1.60890.02550.00460.01510.0100-0.0071-1.2479 1.61810.02600.00480.01500.0096-0.0077-1.4868 -1.64800.02650.00500.01480.0090-0.0082

17、-1.7336 -1.69550.02700.00520.01460.0084-0.0088-1.9905 -1.75740.02750.00540.01450.0076-0.0095-2.2588 -1.83040.02800.00550.01430.0068-0.0101-2.5391 1.91000.02850.00560.01410.0058-0.0108-2.8305 -1.99100.0290 0.0057 0.0138 0.0048 -0.0115 -3.1300 -2.06600.02950.00580.01360.0037-0.0122-3.4326-2.12550.0300

18、0.00590.01330.0024-0.0130-3.7297-2.15720.03050.00590.01310.0011-0.0137-4.0091-2.14510.03100.00590.0128-0.0004 0.0145-4.2538-2.06960.03150.00590.0125-0.0019-0.0152-4.4419-1.90790.03200.00580.0122-0.0035-0.0158-4.5473-1.63520.03250.00580.0119-0.0051 0.0163-4.5411-1.22730.03300.00560.0115-0.0066-0.0166-4.3954-0.66610.03350.00550.0112-0.0081 0.0167-4.08890.05510.03400.00530.0109-0.0095-0.0166-3.61290.92430.03450.00510.0105-0.0106-0.0161-2.97811.90580.03500.00490.

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論