Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 85 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
85
Dung lượng
5,21 MB
Nội dung
MINISTRY OF EDUCATION AND TRAINING HCMC UNIVERSITY OF TECHNOLOGY AND EDUCATION BACHELOR THESIS MECHATRONIC ENGINEERING TECHNOLOGY STUDY ON INTERPOLATION ALGORITHMS FOR CNC MACHINE ADVISOR: VO LAM CHUONG, MSC STUDENT’S NAME: NGUYEN TAN TAI STUDENT’S ID: 13146280 STUDENT’S NAME: PHUN QUOC VIET STUDENT’S ID: 13146264 STUDENT’S NAME: TRAN DAI NAM STUDENT’S ID: 13146137 SKL 0 Ho Chi Minh city, July 2017 an SOCIALIST REPUBLIC OF VIETNAM Independence - Freedom - Happiness *** Ho Chi Minh City, July 15th 2017 MISSION OF THESIS Student’s name: Nguyen Tan Tai Major: Mechatronics Phone number: 0164 6576 793 Student’s name: Phun Quoc Viet Major: Mechatronics Phone number: 01644960322 Student’s name: Tran Đại Nam Major: Mechatronics Phone number: 01666323408 Advisor: Vo Lam Chuong, MSc Student’s ID: 13146280 Class: 13146CLC Student’s ID: 13146264 Class: 131462B Student’s ID: 13146137 Class: 131462A Delivery date: July 15th 2017 Submission date: Title of thesis: Study on interpolation algorithms for CNC machine The original data, documents: Use the embedded beagleboard control axes CNC milling machine Main content: - Setting up the parameters for AC servo drivers - Designing a controller panel, interface boards for AC drivers - Study on the interpolation algorithms based on pulse reference method, concentrating on NURBS algorithms - Simulating and implementing on a real model - Building an experimental lesson for the subject “Practice on Servo Systems” Product: Milling machines can process Spline curves on materials: mica, plastic, … Dean of Department Advisor i an SOCIALIST REPUBLIC OF VIETNAM Independence - Freedom - Happiness *** ADVISOR’S COMMENT Student’s name: Student’s ID: Major: Title of thesis: Advisor’s name: REMARK The content of thesis and the workload: Advantages: Disadvantages: Project defence approval: Evaluate: Grade: (by letters: ) Ho Chi Minh City, July 2017 Advisor (Name, signature) ii an SOCIALIST REPUBLIC OF VIETNAM Independence - Freedom - Happiness *** ADVISOR’S COMMENT Student’s name: Student’s ID: Major: Title of thesis: Advisor’s name: REMARK The content of thesis and the workload: Advantages: Disadvantages: Project defence approval: Evaluate: Grade: (by letters: ) Ho Chi Minh City, July 2017 Advisor (Name, signature) iii an ACKNOWLEDGEMENT During the working time, we received enthusiastic guidance that help us finish the project successfully Firstly, we would like to express our sincere gratitude to the School Board of Ho Chi Minh City University of Technology and Education and the Faculty of High Quality Training that create great conditions for successful project Secondly, we would like to thank Vo Lam Chuong, MSc – our supervisor who gave us a lot of useful guidance and advice that help us to complete the project successfully From these advice, we know how to apply our knowledge to solve a real problem and feel more confident in our learned skills Thank to our group members in Servo Laboratory, who often attend to support each other and cooperate enthusiastically to complete the project Finally, we would like to thank my family and friends for always supporting, caring and encouraging us during more than four years studying at the universisty Ho Chi Minh City, July 24th, 2017 Members of group: Phun Quoc Viet Nguyen Tan Tai Tran Dai Nam iv an ABSTRACT Our country's mechanical engineering has made significant development but the precision engineering industry has not really developed yet to meet the demand for high precision mechanical processes To achieve the precision and high quality require technology of thriving CAD/CAM/CNC Therefore, researching and appling control algorithms are extremely important This article presents some results in research of interpolation algorithms such as DDA (Digital Differential Analyzer), SA (Stairs Approximation), DS (Direct Search) and NURBS (Non-Uniform Rational B-spline) to improve accuracy for CNC milling machines We used the strong support softwares to simulate as Matlab, C #, then evaluated the quality and accuracy of the algorithms on the 3-axis CNC milling machine model v an TABLE OF CONTENTS MISSION OF THESIS i ADVISOR’S COMMENT ii ADVISOR’S COMMENT iii ACKNOWLEDGEMENT iv ABSTRACT v TABLE OF CONTENTS vi LIST OF ABBREVIATIONS ix LIST OF TABLES ix LIST OF FIGURES AND CHARTS x CHARTER 1: OVERVIEW PROJECT 1.1 The urgency of the project .1 1.2 The scientific and practical significance of the project 1.3 Research objectives of the project 1.4 Object and scope of the study 1.4.1 Research scope of the project 1.4.2 Research subjects of the project 1.5 Research methods .2 1.5.1 Methodological basis 1.5.2 Specific research methods 1.6 Thesis structure CHAPTER 2: OVERVIEW TECHNOLOGY CNC 2.1 CNC technology 2.1.1 CNC technology overview 2.1.2 CNC machine .4 2.1.3 CNC machine structure vi an 2.2 CNC control loop 11 2.2.1 Semi-closed Loop 12 2.2.2 Closed loop .12 2.2.3 Hybrid loop 13 2.2.4 Open loop 13 2.3 Electric overview .14 2.3.1 Isolation circuit 14 2.3.2 Controller circuit .15 CHAPTER 3: MECHANICAL SECTION 16 3.1 CNC milling machine 16 3.1.1 CNC milling machine introduction .16 3.1.2 CNC milling technology 18 3.2 CNC milling machine design 20 3.2.1 Method of moving workpiece 20 3.2.2 Selecting the optimum solution 22 3.2.3 Selecting structure of motion 22 3.2.4 Selecting guiding method 28 3.2.5 Transmission parameter .30 3.2.6 Calculating, engines selection .31 3.2.7 General CNC machine model 35 CHAPTER 4: ELECTRIC DESIGN 37 4.1 MCU (Micro Controller Unit) design 37 4.2 Buffer circuit 39 4.2.1 Buffer circuit overview 39 4.2.2 Design circuit 39 4.3 Serial PORT .42 4.3.1 Introduction common protocol 42 vii an 4.3.2 Interface design .43 4.3.3 Main interface 44 CHAPTER 5: INTERPOLATION ALGORITHMS 46 5.1 Interpolation algorithms introduction 46 5.2 Hardware interpolation 47 5.3 Software interpolation 47 5.3.5 Reference pulse method 47 5.3.5 Sampling method .48 5.3.5 Software DDA Interpolator 49 5.3.5 Stairs Approximation Interpolator .51 5.3.5 Direct Search algorithm 52 5.4 NURBS algorithm 54 5.4.5 Theory of NURBS curve 54 5.4.5 Survey the NURBS curve characteristics .55 5.4.5 NURBS interpolation algorithm design 55 Calculating the parameters value .55 Calculating the knots vector 56 Calculating base function Spline .56 Calculating control points 56 Finding the equation for curve 56 Calculating the points of the NURBS curve 58 Interpolate the NURBS curve using DDA algorithm .58 5.4.4 Building diagram of NURBS interpolation algorithm 59 5.4.5 Simulating NURBS interpolation 60 5.5 General algorithm interpolation of system 62 CHAPTER : EXPERIMENTAL RESULTS 63 6.1 Conclude 63 viii an 6.2 Result 70 6.3 Development 70 REFERENCES 71 LIST OF ABBREVIATIONS NURBS Non-Uniform Rational Basis Spline CNC Computer Numerical Controlled RPM Revolution Per Minute NC Numerical Control LED Light Emitting Diode SCR Silicon-Controlled Rectifier PLC Programmable Logic Controller MCU Micro Controller Unit CAD Computer Aided Design CAM Computer-Aided Manufacturing MMI Multi Media Interface PIC Programmable Intelligent Computer ARM Advanced RISC Machine DDA Digital Differential Analyzer SA Stairs Approximation DS Direct Search LIST OF TABLES Table 3.1: Parameters of shafts 24 Table 4.1: Parameters of STM32F407VET6 37 ix an Calculating the points of the NURBS curve From the NURBS curve equation, we enter the value knot u in the interval [a, b] to find the set of curves, after that connects these points together by the straight lines, more the number of knots, the accuracy of the curve higher For k is the corresponding number of nodes we will find out k points of that curve Interpolate the NURBS curve using DDA algorithm After calculating the points of the curve and the lines connecting the points, we export G-code data for those lines using the DDA line interpolation algorithm to output the control pulse Figure 5.12: Using DDA algorithm for NURBS [3] 58 an 5.4.4 Building diagram of NURBS interpolation algorithm Figure 5.13: General NURBS interpolation algorithm 59 an Figure 5.13: NURBS interpolation algorithm 5.4.5 Simulating NURBS interpolation Simulating NURBS interpolation algorithm on C #: 60 an Figure 5.14: NURBS algorithm simulation 61 an 5.5 General algorithm interpolation of system Figure 5.15: General interpolation algorithm From initial input data, if that's the data from NURBS curve, we the NURBS interpolation, then export points of NURBS curve and output the pulse using the DDA algorithm to control the X, Y, Z axes If the data is G-code, we DDA algorithm to interpolate straight lines and DS algorithm to interpolate the arc/circle 62 an CHAPTER : EXPERIMENTAL RESULTS 6.1 Conclude Capstone project is an opportunity for students apply knowledge, skill that studied throughout year It is important for students graduates, ability calulation, experience repair error and other skill such as teamwork The teamwork process has completed a great abjetive, the results have been error and limit, but the team is very proud with members in team “Study on interpolation algorithms for CNC machines” is not unfamiliar, but CNC technology is always delopve day by day The process study the end,the team provide the shool continue supporting student of the next coure study and implement the limtations encounter by the team 63 an Figure 6.1: Real CNC machine model 64 an Figure 6.2: Circuit board 65 an Figure 6.3: DDA linear algorithm simulation Figure 6.4: DDA circle algorithm simulation 66 an Figure 6.5: SA algorithm simulation Figure 6.6: DS algorithm simulation This is simulation results of interpolation algorithms DDA, SA and DS on C# We can see that the DA algorithm have more accurate results and faster than DDA algorithm because it has fewer loop DS algorithm gives the most accurate results because X, Y axes move simultaneously and it has number of loop at least 67 an Figure 6.7: The points on NURBS curve correspond to the knots Figure 6.8: Simulation result of interpolation algorithm NURBS curves 68 an Figure 6.9: Result of DDA on real model 69 an Figure 6.10: Result of NURBS algorithm on real model Curve NURBS equation is created based on Deboor algorithm, accuracy of the NURBS curve depend on the number of knots more or less Increasing the number of knots will increase the accuracy of the NURBS We can change the weight coefficients (w1, w2, w3, w4) to change the shape of the NURBS curve 6.2 Result Setting up the parameters for AC servo drivers Designing a controller panel, interface boards for AC drivers Study on the interpolation algonthms based on pulse reference method, concentracting on NURBS algorithms Simulating and implementing on a real model Buiding an experimental lesson for the subject “Practice on Servo Systems” 6.3 Development Athough the process study algorithm has achieved the abjective, but the ability to develop such as: Design mechanical achieves stability and accuracy Study algorithms control the higher order curves 70 an REFERENCES Vietnamese [1] Lê Minh Tài (2010), "Nghiên cứu ứng dụng giải thuật nội suy NURBS xây dựng chương trình điều khiển mơ quỹ đạo máy CNC", Library of HCM city University of Technology and Education, pp 40-60 [2] PGS.TS.NGUYỄN HỮU LỘC, “kỹ thuật CAD/CAE”, 144- 236, nhà xuất khoa học kỹ thuật, in lần thứ nhất,25/3/2010 English [3] Suk-Hwan Suh, Seong-Kyoon Kang, Dae-Hyuk Chung, Ian Stroud (2008) " Theory and Design of CNC Systems" British Library Cataloguing in Publication Data., pp 17-20 [4] SANYO DENKI AMERICA, INC (1998-2006) "Handbook of AC Servo System" www.MotionOnline.com., pp 10-40 [5] Datasheet STM32F4VET6 [6] Panasonic, AC Servo Moto Driver, MINAS A Series, Operating Manual Other sources [7] https://en.wikipedia.org/wiki/Milling [8] https://en.wikipedia.org/wiki/Milling_(machining) [9] https://en.wikipedia.org/wiki/Servomotor [10] https://en.wikipedia.org/wiki/Microcontroller [11] https://www.slideshare.net/phongnvt/gii-thiu-cng-ngh-cnc [12]http://www.tramarindustries.com/blog/5-Common-Types-of-CNC Machines_AE8.html [13] https://en.wikipedia.org/wiki/Opto-isolator [14] https://www.lifewire.com/stepper-motor-vs-servo-motors-selecting-a-motor818841 [15] https://en.wikipedia.org/wiki/Servo_drive [16] http://wilbo666.pbworks.com/w/page/49320712/RS232 [17] https://electronics.stackexchange.com/questions/208350/showing-junk-data-inrs485-protocol-using-pic24f 71 an S an K L 0 ... Submission date: Title of thesis: Study on interpolation algorithms for CNC machine The original data, documents: Use the embedded beagleboard control axes CNC milling machine Main content: -... parameters for AC servo drivers - Designing a controller panel, interface boards for AC drivers - Study on the interpolation algorithms based on pulse reference method, concentrating on NURBS algorithms. .. Designing a controller panel, interface boards for AC drivers Study on the interpolation algonthms based on pulse reference method, concentrating on NURBS algorithms Simulating and implementing on a