版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、基于AutoCAD, VB,Mathematica和Working model的凸輪設(shè)計(jì)與仿真 目錄摘要1引言1凸輪設(shè)計(jì)要求2Excel 軟件輔助設(shè)計(jì)2AutoCAD 凸輪輪廓線設(shè)計(jì)3VB編程作凸輪輪廓線并仿真4Mathematica 編程作凸輪輪廓線9Working Model凸輪仿真13各個(gè)軟件比較15課題研究收獲15參考文獻(xiàn)16摘要凸輪是具有曲面輪廓的構(gòu)件,一般多為原動(dòng)件。當(dāng)凸輪為原動(dòng)件時(shí),通常做等速的轉(zhuǎn)動(dòng)或移動(dòng),而從動(dòng)件就按照預(yù)期的輸出特性要求做連續(xù)或間隙的往復(fù)運(yùn)動(dòng),移動(dòng)或平面復(fù)雜運(yùn)動(dòng)。本文主要介紹用Excel計(jì)算凸輪輪廓線坐標(biāo)數(shù)據(jù),然后導(dǎo)入AutoCAD和Working model中
2、生成凸輪輪廓線。還介紹了用VB和Mathematica編程來設(shè)計(jì)凸輪輪廓線并對(duì)凸輪進(jìn)行仿真。主要技術(shù)要求是熟悉凸輪設(shè)計(jì)基本原理及相關(guān)理論計(jì)算,能熟練使用Excel,AutoCAD和Working model等軟件,熟悉VB和Mathematica編程語言,能將他們相結(jié)合起來應(yīng)用到設(shè)計(jì)仿真中。關(guān)鍵詞:凸輪,Excel,AutoCAD,Working model,VB和Mathematica,設(shè)計(jì),仿真。引言盤形凸輪設(shè)計(jì)的主要任務(wù)是繪制凸輪的輪廓曲線, 傳統(tǒng)設(shè)計(jì)方法分為圖解法和解析法兩種。其中圖解法是根據(jù)從動(dòng)件的位移曲線, 按“反轉(zhuǎn)法”原理, 做出從動(dòng)件在反轉(zhuǎn)過程中所占據(jù)的一系列位置, 從而求得凸
3、輪輪廓曲線。圖解法可用手工法和計(jì)算機(jī)輔助設(shè)計(jì)的方法進(jìn)行。手工圖解法設(shè)計(jì)凸輪的輪廓曲線誤差較大, 故對(duì)于精度要求高的高速凸輪往往不能滿足要求。計(jì)算機(jī)輔助作圖的方法來作凸輪曲線需要足夠多的軌跡上的點(diǎn)的坐標(biāo)才能達(dá)到高的精度要求。但是求解大量點(diǎn)的坐標(biāo)計(jì)算繁瑣,所以我們就利用Excel強(qiáng)大的的表格數(shù)據(jù)處理功能來準(zhǔn)確便捷的計(jì)算出足夠多的點(diǎn)的坐標(biāo)數(shù)據(jù),然后將這些數(shù)據(jù)導(dǎo)入AutoCAD中生成凸輪輪廓線,我們還將數(shù)據(jù)導(dǎo)入Working Model中,這就可以對(duì)凸輪的運(yùn)動(dòng)做直觀地觀察。同時(shí),我們還借助編程語言在計(jì)算機(jī)上編制程序來完成凸輪輪廓曲線的繪制和驗(yàn)證仿真,我們分別用VB和Mathematica進(jìn)行編程并加以
4、比較。凸輪設(shè)計(jì)要求:凸輪基圓半徑r0=40mm,行程h=20mm,偏距e=10mm,推程為簡諧運(yùn)動(dòng),推程角為0=120°,遠(yuǎn)休止角s=30°,回程運(yùn)動(dòng)為等加速等減速運(yùn)動(dòng),回程角為0=120°,近休止角s=90°。Excel軟件輔助設(shè)計(jì)用Excel計(jì)算出凸輪輪廓線上點(diǎn)的坐標(biāo)(部分?jǐn)?shù)據(jù)截圖)AutoCAD凸輪輪廓線設(shè)計(jì)數(shù)據(jù)導(dǎo)入AutoCAD中生成凸輪輪廓線:由該圖可直觀的看出,AutoCAD是根據(jù)導(dǎo)入的點(diǎn)的坐標(biāo),用光滑的曲線將其一一連接得到凸輪輪廓曲線的。VB編程作凸輪輪廓線并仿真:1. VB程序模塊Public s(200) As DoublePublic
5、 v(200) As DoublePublic a(200) As DoublePublic s1(200), v1(200), a1(200)Public Const pi = 3.1415926Public 0, 1, 2, 3 運(yùn)動(dòng)角參數(shù)Public h, , rb, e, r, e1, r0 升程、角速度、基圓半徑等Public Sub draw1()n = rb / 15: r = rb / n: e1 = e / n main.Picture1.Circle (35 * 50, 40 * 50), r * 50 畫基圓 main.Picture1.Circle (35 * 50,
6、40 * 50), e1 * 50 畫偏心圓End SubDim r0 As DoublePrivate Sub Command1_Click()0 = Val(Text3(0).Text) 初始值1 = Val(Text4.Text)2 = Val(Text3(1).Text)3 = 360 - 0 - 1 - 2h = Val(Text5.Text)r0 = Val(Text6.Text) 滾子半徑rb = Val(Text2.Text) 基圓半徑e = Val(Text1.Text) 偏心距Dim j As Integerj = 0'計(jì)算推程的位移If op1dengsu(0).
7、Value = True Then 等速運(yùn)動(dòng) For i = 0 To 0 Step 3 s(j) = h * i / 0 j = j + 1 Next iElse If op1dengjiajian(0).Value = True Then 等加速等減速 For i = 0 To 0 / 2 Step 3 s(j) = 2 * h * i 2 / 0 2 j = j + 1 Next i For i = 0 / 2 + 3 To 0 Step 3 s(j) = h - 2 * h(0 - i) 2 / 0 2 j = j + 1 Next iElse If op1yuxian(0).Valu
8、e = True Then 余弦加速度 For i = 0 To 0 Step 3 s(j) = h * (1 - Cos(pi * i / 0) / 2 j = j + 1 Next iElse If op1zhengxian(0).Value = True Then 正弦加速度 For i = 0 To 0 Step 3 s(j) = h * (1 - Sin(pi * i / 0) / 2 j = j + 1 Next iEnd If計(jì)算遠(yuǎn)停程位移For i = 3 To (0 + 1) Step 3s(j) = hj = j + 1Next i計(jì)算回程的位移If op2dengsu(1
9、).Value = True Then 等速運(yùn)動(dòng)For i = 3 To (0 + 1 + 2) Step 3s(j) = h * (1 - i / 2)j = j + 1Next iElse If op2dengjiajian(1).Value = True Then 等加速等減速For i = 3 To (0 + 1 + 2 / 2) Step 3s(j) = h - 2 * h * i 2 / 2 2j = j + 1Next iFor i = (0 + 1 + 2 / 2) + 3 To (0 + 1 + 2) Step 3s(j) = 2 * h * (2 - i) 2 / 2 2j
10、 = j + 1Next iElse If op2yuxian(1).Value = True Then 余弦加速度For i = 3 To (0 + 1 + 2) Step 3s(j) = h * (1 + Cos(pi * i / 2) / 2j = j + 1Next iElse If op2zhengxian(1).Value = True Then 正弦加速度For i = 3 To (0 + 1 + 2) Step 3s(j) = h * (1 + Sin(pi * i / 2) / 2j = j + 1Next iEnd If近停程For i = (0 + 1 + 2) To (
11、0 + 1 + 2 + 3) Step 5s(j) = r0j = j + 1Next idraw1If Val(Text6.Text) = 0 ThenDraw with = 3Picture1.Line (35 * 50, (40 - r) * 50)-(35 * 50, 5 * 50)Turnoff timerTimer1.Interval = 250Timer1.Enabled = True 選擇直動(dòng)尖頂從動(dòng)件動(dòng)畫Else If Val(Text6.Text) > 0 ThenTurnoff timerx0 = 35 + e1: y0 = 40 - Sqr(r 2 - e1 2)
12、For g = 2 To 70 畫理論輪廓線m = g - 1X2 = 35 - (s(g) + Sqr(r 2 - e1 2) * Sin(5 * g * pi / 180) + e1 * Cos(5 * g * pi / 180)Y2 = 40 - (s(g) + Sqr(r 2 - e1 2) * Cos(5 * g * pi / 180) + e1 * Sin(5 * g * pi / 180)X1 = 35 - (s(m) + Sqr(r 2 - e1 2) * Sin(5 * m * pi / 180) + e1 * Cos(5 * m * pi / 180)Y1 = 40 - (
13、s(m) + Sqr(r 2 - e1 2) * Cos(5 * m * pi / 180) + e1 * Sin(5 * m * pi / 180) Picture1.Line (x0 * 50, y0 * 50)-(X1 * 50, Y1 * 50) Picture1.Line (X1 * 50, Y1 * 50)-(X2 * 50, Y2 * 50)x0 = X2: y0 = Y2Next gTimer2.Interval = 250Timer2.Enabled = True 選擇直動(dòng)滾子從動(dòng)件動(dòng)畫ElsePicture1.Current X = 20 * 50Picture1.Curr
14、ent Y = 62 * 50 Picture1.Print "重新選擇"End IfEnd Sub Private Sub Timer1_Timer() 直動(dòng)滾子從動(dòng)件動(dòng)畫x0 = 35 + e1: y0 = 40 - Sqr(r 2 - e1 2)For g = 2 To 70m = g - 1X3 = e1 * Cos(5 * g * pi / 180)Y3 = -e1 * Sin(5 * g * pi / 180)X2 = 35 - (s(g) + Sqr(r 2 - e1 2) * Sin(5 * g * pi / 180) + e1 * Cos(5 * g *
15、pi / 180)Y2 = 40 - (s(g) + Sqr(r 2 - e1 2) * Cos(5 * g * pi / 180) + e1 * Sin(5 * g * pi / 180)X1 = 35 - (s(m) + Sqr(r 2 - e1 2) * Sin(5 * m * pi / 180) + e1 * Cos(5 * m * pi / 180)Y1 = 40 - (s(m) + Sqr(r 2 - e1 2) * Cos(5 * m * pi / 180) + e1 * Sin(5 * m * pi / 180) Picture1.Line (62 + g * 0.6) * 5
16、0, 15 * 50)-(62 + g * 0.6) * 50, (15 - s(g) * 50) Picture1.Line (X3 + 35) * 50, (Y3 + 40) * 50)-(X2 * 50, Y2 * 50) Picture1.Line (x0 * 50, y0 * 50)-(X1 * 50, Y1 * 50) Picture1.Line (X1 * 50, Y1 * 50)-(X2 * 50, Y2 * 50)x0 = X2: y0 = Y2Next gIf g > 70 ThenTurnoff timerEnd IfEnd Sub Private Sub Time
17、r2_Timer() 直動(dòng)滾子從動(dòng)件動(dòng)畫X2 = 35 - (s(g) + Sqr(r 2 - e1 2) * Sin(5 * g * pi / 180) + e1 * Cos(5 * g * pi / 180)Y2 = 40 - (s(g) + Sqr(r 2 - e1 2) * Cos(5 * g * pi / 180) + e1 * Sin(5 * g * pi / 180) Picture1.Circle (X2 * 50, Y2 * 50), (r0 / rb * 15) * 50g = g + 1If g > 71 ThenTurnoff timerEnd IfEnd Sub
18、Private Sub turnoff timer()Timer1.Enabled = FalseTimer2.Enabled = FalseEnd Sub參數(shù)輸入:形成輪廓線,驗(yàn)證仿真:用Mathematica編程作凸輪輪廓線locuspoint1=s,Sins2;ParametricPlotEvaluatelocuspoint1,s,-2,2 locuspoint2=IfNp/2<s< (3 N)/2,1,1+CossCoss,Sins;ParametricPlotEvaluatelocuspoint2,s,0,2 p Needs"MechanicalSystemsM
19、odeler2D" CamPlotPoint2,locuspoint2,s,0,2,Frame®True,AspectRatio®Automatic Show%/.X2®1,Y2®-2,Q2®0.5 OffGeneral:"spell1"alpha;beta;OnGeneral:"spell1"camprof=3 Cosalpha,3 Sinalpha+Sin2 alpha; ParametricPlotEvaluatecamprof,alpha,0,2,AspectRatio®Aut
20、omaticground=1;cam=2;follower=3; SetBodiesBodyfollower,InitialGuess®-3.5,4.0,0.0SetConstraintsRevolute21,Pointcam,0,Pointground,0,Revolute22,Pointfollower,0,Pointground,-3.5,4,RotationLock13,cam,2 Np T,CamToLine14,Pointcam,camprof,alpha,1.5,Linefollower,0.5,-1,6.5,-1 SolveMech.15 SolveMech.30 l
21、ocuspoint=IfN/2<s<(3 N)/2,1,1+CossCoss,t,Sins; ParametricPlot3DEvaluatelocuspoint,s,0,2,t,0,2,PlotPoints®35,2 Needs"MechanicalSystemsModeler3D"®True Show%/.X2®1,Y2®-2,Z2®0.5,Eo2®.7,Ei2®.7,Ej2®0,Ek2®0 camsurf=IfN/2<alpha<(3 N)/2,1,1+C
22、osalpha Cosalpha,beta,Sinalpha;ground=1;cam=2;follower=3; SetBodiesBodyfollower,InitialGuess®-2,0,2,1,0,0,0 SetConstraintsRevolute51,Linecam,0,0,2,0,Lineground,0,0,2,0,Revolute52,Linefollower,0,0,2,0,Lineground,-2,0,2,-2,2,2,ProjectedAngle13,Vectorcam,0,0,1,Vectorground,0,0,1,Vectorground,0,-1,
23、0,2N T,CamToSphere14,Pointcam,camsurf,alpha,1.5,beta,1,Pointfollower,2,1,0,0.5 SolveMech0.1 SolveMech.20 Needs"MechanicalSystemsModeler2D" knotpoints=0,1.5,.75,.75,1,0,.707,-.707,0,-1,-.707,-.707,-1,0,-.75,.75,0,1.5; splinelocus=SplineFitknotpoints,EndConditions®Closed ParametricPlots
24、plinelocuss,s,0,8,AspectRatio®Automatic CamToCircle14,Point2,splinelocuss,s,2.0,Point3,0,0,.2 data=PolarToXY/Table4-i,i Np,i,1,3,.2; splinelocus=SplineFitdata,EndConditions®.106,-.994,.152,-.476 ParametricPlotsplinelocuss,s,0,10,AspectRatio®Automatic splinearc=ArcLengthsplinelocus gro
25、und=1;cam=2;SetConstraintsCamToLine11,Pointcam,splinelocuss,s,2,Lineground,0,0,1,0,RotationLock12,cam,2NpT,Constraint3,splinearcs=Locationcam,splinelocussP1RightDoubleBracketSetGuessX2®4,Y2®2.5;SolveMech0,-0.2,-0.4 ansplinelocus=PolarToXY4-s,s Np ansplinearc=Integralâs PlotEvaluateans
26、plinearc-(ansplinear/.s®1),splinearc5 (s-1),s,1,3 data=Join3.08599,0.61384,3.23358,1.33939,3.20411,2.14091,2.82843,2.82843,2.14092,3.20411,1.33939,3.23358,0.61384,3.08599,Table3 Cosi,Sini,i,Np/2,2 Np,3 Np/(2 24);len=Lengthdata;fourierdata=Fourier/Transposedata 2/N;fourierdataP1,1RightDoubleBrac
27、ket/=2;fourierdataP2,1RightDoubleBracket/=2; terms=10;fourierlocus=(TakeRe#1,terms.TableCosi s,i,0,terms-1+TakeIm#1,terms.TableSini s,i,0,terms-1&)/fourierdata; ShowGraphicsPointSize.018,Point/data,ParametricPlotEvaluatefourierlocus,s,0,2 p,DisplayFunction®Identity,AspectRatio®Automatic locuspoint1=Involuteg1,0,0,4.0,5.0,0;locuspoint2=Involuteg2,0,0,5.6,7.0,Np ground=1;gear1=2;gear2=3;SetConstraintsRevolute21,Pointground,0,0,Pointgear1,0,0,RotationLock12,gear1,2 Np T,Revolute23,Pointground,12,0,Pointgear2,0,0,CamToCam14,
溫馨提示
- 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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 在法院的實(shí)習(xí)報(bào)告集錦七篇
- 公司的工作計(jì)劃范文
- 指導(dǎo)青年教師工作心得
- 唐山大地震觀后感集合15篇
- 高中數(shù)學(xué)教學(xué)設(shè)計(jì)
- 2022春晚觀后感心得體會(huì)10篇
- 新學(xué)期生活學(xué)習(xí)計(jì)劃
- DB45T 2685-2023 青錢柳茶加工技術(shù)規(guī)程
- DB45T 2634.1-2023 道路運(yùn)輸車輛主動(dòng)安全智能防控系統(tǒng)設(shè)計(jì) 第1部分:平臺(tái)技術(shù)要求
- 2025廣州租房合同協(xié)議下載
- Unit 1 Making friends Part B(說課稿)-2024-2025學(xué)年人教PEP版(2024)英語三年級(jí)上冊
- 《涉江采芙蓉》 課件高中語文統(tǒng)編版必修上冊
- 2024年事業(yè)單位考試職業(yè)能力傾向測驗(yàn)試題與參考答案
- 保定學(xué)院《自然語言處理》2022-2023學(xué)年第一學(xué)期期末試卷
- 北京市西城區(qū)2023-2024學(xué)年六年級(jí)上學(xué)期數(shù)學(xué)期末試卷(含答案)
- 2024年考研英語(二)真題及參考答案
- 2024年水稻種項(xiàng)目可行性研究報(bào)告
- 供應(yīng)商質(zhì)量管理培訓(xùn)課程
- 阿膠的課件教學(xué)課件
- 登高作業(yè)安全
- 口腔營銷技能培訓(xùn)課件
評(píng)論
0/150
提交評(píng)論