TWI451932B - Locally reinforced learning control for rigid tapping - Google Patents

Locally reinforced learning control for rigid tapping Download PDF

Info

Publication number
TWI451932B
TWI451932B TW100126570A TW100126570A TWI451932B TW I451932 B TWI451932 B TW I451932B TW 100126570 A TW100126570 A TW 100126570A TW 100126570 A TW100126570 A TW 100126570A TW I451932 B TWI451932 B TW I451932B
Authority
TW
Taiwan
Prior art keywords
learning
axis
module
feed axis
unit
Prior art date
Application number
TW100126570A
Other languages
Chinese (zh)
Other versions
TW201304901A (en
Inventor
Shyh Leh Chen
Chang Yan Chou
Original Assignee
Nat Univ Chung Cheng
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nat Univ Chung Cheng filed Critical Nat Univ Chung Cheng
Priority to TW100126570A priority Critical patent/TWI451932B/en
Publication of TW201304901A publication Critical patent/TW201304901A/en
Application granted granted Critical
Publication of TWI451932B publication Critical patent/TWI451932B/en

Links

Description

剛性攻牙之局部強化學習控制方法Local reinforcement learning control method for rigid tapping

本發明係關於一種學習控制方法,尤指一種可降低同步誤差及提供較佳加工品質之剛性攻牙之局部強化學習控制方法者。The invention relates to a learning control method, in particular to a local reinforcement learning control method for rigid tapping which can reduce synchronization error and provide better processing quality.

按,剛性攻牙機在現代電子產業扮演著重要的角色,有許多電子產品需要進行大量的鑽孔與高品質的螺紋,這些都必須依靠剛性攻牙機來完成,其中以手機為例,在產品製程上需在手掌大的面積中,加工出10~30個孔洞,其他應用的產品包括有手錶及PDA等,當電子產品的體積越小時,進行加工處理的困難度就越高,因此剛性攻牙機必須具更穩定且更精準的控制,方可符合市場的需求;一般來說,剛性攻牙機若能以同步控制其旋轉軸與進給軸的轉動與移動(如進刀、攻牙、反轉退刀、移動到下一位置等動作),才能完成一個品質良好的加工螺孔,目前剛性攻牙機欲達成同步控制旋轉軸與進給軸的方式大致可分為兩種,第一種係對剛性攻牙機的機構進行改良,其主要係將剛性攻牙機加工工件時,所遇到摩擦力或震動等問題加以分析後,改良相關問題的機構設計,藉以降低旋轉軸與進給軸的同步誤差,而另一種方式係變更剛性攻牙機的控制器設計,即針對各種加工工作準備不同的控制器來控制加工過程,藉以選出可以得到好的加工結果的控制器或是控制器參數;以剛性攻牙機來說,其對於旋轉軸與進給軸的同步要求非常嚴苛,只要稍不一致的螺距就極易使刀具產生斷裂的情形,正因如此,旋轉軸與進給軸的同步控制非常重要,其中現有同步控制的架構大致上有兩種,第一種為主從式學習架構,主要係由進給軸追隨旋轉軸作動,進給軸進給的命令係由旋轉軸實際位置所提供,然而,現有主從式學習架構的進給軸要追上旋轉軸需要一段時間,且當追上時旋轉軸又已經跑到下個位置了,因此會有動態延遲的問題,因此,主從式架構通常會利用一前饋控制來補償動態延遲;第二種同步控制架構係為一交叉耦合學習架構,其係同時考量進給軸與旋轉軸的動態,直接控制所加工出來的同步誤差,此種控制架構通常係採用一由比例積分(Proportional-Integral)控制器調整參數後的閉迴路系統(closed-loop system),並以經驗或嚐試錯誤方式選擇控制參數,但無法以系統化方式加以設計,因此,如何有效地降地剛性攻牙機的同步誤差,係目前亟需解決的問題;為了解決上述在剛性攻牙中心機的同步控制架構所遭遇的問題,而產生了剛性攻牙中心機之學習控制方法,期能有效縮減剛性攻牙中心機的旋轉軸與進給軸之間同步誤差,獲得更佳的加工品質。然而,現有的學習控制方法大都針對所有時間區段設定相同的學習速率,容易導致較高的學習增益,且容易將雜訊放大而影響學習性能,其中現有剛性攻牙的學習控制法則為:Press, rigid tapping machines play an important role in the modern electronics industry. There are many electronic products that require a lot of drilling and high-quality threads, which must be done by rigid tapping machines. In the product process, 10 to 30 holes need to be machined in the large area of the palm. Other applications include watches and PDAs. When the volume of the electronic product is small, the difficulty in processing is higher, so the rigidity is The tapping machine must have more stable and more precise control to meet the needs of the market; in general, the rigid tapping machine can synchronously control the rotation and movement of its rotating and feed axes (such as feeding and attacking). To complete a good quality machining screw hole, such as teeth, reverse retracting, moving to the next position, etc. At present, the rigid tapping machine can be roughly divided into two types to achieve synchronous control of the rotating shaft and the feeding shaft. The first type is to improve the mechanism of the rigid tapping machine. It is mainly used to analyze the problems such as friction or vibration when the rigid tapping machine is machining the workpiece. In order to reduce the synchronization error between the rotating shaft and the feed axis, the other way is to change the controller design of the rigid tapping machine, that is, to prepare different controllers for various machining operations to control the machining process, so that it can be selected well. The controller or controller parameters of the machining result; in the case of a rigid tapping machine, the synchronization requirements for the rotating shaft and the feed shaft are very strict, as long as the pitch is slightly inconsistent, the tool is easily broken. Therefore, the synchronous control of the rotating shaft and the feed axis is very important. There are two types of existing synchronous control architectures. The first one is a master-slave learning architecture, which is mainly driven by the feed axis following the rotary axis. The command for the axis feed is provided by the actual position of the rotary axis. However, it takes a while for the feed axis of the existing master-slave learning architecture to catch up with the rotary axis, and the rotary axis has already moved to the next position when it is caught up. Therefore, there is a problem of dynamic delay. Therefore, the master-slave architecture usually uses a feedforward control to compensate the dynamic delay; the second synchronous control architecture is a cross-coupling. The architecture, which considers the dynamics of the feed axis and the rotary axis at the same time, directly controls the synchronous error processed. This control architecture usually adopts a closed loop system with a Proportional-Integral controller to adjust the parameters. (closed-loop system), and select the control parameters by experience or try the wrong way, but can not be designed in a systematic way. Therefore, how to effectively reduce the synchronization error of the rigid tapping machine is an urgent problem to be solved. In order to solve the above problems encountered in the synchronous control architecture of the rigid tapping center machine, a learning control method of the rigid tapping center machine is generated, which can effectively reduce the synchronization between the rotating shaft and the feeding axis of the rigid tapping center machine. Errors for better processing quality. However, the existing learning control methods mostly set the same learning rate for all time segments, which tends to lead to higher learning gain, and it is easy to amplify the noise and affect the learning performance. The learning control rule of the existing rigid tapping is:

r j = r j -1 +L ε j -1  (3) r j = r j -1 + L ε j -1 (3)

其中 r j 代表第j次加工時整個完整週期的剛性攻牙輸入控制命令向量(包含主軸與Z軸命令),ε j 則代表第j次加工時整個週期同步誤差的向量,L 為一學習增益矩陣,其方程式式如下所示:Where r j represents the rigid tapping input control command vector (including the spindle and Z axis commands) for the entire complete cycle of the jth machining, ε j represents the vector of the entire cycle synchronization error during the jth machining, and L is a learning gain The matrix, whose equation is as follows:

其中p 代表整個剛性攻牙週期共有p 個取樣時間,此學習增益矩陣只能設定一個學習速率(1/ρ),即讓每個取樣時間(k )的同步誤差係以相同的比率降低:Where p represents a total of p sampling times for the entire rigid tapping cycle. This learning gain matrix can only set a learning rate (1/ρ), ie the synchronization error for each sampling time ( k ) is reduced by the same ratio:

ε j (k )=ρε j -1 (k ) (5)ε j ( k )=ρε j -1 ( k ) (5)

因此,現有剛性攻牙的學習控制僅能設定一固定的學習速率與學習增益,通常導致較高之學習增益,容易將雜訊放大而影響學習性能,然而,在整個剛性攻牙的過程中,不同時間區段的同步誤差通常不同,例如,在加減速的區域會有比較大的同步誤差,請配合參看如圖5所示,其係為一未學習前的剛性攻牙機旋轉軸轉速命令與時間之關係圖,而圖6係為圖5轉速命令的同步誤差關係圖,由圖中可明顯看出在加減速的區域(t介於0.8~1.0之間)內的同步誤差比較大,由此可知,以一固定的學習速率與學習增益的學習方式,通常無法得到較好的學習效果,進而無法提供較佳的加工品質,誠有加以改進之處。Therefore, the learning control of the existing rigid tapping can only set a fixed learning rate and learning gain, which usually leads to higher learning gain, and it is easy to amplify the noise and affect the learning performance. However, in the process of rigid tapping, The synchronization error of different time segments is usually different. For example, there is a large synchronization error in the acceleration/deceleration area. Please refer to FIG. 5, which is a rigid tapping machine rotating shaft speed command before learning. The relationship with time, and Figure 6 is the synchronization error relationship diagram of the speed command of Figure 5, it can be clearly seen from the figure that the synchronization error in the acceleration/deceleration region (between 0.8~1.0) is relatively large. It can be seen that with a fixed learning rate and a learning gain learning method, it is generally impossible to obtain a good learning effect, and thus it is impossible to provide a better processing quality, and there are improvements.

因此,本發明人有鑑於目前剛性攻牙機同步控制學習架構在操作上的不足與問題,特經過不斷的研究與試驗,終於發展出一種能改進現有缺失之本發明。Therefore, the inventors have in view of the deficiencies and problems in the operation of the rigid tapping machine synchronous control learning architecture, and through continuous research and experimentation, finally developed a invention which can improve the existing defects.

本發明之主要目的係在於提供一種剛性攻牙之局部強化學習控制方法,主要係透過一學習控制的方式,以一非固定的學習速率與學習增益,能在不同的時間區段彈性設定不同的學習速率與學習增益,可有效降低整體之剛性攻牙同步誤差,其中當同步誤差愈大之時間區段,可設定愈大的學習速率與學習增益,如此更能實現同步誤差為零的結果,達到精密攻牙加工目的,進而提供一可降低同步誤差及提供較佳加工品質之剛性攻牙之局部強化學習控制方法之目的者。The main object of the present invention is to provide a local reinforcement learning control method for rigid tapping, which mainly adopts a learning control method, and has a non-fixed learning rate and learning gain, and can flexibly set different values in different time segments. The learning rate and the learning gain can effectively reduce the overall rigid tapping synchronization error, wherein the larger the synchronization error is, the larger the learning rate and the learning gain can be set, so that the synchronization error is zero. To achieve the purpose of precision tapping, and to provide a local reinforcement learning control method for rigid tapping that can reduce synchronization error and provide better processing quality.

為達到上述目的,本發明係提供一種剛性攻牙之局部強化學習控制方法,其係包含有:裝置設置:於一剛性攻牙機上設置一學習模組、一同步誤差計算模組、一反饋模組及一動態模組,該學習模組係設有一旋轉軸學習控制單元及一進給軸學習控制單元,該同步誤差計算模組係與該學習模組及該剛性攻牙機相連接且設有兩位置檢知器,兩位置檢知器係分別連接至該剛性攻牙中心機的旋轉軸及進給軸,藉以獲得該剛性攻牙機旋轉軸及進給軸的位置,該反饋模組係與該學習模組相連接且設有一旋轉軸反饋單元及一進給軸反饋單元,該旋轉軸反饋單元係與該旋轉軸學習控制單元相連接,而該進給軸反饋單元係與該進給軸學習控制單元相連接,該動態模組係與該反饋模組相連接且設有一旋轉軸動態單元及一進給軸動態單元,該旋轉軸動態單元係與該旋轉軸反饋單元及該旋轉軸相連接,而該進給軸動態單元係與該進給軸反饋單元及該進給軸相連接;取得控制命令:由該旋轉軸學習控制單元及進給軸學習控制單元分別取得該剛性攻牙機旋轉軸及進給軸的控制命令,將兩控制命令分別依序地輸出至該反饋單元及該動態單元;計算誤差:該同步誤差計算模組透過兩位置檢知器獲得兩軸目前的實際位置,經由該反饋模組及該動態模組得到兩軸的控制命令,計算出兩軸的位置誤差,再依據該旋轉軸及該進給軸的位置誤差計算出本次的同步誤差:以及計算修正量:將前述步驟所計算出的同步誤差分別輸出至該旋轉軸學習控制單元及該進給軸學習控制單元,依據該同步誤差及控制命令計算出一學習命令修正量,於下一次控制命令輸入時,以該學習命令修正量修正該控制命令,如此重覆執行直到獲得符合要求的精度,其中該學習模組針對每個取樣時間設定不同的學習速率。In order to achieve the above object, the present invention provides a localized reinforcement learning control method for rigid tapping, which comprises: setting a device: setting a learning module, a synchronization error calculation module, and a feedback on a rigid tapping machine a module and a dynamic module, the learning module is provided with a rotary axis learning control unit and a feed axis learning control unit, and the synchronous error calculation module is connected to the learning module and the rigid tapping machine A two-position detector is provided, and the two position detectors are respectively connected to the rotation axis and the feed axis of the rigid tapping center machine, to obtain the position of the rigid tapping machine rotation axis and the feed axis, the feedback mode The group is connected to the learning module and is provided with a rotating shaft feedback unit and a feed axis feedback unit, and the rotating shaft feedback unit is connected to the rotating shaft learning control unit, and the feeding axis feedback unit is The feed axis learning control unit is connected, and the dynamic module is connected to the feedback module and is provided with a rotating shaft dynamic unit and a feed axis dynamic unit, and the rotating shaft dynamic unit is opposite to the rotating shaft The unit and the rotating shaft are connected, and the feed axis dynamic unit is connected to the feed axis feedback unit and the feed axis; obtaining a control command: the rotary axis learning control unit and the feed axis learning control unit respectively Obtaining a control command of the rigid tapping machine rotating shaft and the feeding axis, respectively outputting two control commands to the feedback unit and the dynamic unit respectively; calculating error: the synchronous error calculating module is obtained by using the two-position detector The current actual position of the two axes is obtained by the feedback module and the dynamic module to obtain two-axis control commands, and the position error of the two axes is calculated, and then the current position is calculated according to the position error of the rotating shaft and the feeding axis. Synchronization error: and calculating the correction amount: outputting the synchronization error calculated in the foregoing step to the rotation axis learning control unit and the feed axis learning control unit, respectively, and calculating a learning command correction amount according to the synchronization error and the control command, When the next control command is input, the control command is corrected by the learning command correction amount, and the execution is repeated until the required accuracy is obtained. In this learning module set different learning rates for each sampling time.

進一步,在裝置設置的操作步驟中,該旋轉軸學習控制單元係設有一旋轉軸學習程序,用以產生一旋轉軸控制命令,而該進給軸學習控制單元係設有一進給軸學習程序,用以產生一進給軸控制命令,而在計算修正量的操作步驟中,當同步誤差分別輸出至該旋轉軸學習控制單元及該進給軸學習控制單元時,執行該旋轉軸學習程序及該進給軸學習程序,藉以依據該同步誤差及控制命令計算出一學習命令修正量。Further, in the operation step of the device setting, the rotary axis learning control unit is provided with a rotary axis learning program for generating a rotary axis control command, and the feed axis learning control unit is provided with a feed axis learning program. For generating a feed axis control command, and in the operation step of calculating the correction amount, when the synchronization error is respectively output to the rotation axis learning control unit and the feed axis learning control unit, executing the rotation axis learning program and the The feed axis learning program calculates a learning command correction amount based on the synchronization error and the control command.

再進一步,於計算修正量的操作步驟中,於非加減速區設定一學習速率為1/0.7,而於加減速區設定一學習速率為1/0.3。Further, in the operation step of calculating the correction amount, a learning rate is set to 1/0.7 in the non-acceleration/deceleration region, and a learning rate is set to 1/0.3 in the acceleration/deceleration region.

藉由上述的技術手段,本發明剛性攻牙之局部強化學習控制方法,係可針對特定時間區段設定不同之學習速率與學習增益,以強化該時間區段之學習,且此加強學習之區段可自由設定,可以細微到每一取樣時間皆有不同之學習增益,其中通常是僅分為二個時間區段:等速區段(即非加減速區段)與加減速區段,而後者有較大的學習速率與學習增益,再者,也能以未學習時的攻牙同步誤差大小,劃分幾個時間區段,並對應到不同之學習速率與學習增益,其中同步誤差愈大者,所設定的學習速率與學習增益也愈大,進而提供一可降低同步誤差及提供較佳加工品質之剛性攻牙之局部強化學習控制方法者。According to the above technical means, the local enhanced learning control method for rigid tapping of the present invention can set different learning rates and learning gains for specific time segments, so as to strengthen the learning of the time segment, and the learning area is strengthened. The segments can be freely set, and can be varied to each learning time with different learning gains, which are usually divided into only two time segments: the constant velocity segment (ie, the non-acceleration segment) and the acceleration/deceleration segment. The latter has a large learning rate and learning gain. Furthermore, it can also divide several time segments with the size of the tapping synchronization error when not learning, and corresponding to different learning rates and learning gains, wherein the larger the synchronization error The set learning rate and learning gain are also larger, and a local reinforcement learning control method for rigid tapping which can reduce synchronization error and provide better processing quality is provided.

為能詳細瞭解本發明的技術特徵及實用功效,並可依照說明書的內容來實施,玆進一步以圖式所示的較佳實施例,詳細說明如后:本發明之目的在於提供一剛性攻牙之局部強化學習控制方法,其係安裝於一剛性攻牙機上,主要係透過偵測剛性攻牙機的旋轉軸(攻牙軸)及進給軸(Z軸)的作動情形並對其進行訊號處理,進而提供一剛性攻牙之局部強化學習控制方法者。In order to understand the technical features and practical effects of the present invention in detail, and in accordance with the contents of the specification, it will be further described in detail with reference to the preferred embodiments shown in the drawings. The purpose of the present invention is to provide a rigid tapping. The local reinforcement learning control method is mounted on a rigid tapping machine, mainly by detecting the rotation axis (tapping axis) and the feeding axis (Z axis) of the rigid tapping machine and performing the same Signal processing, which in turn provides a method of local reinforcement learning control for rigid tapping.

本發明係一種剛性攻牙之局部強化學習控制方法,請配合參看如圖1及2所示,該剛性攻牙之局部強化學習控制方法係包含有:The invention relates to a local reinforcement learning control method for rigid tapping. Please refer to FIG. 1 and FIG. 2, the local reinforcement learning control method for rigid tapping includes:

(A)、裝置設置:於一剛性攻牙機上設置一學習模組10、一同步誤差計算模組20、一反饋模組30及一動態模組40,該學習模組10係設有一旋轉軸學習控制單元11及一進給軸學習控制單元12,其中該旋轉軸學習控制單元11係設有一旋轉軸學習程序,用以產生一旋轉軸控制命令,而該進給軸學習控制單元12係設有一進給軸學習程序,用以產生一進給軸控制命令,該同步誤差計算模組20係與該學習模組10及該剛性攻牙機相連接且設有兩位置檢知器21,22,兩位置檢知器21,22係分別連接至該剛性攻牙中心機的旋轉軸及進給軸,藉以獲得該剛性攻牙機旋轉軸及進給軸的位置,並計算出該旋轉軸的位置誤差及該進給軸的位置誤差,該反饋模組30係與該學習模組10相連接且設有一旋轉軸反饋單元31及一進給軸反饋單元32,該旋轉軸反饋單元31係與該旋轉軸學習控制單元11相連接,而該進給軸反饋單元32係與該進給軸學習控制單元12相連接,該反饋模組30可為一PPI控制器,用以提高受控驅動馬達之位置和速度迴路的暫態響應與降低穩態誤差,使整合動態後的閉回路系統對命令有良好的性能,該動態模組40係與該反饋模組30相連接且設有一旋轉軸動態單元41及一進給軸動態單元42,該旋轉軸動態單元41係與該旋轉軸反饋單元31及該旋轉軸相連接,而該進給軸動態單元42係與該進給軸反饋單元32及該進給軸相連接;(B)、取得控制命令:由該旋轉軸學習控制單元11及進給軸學習控制單元12分別取得該剛性攻牙機旋轉軸及進給軸的控制命令,並將此兩控制命令分別依序地輸出至該旋轉軸反饋單元31、該進給軸反饋單元32、該旋轉軸動態單元41及該進給軸動態單元42;(C)、計算誤差:該同步誤差計算模組20透過兩位置 檢知器21,22獲得兩軸目前的實際位置,並經由該反饋模組30及該動態模組40得到兩軸的控制命令,分別計算出兩軸的位置誤差,再依據該旋轉軸及該進給軸的位置誤差計算出本次的同步誤差;以及(D)、計算修正量:將前述步驟所計算出的同步誤差分別輸出至該旋轉軸學習控制單元11及該進給軸學習控制單元12,分別執行該旋轉軸學習程序及該進給軸學習程序,依據該同步誤差及控制命令計算出一學習命令修正量,於下一次控制命令輸入時,以該學習命令修正量修正該控制命令,如此重覆執行直到獲得符合要求的精度,其中由於兩位置檢知器21,22於偵測會受到外在的雜訊影響,使該學習模組10在根據同步誤差而輸出一學習命令修正量時,會將兩位置檢知器21,22所偵測到的雜訊放大,進而對於學習模組10於運算時造成影響,其中當同步誤差值遠大於雜訊值時,該學習模組10可有效地將該同步誤差值降低,因此,雜訊對於學習模組10的影響不大,此時,當該學習模組10的學習速率設定愈大(即期望每次學習可使同步誤差降低之量愈大)時,所得到的學習增益值也將愈大(即學習命令修正補償量愈大),同步誤差也降得愈快;反之,當同步誤差值降低到與雜訊值差不多時,則雜訊對於學習模組10有顯著的影響,因此,該學習模組10無法有效地降低該同步誤差,再者,此時設定大的學習速率,也不見得可降低該同步誤差,所以本發明之學習模組10係採用一較彈性之學習增益矩陣,其方程式係如下所示:(A), device setting: a learning module 10, a synchronization error calculation module 20, a feedback module 30 and a dynamic module 40 are arranged on a rigid tapping machine, and the learning module 10 is provided with a rotation The axis learning control unit 11 and a feed axis learning control unit 12, wherein the rotary axis learning control unit 11 is provided with a rotary axis learning program for generating a rotary axis control command, and the feed axis learning control unit 12 A feed axis learning program is provided for generating a feed axis control command. The synchronous error calculation module 20 is connected to the learning module 10 and the rigid tapping machine and is provided with a two-position detector 21. 22, the two position detectors 21, 22 are respectively connected to the rotation axis and the feed axis of the rigid tapping center machine, to obtain the position of the rigid tapping machine rotation axis and the feed axis, and calculate the rotation axis The position error and the position error of the feed axis are connected to the learning module 10 and provided with a rotary axis feedback unit 31 and a feed axis feedback unit 32. The rotary axis feedback unit 31 is Connected to the rotary axis learning control unit 11 The feed axis feedback unit 32 is connected to the feed axis learning control unit 12, and the feedback module 30 can be a PPI controller for improving the transient response of the position and speed loop of the controlled drive motor. The steady-state error is reduced, so that the integrated dynamic closed-loop system has good performance for the command. The dynamic module 40 is connected to the feedback module 30 and is provided with a rotating shaft dynamic unit 41 and a feed axis dynamic unit 42. The rotating shaft dynamic unit 41 is connected to the rotating shaft feedback unit 31 and the rotating shaft, and the feeding axis dynamic unit 42 is connected to the feeding axis feedback unit 32 and the feeding shaft; (B) Obtaining a control command: the rotation axis learning control unit 11 and the feed axis learning control unit 12 respectively obtain control commands of the rigid tapping machine rotation axis and the feed axis, and sequentially output the two control commands to the The rotary axis feedback unit 31, the feed axis feedback unit 32, the rotary axis dynamic unit 41 and the feed axis dynamic unit 42; (C), calculation error: the synchronous error calculation module 20 transmits through two positions The detectors 21, 22 obtain the current actual positions of the two axes, and obtain the control commands of the two axes via the feedback module 30 and the dynamic module 40, respectively calculating the position errors of the two axes, and then according to the rotation axis and the The position error of the feed axis calculates the current synchronization error; and (D) calculates the correction amount: the synchronization error calculated in the foregoing step is output to the rotation axis learning control unit 11 and the feed axis learning control unit, respectively. 12, respectively executing the rotation axis learning program and the feed axis learning program, calculating a learning command correction amount according to the synchronization error and the control command, and correcting the control command with the learning command correction amount when the next control command is input Execution in this way until the required accuracy is obtained, wherein the two-position detector 21, 22 is affected by external noise during the detection, so that the learning module 10 outputs a learning command correction according to the synchronization error. When the amount is measured, the noise detected by the two position detectors 21, 22 is amplified, which in turn affects the operation of the learning module 10, wherein the synchronization error value is much larger than the noise. The learning module 10 can effectively reduce the synchronization error value. Therefore, the noise has little effect on the learning module 10. At this time, the learning rate of the learning module 10 is set to be larger (that is, each time is expected The secondary learning can reduce the amount of synchronization error. The larger the learning gain value will be (ie, the larger the learning command correction compensation amount), the faster the synchronization error will fall; otherwise, the synchronization error value will decrease. When it is similar to the noise value, the noise has a significant influence on the learning module 10. Therefore, the learning module 10 cannot effectively reduce the synchronization error. Furthermore, setting a large learning rate at this time is not necessarily the case. The synchronization error can be reduced, so the learning module 10 of the present invention adopts a more flexible learning gain matrix, and the equations are as follows:

藉由上述的方程式(1),可針對每個取樣時間(k )設定不同的學習速率(1/ρ k ),進而讓每個取樣時間(k )的同步誤差降低比率不相同,其如下所示:By the above equation (1), different learning rates (1/ρ k ) can be set for each sampling time ( k ), so that the synchronization error reduction ratio of each sampling time ( k ) is different, as follows Show:

ε j (k )=ρ k ε j -1 (k ) (2)ε j ( k )=ρ k ε j -1 ( k ) (2)

藉由上述的方程式(2),使用者可根據未學習的同步誤差結果,來決定是否要使用局部強化學習以及使用局部強化學習的時間區段,例如:選擇一固定學習速率1/0.7進行學習控制時,則該剛性攻牙機的同步誤差與時間的關係圖係如圖3所示,可明顯看出經學習後的同步誤差與未經學習的同步誤差係有所不同;再者,於非加減速區設定一學習速率為1/0.7,而於加減速區設定一學習速率為1/0.3,可得到如圖4所示之結果,比較圖3及4之結果可明顯發現,因此,透過不同的學習速率,可針對誤差大的區域給予更大的收斂速率,即給予更大的補償量,可在同步誤差峰值的收斂上能有更好的結果。By the above equation (2), the user can decide whether to use the local reinforcement learning and the time segment using the local reinforcement learning according to the unlearned synchronization error result, for example, selecting a fixed learning rate of 1/0.7 for learning. When controlling, the relationship between the synchronization error of the rigid tapping machine and time is shown in Fig. 3. It can be clearly seen that the synchronization error after learning is different from the unsynchronized synchronization error system; The non-acceleration/deceleration zone sets a learning rate of 1/0.7, and sets a learning rate of 1/0.3 in the acceleration/deceleration zone to obtain the result shown in Fig. 4. Comparing the results of Figs. 3 and 4 can be clearly found, therefore, Through different learning rates, a larger convergence rate can be given for a region with a large error, that is, a larger compensation amount can be given, and a better result can be obtained in the convergence of the synchronization error peak.

藉由上述的技術手段,本發明剛性攻牙之局部強化學習控制方法,主要係透過設定不同的學習速率,可得到不同的學習效益,例如根據改善效益高(學習控制效果可以較顯著)的區域設定較高的學習速率,來加強學習效益,根據改善效益低的區域設定較低的學習速率,或甚至停止學習,如此一來,不僅可透過局部加強部分時間區段的學習控制方式,且可同時在不影響其他時間區段的方式下,進而讓所有時間區段皆達到更佳的學習結果,藉以提供一可降低同步誤差及提供較佳加工品質之剛性攻牙之局部強化學習控制方法者。According to the above technical means, the local reinforcement learning control method for rigid tapping of the present invention mainly obtains different learning benefits by setting different learning rates, for example, according to an area with high improvement benefit (the learning control effect can be remarkable) Set a higher learning rate to enhance learning efficiency, set a lower learning rate according to areas with low improvement efficiency, or even stop learning. In this way, not only can the learning control method of partial time section be partially enhanced, but also At the same time, in a way that does not affect other time segments, and thus achieve better learning results in all time segments, a local reinforcement learning control method for rigid tapping that can reduce synchronization errors and provide better processing quality is provided. .

以上所述,僅是本發明的較佳實施例,並非對本發明作任何形式上的限制,任何所屬技術領域中具有通常知識者,若在不脫離本發明所提技術方案的範圍內,利用本發明所揭示技術內容所作出局部更動或修飾的等效實施例,並且未脫離本發明的技術方案內容,均仍屬於本發明技術方案的範圍內。The above is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any one of ordinary skill in the art can use the present invention without departing from the scope of the present invention. Equivalent embodiments of the invention may be made without departing from the technical scope of the present invention.

10...學習模組10. . . Learning module

11...旋轉軸學習控制單元11. . . Rotary axis learning control unit

12...進給軸學習控制單元12. . . Feed axis learning control unit

20...同步誤差計算模組20. . . Synchronous error calculation module

21...位置檢知器twenty one. . . Position detector

22...位置檢知器twenty two. . . Position detector

30...反饋模組30. . . Feedback module

31...旋轉軸反饋單元31. . . Rotary axis feedback unit

32...進給軸反饋單元32. . . Feed axis feedback unit

40...動態模組40. . . Dynamic module

41...旋轉軸動態單元41. . . Rotary axis dynamic unit

42...進給軸動態單元42. . . Feed axis dynamic unit

圖1係本發明剛性攻牙之局部強化學習控制方法之流程方塊圖。1 is a block diagram showing the flow of a local enhanced learning control method for rigid tapping of the present invention.

圖2係本發明剛性攻牙之局部強化學習控制方法之操作流程方塊圖。2 is a block diagram showing the operation flow of the local enhanced learning control method for rigid tapping of the present invention.

圖3係本發明設定固定學習效率之同步誤差與時間之關係圖。Figure 3 is a graph showing the relationship between the synchronization error and the time for setting the fixed learning efficiency of the present invention.

圖4係本發明設定非固定學習效率之同步誤差與時間之關係圖。Figure 4 is a graph showing the relationship between the synchronization error and the time for setting the non-fixed learning efficiency of the present invention.

圖5係現有剛性攻牙機旋轉軸轉速與時間之關係圖。Figure 5 is a graph showing the relationship between the rotational speed of a conventional rigid tapping machine and the time.

圖6係現有剛性攻牙機旋轉軸同步誤差與時間之關係圖。Fig. 6 is a graph showing the relationship between the synchronization error of the rotating shaft of the conventional rigid tapping machine and time.

Claims (4)

一種剛性攻牙之局部強化學習控制方法,包含有:裝置設置:於一剛性攻牙機上設置一學習模組、一同步誤差計算模組、一反饋模組及一動態模組,該學習模組係設有一旋轉軸學習控制單元及一進給軸學習控制單元,該同步誤差計算模組係與該學習模組及該剛性攻牙機相連接且設有兩位置檢知器,兩位置檢知器係分別連接至該剛性攻牙中心機的旋轉軸及進給軸,藉以獲得該剛性攻牙機旋轉軸及進給軸的位置,該反饋模組係與該學習模組相連接且設有一旋轉軸反饋單元及一進給軸反饋單元,該旋轉軸反饋單元係與該旋轉軸學習控制單元相連接,而該進給軸反饋單元係與該進給軸學習控制單元相連接,該動態模組係與該反饋模組相連接且設有一旋轉軸動態單元及一進給軸動態單元,該旋轉軸動態單元係與該旋轉軸反饋單元及該旋轉軸相連接,而該進給軸動態單元係與該進給軸反饋單元及該進給軸相連接;取得控制命令:由該旋轉軸學習控制單元及進給軸學習控制單元分別取得該剛性攻牙機旋轉軸及進給軸的控制命令,將兩控制命令分別依序地輸出至該反饋單元及該動態單元;計算誤差:該同步誤差計算模組透過兩位置檢知器獲得兩軸目前的實際位置,經由該反饋模組及該動態模組得到兩軸的控制命令,計算出兩軸的位置誤差,再依據該旋轉軸及該進給軸的位置誤差計算出本次的同步誤差;以及計算修正量:將前述步驟所計算出的同步誤差分別輸出至該旋轉軸學習控制單元及該進給軸學習控制單元,依據該同步誤差及控制命令計算出一學習命令修正量,於下一次控制命令輸入時,以該學習命令修正量修正該控制命令,如此重覆執行直到獲得符合要求的精度,其中該學習模組針對每個取樣時間設定不同的學習速率。A local reinforcement learning control method for rigid tapping includes: device setting: setting a learning module, a synchronous error calculating module, a feedback module and a dynamic module on a rigid tapping machine, the learning module The group is provided with a rotary axis learning control unit and a feed axis learning control unit. The synchronous error calculation module is connected with the learning module and the rigid tapping machine and is provided with a two-position detector, and two position detection The sensing device is respectively connected to the rotating shaft and the feeding shaft of the rigid tapping center machine, so as to obtain the position of the rigid tapping machine rotating shaft and the feeding shaft, the feedback module is connected with the learning module and is provided a rotary axis feedback unit and a feed axis feedback unit are coupled to the rotary axis learning control unit, and the feed axis feedback unit is coupled to the feed axis learning control unit, the dynamic The module is connected to the feedback module and is provided with a rotating shaft dynamic unit and a feed axis dynamic unit, and the rotating shaft dynamic unit is connected to the rotating shaft feedback unit and the rotating shaft, and the feeding a dynamic unit is connected to the feed axis feedback unit and the feed axis; and a control command is obtained: the rotary axis learning control unit and the feed axis learning control unit respectively obtain the rigid tapping machine rotation axis and the feed axis Controlling the command, sequentially outputting the two control commands to the feedback unit and the dynamic unit; calculating error: the synchronous error calculation module obtains the current actual position of the two axes through the two-position detector, and the feedback module and The dynamic module obtains two-axis control commands, calculates the position error of the two axes, and calculates the current synchronization error according to the rotation axis and the position error of the feed axis; and calculates the correction amount: the calculation by the foregoing steps The synchronization error is output to the rotation axis learning control unit and the feed axis learning control unit respectively, and a learning command correction amount is calculated according to the synchronization error and the control command, and is corrected by the learning command when the next control command is input. Correcting the control command, repeating the execution until the required accuracy is obtained, wherein the learning module is set for each sampling time Different learning rates. 如請求項1所述之剛性攻牙之局部強化學習控制方法,其中在裝置設置的操作步驟中,該旋轉軸學習控制單元係設有一旋轉軸學習程序,用以產生一旋轉軸控制命令,而該進給軸學習控制單元係設有一進給軸學習程序,用以產生一進給軸控制命令,而在計算修正量的操作步驟中,當同步誤差分別輸出至該旋轉軸學習控制單元及該進給軸學習控制單元時,執行該旋轉軸學習程序及該進給軸學習程序,藉以依據該同步誤差及控制命令計算出一學習命令修正量。The local reinforced learning control method for rigid tapping according to claim 1, wherein in the operation step of the device setting, the rotary axis learning control unit is provided with a rotary axis learning program for generating a rotary axis control command, and The feed axis learning control unit is provided with a feed axis learning program for generating a feed axis control command, and in the operation step of calculating the correction amount, when the synchronization error is respectively output to the rotary axis learning control unit and the When the feed axis learning control unit executes the rotation axis learning program and the feed axis learning program, a learning command correction amount is calculated based on the synchronization error and the control command. 如請求項2所述之剛性攻牙之局部強化學習控制方法,其中於計算修正量的操作步驟中,於非加減速區設定一學習速率為1/0.7,而於加減速區設定一學習速率為1/0.3。The local reinforcement learning control method for rigid tapping according to claim 2, wherein in the operation step of calculating the correction amount, a learning rate is set to 1/0.7 in the non-acceleration/deceleration region, and a learning rate is set in the acceleration/deceleration region. It is 1/0.3. 如請求項1所述之剛性攻牙之局部強化學習控制方法,其中於計算修正量的操作步驟中,於非加減速區設定一學習速率為1/0.7,而於加減速區設定一學習速率為1/0.3。The local reinforcement learning control method for rigid tapping according to claim 1, wherein in the operation step of calculating the correction amount, a learning rate is set to 1/0.7 in the non-acceleration/deceleration region, and a learning rate is set in the acceleration/deceleration region. It is 1/0.3.
TW100126570A 2011-07-27 2011-07-27 Locally reinforced learning control for rigid tapping TWI451932B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW100126570A TWI451932B (en) 2011-07-27 2011-07-27 Locally reinforced learning control for rigid tapping

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW100126570A TWI451932B (en) 2011-07-27 2011-07-27 Locally reinforced learning control for rigid tapping

Publications (2)

Publication Number Publication Date
TW201304901A TW201304901A (en) 2013-02-01
TWI451932B true TWI451932B (en) 2014-09-11

Family

ID=48168935

Family Applications (1)

Application Number Title Priority Date Filing Date
TW100126570A TWI451932B (en) 2011-07-27 2011-07-27 Locally reinforced learning control for rigid tapping

Country Status (1)

Country Link
TW (1) TWI451932B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI598168B (en) * 2016-11-03 2017-09-11 財團法人工業技術研究院 Control method for screw tap

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1647881A (en) * 2004-01-30 2005-08-03 发那科株式会社 Threading/tapping control apparatus
CN2936560Y (en) * 2006-08-10 2007-08-22 重庆长安汽车股份有限公司 Control circuit of automatic tapping mechanism
TWI288680B (en) * 2005-05-20 2007-10-21 Future Power Technology Co Ltd Tapping apparatus capable of synchronously manufacturing different aperture diameters
TWM351128U (en) * 2008-09-15 2009-02-21 Ping-Dong Zhan Slipping base assembly of main axle of servo motor
CN201201080Y (en) * 2008-06-20 2009-03-04 重庆工学院 Self-tapping apparatus
US7559727B2 (en) * 2002-10-28 2009-07-14 Amada Company Limited Tapping method and device, and punch press
JP4361071B2 (en) * 2005-07-08 2009-11-11 ファナック株式会社 Servo control device
TWM371596U (en) * 2009-06-25 2010-01-01 Liang Lih Machine Co Ltd Structure of numerically-controlled drilling machine
CN101377669B (en) * 2008-09-24 2010-12-08 济南二机床集团有限公司 Method for knife-breaking and return withdrawing of deep hole rigid tapping
CN201702473U (en) * 2010-05-20 2011-01-12 贵州航天精工制造有限公司 Automatic tapping device
JP2011073070A (en) * 2009-09-29 2011-04-14 Brother Industries Ltd Numeric value control device, control program of numeric value control device and storage medium
CN102029446A (en) * 2009-09-29 2011-04-27 兄弟工业株式会社 Numerical control device

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7559727B2 (en) * 2002-10-28 2009-07-14 Amada Company Limited Tapping method and device, and punch press
CN102091938A (en) * 2002-10-28 2011-06-15 株式会社阿玛达 Tapping method and device, and punch press
JP2005216135A (en) * 2004-01-30 2005-08-11 Fanuc Ltd Threading/tapping controller
CN1647881A (en) * 2004-01-30 2005-08-03 发那科株式会社 Threading/tapping control apparatus
TWI288680B (en) * 2005-05-20 2007-10-21 Future Power Technology Co Ltd Tapping apparatus capable of synchronously manufacturing different aperture diameters
JP4361071B2 (en) * 2005-07-08 2009-11-11 ファナック株式会社 Servo control device
CN1892523B (en) * 2005-07-08 2010-10-27 发那科株式会社 Servo controller
CN2936560Y (en) * 2006-08-10 2007-08-22 重庆长安汽车股份有限公司 Control circuit of automatic tapping mechanism
CN201201080Y (en) * 2008-06-20 2009-03-04 重庆工学院 Self-tapping apparatus
TWM351128U (en) * 2008-09-15 2009-02-21 Ping-Dong Zhan Slipping base assembly of main axle of servo motor
CN101377669B (en) * 2008-09-24 2010-12-08 济南二机床集团有限公司 Method for knife-breaking and return withdrawing of deep hole rigid tapping
TWM371596U (en) * 2009-06-25 2010-01-01 Liang Lih Machine Co Ltd Structure of numerically-controlled drilling machine
JP2011073070A (en) * 2009-09-29 2011-04-14 Brother Industries Ltd Numeric value control device, control program of numeric value control device and storage medium
CN102029446A (en) * 2009-09-29 2011-04-27 兄弟工业株式会社 Numerical control device
CN201702473U (en) * 2010-05-20 2011-01-12 贵州航天精工制造有限公司 Automatic tapping device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
趙若嵐,「剛性攻牙學習控制與實驗驗證」,國立中正大學工學院機械工程學系碩士論文 中華民國99年6月30日 *

Also Published As

Publication number Publication date
TW201304901A (en) 2013-02-01

Similar Documents

Publication Publication Date Title
US10005165B2 (en) Device and method of controlling machine tool, to control synchronized operation of spindle axis and feed axis
US8662799B2 (en) Tapping machine
JP6034913B2 (en) Machine tool control apparatus and control method for controlling synchronous operation of main shaft and feed shaft
JP4335123B2 (en) Control device
US20150081084A1 (en) Numerical control device
JPH0569275A (en) Numerical control device
CN103123477B (en) Shaft motion control method based on double feedbacks of motor and machine tool location
CN103488189B (en) Control method of servo motor
US9753452B2 (en) Device and method of controlling machine tool, to control synchronized operation of spindle axis and feed axis
JP6001633B2 (en) Machine tool control apparatus and control method for controlling synchronous operation of main shaft and feed shaft
JP2005313280A (en) Numerical control device
TWI451932B (en) Locally reinforced learning control for rigid tapping
CN107615195B (en) Method for tapping threaded hole, numerical control machine tool and numerical control machining device
CN105929791B (en) The direct contour outline control method of plane rectangular coordinates kinematic system
JP5077483B2 (en) Numerical controller
TWI454335B (en) Learning control system for simultaneously reduction in process time and machining errors
JP5460371B2 (en) Numerical controller
JP2014002461A (en) Numerical control device
JP5334932B2 (en) Parameter setting method and parameter setting device
JP2010201571A (en) Method and device for reworking variable pitch screw
JPS63251121A (en) Screw machining device
JP5890275B2 (en) High-speed synchronous axis position controller
JP5732289B2 (en) Machine Tools
WO2023026368A1 (en) Numerical control device and storage medium
WO2024033976A1 (en) Numerical control device