Controller with parameter learning and the parametric learning method thereof of mechanical hook-up
Technical field
The invention relates to the numerical controller in a kind of CNC mechanical hook-up, particularly relevant for a kind of controller of the CNC mechanical hook-up with parameter learning function and the control method of parameter learning thereof; Can be according to the preference of user for processing characteristics, through parametric learning method, the parameter of modulation mechanical hook-up, reach and shorten process time, promote machining precision, improve the effect of mechanical hook-up processing stability.
Background technology
At first, please refer to Fig. 1, is a kind of numerical controller block schematic diagram of known CNC mechanical hook-up.As shown in Figure 1, digital control module 10 is made up of institutes such as path planning unit 12, traverse planning unit 13 and interpolating unit 14; Wherein the path planning unit 12, are job sequence 11 deciphers that the user is edited and cook up a machining path; Then, traverse planning unit 13 is the parameters 18 that provide according to digital control module 10, further plans the kinetic characteristic of machining path, as speed, acceleration etc.; Afterwards, after the single-unit data with kinetic characteristic that will finish traverse planning by interpolating unit 14 are done interpolation arithmetic, again order is sent to driver 15; Then, after the order of driver 15 after receiving interpolation, send control signal again to drive and control motor 16; In addition, by each axial location sensing assembly 17, as motor encoder or optics chi, with the motor 16 position feedback data of sensing and pass driver 15 back.
In the operating process of above-mentioned CNC mechanical hook-up, often different with each portion mechanism because of board rigidity, motor characteristics when setting the parameters 18 of digital control module 10, need to test repeatedly by rule of thumb, could set out one group of more suitable parameter 18.So can produce inconvenience, for example: setup parameter needs experienced accent machine personnel, need spend the test and validation repeatedly of many times.
Because known technology is in the use of CNC mechanical hook-up, be to use one group of parameter to be applicable to all process, because the user does not know much have less understanding to parameter, and machining status often changes because of different situations, so the user often can not determine present parameter and whether be fit to just preparing processing to be processed grade, problems such as long, board shake process time can or can not be arranged; In the face of these problems, the user can't adjust parameter voluntarily usually and solve, and needs the personnel of machine works to assist just to have way, causes the sizable puzzlement of user and inconvenience.
Summary of the invention
The object of the present invention is to provide a kind of numerical controller that configuration has the parameter learning function in the CNC mechanical hook-up, by the tool parameter learning function of numerical controller, make that the CNC mechanical hook-up can be more convenient in accent machine and parameter setting.
Another object of the present invention is to provide a kind of numerical controller that configuration has the parameter learning function in the CNC mechanical hook-up, make the personnel of machine works when the CNC mechanical hook-up is transferred machine, can open parameter learning function and operative norm test procedure, make digitial controller record performance indicators such as fast quasi-stationary, and upgrade the parameter of mechanical hook-up automatically via the parameter learning algorithm, make the CNC mechanical hook-up set in accent machine and parameter and can reach processing effect more accurately.
Another purpose of the present invention is to provide a kind of numerical controller that configuration has the parameter learning function in the CNC mechanical hook-up, make the personnel of machine works when the CNC mechanical hook-up is transferred machine, can open parameter learning function and operative norm test procedure, make digitial controller record performance indicators such as fast quasi-stationary, and upgrade the parameter of mechanical hook-up automatically via the parameter learning algorithm, so can be according to the preference of user for processing characteristics, through parametric learning method, the parameter of modulation mechanical hook-up reaches and shortens process time, promote machining precision, improve the effect of mechanical hook-up processing stability.
For achieving the above object, the controller with parameter learning function provided by the invention comprises:
One path planning unit is in order to receive a job sequence and to plan a machining path information according to this job sequence;
One traverse planning unit, one input end is connected with this path planning unit and receives this machining path information, its another input end is connected with a digital control parameter, according to this machining path information and this machining path information of this digital control parametric programming and output movement information;
One interpolating unit is connected with this traverse planning unit, and after the movable information that this traverse planning unit is exported carries out interpolation arithmetic, exports a control command to a motor driver again, in order to drive a motor;
One fast quasi-stationary pointer computing unit, one input end is connected with a location sensing assembly, comprise: a fast pointer calculates sub-cell, surely pointer calculates sub-cell and a steady pointer calculating sub-cell, and receive the feedback signal of this location sensing assembly input, and calculate a fast performance indicators FI respectively according to this feedback signal, surely performance indicators PI and a steady performance indicators, to export a fast quasi-stationary pointer information, wherein, it is when job sequence is carried out the start-up parameter learning functionality that the fast pointer of in this fast quasi-stationary pointer computing unit this calculates sub-cell, each single-unit processing required time T of opening entry
i, and the account form of this fast performance indicators FI is FI=α
F/ Σ
iT
i, and α
FBe fast index constant, it is that a servo command position and this feedback position signal are carried out computing that the accurate pointer of this in this fast quasi-stationary pointer computing unit calculates sub-cell, to calculate relative locus error E
i, and the account form of this accurate performance indicators PI is PI=α
P/ Σ
iE
i, and α
PThe index that is as the criterion constant, it is that this motor acceleration value of feedback signal is carried out calculus of differences that the steady pointer of this in this fast quasi-stationary pointer computing unit calculates sub-cell, to obtain an acceleration change value;
One learning functionality unit, the one first input end receives the fast quasi-stationary weight information of being set by the user, one second input end is connected with this fast quasi-stationary pointer computing unit and receives this fast quasi-stationary pointer information, recomputates new digital control parameter, and exports this traverse planning unit to.
Described controller, wherein this learning functionality unit comprises:
One total performance pointer calculates sub-cell, calculates a total performance index according to this fast quasi-stationary weight information and one of them performance indicators at least of being somebody's turn to do fast performance pointer, this accurate performance indicators or this steady performance indicators;
One results of learning check sub-cell is connected with this total pointer calculating sub-cell that shows, and receives and should always show index to carry out a judgement;
One Jacobi matrix correction sub-cell is connected with this results of learning check sub-cell, and according to the judged result of this results of learning check sub-cell, the performance indicators in the correction Jacobi matrix is to parameter;
One parameter correction sub-cell is connected with this Jacobi matrix correction sub-cell, and sets a parameter learning condition of convergence.
Controller parameter learning method provided by the invention comprises:
Provide a path planning unit, in order to receive a job sequence and to plan a machining path information according to this job sequence;
One traverse planning unit is provided, one input end is connected with this path planning unit and receives this machining path information, its another input end is connected with a digital control parameter, according to this machining path information and this machining path information of this digital control parametric programming and output movement information;
One interpolating unit is provided, is connected with this traverse planning unit and after movable information that this traverse planning unit is exported carries out interpolation arithmetic, exports a control command to motor driver again, in order to drive a motor;
One fast quasi-stationary pointer computing unit is provided, one input end is connected with a location sensing assembly, this fast quasi-stationary pointer computing unit comprises: a fast pointer calculates sub-cell, surely pointer calculates sub-cell and a steady pointer calculating sub-cell, and receive the feedback signal of this location sensing assembly input, and calculate a fast performance indicators FI respectively according to this feedback signal, surely performance indicators PI and a steady performance indicators, to export a fast quasi-stationary pointer information, wherein, it is when job sequence is carried out the start-up parameter learning functionality that the fast pointer of in this fast quasi-stationary pointer computing unit this calculates sub-cell, each single-unit processing required time T of opening entry
i, and the account form of this fast performance indicators FI is FI=α
F/ Σ
iT
i, and α
FBe fast index constant, it is that a servo command position and this feedback position signal are carried out computing that the accurate pointer of this in this fast quasi-stationary pointer computing unit calculates sub-cell, to calculate relative locus error E
i, and the account form of this accurate performance indicators PI is PI=α
P/ Σ
iE
i, and α
PThe index that is as the criterion constant, it is that this motor acceleration value of feedback signal is carried out calculus of differences that the steady pointer of this in this fast quasi-stationary pointer computing unit calculates sub-cell, to obtain an acceleration change value;
One learning functionality unit is provided, the one first input end receives the fast quasi-stationary weight information of being set by the user, one second input end is connected with this fast quasi-stationary pointer computing unit and receives this fast quasi-stationary pointer information, recomputates new digital control parameter, and exports this traverse planning unit to.
Described controller parameter learning method, wherein the algorithm steps of this learning functionality unit comprises:
Provide a total performance pointer to calculate sub-cell, according to this fast quasi-stationary weight information with should fast performance pointer, this accurate performance indicators or this one of them performance indicators of steady performance indicators calculate one and always show index;
One results of learning check sub-cell is provided, calculates sub-cell with total performance pointer and be connected and receive and always to show index to carry out a judgement;
One Jacobi matrix correction sub-cell is provided, is connected with this results of learning check sub-cell and according to the judged result of this results of learning check sub-cell, the performance indicators in the correction Jacobi matrix is to parameter;
One parameter correction sub-cell is provided, is connected with this Jacobi matrix correction sub-cell, and sets a parameter learning condition of convergence.
Described controller parameter learning method, wherein the corrected parameter step of this parameter correction sub-cell comprises:
Determine the target improvement amount of a total performance pointer, if last time learnt the invalid target improvement amount that then reduces, if effectively then do not change target improvement amount;
Determine the direction of modulation parameter, select a parallel total performance index that the gradient direction of parameter is come the modulation parameter;
Determine revised numerical control device parameter, according to the rapid result of first two steps, get parameters correction and with present parameter addition, to draw a revised parameter.
The mode of parameter learning of the present invention can be set the weight of performance indicators such as fast, accurate and stable according to the user, draws up total performance index, and is the target of parameter learning to pursue best total performance index.So major advantage of the present invention comprises:
When 1) transferring machine, operation parameter learning functionality, the parameter after guaranteeing to adjust can make total performance pointer of CNC mechanical hook-up be promoted to goodish degree, and can avoid can not transferring suitable parameter or adjusting machine time situation of a specified duration excessively to take place because lacking experience.
2) the past user runs into the undesirable situation of processing effect, can only change parameter and repeat processing, is not easy very much to solve.By the parameter learning function, can directly import the weight of index preference such as fast quasi-stationary, and not need to change voluntarily parameter, just parameter can be learnt well, improve convenience with deal with problems ageing.
Description of drawings
Fig. 1 is known CNC mechanical hook-up Numerical Control calcspar;
Fig. 2 is job sequence Numerical Control file synoptic diagram;
Fig. 3 is CNC mechanical hook-up Numerical Control calcspar of the present invention;
Fig. 4 is fast quasi-stationary pointer computing module calcspar of the present invention;
Fig. 5 is learning functionality module calcspar of the present invention.
Primary clustering symbol description in the accompanying drawing:
10 digital control modules; 11 job sequences; 12 path planning unit; 13 traverse planning units; 14 interpolating unit; 15 drivers; 16 motors; 17 location sensing assemblies; 18 Numerical Control parameters; 20 fast quasi-stationary pointer computing units; 22 fast pointers calculate sub-cell; 23 accurate pointers calculate sub-cell; 24 steady pointers calculate sub-cell; 25 calculate corresponding fast pointer information; 26 accurate pointer informations; 27 steady pointer informations; 28 fast quasi-stationary pointer informations; 30 learning functionality unit; 31 fast quasi-stationary weight informations; 32 total performance pointers calculate sub-cell; 33 results of learning check sub-cell; 34 Jacobi matrix correction sub-cells; 35 parameter correction sub-cells; w
i: the weight of every performance indicators that the user sets; q
i: every performance indicators; Δ q
i: actual performance indicators variable quantity; Δ q
i': the performance indicators variable quantity of estimating; E: the predictor error of performance indicators variable quantity; P: always show index; Δ P
O: the target improvement amount that always shows pointer; x
j: parameters; Δ x
j: the correction of parameters; (x
j)
r: the r time employed parameters of study; K: the Jacobi of performance indicators and parameter (Jacobian) matrix; Δ K: Jacobi (Jacobian) matrix correction; (K)
r: the r time study employed Jacobi (Jacobian) matrix; k
Ij: each element of Jacobi (Jacobian) matrix.
Embodiment
The present invention at first provides a kind of controller with parameter learning function, comprising: a path planning unit, in order to receiving a job sequence, and plan a machining path information according to job sequence; One traverse planning unit, one input end are connected with the path planning unit and receive machining path information, and its another input end is connected with a digital control parameter, according to machining path information and digital control parametric programming machining path information output movement information; One interpolating unit is connected with the traverse planning unit, and after the movable information that the traverse planning unit is exported carries out interpolation arithmetic, exports a control command to motor driver again; One fast quasi-stationary pointer computing unit, one input end is connected with a location sensing assembly, and the feedback signal of receiving position sensing component input, and calculate fast performance pointer, accurate performance indicators and steady performance indicators respectively according to feedback signal, to export a fast quasi-stationary pointer information; One learning functionality unit, its first input end receives the fast quasi-stationary weight information of setting by with the person, its second input end is connected with fast quasi-stationary pointer computing unit and receives the fast quasi-stationary pointer information, recomputates new digital control parameter, and exports the traverse planning unit to.
The present invention then provides a kind of parametric learning method of controller, comprising: a path planning unit is provided, in order to receiving a job sequence, and plans a machining path information according to job sequence; One traverse planning unit is provided, one input end is connected with the path planning unit and receives machining path information, its another input end is connected with a digital control parameter, according to machining path information and this digital control parametric programming machining path information output movement information; One interpolating unit is provided, is connected with the traverse planning unit, and after the movable information that the traverse planning unit is exported carries out interpolation arithmetic, export a control command to motor driver again; One fast quasi-stationary pointer computing unit is provided, one input end is connected with a location sensing assembly, and the feedback signal of receiving position sensing component input, and calculate fast performance pointer, accurate performance indicators and steady performance indicators respectively according to feedback signal, to export a fast quasi-stationary pointer information; One learning functionality unit is provided, its first input end receives the fast quasi-stationary weight information of setting by with the person, its second input end is connected with fast quasi-stationary pointer computing unit and receives the fast quasi-stationary pointer information, recomputates new digital control parameter, and exports this traverse planning unit to.
Because the present invention discloses a kind of numerical control device and control method thereof with parameter learning function, make numerical control device can import parameter learning function control mechanical hook-up, therefore, in the following description, implement the method for parameter learning function with describing numerical control device in detail.
At first, please refer to Fig. 2, is the synoptic diagram with CNC mechanical hook-up Numerical Control file (NC File) of learning functionality.As shown in Figure 2, the processing single-unit that the G90G01Z-5.F2000 representative is general, wherein, G90 represents absolute order, and G01 represents the linear interpolation instruction, and the Z independent variable is set the single-unit terminal point coordinate, and the cutting feed rate is set in the F2000 representative; And G5.7P1QnRnKn represents the start-up parameter learning functionality, and wherein, Pn sets study to n group high speed and super precision parameter, and the QnRnKn representative set fast (Q), accurate (
R), steady (
K) weight, for example: P1Q1R1K1 is representative study to the 1st group of high speed and super precision parameter and to set fast, accurate and stable weight be 1: 1: 1; And the processing single-unit that the G01.X0.Y10./X30.Y20. representative has learning functionality, wherein, X, Y independent variable are set the single-unit terminal point coordinate; The G5.5 representative finishes (or closing) parameter learning function; G01.X12.Y5. represent general processing single-unit, wherein, X, Y independent variable are set the single-unit terminal point coordinate.
In invention, in the Numerical Control file of the job sequence that the user edits, when picking out the G5.7 sign indicating number, i.e. the program of learning functionality is opened in expression; When picking out the G5.5 sign indicating number, i.e. expression finishes the program of learning functionality.After the program of learning functionality is opened in the job sequence execution, just can record performance indicators such as fast, accurate and stable, through the parameter learning algorithm, will obtain one group and satisfy best total parameter that shows index " P ".Clearly, learning functionality of the present invention is can start learning functionality in any time of job sequence or show the end learning functionality; To this, the present invention is not limited.
Then, please refer to Fig. 3, is the function block schematic diagram of numerical controller of the present invention.As shown in Figure 3, numerical controller of the present invention comprises digital control module 10, location sensing assembly 17, fast quasi-stationary pointer computing unit 20 and learning functionality unit 30; Wherein, digital control module 10 is made up of with interpolating unit 14 path planning unit 12, traverse planning unit 13.Location sensing assembly 17 is connected with motor 16, in order to read feedback signal and to import feedback signal into driver and numerical control device; Wherein, location sensing assembly 17 can be motor encoder, optics chi or accelerate rule; And this feedback signal can comprise position, speed and the acceleration etc. of motor 16.Then, fast quasi-stationary computing unit 20 is connected with location sensing assembly 17, the feedback signal that can import into according to location sensing assembly 17, and with after the calculating respectively of this feedback signal through fast quasi-stationary computing unit 20, obtain fast pointer information 25, accurate pointer information 26 and steady pointer information 27 respectively; Again these three fast quasi-stationary pointer signals 28 are exported and sent to learning functionality unit 30, use for learning functionality.
Learning functionality unit 30 is connected with fast quasi-stationary computing unit 20, in order to an algorithm to be provided, and the fast quasi-stationary weight information 31 that can set according to the user and the fast quasi-stationary computing unit 20 fast quasi-stationary pointer signal 28 of calculating, after the algorithm calculation by learning functionality unit 30, obtain revised numerical control device parameter 18, use for the processing after the CNC mechanical hook-up.
Then, please refer to Fig. 4, is the block schematic diagram of fast quasi-stationary pointer computing unit of the present invention.As shown in Figure 4, fast quasi-stationary pointer computing unit 20 is connected with feedback signal 21, and this feedback signal 21 can be that the feedback position of motor or optics chi is advised the acceleration value of passing back with acceleration; Fast pointer calculates sub-cell 22 when job sequence is carried out the start-up parameter learning functionality, just can each single-unit processing required time T of opening entry
iSo fast index of the present invention (Fast Index) can be set FI=α for
F/ Σ
iT
i, and α
FBe fast index constant.Accurate pointer calculates sub-cell 23 servo command position and feedback position signal 21 is subtracted each other, and calculates relative locus error E
iSo accurate index of the present invention (Precision Index) can be set as PI=α
P/ Σ
iE
i, and α
PBe fast index constant.Steady pointer calculates the acceleration change value that sub-cell 24 is born by feedback acceleration signal 21 survey bed platforms or workpiece work in-process, perhaps also can be from feedback position signal 21 through difference, the acceleration change value that obtains estimating; Will define the purpose of this steady index especially, be because the variation of acceleration can cause the irregular shake of board; So The present invention be directed to the acceleration time signal, use wavelet conversion (Wavelet Transformation) or fast fourier transform (Fast Fourior Frequency Transformation), convert time signal to frequency signal, therefore can be easy to generate on the frequency of resonance at board, the intensity of monitoring acceleration signal (intensity) is so steady index of the present invention (Stability Index) can be set as SI=α
S/ Σ
iI
i, α wherein
SBe fast index constant, I
iBe the intensity in the monitoring frequency.Calculate sub-cell 22, accurate pointer calculating sub-cell 23 and steady pointer calculating sub-cell 24 by fast pointer and calculate corresponding fast pointer information 25, accurate pointer information 26 and steady pointer information 27, and this three's fast quasi-stationary pointer information 28 is offered the use of learning functionality module.
Clearly, above-mentioned fast pointer calculates sub-cell, accurate pointer calculating sub-cell is according to feedback signal with steady pointer calculating sub-cell, calculates the fast performance pointer of weighing with numeral, accurate performance indicators and steady performance indicators respectively.In addition, to emphasize again also that the present invention only is applicable to and calculates wherein the effect that one to two performance indicators also can reach study, is not limited to calculate the effect that three performance indicators of fast quasi-stationary just can reach study.In addition, because steady performance indicators is relevant with machined surface roughness or surface smoothness, therefore, steady performance indicators also can be described by surfaceness, and this present invention is not limited to steady performance indicators describing mode.
Refer again to Fig. 5, is the block schematic diagram of learning functionality of the present invention unit.Please refer to Fig. 5, learning functionality unit 30 is formed by total performance pointer calculating sub-cell 32, serial connections such as results of learning check sub-cell 33, Jacobi (Jacobian) matrix correction sub-cell 34 and parameter correction sub-cell 35.Fast quasi-stationary weight information 31 among the figure is the fast quasi-stationary performance indicators preference weight " w that set by the user
i", it can be when input of control commands, in the lump by inputing in the control command in the learning functionality module; Wherein, the fast quasi-stationary performance indicators that calculates for aforesaid fast quasi-stationary pointer computing unit 20 of fast quasi-stationary pointer information 28.Fast quasi-stationary pointer information 28 is defined as " q
i" time, then comprise fast quasi-stationary pointer information " q
i" and fast quasi-stationary performance indicators preference weight " w
i" total performance pointer calculate sub-cell 32 and try to achieve total performance index " P " according to Eq (1):
With present total performance index " P " substitution results of learning check sub-cell 33, whether judgement total performance index " P " has improves, and the representative that improves being arranged, and last time study was effective, then learnt effective degree and added 1, flag " L " establishes 1, and stores the last time parameter correction result of study; It is invalid that the representative that do not improve was last time learnt, and then learns invalid number of times and add 1, and flag " L " establishes 0, and the parameter correction result of abandoning last time learning.Wherein, judging whether total performance index " P " has the mode that improves, is with this total performance index " P " that calculates and the preceding total performance index " P that once calculates
-1" compare; For example, as the total performance of total performance index " P " value ratio index " P
-1" value hour when convergence (or), judge that then total performance index " P " improves; Anti-, judge that then total performance index " P " becomes bad.
After the check results of learning, enter Jacobi (Jacobian) matrix correction sub-cell 34, if flag " L " is 1, then revise Jacobi matrix " K "; If flag " L " is 0, it is invalid that expression was last time learnt, and then do not revise Jacobi matrix " K "; Wherein, the modification method of Jacobi matrix " K " is as follows:
Because every performance indicators " q
i" be each parameter " x
j" function, so its variable quantity is:
q
i=f(x
1,…,x
j,…,x
n)
Performance indicators variable quantity " the Δ q that utilizes Eq (2) to calculate to estimate
i' ":
Definition Jacobi matrix " K ":
So available " K " calculates performance indicators variable quantity " the Δ q that estimates
i' ", wherein " K " initial value is that numerical control device estimation in advance is good; Practical manifestation index variable quantity " Δ q
i" index that equals this measurement subtracts the index that last time measured.Because the actual performance indicators variable quantity that measures is different with the performance indicators variable quantity of estimating, therefore with practical manifestation index variable quantity and estimate the performance indicators variable quantity and subtract each other definable performance indicators variable quantity predictor error " e
i":
Can be got correction " the Δ k of each element of Jacobi matrix by Eq (5)
Ij", and upgrade the Jacobi matrix that uses next time according to this:
(K)
r+1=(K)
r+Δk Eq(6)
After revising Jacobi matrix, enter parameter correction sub-cell 35, if flag " L " is 0, expression last time always showed target improvement amount " the Δ P of pointer
O" excessive, it is invalid to cause learning, so reduce target improvement amount " Δ P earlier
O".Learning objective is the extreme value of pursuing total performance index " P ", and when the gradient of the parallel total performance index of the direction of parameter modulation, learning efficiency is the highest, so derive Eq (7) with this:
Wherein,
ΔP=ΔP
O
To improve aim parameter " Δ P
O" with the element " k of Jacobi matrix
Ij" substitution, separate unknown number " C ", with each parameter correction " Δ x
j", namely get and revise back parameter " x
j", use for study next time or processing:
(x
j)
r+1=(x
j)
r+Δx
j Eq(8)
Parameter learning can be set the condition of convergence, for example: the upper limit of study number of times or always show the lower limit of the target improvement amount of pointer.When the condition of convergence takes place, namely the parameter learning function finishes, and carries out processing afterwards all with the parameter of learning to finish, and no longer upgrades or learn new parameter.Clearly, controller and learning method thereof with parameter learning function of the present invention can be according to the preference of user for processing characteristics, through parametric learning method, the parameter of modulation mechanical hook-up reaches and shortens process time, promotes machining precision, improves the effect of mechanical hook-up processing stability.
More than be purpose for illustrating at explanation of the present invention, and be not intended to limit accurate application form of the present invention, made by above instruction that to revise to a certain degree be possible.Therefore, technological thought of the present invention will be decided by the claim scope of application.