[go: up one dir, main page]

CN117555292A - Servo drive control method, system, equipment and medium based on cooperative control - Google Patents

Servo drive control method, system, equipment and medium based on cooperative control Download PDF

Info

Publication number
CN117555292A
CN117555292A CN202410040521.3A CN202410040521A CN117555292A CN 117555292 A CN117555292 A CN 117555292A CN 202410040521 A CN202410040521 A CN 202410040521A CN 117555292 A CN117555292 A CN 117555292A
Authority
CN
China
Prior art keywords
control
expected
servo motor
distance
calculating
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202410040521.3A
Other languages
Chinese (zh)
Other versions
CN117555292B (en
Inventor
杨林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Dekeweier Automation Co ltd
Original Assignee
Nanjing Dekeweier Automation Co ltd
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 Nanjing Dekeweier Automation Co ltd filed Critical Nanjing Dekeweier Automation Co ltd
Priority to CN202410040521.3A priority Critical patent/CN117555292B/en
Publication of CN117555292A publication Critical patent/CN117555292A/en
Application granted granted Critical
Publication of CN117555292B publication Critical patent/CN117555292B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/414Structure of the control system, e.g. common controller or multiprocessor systems, interface to servo, programmable interface controller
    • G05B19/4142Structure of the control system, e.g. common controller or multiprocessor systems, interface to servo, programmable interface controller characterised by the use of a microprocessor
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/34Director, elements to supervisory
    • G05B2219/34013Servocontroller
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Control Of Position Or Direction (AREA)

Abstract

The invention provides a servo drive control method, a system, equipment and a medium based on cooperative control, which relate to the technical field of servo drive control and comprise the following steps: acquiring a control expectation of a numerical control machine tool; calculating and analyzing the distance to be moved of the mechanical arm in the numerical control machine tool according to the control expectation; calculating the number of turns and the angle of the servo motor required to rotate according to the expected distance; based on a PID algorithm, calculating and analyzing the expected distance and the actual distance of the mechanical arm; repeatedly analyzing whether the mechanical arm moves to a control expected position; analyzing a control error ratio; the servo drive control method is used for solving the problems that the existing servo drive control technology is insufficient in precision of servo drive control and lacks of an adaptive control method, so that the precision of products produced by a numerical control machine tool is insufficient.

Description

Servo drive control method, system, equipment and medium based on cooperative control
Technical Field
The present invention relates to the field of servo drive control technologies, and in particular, to a servo drive control method, system, device, and medium based on cooperative control.
Background
The servo drive control technology is a motor control technology for realizing accurate position, speed or angle control, and the motor can accurately track a set value by accurately adjusting a drive signal of a servo motor and correct deviation through a feedback mechanism so as to achieve a required control target.
The existing servo drive control technology generally detects the real-time position of the mechanical arm when the mechanical arm of the numerical control machine tool is controlled, when the mechanical arm reaches a control expectation, the mechanical arm is controlled to stop moving, but a control signal has delay property when being transmitted, the generated error is far greater than an acceptable error threshold value, so that the product accuracy of the numerical control machine tool is insufficient, meanwhile, the existing servo drive control technology lacks analysis of error ratio of each control, fault analysis is usually only carried out, the rotating angle of the servo motor is lower than an actual value due to various reasons in the rotating process, the fault analysis is a normal phenomenon, the fault analysis is difficult to distinguish, and the servo motor is difficult to carry out self-adaptive regulation and control, for example, in Chinese patent with publication number CN108762196A, a servo drive, a motion control method, a system, a terminal and the numerical control machine tool of a tail mechanism are disclosed, the scheme lacks analysis of the servo drive control accuracy, the servo motor cannot be self-adaptive controlled to improve the accuracy of the servo drive control, and the existing servo drive control technology lacks precision of the servo drive control method, so that the product accuracy of the numerical control machine tool is insufficient.
Disclosure of Invention
Aiming at the defects existing in the prior art, the invention provides a servo drive control method based on cooperative control, which can acquire control expectations, analyze expected distances through controlling the expects and the current position of a mechanical arm, calculate the number of turns and angles required to rotate by a servo motor according to the expected distances, calculate pulses required to be sent to the servo motor according to the expected numbers of turns and the expected angles so as to achieve the aim of accurate control, analyze the control expectations and the actual positions after the rotation of the servo motor is completed, judge whether the moving position of the mechanical arm is accurate or not, adjust the servo motor if the moving position is inaccurate, record the control expectations and the actual positions adjusted each time, judge the control error ratio of each time of control through analysis, and correct the offset of the pulse requirement of the next control based on the control error ratio of the previous analysis so as to solve the problems that the accuracy of servo drive control is insufficient and the accuracy of products produced by a numerical control machine tool is insufficient due to the lack of a self-adaptive control method.
In order to achieve the above object, in a first aspect, the present invention provides a servo drive control method based on cooperative control, comprising the steps of:
Acquiring a control expectation of a numerical control machine tool;
calculating and analyzing the distance required to move by a mechanical arm in the numerical control machine tool according to a control expectation, and marking the distance as a required distance;
calculating the number of turns and the angle of the servo motor which need to rotate according to the expected distance, respectively marking the number of turns and the expected angle as the expected number of turns and controlling the servo motor to rotate;
after the servo motor rotates an expected circle number and an expected angle, acquiring the actual moving distance of the mechanical arm, marking the actual distance, calculating and analyzing the expected distance and the actual distance of the mechanical arm based on a PID algorithm, judging whether the mechanical arm moves to a control expected position, and outputting a control signal when the mechanical arm does not move to a specified position;
adjusting the servo motor according to the control signal and repeatedly analyzing whether the mechanical arm moves to a control expected position;
and recording the expected distance and the actual distance of the servo motor when the control expectations are updated each time, analyzing the control error ratio, and regulating and controlling the servo motor according to the control error ratio.
Further, the acquisition of control expectations of the numerical control machine tool comprises the following sub-steps:
taking the bottom of a numerical control machine tool as a plane, taking the long side of the plane as an X axis, the short side as a Y axis and the height as a Z axis, and establishing a plane coordinate system;
Acquiring the current control expectation of the numerical control machine, wherein the control expectation is the coordinate which needs to be reached by the current mechanical arm and is recorded as the coordinate of the current mechanical arm,/>,/>)。
Further, according to the control expectation, calculating and analyzing the distance that the mechanical arm in the numerical control machine needs to move comprises the following substeps:
obtaining the current coordinate of the mechanical arm, marking the current coordinate as the current coordinate, and marking the current coordinate as the current coordinate,/>,/>);
Acquiring an abscissa, an ordinate and an ordinate of the current coordinate, and respectively marking the abscissa, the ordinate and the ordinate as the current abscissaCurrent ordinate +.>Current vertical coordinates +.>
Acquiring and controlling the desired abscissa, ordinate and ordinate, respectively marked as the desired abscissaDesired ordinate +.>Desired vertical coordinates +.>
Calculating the distance of the mechanical arm which needs to move transversely, longitudinally and vertically, and marking the distance as the transverse expected distance respectivelyLongitudinal desired distance->Vertical desired distance +.>Transverse barTo the desired distance->Longitudinal desired distance->Vertical desired distance +.>Integrating the marks to a desired distance;
the calculation process is as follows:;/>;/>the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>、/>And +.>Respectively, represent the direction of movement.
Further, calculating the number of turns and the angle of the servo motor to be rotated according to the expected distance comprises the following substeps:
reading a motor configuration database, and acquiring lead of a screw rod of a servo motor and an electronic gear ratio;
Calculating the expected distance, the lead of the screw rod and the electronic gear ratio through a number of turns calculation formula to obtain the expected number of turns;
the number of turns calculation formula is configured as:the method comprises the steps of carrying out a first treatment on the surface of the Wherein Re is the expected number of turns, eg is the electronic gear ratio, le is the expected distance, sd is the lead of the screw rod, and int is the rounding operator;
calculating the expected number of turns through an angle calculation formula to obtain an expected angle;
the angle calculation formula is configured as follows:wherein Ae is the desired angle,% is the modulo operator;
and calculating the pulse demand of the servo motor according to the expected number of turns and controlling the servo motor to rotate.
Further, calculating the pulse demand of the servo motor according to the expected number of turns and controlling the servo motor to rotate comprises the following substeps:
the method comprises the steps of obtaining the resolution of an encoder of a servo motor, and calculating the resolution of the encoder and expected turns through a pulse demand calculation formula to obtain pulse demands, wherein the pulse demands comprise transverse pulse demands, longitudinal pulse demands and vertical pulse demands;
the pulse demand calculation formula is configured to:the method comprises the steps of carrying out a first treatment on the surface of the Wherein Pd is the pulse demand, er is the encoder resolution;
and sending corresponding pulses to the transverse servo motor, the longitudinal servo motor and the vertical servo motor according to pulse requirements so as to cooperatively control the servo motors to rotate.
Further, based on the PID algorithm, calculating and analyzing the expected distance and the actual distance of the mechanical arm, and judging whether the mechanical arm moves to a control expected position comprises the following substeps:
recording the actual number of turns and the actual angle of the rotation of the servo motor through an encoder, calculating the actual position = actual number of turns x 360 degrees + actual angle, and marking the actual position as Ap; calculating a desired position by the formula ad=re×360 ° + Ae, wherein Ad is the desired position;
calculating an |Ap-Ad|, marking the position difference value as a position difference value, comparing the position difference value with a first error threshold value, and outputting an error permission signal if the position difference value is smaller than or equal to the first error threshold value; if the position difference value is larger than the first error threshold value, outputting an error overlarge signal;
if the error is excessive, the servo drive is adjusted.
Further, if the error is excessively large, the servo drive is adjusted, which comprises the following sub-steps:
acquiring a position difference value;
setting a proportional coefficient, an integral coefficient and a differential coefficient, which are respectively marked as Kp, ki and Kd;
counting the position difference value of each adjustment, marking the position difference value as e (k), wherein k is a constant and a positive integer, and setting e (0) as 0;
Calculating the position difference value through a fine tuning pulse formula to obtain fine tuning pulses;
the trimming pulse formula is configured to:
the method comprises the steps of carrying out a first treatment on the surface of the Wherein Uk is a trimming pulse;
and sending the fine adjustment pulse as a control signal to the servo motor to control the servo motor to rotate.
Further, adjusting the servo motor according to the control signal and repeatedly analyzing whether the mechanical arm moves to a control desired position comprises the following sub-steps:
after each fine adjustment, acquiring an actual position of the mechanical arm, wherein the actual position comprises an actual abscissa, an actual ordinate and an actual ordinate;
calculating the difference value between the actual abscissa and the expected abscissa, taking an absolute value, marking the absolute value as a horizontal coordinate difference value, comparing the horizontal coordinate difference value with a second error threshold value, and outputting an accurate horizontal coordinate signal if the horizontal coordinate difference value is smaller than or equal to the second error threshold value; outputting an inaccurate abscissa signal if the difference value of the abscissa is larger than the second error threshold value;
calculating the difference value between the actual ordinate and the expected ordinate, taking an absolute value, marking the absolute value as a ordinate difference value, comparing the ordinate difference value with a second error threshold value, and outputting an ordinate accurate signal if the ordinate difference value is smaller than or equal to the second error threshold value; outputting an inaccurate ordinate signal if the ordinate difference value is larger than the second error threshold value;
Calculating the difference value between the actual vertical coordinate and the expected vertical coordinate, taking an absolute value, marking the absolute value as a vertical coordinate difference value, comparing the vertical coordinate difference value with a second error threshold value, and outputting a vertical coordinate accurate signal if the vertical coordinate difference value is smaller than or equal to the second error threshold value; outputting a vertical coordinate inaccuracy signal if the vertical coordinate difference value is larger than the second error threshold value;
if the abscissa inaccurate signal is output, the transverse servo motor is adjusted again until the abscissa accurate signal is output; if the ordinate inaccurate signal is output, the longitudinal servo motor is adjusted again until the ordinate accurate signal is output; and if the vertical coordinate inaccurate signal is output, the vertical servo motor is adjusted again until the vertical coordinate accurate signal is output.
Further, the recording of the desired distance and the actual distance to the servo motor each time the control desire is updated, and the analyzing the control error ratio comprises the following sub-steps:
establishing a control record database, recording the expected position of the servo motor and the position difference value between the expected position and the actual position when the control expectation is updated each time, marking the position difference value between the expected position and the actual position as a historical control error, and marking the expected position as a historical expectation;
The history control error and the history expectation in the first time before reading are respectively marked as Wn and Sn, wherein n is a positive integer from 1 to the first time;
calculating the historical control error through a control error ratio calculation formula to obtain a control error ratio;
the control error ratio calculation formula is configured as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein Ce is a control error ratio, and Q is a first time;
when the next control expects to update, changing the pulse requirement when the servo motor sends a pulse to pdg=pd× (1+ce); wherein, pdG is the modified pulse demand.
In a second aspect, the invention provides a servo drive control system based on cooperative control, which comprises a data acquisition module, a servo drive control analysis module and a servo motor control module; the data acquisition module and the servo motor control module are respectively connected with the servo drive control analysis module in a data way;
the data acquisition module is used for acquiring control expectations of the numerical control machine tool;
the servo drive control analysis module comprises an expected distance analysis unit, an expected circle number and angle analysis unit, a PID control analysis unit and a control error ratio analysis unit; the expected distance analysis unit is used for calculating and analyzing the distance required to be moved by the mechanical arm in the numerical control machine tool according to control expected, and marking the distance as the expected distance;
The expected number of turns and angle analysis unit is used for calculating the number of turns and the angle of the servo motor which need to rotate according to the expected distance, and the expected number of turns and the expected angle are marked as expected numbers of turns and expected angles respectively;
the PID control analysis unit is used for calculating and analyzing the expected distance and the actual distance of the mechanical arm based on a PID algorithm;
the control error ratio analysis unit is used for analyzing the control error ratio and regulating and controlling the servo motor according to the control error ratio;
the servo motor control module is used for controlling the servo motor.
In a third aspect, the present application provides an electronic device comprising a processor and a memory storing computer readable instructions which, when executed by the processor, perform the steps of the method as described above.
In a fourth aspect, the present application provides a storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method as described above.
The invention has the beneficial effects that: according to the invention, the control expectation is obtained, the expected distance is analyzed through the control expectation and the current position of the mechanical arm, the number of turns and the angle of the servo motor which need to rotate are calculated according to the expected distance, and the pulse which needs to be sent to the servo motor is calculated according to the expected number of turns and the expected angle;
According to the invention, the control expectation and the actual position are analyzed after the rotation of the servo motor is finished, so that whether the moving position of the mechanical arm is accurate or not is judged, and if not, the servo motor is adjusted;
the servo motor is adjusted through the PID algorithm, the current error is adjusted through proportion, all the past errors are adjusted through integration, the next error is predicted through differentiation, and the control signal of fine adjustment is obtained through comprehensive analysis;
the invention monitors and records the control expected and actual position of each adjustment, judges the control error ratio of each control through analysis, and corrects the offset based on the control error ratio of the previous analysis for the pulse demand of the next control.
Additional aspects of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the detailed description of non-limiting embodiments, given with reference to the accompanying drawings in which:
FIG. 1 is a flow chart of the steps of a cooperative control-based servo drive control method of the present invention;
FIG. 2 is a schematic diagram of a planar coordinate system of the present invention;
FIG. 3 is a schematic block diagram of a cooperative control-based servo drive control system of the present invention;
FIG. 4 is a connection block diagram of an electronic device of the present invention;
in the figure: 70. an electronic device; 701. a processor; 702. a memory.
Detailed Description
The invention is further described in connection with the following detailed description, in order to make the technical means, the creation characteristics, the achievement of the purpose and the effect of the invention easy to understand.
Example 1
Referring to fig. 1, in a first aspect, the present invention provides a servo drive control method based on cooperative control, which can obtain a control expectation, analyze an expected distance from a current position of a mechanical arm by controlling the expectation, calculate a number of turns and an angle of a servo motor required to rotate according to the expected distance, calculate a pulse required to be sent to the servo motor according to the expected number of turns and the expected angle, so as to achieve a purpose of precise control, analyze the control expectation and an actual position after the servo motor rotates, determine whether the position of the mechanical arm is accurate, adjust the servo motor if the position is inaccurate, record the control expectation and the actual position adjusted each time, determine a control error ratio of each time of control by analysis, and correct an offset for a pulse requirement of next control based on the control error ratio of previous analysis, so as to solve the problems of insufficient precision of servo drive control and insufficient precision of products produced by a numerical control machine tool caused by lack of a self-adaptive control method.
The servo drive control method based on cooperative control comprises the following steps of S1, obtaining a control expectation of a numerical control machine tool; s2, calculating and analyzing the distance to be moved of the mechanical arm in the numerical control machine tool according to the control expectation; step S3, calculating the number of turns and the angle of the servo motor to be rotated according to the expected distance; s4, calculating and analyzing the expected distance and the actual distance of the mechanical arm based on a PID algorithm; s5, repeatedly analyzing whether the mechanical arm moves to a control expected position; s6, analyzing a control error ratio; the method comprises the following steps:
step S1, obtaining a control expectation of a numerical control machine tool; step S1 comprises the following sub-steps:
referring to fig. 2, step S101, a plane coordinate system is established with the bottom of the numerically-controlled machine tool as a plane, the long side of the plane as an X axis, the short side as a Y axis, and the high side as a Z axis;
step S102, obtaining the current control expectation of the numerical control machine tool, wherein the control expectation is the coordinate which needs to be reached by the current mechanical arm and is recorded as the coordinate,/>,/>);
In particular, the planar coordinate system is as shown in fig. 3, and the control expectation is obtained (433.5,426.8,568.5).
S2, calculating and analyzing the distance required to move by a mechanical arm in the numerical control machine tool according to a control expectation, and marking the distance as a required distance; step S2 comprises the following sub-steps:
Step S201, obtaining the current coordinate of the mechanical arm, marking the current coordinate as the current coordinate, and marking the current coordinate as the current coordinate,/>,/>);
Step S202, acquiring the abscissa, the ordinate and the vertical coordinate of the current coordinate, and marking the abscissa, the ordinate and the vertical coordinate as the current abscissa respectivelyCurrent ordinate +.>Current vertical coordinates +.>
Step S203, acquiring and controlling the desired abscissa, ordinate and ordinate, respectively marked as the desired abscissaDesired ordinate +.>Desired vertical coordinates +.>
Step S204, calculating the distance of the mechanical arm to be moved transversely, longitudinally and vertically, and marking the distance as the transverse expected distance respectivelyLongitudinal desired distance->Vertical desired distance +.>Lateral desired distance->Longitudinal desired distance->Vertical desired distance +.>Integrated tagIs the desired distance;
step S205, the calculation process is:;/>;/>the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>、/>And +.>The positive and negative values of (a) respectively represent the direction of movement, not the numerical value;
in specific implementation, if the current coordinate of the mechanical arm is (226,226,568.5), then226->226->568.5, since the control is desired to be (433.5,426.8,568.5), then +.>433.5->426.8->568.5 by calculation +.>207.5 @>200.8 @, @>Is 0.
Step S3, calculating the number of turns and the angle of the servo motor which need to rotate according to the expected distance, respectively marking the number of turns and the expected angle, and controlling the servo motor to rotate; in practical application, the number of turns and the angle of the servo motor which need to be rotated are calculated according to the expected distance, so that the servo motor can be controlled more accurately, and the mechanical arm movement error is larger because of no delay interference of control signals; step S3 comprises the following sub-steps:
Step S301, a motor configuration database is read, and lead screw leads and electronic gear ratios of a servo motor are obtained;
step S302, calculating the expected distance, the lead of the screw rod and the electronic gear ratio through a number of turns calculation formula to obtain the expected number of turns;
the lap calculation formula is configured as:the method comprises the steps of carrying out a first treatment on the surface of the Wherein Re is the expected number of turns, eg is the electronic gear ratio, le is the expected distance, sd is the lead of the screw rod, and int is the rounding operator;
step S303, calculating the expected number of turns through an angle calculation formula to obtain an expected angle;
the angle calculation formula is configured as:wherein Ae is the desired angle,% is the modulo operator;
in specific implementation, the lead screw lead Sd is 5mm, the electronic gear ratio Eg is 1, and the electronic gear ratio Eg is respectively set for the transverse expected distanceLongitudinal desired distance->Vertical desired distance +.>Calculating to obtain a transverse expected circle number of 41, and further calculating to obtain a transverse expected angle of 180 degrees through an angle calculation formula; the longitudinal expected number of turns is calculated to be 40, the longitudinal expected angle is 57.6 degrees, the vertical expected number of turns is 0, and the vertical expected angle is 0;
step S304, calculating the pulse demand of the servo motor according to the expected number of turns and controlling the servo motor to rotate; in practical application, the pulse signals required by the moving mechanical arm are calculated and analyzed according to the relation between the pulse signals received by the servo motor and the moving distance of the mechanical arm, so that the pulse requirements can be accurately obtained and quantitative pulse signals can be provided, the problem that the servo motor is not stopped in time due to continuous output of the pulse signals, and further the moving position error of the mechanical arm is larger is solved;
Step S304 includes the following sub-steps:
step S3041, obtaining the encoder resolution of a servo motor, and calculating the encoder resolution and the expected number of turns through a pulse demand calculation formula to obtain a pulse demand, wherein the pulse demand comprises a transverse pulse demand, a longitudinal pulse demand and a vertical pulse demand;
the pulse demand calculation formula is configured to:the method comprises the steps of carrying out a first treatment on the surface of the Wherein Pd is the pulse demand, er is the encoder resolution;
step S3042, corresponding pulses are sent to the transverse servo motor, the longitudinal servo motor and the vertical servo motor according to pulse requirements so as to cooperatively control the servo motors to rotate;
in the implementation, if the resolution of the encoder is 3600, the transverse pulse requirement is 149400 through calculation, the longitudinal pulse requirement is 144576 through calculation, and the vertical pulse requirement is 0; 149400 pulse signals are sent to the transverse servo motor, 144576 pulse signals are sent to the longitudinal servo motor, and no pulse signals are sent to the vertical servo motor.
Step S4, after the servo motor rotates an expected circle number and an expected angle, acquiring the actual moving distance of the mechanical arm, marking the actual moving distance as the actual distance, calculating and analyzing the expected distance and the actual distance of the mechanical arm based on a PID algorithm, judging whether the mechanical arm moves to a control expected position, and outputting a control signal when the mechanical arm does not move to a specified position; step S4 comprises the following sub-steps:
Step S401, recording the actual number of turns and the actual angle of the rotation of the servo motor through an encoder, calculating the actual position = actual number of turns x 360 degrees + the actual angle, and marking the actual position as Ap; calculating a desired position by the formula ad=re×360 ° + Ae, wherein Ad is the desired position;
step S402, calculating an absolute value Ap-Ad, marking the absolute value as a position difference value, comparing the position difference value with a first error threshold value, and outputting an error permission signal if the position difference value is smaller than or equal to the first error threshold value; if the position difference value is larger than the first error threshold value, outputting an error overlarge signal;
in specific implementation, the first error threshold is set to 40 degrees, the calculation and analysis process of the longitudinal servo motor and the vertical servo motor is aimed at explaining the calculation and analysis process of the transverse servo motor, the calculation and analysis process of the longitudinal servo motor and the vertical servo motor is the same as that of the transverse servo motor, the actual circle number of the transverse servo motor is recorded to be 41, the actual angle is 60 degrees, the actual position is calculated to be 14820 degrees, the expected position is 14940 degrees, the position difference is further calculated to be 120 degrees, the position difference is obtained through comparison to be larger than the first error threshold, and an error overlarge signal is output;
step S403, if the error is overlarge, adjusting the servo drive; in practical application, because a certain error exists when the servo motor controls the mechanical arm, a certain error can be generated in each fine adjustment, and the moving position of the mechanical arm is difficult to reach a target value due to the accumulation of the errors after multiple fine adjustments, a PID algorithm is adopted to calculate a pulse signal required by each fine adjustment, so that the purpose of accurate control is achieved;
Step S403 includes the following sub-steps:
step S4031, obtaining a position difference value;
step S4032, setting a proportional coefficient, an integral coefficient and a differential coefficient, which are respectively marked as Kp, ki and Kd;
step S4033, counting the position difference value of each adjustment, marking the position difference value as e (k), wherein k is a constant and a positive integer, and setting e (0) as 0;
step S4034, calculating the position difference value through a fine tuning pulse formula to obtain a fine tuning pulse;
the trimming pulse formula is configured as follows:
the method comprises the steps of carrying out a first treatment on the surface of the Wherein Uk is a trimming pulse;
step S4035, the fine adjustment pulse is used as a control signal to be sent to a servo motor to control the servo motor to rotate;
in a specific implementation, kp is set to 0.7, ki is set to 0.2, kd is set to 0.1, the position difference e (k) of this adjustment is 120 °, and if the fine tuning pulse Uk is 1320 through calculation, 1320 pulse signals are sent to the transverse servo motor.
Step S5, adjusting the servo motor according to the control signal and repeatedly analyzing whether the mechanical arm moves to a control expected position; step S5 comprises the following sub-steps:
step S501, after each fine adjustment, acquiring an actual position of the mechanical arm, wherein the actual position comprises an actual abscissa, an actual ordinate and an actual ordinate;
Step S502, calculating the difference value between the actual abscissa and the expected abscissa, taking an absolute value, marking the absolute value as a horizontal coordinate difference value, comparing the horizontal coordinate difference value with a second error threshold value, and outputting an accurate horizontal coordinate signal if the horizontal coordinate difference value is smaller than or equal to the second error threshold value; outputting an inaccurate abscissa signal if the difference value of the abscissa is larger than the second error threshold value;
step S503, calculating the difference value between the actual ordinate and the expected ordinate, taking the absolute value, marking the absolute value as the ordinate difference value, comparing the ordinate difference value with a second error threshold value, and outputting an ordinate accurate signal if the ordinate difference value is smaller than or equal to the second error threshold value; outputting an inaccurate ordinate signal if the ordinate difference value is larger than the second error threshold value;
step S504, calculating the difference value between the actual vertical coordinate and the expected vertical coordinate, taking an absolute value, marking the difference value as a vertical coordinate difference value, comparing the vertical coordinate difference value with a second error threshold value, and outputting a vertical coordinate accurate signal if the vertical coordinate difference value is smaller than or equal to the second error threshold value; outputting a vertical coordinate inaccuracy signal if the vertical coordinate difference value is larger than the second error threshold value;
step S505, if the abscissa inaccurate signal is output, the transverse servo motor is adjusted again until the abscissa accurate signal is output; if the ordinate inaccurate signal is output, the longitudinal servo motor is adjusted again until the ordinate accurate signal is output; if the vertical coordinate inaccurate signal is output, the vertical servo motor is adjusted again until the vertical coordinate accurate signal is output;
In specific implementation, the second error threshold is set to be 1, an actual abscissa is 432.8, an actual ordinate is 427.2, an actual ordinate is 568.5, and the control expectation is 433.5,426.8,568.5, so that a horizontal coordinate difference value is 0.7, a vertical coordinate difference value is 0.4, a vertical coordinate difference value is 0, and a horizontal coordinate difference value is smaller than the second error threshold through comparison, so that an accurate horizontal coordinate signal is output; outputting an accurate ordinate signal if the ordinate difference value is smaller than the second error threshold value; and outputting a vertical coordinate accurate signal if the vertical coordinate difference value is smaller than the second error threshold value.
S6, recording the expected distance and the actual distance of the servo motor when the control expectation is updated each time, analyzing the control error ratio, and regulating and controlling the servo motor according to the control error ratio; in practical application, because of long-term use, different errors may exist in the control of the servo motor on the mechanical arm, the control error ratio of the servo motor can be calculated through the history control error to obtain the error ratio of the control of the servo motor for the last several times, and then the pulse demand is updated according to the control error ratio, so that the mechanical arm can be controlled more accurately; step S6 comprises the following sub-steps:
Step S601, a control record database is established, the expected position of the servo motor and the position difference value between the expected position and the actual position are recorded when the control expectation is updated each time, the position difference value between the expected position and the actual position is marked as a history control error, and the expected position is marked as a history expectation;
step S602, the history control error and the history expectation in the first time before reading are marked as Wn and Sn respectively, wherein n is a positive integer from 1 to the first time;
step S603, calculating the historical control error through a control error ratio calculation formula to obtain a control error ratio;
the control error ratio calculation formula is configured as:the method comprises the steps of carrying out a first treatment on the surface of the Wherein Ce is a control error ratio, and Q is a first time;
step S604, when the next control desires to update, changing the pulse requirement when the servo motor sends a pulse to pdg=pd× (1+ce); wherein, pdG is the modified pulse demand;
in specific implementation, the first time number is set to be 10, the history control error is recorded, the history control error in the first time before reading is the history control difference value in the first time before the current updating control is expected, and the history control error in the first time before the current updating control is not controlled and recorded in the database; the history control differences in the previous first times are 160 degrees, 180 degrees, 130 degrees, 145 degrees, 133 degrees, 124 degrees, 115 degrees, 158 degrees, 172 degrees and 131 degrees in sequence, and the histories are 19240 degrees, 23860 degrees, 17230 degrees, 18863 degrees, 15668 degrees, 14660 degrees, 13245 degrees, 15687 degrees, 19880 degrees and 14336 degrees in sequence; the control error ratio Ce is calculated to be 0.0085, and the calculated result keeps 4 decimal places; when the next time the control expects to update, the pulse requirement is calculated to be 159800, the pulse requirement is updated according to the control error ratio, the updated pulse requirement is 161,158, and the calculation result retains one decimal.
Example 2
Referring to fig. 3, in a second aspect, the present invention provides a servo drive control system based on cooperative control, which includes a data acquisition module, a servo drive control analysis module, and a servo motor control module; the data acquisition module and the servo motor control module are respectively connected with the servo drive control analysis module in a data way;
the data acquisition module is used for acquiring control expectations of the numerical control machine tool;
the data acquisition module is configured with a data acquisition policy comprising:
taking the bottom of a numerical control machine tool as a plane, taking the long side of the plane as an X axis, the short side as a Y axis and the height as a Z axis, and establishing a plane coordinate system;
acquiring the current control expectation of the numerical control machine tool, wherein the control expectation is the coordinate which needs to be reached by the current mechanical arm and is recorded as the coordinate of the current mechanical arm,,/>);
The servo drive control analysis module comprises an expected distance analysis unit, an expected circle number and angle analysis unit, a PID control analysis unit and a control error ratio analysis unit; the expected distance analysis unit is used for calculating and analyzing the distance required to be moved by the mechanical arm in the numerical control machine tool according to control expected, and marking the distance as the expected distance;
the desired distance analysis unit is configured with a desired distance analysis strategy comprising:
Obtaining the current coordinate of the mechanical arm, marking the current coordinate as the current coordinate, and marking the current coordinate as the current coordinate,/>,/>);
Acquiring an abscissa, an ordinate and an ordinate of the current coordinate, and respectively marking the abscissa, the ordinate and the ordinate as the current abscissaCurrent ordinate +.>Current vertical coordinates +.>
Acquiring and controlling the desired abscissa, ordinate and ordinate, respectively marked as the desired abscissaDesired ordinate +.>Desired vertical coordinates +.>
Calculating the distance of the mechanical arm which needs to move transversely, longitudinally and vertically, and marking the distance as the transverse expected distance respectivelyLongitudinal desired distance->Vertical desired distance +.>Lateral desired distance->Longitudinal desired distance->Vertical desired distance +.>Integrating the marks to a desired distance;
the calculation process is as follows:;/>;/>the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>、/>And +.>The positive and negative values of (a) respectively represent the direction of movement, not the numerical value;
the expected number of turns and angle analysis unit is used for calculating the number of turns and the angle of the servo motor which need to rotate according to the expected distance, and the expected number of turns and the expected angle are marked as the expected number of turns and the expected angle respectively;
the expected number of turns and angle analysis unit is configured with an expected number of turns and angle analysis strategy comprising:
reading a motor configuration database, and acquiring lead of a screw rod of a servo motor and an electronic gear ratio;
Calculating the expected distance, the lead of the screw rod and the electronic gear ratio through a number of turns calculation formula to obtain the expected number of turns;
the lap calculation formula is configured as:the method comprises the steps of carrying out a first treatment on the surface of the Wherein Re is the expected number of turns, eg is the electronic gear ratio, le is the expected distance, sd is the lead of the screw rod, and int is the rounding operator;
calculating the expected number of turns through an angle calculation formula to obtain an expected angle;
the angle calculation formula is configured as:wherein Ae is the desired angle,% is the modulo operator;
calculating the pulse demand of the servo motor according to the expected number of turns and controlling the servo motor to rotate;
the method comprises the steps of obtaining the resolution of an encoder of a servo motor, and calculating the resolution of the encoder and expected turns through a pulse demand calculation formula to obtain pulse demands, wherein the pulse demands comprise transverse pulse demands, longitudinal pulse demands and vertical pulse demands;
the pulse demand calculation formula is configured to:the method comprises the steps of carrying out a first treatment on the surface of the Wherein Pd is the pulse demand, er is the encoder resolution;
sending corresponding pulses to the transverse servo motor, the longitudinal servo motor and the vertical servo motor according to pulse requirements so as to cooperatively control the servo motors to rotate;
the PID control analysis unit is used for calculating and analyzing the expected distance and the actual distance of the mechanical arm based on a PID algorithm;
The PID control analysis unit is configured with a PID control analysis strategy, the PID control analysis strategy comprising:
recording the actual number of turns and the actual angle of the rotation of the servo motor through an encoder, calculating the actual position = actual number of turns x 360 degrees + actual angle, and marking the actual position as Ap; calculating a desired position by the formula ad=re×360 ° + Ae, wherein Ad is the desired position;
calculating an |Ap-Ad|, marking the position difference value as a position difference value, comparing the position difference value with a first error threshold value, and outputting an error permission signal if the position difference value is smaller than or equal to the first error threshold value; if the position difference value is larger than the first error threshold value, outputting an error overlarge signal;
if the error is overlarge, adjusting the servo drive;
acquiring a position difference value;
setting a proportional coefficient, an integral coefficient and a differential coefficient, which are respectively marked as Kp, ki and Kd;
counting the position difference value of each adjustment, marking the position difference value as e (k), wherein k is a constant and a positive integer, and setting e (0) as 0;
calculating the position difference value through a fine tuning pulse formula to obtain fine tuning pulses;
the trimming pulse formula is configured as follows:
the method comprises the steps of carrying out a first treatment on the surface of the Wherein Uk is a trimming pulse;
the fine adjustment pulse is used as a control signal to be sent to a servo motor to control the servo motor to rotate;
After each fine adjustment, acquiring an actual position of the mechanical arm, wherein the actual position comprises an actual abscissa, an actual ordinate and an actual ordinate;
calculating the difference value between the actual abscissa and the expected abscissa, taking an absolute value, marking the absolute value as a horizontal coordinate difference value, comparing the horizontal coordinate difference value with a second error threshold value, and outputting an accurate horizontal coordinate signal if the horizontal coordinate difference value is smaller than or equal to the second error threshold value; outputting an inaccurate abscissa signal if the difference value of the abscissa is larger than the second error threshold value;
calculating the difference value between the actual ordinate and the expected ordinate, taking an absolute value, marking the absolute value as a ordinate difference value, comparing the ordinate difference value with a second error threshold value, and outputting an ordinate accurate signal if the ordinate difference value is smaller than or equal to the second error threshold value; outputting an inaccurate ordinate signal if the ordinate difference value is larger than the second error threshold value;
calculating the difference value between the actual vertical coordinate and the expected vertical coordinate, taking an absolute value, marking the absolute value as a vertical coordinate difference value, comparing the vertical coordinate difference value with a second error threshold value, and outputting a vertical coordinate accurate signal if the vertical coordinate difference value is smaller than or equal to the second error threshold value; outputting a vertical coordinate inaccuracy signal if the vertical coordinate difference value is larger than the second error threshold value;
If the abscissa inaccurate signal is output, the transverse servo motor is adjusted again until the abscissa accurate signal is output; if the ordinate inaccurate signal is output, the longitudinal servo motor is adjusted again until the ordinate accurate signal is output; if the vertical coordinate inaccurate signal is output, the vertical servo motor is adjusted again until the vertical coordinate accurate signal is output;
the control error ratio analysis unit is used for analyzing the control error ratio and regulating and controlling the servo motor according to the control error ratio;
the control error ratio analysis unit is configured with a control error ratio analysis strategy including:
establishing a control record database, recording the expected position of the servo motor and the position difference value between the expected position and the actual position when the control expectation is updated each time, marking the position difference value between the expected position and the actual position as a historical control error, and marking the expected position as a historical expectation;
the history control error and the history expectation in the first time before reading are respectively marked as Wn and Sn, wherein n is a positive integer from 1 to the first time;
calculating the historical control error through a control error ratio calculation formula to obtain a control error ratio;
The control error ratio calculation formula is configured as:the method comprises the steps of carrying out a first treatment on the surface of the Wherein Ce is a control error ratio, and Q is a first time;
when the next control expects to update, changing the pulse requirement when the servo motor sends a pulse to pdg=pd× (1+ce); wherein, pdG is the modified pulse demand;
the servo motor control module is used for controlling the servo motor.
Example 3
Referring to fig. 4, in a third aspect, the present application provides an electronic device 70, including a processor 701 and a memory 702, where the memory 702 stores computer readable instructions, and when the computer readable instructions are executed by the processor 701, the steps in the above method are executed. Through the above technical solutions, the processor 701 and the memory 702 are interconnected and communicate with each other through a communication bus and/or other form of connection mechanism (not shown), the memory 702 stores a computer program executable by the processor 701, which when the electronic device 70 is operated, is executed by the processor 701 to perform the method in any of the alternative implementations of the above embodiments to realize the following functions: acquiring a control expectation of a numerical control machine tool; calculating and analyzing the distance to be moved of the mechanical arm in the numerical control machine tool according to the control expectation; calculating the number of turns and the angle of the servo motor required to rotate according to the expected distance; based on a PID algorithm, calculating and analyzing the expected distance and the actual distance of the mechanical arm; repeatedly analyzing whether the mechanical arm moves to a control expected position; and analyzing and controlling the error ratio.
Example 4
In a fourth aspect, the present application provides a storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above method. By the above technical solution, the computer program, when executed by the processor, performs the method in any of the alternative implementations of the above embodiments to implement the following functions: acquiring a control expectation of a numerical control machine tool; calculating and analyzing the distance to be moved of the mechanical arm in the numerical control machine tool according to the control expectation; calculating the number of turns and the angle of the servo motor required to rotate according to the expected distance; based on a PID algorithm, calculating and analyzing the expected distance and the actual distance of the mechanical arm; repeatedly analyzing whether the mechanical arm moves to a control expected position; and analyzing and controlling the error ratio.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein. The storage medium may be implemented by any type or combination of volatile or nonvolatile Memory devices, such as static random access Memory (Static Random Access Memory, SRAM), electrically erasable Programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), erasable Programmable Read-Only Memory (Erasable Programmable Red Only Memory, EPROM), programmable Read-Only Memory (PROM), read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
The above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (12)

1. The servo driving control method based on cooperative control is characterized by comprising the following steps:
acquiring a control expectation of a numerical control machine tool;
calculating and analyzing the distance required to move by a mechanical arm in the numerical control machine tool according to a control expectation, and marking the distance as a required distance;
calculating the number of turns and the angle of the servo motor which need to rotate according to the expected distance, respectively marking the number of turns and the expected angle as the expected number of turns and controlling the servo motor to rotate;
After the servo motor rotates an expected circle number and an expected angle, acquiring the actual moving distance of the mechanical arm, marking the actual distance, calculating and analyzing the expected distance and the actual distance of the mechanical arm based on a PID algorithm, judging whether the mechanical arm moves to a control expected position, and outputting a control signal when the mechanical arm does not move to a specified position;
adjusting the servo motor according to the control signal and repeatedly analyzing whether the mechanical arm moves to a control expected position;
and recording the expected distance and the actual distance of the servo motor when the control expectations are updated each time, analyzing the control error ratio, and regulating and controlling the servo motor according to the control error ratio.
2. The cooperative control-based servo drive control method according to claim 1, wherein the acquisition of the control expectation of the numerical control machine tool includes the sub-steps of:
taking the bottom of a numerical control machine tool as a plane, taking the long side of the plane as an X axis, the short side as a Y axis and the height as a Z axis, and establishing a plane coordinate system;
acquiring the current control expectation of the numerical control machine, wherein the control expectation is the coordinate which needs to be reached by the current mechanical arm and is recorded as the coordinate of the current mechanical arm,,/>)。
3. The cooperative control-based servo drive control method according to claim 2, wherein calculating and analyzing the distance that the robot arm in the numerical control machine needs to move according to the control desire includes the sub-steps of:
Obtaining the current coordinate of the mechanical arm, marking the current coordinate as the current coordinate, and marking the current coordinate as the current coordinate,/>,/>);
Acquiring an abscissa, an ordinate and an ordinate of the current coordinate, and respectively marking the abscissa, the ordinate and the ordinate as the current abscissaCurrent ordinateCurrent vertical coordinates +.>
Acquiring and controlling the desired abscissa, ordinate and ordinate, respectively marked as the desired abscissaDesired ordinateDesired vertical coordinates +.>
Calculating the distance of the mechanical arm which needs to move transversely, longitudinally and vertically, and marking the distance as the transverse expected distance respectivelyLongitudinal desired distance->Vertical desired distance +.>Lateral desired distance->Longitudinal desired distance->Vertical desired distance +.>Integrating the marks to a desired distance;
the calculation process is as follows:;/>;/>the method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>、/>And +.>Respectively, represent the direction of movement.
4. A servo drive control method based on cooperative control according to claim 3, wherein calculating the number of turns and the angle of the servo motor required to rotate according to the desired distance comprises the sub-steps of:
reading a motor configuration database, and acquiring lead of a screw rod of a servo motor and an electronic gear ratio;
calculating the expected distance, the lead of the screw rod and the electronic gear ratio through a number of turns calculation formula to obtain the expected number of turns;
The number of turns calculation formula is configured as:the method comprises the steps of carrying out a first treatment on the surface of the Wherein Re is the expected number of turns, eg is the electronic gear ratio, le is the expected distance, sd is the lead of the screw rod, and int is the rounding operator;
calculating the expected number of turns through an angle calculation formula to obtain an expected angle;
the angle calculation formula is configured as follows:wherein Ae is the desired angle,% is the modulo operator;
and calculating the pulse demand of the servo motor according to the expected number of turns and controlling the servo motor to rotate.
5. The cooperative control-based servo drive control method of claim 4, wherein calculating a pulse demand of the servo motor according to a desired number of turns and controlling the servo motor to rotate comprises the sub-steps of:
the method comprises the steps of obtaining the resolution of an encoder of a servo motor, and calculating the resolution of the encoder and expected turns through a pulse demand calculation formula to obtain pulse demands, wherein the pulse demands comprise transverse pulse demands, longitudinal pulse demands and vertical pulse demands;
the pulse demand calculation formula is configured to:the method comprises the steps of carrying out a first treatment on the surface of the Wherein Pd is the pulse demand, er is the encoder resolution;
and sending corresponding pulses to the transverse servo motor, the longitudinal servo motor and the vertical servo motor according to pulse requirements so as to cooperatively control the servo motors to rotate.
6. The cooperative control-based servo drive control method of claim 5, wherein the calculating and analyzing the expected distance and the actual distance of the robot arm based on the PID algorithm, determining whether the robot arm moves to a control expected position includes the following sub-steps:
recording the actual number of turns and the actual angle of the rotation of the servo motor through an encoder, calculating the actual position = actual number of turns x 360 degrees + actual angle, and marking the actual position as Ap; calculating a desired position by the formula ad=re×360 ° + Ae, wherein Ad is the desired position;
calculating an |Ap-Ad|, marking the position difference value as a position difference value, comparing the position difference value with a first error threshold value, and outputting an error permission signal if the position difference value is smaller than or equal to the first error threshold value; if the position difference value is larger than the first error threshold value, outputting an error overlarge signal;
if the error is excessive, the servo drive is adjusted.
7. The cooperative control-based servo drive control method of claim 6, wherein if the error is excessively large, adjusting the servo drive comprises the sub-steps of:
acquiring a position difference value;
setting a proportional coefficient, an integral coefficient and a differential coefficient, which are respectively marked as Kp, ki and Kd;
Counting the position difference value of each adjustment, marking the position difference value as e (k), wherein k is a constant and a positive integer, and setting e (0) as 0;
calculating the position difference value through a fine tuning pulse formula to obtain fine tuning pulses;
the trimming pulse formula is configured to:
the method comprises the steps of carrying out a first treatment on the surface of the Wherein Uk is a trimming pulse;
and sending the fine adjustment pulse as a control signal to the servo motor to control the servo motor to rotate.
8. The cooperative control-based servo drive control method of claim 7, wherein adjusting the servo motor according to the control signal and repeatedly analyzing whether the robot arm moves to a control desired position comprises the sub-steps of:
after each fine adjustment, acquiring an actual position of the mechanical arm, wherein the actual position comprises an actual abscissa, an actual ordinate and an actual ordinate;
calculating the difference value between the actual abscissa and the expected abscissa, taking an absolute value, marking the absolute value as a horizontal coordinate difference value, comparing the horizontal coordinate difference value with a second error threshold value, and outputting an accurate horizontal coordinate signal if the horizontal coordinate difference value is smaller than or equal to the second error threshold value; outputting an inaccurate abscissa signal if the difference value of the abscissa is larger than the second error threshold value;
calculating the difference value between the actual ordinate and the expected ordinate, taking an absolute value, marking the absolute value as a ordinate difference value, comparing the ordinate difference value with a second error threshold value, and outputting an ordinate accurate signal if the ordinate difference value is smaller than or equal to the second error threshold value; outputting an inaccurate ordinate signal if the ordinate difference value is larger than the second error threshold value;
Calculating the difference value between the actual vertical coordinate and the expected vertical coordinate, taking an absolute value, marking the absolute value as a vertical coordinate difference value, comparing the vertical coordinate difference value with a second error threshold value, and outputting a vertical coordinate accurate signal if the vertical coordinate difference value is smaller than or equal to the second error threshold value; outputting a vertical coordinate inaccuracy signal if the vertical coordinate difference value is larger than the second error threshold value;
if the abscissa inaccurate signal is output, the transverse servo motor is adjusted again until the abscissa accurate signal is output; if the ordinate inaccurate signal is output, the longitudinal servo motor is adjusted again until the ordinate accurate signal is output; and if the vertical coordinate inaccurate signal is output, the vertical servo motor is adjusted again until the vertical coordinate accurate signal is output.
9. The cooperative control-based servo drive control method of claim 8, wherein the recording of the desired distance to the servo motor and the actual distance each time the control desire is updated, analyzing the control error ratio includes the sub-steps of:
establishing a control record database, recording the expected position of the servo motor and the position difference value between the expected position and the actual position when the control expectation is updated each time, marking the position difference value between the expected position and the actual position as a historical control error, and marking the expected position as a historical expectation;
The history control error and the history expectation in the first time before reading are respectively marked as Wn and Sn, wherein n is a positive integer from 1 to the first time;
calculating the historical control error through a control error ratio calculation formula to obtain a control error ratio;
the control error ratio calculation formula is configured as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein Ce is a control error ratio, and Q is a first time;
when the next control expects to update, changing the pulse requirement when the servo motor sends a pulse to pdg=pd× (1+ce); wherein, pdG is the modified pulse demand.
10. A system adapted for use in a cooperative servo drive control method according to any of claims 1 to 9, comprising a data acquisition module, a servo drive control analysis module, and a servo motor control module; the data acquisition module and the servo motor control module are respectively connected with the servo drive control analysis module in a data way;
the data acquisition module is used for acquiring control expectations of the numerical control machine tool;
the servo drive control analysis module comprises an expected distance analysis unit, an expected circle number and angle analysis unit, a PID control analysis unit and a control error ratio analysis unit; the expected distance analysis unit is used for calculating and analyzing the distance required to be moved by the mechanical arm in the numerical control machine tool according to control expected, and marking the distance as the expected distance;
The expected number of turns and angle analysis unit is used for calculating the number of turns and the angle of the servo motor which need to rotate according to the expected distance, and the expected number of turns and the expected angle are marked as expected numbers of turns and expected angles respectively;
the PID control analysis unit is used for calculating and analyzing the expected distance and the actual distance of the mechanical arm based on a PID algorithm;
the control error ratio analysis unit is used for analyzing the control error ratio and regulating and controlling the servo motor according to the control error ratio;
the servo motor control module is used for controlling the servo motor.
11. An electronic device comprising a processor and a memory storing computer readable instructions that, when executed by the processor, perform the steps in the method of any of claims 1-9.
12. A storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any of claims 1-9.
CN202410040521.3A 2024-01-11 2024-01-11 Servo drive control method, system, equipment and medium based on cooperative control Active CN117555292B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410040521.3A CN117555292B (en) 2024-01-11 2024-01-11 Servo drive control method, system, equipment and medium based on cooperative control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410040521.3A CN117555292B (en) 2024-01-11 2024-01-11 Servo drive control method, system, equipment and medium based on cooperative control

Publications (2)

Publication Number Publication Date
CN117555292A true CN117555292A (en) 2024-02-13
CN117555292B CN117555292B (en) 2024-04-09

Family

ID=89823588

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410040521.3A Active CN117555292B (en) 2024-01-11 2024-01-11 Servo drive control method, system, equipment and medium based on cooperative control

Country Status (1)

Country Link
CN (1) CN117555292B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117914223A (en) * 2024-03-20 2024-04-19 淮安致远信息技术有限公司 Control system of servo motor

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB906882A (en) * 1960-05-16 1962-09-26 Westinghouse Electric Corp Digital control apparatus
GB995648A (en) * 1961-03-22 1965-06-23 Licentia Gmbh An arrangement for the numerical control of machines
US4876679A (en) * 1987-02-04 1989-10-24 Matsushita Electric Industrial Co., Ltd. Digitally controlled positioning system for quickly moving and then finely positioning an object
WO1995018925A1 (en) * 1994-01-10 1995-07-13 Sulzer Electronics Ag Process and device for controlling an electric induction machine with a special winding for simultaneously generating a torque and a transverse force therein
WO2021103254A1 (en) * 2019-11-27 2021-06-03 歌尔股份有限公司 Displacement control method, system, servo motor, and storage medium
CN116436356A (en) * 2023-04-25 2023-07-14 中国科学技术大学 Servo motor control system and method based on RSIC-V servo drive chip
CN117047774A (en) * 2023-09-11 2023-11-14 山东大学 Multi-joint hydraulic mechanical arm servo control method and system based on sliding film self-adaption

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB906882A (en) * 1960-05-16 1962-09-26 Westinghouse Electric Corp Digital control apparatus
GB995648A (en) * 1961-03-22 1965-06-23 Licentia Gmbh An arrangement for the numerical control of machines
CH404772A (en) * 1961-03-22 1965-12-31 Licentia Gmbh Arrangement for the numerical control of work machines, in particular machine tools
US4876679A (en) * 1987-02-04 1989-10-24 Matsushita Electric Industrial Co., Ltd. Digitally controlled positioning system for quickly moving and then finely positioning an object
WO1995018925A1 (en) * 1994-01-10 1995-07-13 Sulzer Electronics Ag Process and device for controlling an electric induction machine with a special winding for simultaneously generating a torque and a transverse force therein
WO2021103254A1 (en) * 2019-11-27 2021-06-03 歌尔股份有限公司 Displacement control method, system, servo motor, and storage medium
CN116436356A (en) * 2023-04-25 2023-07-14 中国科学技术大学 Servo motor control system and method based on RSIC-V servo drive chip
CN117047774A (en) * 2023-09-11 2023-11-14 山东大学 Multi-joint hydraulic mechanical arm servo control method and system based on sliding film self-adaption

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴言穗;王瑶为;俞立;王军晓;: "多轴运动控制系统的非线性PID交叉耦合控制", 控制工程, no. 05, 20 May 2020 (2020-05-20) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117914223A (en) * 2024-03-20 2024-04-19 淮安致远信息技术有限公司 Control system of servo motor
CN117914223B (en) * 2024-03-20 2024-05-14 淮安致远信息技术有限公司 Control system of servo motor

Also Published As

Publication number Publication date
CN117555292B (en) 2024-04-09

Similar Documents

Publication Publication Date Title
CN117555292B (en) Servo drive control method, system, equipment and medium based on cooperative control
US6892153B2 (en) Adaptation of compensation data for reducing positioning errors in machine tools and robots
US20140195037A1 (en) Numerical control device
US9715225B2 (en) Numerical controller for smoothing tool path in operation based on table format data
JP4891528B2 (en) Machining time calculation device
US20190266296A1 (en) Machining simulation device of machine tool
CN111687838B (en) Online compensation method, system and storage medium for track following error of manipulator
US11175647B2 (en) Motor controller
US20190317456A1 (en) Adjusting device and adjusting method
US9897992B2 (en) Numerical control apparatus
US11745430B2 (en) Calibration method and build unit
JP4875672B2 (en) Machine Tools
EP0292574A1 (en) Numerical controller
CN116047997A (en) RTCP compensation method and device for numerical control machine tool
KR20130009433A (en) Method and device for compensating position to change tools of a machine tool
US11506489B2 (en) Contour accuracy measuring system and contour accuracy measuring method
CN118192414A (en) Lead screw error compensation method, equipment and medium with motion planning
CN112596378A (en) Coating thickness control method and training method and device of coating thickness control model
CN116560292B (en) Intelligent control method of electric actuating mechanism suitable for remote control
JPH0772913A (en) Error correcting system for machine tool
CN112068490A (en) Trajectory planning method and device, electronic equipment and storage medium
US20230025149A1 (en) Horizontal correction method for detection platform, electronic device, and storage medium
CN114174009B (en) Method, device, system, storage medium and terminal for controlling robot
CN116635800A (en) Numerical control device
CN110968045B (en) Speed control method and device for moving target and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant