The 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 provided according to digital control module 10, further plans the kinetic characteristic of machining path, like speed, acceleration etc.; Afterwards, after the single-unit data with kinetic characteristic that will accomplish 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, like 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 when setting the parameters 18 of digital control module 10 because of board rigidity, motor characteristics, need to test repeatedly by rule of thumb, could set out one group than proper parameters 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 is often because of different situations change, and whether is fit to just to prepare the processing shelves that will handle so the user often is not sure of present parameter, and 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 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,, make that the CNC mechanical hook-up can be more convenient on accent machine and parameter setting by the tool parameter learning function of numerical controller.
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 the fast accurate performance indicators such as steady of digitial controller record, and upgrade the parameter of mechanical hook-up automatically, make the CNC mechanical hook-up can reach processing effect more accurately at accent machine and parameter setting via the parameter learning algorithm.
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 write down performance indicators such as accurate steady soon, 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, promotes machining precision, improves the effect of mechanical hook-up processing stability.
For realizing above-mentioned purpose, 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 accurate steady pointer computing unit; One input end is connected with a location sensing assembly; And receive the feedback signal of this location sensing assembly input, and calculate a fast performance indicators, a performance indicators and a steady performance indicators surely respectively, to export a certainly steady pointer information soon according to this feedback signal;
One learning functionality unit; The one of which first input end receives the steady weight information of being set by the user of fast standard; One of which second input end with should fast accurate steady pointer computing unit is connected and receives should fast standard steady pointer information, recomputate new digital control parameter, and export this traverse planning unit to.
Described controller, wherein this machining path information output movement information comprises: speed and acceleration.
Described controller, wherein this feedback signal comprises position, speed and the acceleration of motor.
Described controller; Wherein should comprise by accurate soon steady pointer computing unit: a fast pointer calculates sub-cell, pointer calculates a sub-cell and a steady pointer calculating sub-cell surely; And, calculate this fast performance indicators, this accurate performance indicators and this steady performance indicators of weighing with numeral respectively according to this feedback signal.
Described controller, this fast pointer calculating sub-cell that wherein is somebody's turn to do in the fast accurate steady pointer computing unit is when job sequence implements the start-up parameter learning functionality, each single-unit of opening entry is processed required time T
i, and the account form of this fast performance indicators FI is FI=α
F/ ∑
iT
i, and α
FBe fast index constant.
Described controller, this accurate pointer calculating sub-cell that wherein is somebody's turn to do in the fast accurate steady pointer computing unit is that a servo command position and this feedback position signal are carried out computing, with calculating 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.
Described controller, this steady pointer calculating sub-cell that wherein is somebody's turn to do in the fast accurate steady pointer computing unit is that this motor acceleration value of feedback signal is carried out calculus of differences, to obtain an acceleration change value.
Described controller, wherein this learning functionality unit comprises:
One total performance pointer calculates sub-cell, calculates a total performance index according to being somebody's turn to do fast accurate steady weight information with 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 Jacobian matrix correction sub-cell is connected with this results of learning check sub-cell, and based on the judged result of this results of learning check sub-cell, the performance indicators in the correction Jacobian 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:
One path planning unit is provided, 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 accurate steady pointer computing unit is provided; One input end is connected and receives the feedback signal of this location sensing assembly input with a location sensing assembly; And calculate a fast performance indicators, a performance indicators and a steady performance indicators surely respectively according to this feedback signal, to export a fast accurate steady pointer information;
One learning functionality unit is provided; The one of which first input end receives the steady weight information of being set by the user of fast standard; One of which second input end with should fast accurate steady pointer computing unit is connected and receives should fast standard steady pointer information, recomputate new digital control parameter, and export 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, foundation is somebody's turn to do fast accurate steady weight information and is somebody's turn to do fast performance pointer, this accurate performance indicators or this one of them performance indicators of steady performance indicators and calculates total index that shows;
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 Jacobian matrix correction sub-cell is provided, is connected with this results of learning check sub-cell and based on the judged result of this results of learning check sub-cell, the performance indicators in the correction Jacobian 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;
The direction of decision modulation parameter selects 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 result of preceding two steps, 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, the operation parameter learning functionality can guarantee that adjusted parameter 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 of lacking experience.
2) the past user runs into the unfavorable situation of processing effect, can only change parameter and repeat processing, is not easy very much to solve.Through the parameter learning function, can directly import the weight of index preferences such as fast standard is steady, and not need to change voluntarily parameter, just can parameter 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 a job sequence Numerical Control file synoptic diagram;
Fig. 3 is a CNC mechanical hook-up Numerical Control calcspar of the present invention;
Fig. 4 is the steady pointer computing module of a fast standard of the present invention calcspar;
Fig. 5 is a 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 accurate steady 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 accurate steady pointer informations; 30 learning functionality unit; 31 fast accurate steady 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 each item performance indicators that the user sets; q
i: each item 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 accurate steady 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 accurate steady pointer information; One learning functionality unit; Its first input end receives the steady weight information of setting by with the person of fast standard; Its second input end is connected with fast accurate steady pointer computing unit and receives fast accurate steady 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, and after the movable information that the traverse planning unit is exported carries out interpolation arithmetic, export a control command to motor driver again with the traverse planning unit; One fast accurate steady 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 accurate steady pointer information; One learning functionality unit is provided; Its first input end receives the steady weight information of setting by with the person of fast standard; Its second input end is connected with fast accurate steady pointer computing unit and receives fast accurate steady 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 following explanation, implement the method for parameter learning function with specifying numerical control device.
At first, please refer to Fig. 2, is the synoptic diagram with CNC mechanical hook-up Numerical Control file (NCFile) of learning functionality.Processing single-unit as shown in Figure 2, 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 and to learn n group high speed and super precision parameter, and the QnRnKn representative set fast (Q), accurate (
R), steady (
K) weight, for example: P1Q1R1K1 is that to learn the 1st group of high speed and super precision parameter and set fast, accurate and stable weight be 1: 1: 1 in representative; 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 write down 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 does not limit.
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 accurate steady pointer computing unit 20 and learning functionality unit 30; Wherein, digital control module 10 is made up of with 14 of interpolating unit 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 quicken rule; And this feedback signal can comprise position, speed and the acceleration etc. of motor 16.Then; Fast accurate steady 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 this feedback signal after the calculating respectively of the steady computing unit 20 of too fast standard, obtain fast pointer information 25, accurate pointer information 26 and steady pointer information 27 respectively; Again these three fast accurate steady pointer signals 28 are exported and seen off to learning functionality unit 30, supply learning functionality to use.
Learning functionality unit 30 is connected with fast accurate steady computing unit 20; In order to an algorithm to be provided; And the steady pointer signal 28 of fast standard that can calculate according to steady weight information 31 of the fast standard that the user sets and fast accurate steady computing unit 20; After the algorithm calculation through learning functionality unit 30, obtain revised numerical control device parameter 18, supply the processing afterwards of CNC mechanical hook-up to use.
Then, please refer to Fig. 4, is the block schematic diagram of the steady pointer computing unit of fast standard of the present invention.As shown in Figure 4, fast accurate steady pointer computing unit 20 is connected with feedback signal 21, and this feedback signal 21 can be the feedback position of motor or optics chi and quicken the acceleration value that rule are passed back; Fast pointer calculates sub-cell 22 when job sequence implements 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 intensity in the monitoring frequency.Calculate sub-cell 22, accurate pointer through fast pointer and calculate sub-cell 23 and steady pointer and calculate sub-cell 24 and calculate corresponding fast pointer information 25, accurate pointer information 26 and steady pointer information 27, and the steady pointer information 28 of this three's fast standard is offered the learning functionality module use.
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 stress 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 steady three performance indicators of fast standard 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 through surfaceness, and this present invention is not limited to steady performance indicators describing mode.
, be the block schematic diagram of learning functionality of the present invention unit please again with reference to figure 5.Please refer to Fig. 5, learning functionality unit 30 is to be 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.The steady weight information 31 of fast standard among the figure is the steady performance indicators preference weight of the fast standard " 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 steady performance indicators of fast standard that calculates for the steady pointer computing unit 20 of aforesaid fast standard of fast accurate steady pointer information 28.Fast accurate steady pointer information 28 is defined as " q
i" time, then comprise the steady pointer information " q of fast standard
i" and fast accurate steady 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 the total performance index " P " and the preceding total performance index " P that is once calculated that this is calculated
-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, get into Jacobi (Jacobian) matrix correction sub-cell 34,, then revise Jacobi matrix " K " if flag " L " is 1; 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 following:
Because each item 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 get 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, get into 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 an 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", promptly get and revise back parameter " x
j", supply study next time or processing to use:
(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, promptly the parameter learning function finishes, and carries out processing afterwards all with the parameter of study completion, 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.
Be the purpose for illustrating to explanation of the present invention more than, and be not intended to limit accurate application form of the present invention, made to a certain degree modification is possible by above instruction.Therefore, technological thought of the present invention will be decided by the claim scope of application.