Numerical control machine tool processing state monitoring method and device
By acquiring the whitelist trajectory curves and current signals of CNC machine tools, and combining phase angle analysis and model calculation, the problem of non-disturbance monitoring of CNC machine tool processing status is solved, ensuring workpiece accuracy and achieving efficient processing status monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSTITUTE OF INFORMATION ENGINEERING CHINESE ACADEMY OF SCIENCES
- Filing Date
- 2023-06-30
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies make it difficult to monitor the machining status without disturbance during CNC machine tool processing, resulting in abnormal workpiece accuracy and an inability to effectively guarantee dimensional, positional, and shape accuracy.
By acquiring the whitelist trajectory curve after processing the CNC code file, the predicted tool position and current signal at the monitoring time, and using phase angle analysis, preset power consumption and trajectory correlation model and heuristic rules, the contour error of the tool position and the predicted position is calculated to achieve disturbance-free monitoring.
It enables undisturbed monitoring of the machining status of CNC machine tools, ensuring the dimensional, shape, and positional accuracy of workpieces and improving machining quality.
Smart Images

Figure CN116880356B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of CNC machine tool monitoring technology, and in particular to a method and device for monitoring the machining status of CNC machine tools. Background Technology
[0002] Machine tools drive the development and progress of modern industry. With the advancement of computer technology, the application of Numerical Control (NC) technology has fundamentally changed the operation and performance of machine tools, making them more precise and efficient, and significantly improving production efficiency and quality. In the era of the Industrial Internet, various devices and systems are interconnected through networks, achieving seamless integration between supply and demand, and promoting the close integration of production and consumption needs. As a core component of the Industrial Internet, CNC machine tools play a crucial role in this ecosystem.
[0003] However, the critical nature of CNC systems also exposes them to serious risks from industrial viruses and cyberattacks. In recent years, industrial control systems have been continuously attacked. Reports from the Industrial Control System Network Emergency Response Team (ICS-CERT) show a growing number of security incidents involving industrial control systems. The security of CNC systems has become an urgent problem to solve. Industrial viruses and cyberattacks can lead to production interruptions, leaks of sensitive information, machine tool damage, and even personal injury, posing significant risks to normal business operations, trade secrets, and the safety of personnel and property. Therefore, protecting the security and stability of CNC systems and strengthening information security awareness and the implementation of measures are of paramount importance.
[0004] Please refer to the following: Figure 1 In the machining process of Computerized Numerical Control (CNC) machine tools employing higher-precision servo motors, exception injection scripts can tamper with the internal NC code of the CNC machine tool system. For example, they can modify the contents of code blocks N1650 to N1900 in the original NC code, injecting a 1mm exception into the x-axis coordinate. This causes the machining trajectory of the CNC machine tool to deviate, resulting in abnormalities in the dimensional accuracy, positional accuracy, and shape accuracy of the machined workpiece, thus reducing workpiece quality. Currently, image sensors such as cameras or position sensors such as grating rulers and encoders are used for monitoring. However, image sensors such as cameras are difficult to guarantee in terms of accuracy and quality under the influence of chips during CNC machining. Furthermore, position sensors such as grating rulers and encoders require installation by damaging the machine tool body, which has high installation requirements and cannot provide uninterrupted monitoring of the CNC machine tool's machining status. Summary of the Invention
[0005] This invention provides a method and apparatus for monitoring the machining status of CNC machine tools, which solves the problem that the machining status of CNC machine tools cannot be monitored without disturbance when machining workpieces.
[0006] This invention provides a method for monitoring the machining status of a CNC machine tool, comprising:
[0007] Acquire the whitelist trajectory curve after processing the CNC code file in the CNC machine tool, the predicted tool position at the monitoring time, and the current signal at the monitoring time;
[0008] Phase angle analysis is performed on the current signal to obtain the current phase angle sequence at the monitoring time;
[0009] Based on the current phase angle sequence at the monitoring time, the motion stage of the tool in the CNC machine tool is obtained using a preset power consumption and trajectory correlation model.
[0010] By using preset heuristic rules, the position of the tool during its movement phase is estimated, and the tool position in the CNC machine tool is obtained.
[0011] Calculate the shortest distance from the tool position and the predicted tool position to the whitelist trajectory curve, respectively, to obtain the contour error of the tool position and the contour error of the predicted tool position;
[0012] The contour error of the tool position is monitored using the contour error of the predicted tool position, and the monitoring results are obtained.
[0013] According to the present invention, a method for monitoring the machining status of a CNC machine tool is provided, which acquires a whitelist trajectory curve after processing a CNC code file in the CNC machine tool, including:
[0014] Obtain the CNC code file from the CNC machine tool;
[0015] Lexical and syntactic analysis were performed on the CNC code file to obtain a CNC code file with correct lexical and syntactic syntax.
[0016] The coordinates of the desired trajectory points are obtained by parsing the lexical and syntactically correct CNC code file.
[0017] By employing a data sampling interpolation algorithm, the coordinates of the desired trajectory points are densified to obtain multiple desired trajectory coordinates.
[0018] Generate a whitelist trajectory curve based on the desired trajectory coordinates of multiple columns.
[0019] According to the present invention, a method for monitoring the machining status of a CNC machine tool is provided, which obtains the predicted tool position at the monitoring time, including:
[0020] Obtain the tool position for several cycles prior to the monitoring time;
[0021] Input the tool position of several cycles before the monitoring time into the preset target model to obtain the predicted tool position at the monitoring time;
[0022] The preset target model is trained by using the tool position of several cycles prior to the historical moment as the input of the basic model and the tool position of the historical moment as the output.
[0023] According to the present invention, a method for monitoring the machining status of a CNC machine tool, before the step of performing phase angle analysis on the current signal to obtain the current phase angle sequence at the monitoring time, further includes:
[0024] The current signal is denoised and filtered using a low-pass filter to obtain the processed current signal.
[0025] According to the CNC machine tool machining status monitoring method provided by the present invention, the shortest distance from the tool position and the predicted tool position to the whitelist trajectory curve is calculated respectively to obtain the contour error of the tool position and the contour error of the predicted tool position, including:
[0026] Using an iterative method, find the point on the whitelist trajectory curve that has the shortest distance to both the tool position and the predicted tool position;
[0027] Calculate the distance from the tool position to the shortest position point to obtain the contour error of the tool position;
[0028] Calculate the distance from the predicted tool position to the shortest position point to obtain the contour error of the predicted tool position.
[0029] According to a CNC machine tool machining status monitoring method provided by the present invention, the contour error of the tool position is monitored using the contour error of the predicted tool position to obtain the monitoring result, including:
[0030] The contour error of the predicted tool position is used to monitor the contour error of the tool position.
[0031] If the contour error of the predicted tool position is greater than the contour error of the tool position, then the monitoring result of normal machining status is obtained.
[0032] If the contour error of the predicted tool position is less than or equal to the contour error of the tool position, then a monitoring result indicating an abnormal machining state is obtained.
[0033] The present invention also provides a CNC machine tool machining status monitoring device, comprising:
[0034] The acquisition module is used to acquire the whitelist trajectory curve after the CNC code file is processed in the CNC machine tool, the predicted tool position at the monitoring time, and the current signal at the monitoring time;
[0035] The current analysis module is used to perform phase angle analysis on the current signal to obtain the current phase angle sequence at the monitoring time;
[0036] The motion phase acquisition module is used to obtain the motion phase of the tool in the CNC machine tool based on the current phase angle sequence at the monitoring time and using a preset power consumption and trajectory correlation model.
[0037] The estimation module is used to estimate the position of the tool during its movement phase using preset heuristic rules, thereby obtaining the tool position in the CNC machine tool.
[0038] The distance calculation module is used to calculate the shortest distance from the tool position and the predicted tool position to the whitelist trajectory curve, respectively, to obtain the contour error of the tool position and the contour error of the predicted tool position.
[0039] The judgment module is used to monitor the contour error of the tool position by using the contour error of the predicted tool position, and obtain the monitoring result.
[0040] According to the CNC machine tool machining status monitoring device provided by the present invention, the acquisition module is used to acquire the whitelist trajectory curve of the CNC machine tool after processing the CNC code file, including:
[0041] Obtain the CNC code file from the CNC machine tool;
[0042] Lexical and syntactic analysis were performed on the CNC code file to obtain a CNC code file with correct lexical and syntactic syntax.
[0043] The coordinates of the desired trajectory points are obtained by parsing the lexical and syntactically correct CNC code file.
[0044] By employing a data sampling interpolation algorithm, the coordinates of the desired trajectory points are densified to obtain multiple desired trajectory coordinates.
[0045] Generate a whitelist trajectory curve based on the desired trajectory coordinates of multiple columns.
[0046] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the CNC machine tool machining status monitoring method described above.
[0047] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the CNC machine tool machining status monitoring method as described above.
[0048] The CNC machine tool machining status monitoring method and device provided by this invention acquires the whitelist trajectory curve after processing the CNC code file, the predicted tool position at the monitoring time, and the current signal at the monitoring time in the CNC machine tool. After processing the current signal, the tool position in the CNC machine tool is obtained. Then, the shortest distance from the tool position and the predicted tool position to the whitelist trajectory curve is calculated to obtain the contour error of the tool position and the contour error of the predicted tool position. The contour error of the predicted tool position is then used to monitor the contour error of the tool position to obtain the monitoring result. This enables non-disruptive monitoring of the CNC machine tool machining status, thereby enabling the monitoring of the CNC machine tool's machining status on the workpiece to ensure the accuracy of the workpiece's size, shape, and position. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0050] Figure 1 This is a diagram illustrating the abnormal injection of code into the original NC code of a CNC machine tool.
[0051] Figure 2 A flowchart illustrating the CNC machine tool machining status monitoring method provided by this invention.
[0052] Figure 3 This is a schematic diagram of the CNC machine tool machining status monitoring device provided by the present invention.
[0053] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0055] The following is combined Figure 2 The present invention describes a method for monitoring the machining status of a CNC machine tool, comprising:
[0056] S1. Obtain the whitelist trajectory curve after processing the CNC code file in the CNC machine tool, the predicted tool position at the monitoring time, and the current signal at the monitoring time.
[0057] In this embodiment, after obtaining the CNC code file from the CNC machine tool, the whitelist trajectory curve is obtained after preprocessing the CNC code file.
[0058] Simultaneously, the tool position is obtained by acquiring the tool position from several cycles prior to the monitoring time. These tool positions are then input into a preset target model to obtain the predicted tool position at the monitoring time.
[0059] Furthermore, NC code (numerical control code) contains machining information u, such as tool path information and process parameters, including curve type, machining speed information (F code), and other auxiliary information (M, S, T codes). After interpolation in the CNC machine tool system, the machining information u ultimately forms control commands y sent to the actuators. The servo driver drives the servo motor to perform corresponding actions according to the control commands y, thereby changing the physical state s = [d, v, p, r] of the machining process. Where d = [d...]. x d y d z ], d i∈{x,y,z} ∈{0,1} represents the direction of motion of each feed axis. d = 0 represents the feed axis moving towards the origin, and d = 1 represents the feed axis moving away from the origin. v = [v x v y v z ], v i∈{x,y,z} ∈R≥0 represents the motion speed of each feed axis. p=[p x p y p z ], p i∈{x,y,z} ∈R≥0 represents the position of each feed axis. During CNC machining, side-channel signals are generated. This invention first clamps an AC / DC current probe onto the power line between the servo driver and the servo motor to collect the instantaneous values of the three-phase AC current (UVW) of the feed axis motor. Then, a phase current acquisition module is used to collect the phase current on the three-phase power line of the servo motor at the monitoring moment.
[0060] This allows the current signal at the monitoring time to be obtained.
[0061] S2. Perform phase angle analysis on the current signal to obtain the current phase angle sequence at the monitoring time.
[0062] Specifically, for the current signal (phase current) of each feed axis, we first establish a motor coordinate system, taking the a-axis in the three-phase stationary coordinate system as the x-axis. c The axis, whose orthogonal direction is taken as yc Establish a two-phase stationary coordinate system. Then, based on the phase current measurement values at time t, calculate the phase angle of the three-phase current vectors at time t (the monitoring time). t See equations (1) and (2):
[0063]
[0064]
[0065] S3. Based on the current phase angle sequence at the monitoring time, and using a preset power consumption and trajectory correlation model, the motion stage of the tool in the CNC machine tool is obtained. Specifically, the current phase angle sequence A = [angle1, angle2, ..., angle...] is obtained through real-time sampling and calculation. t Substitute this information into the preset power consumption and trajectory correlation model; determine the motion stage of the tool in the CNC machine tool at the monitoring time, where the motion stage includes: acceleration start, smooth operation, and deceleration braking. The preset power consumption and trajectory correlation model includes: calculating the rate of change s = |angle| of the phase angle sequence at time t (historical time). t -angle t-1 If the rate of change s is greater than the preset threshold ε, then the current stage is determined to be either an acceleration start-up stage or a deceleration braking stage; otherwise, the current stage is determined to be a stable operation stage.
[0066] S4. Using preset heuristic rules, estimate the position of the tool during its movement phase to obtain the tool position in the CNC machine tool.
[0067] S5. Calculate the shortest distance from the tool position and the predicted tool position to the whitelist trajectory curve, respectively, to obtain the contour error of the tool position and the contour error of the predicted tool position.
[0068] S6. The contour error of the tool position is monitored using the contour error of the predicted tool position, and the monitoring result is obtained.
[0069] This invention acquires the whitelist trajectory curve after processing the CNC code file in a CNC machine tool, the predicted tool position at the monitoring time, and the current signal at the monitoring time. After processing the current signal, the tool position in the CNC machine tool is obtained. Then, the shortest distance from the tool position and the predicted tool position to the whitelist trajectory curve is calculated to obtain the contour error of the tool position and the contour error of the predicted tool position. The contour error of the predicted tool position is then used to monitor the contour error of the tool position to obtain the monitoring results. This enables non-disruptive monitoring of the machining state of the CNC machine tool, thereby monitoring the machining state of the CNC machine tool on the workpiece to ensure the accuracy of the workpiece's size, shape, and position.
[0070] Based on the above embodiments, the whitelist trajectory curve after processing the CNC code file in the CNC machine tool is obtained, including:
[0071] Obtain the CNC code file from the CNC machine tool.
[0072] Lexical and syntactic analysis were performed on the CNC code file to obtain a CNC code file with correct lexical and syntactic syntax.
[0073] The lexical and syntactic correct CNC code file is parsed to obtain the coordinates of the desired trajectory points. In addition to obtaining the coordinates of the desired trajectory points, the parsing process also yields information such as the motion speed.
[0074] By employing a data sampling and interpolation algorithm, the coordinates of the desired trajectory points are densified to obtain multiple columns of desired trajectory coordinates.
[0075] Generate a whitelist trajectory curve based on the desired trajectory coordinates of multiple columns.
[0076] This invention obtains the CNC code file from the CNC machine tool, parses the CNC code file with correct lexical and syntactic syntax to obtain the coordinates of the desired trajectory points, performs data densification processing on the coordinates of the desired trajectory points to obtain multiple desired trajectory coordinates, and then obtains a standard whitelist trajectory curve based on the whitelist trajectory curve.
[0077] The machining process of each feed axis is decomposed into multiple continuous motions, and then the starting coordinates s of one motion are obtained through analysis. i End point coordinates e i The coordinates of the reverse point r i The equation of the curve for one motion is given in equations (1) to (4).
[0078] s i =[x si y si , z si (1);
[0079] e i =[x ei y ei , z ei (2);
[0080] r i =[x ri y ri , z ri (3);
[0081]
[0082] In the formula, t sLet t represent the starting time of a trajectory. e U represents the endpoint of the trajectory. x (t) represents the position in the X direction at time t, u y (t) represents the position in the Y direction at time t, u z (t) represents the position in the Z direction at time t.
[0083] Based on the above embodiments, the predicted tool position at the monitoring time is obtained, including:
[0084] Obtain the tool position for several cycles prior to the monitoring time.
[0085] Input the tool position of several cycles prior to the monitoring time into the preset target model to obtain the predicted tool position at the monitoring time.
[0086] The preset target model is trained by using the tool position of several cycles prior to the historical moment as the input of the basic model and the tool position of the historical moment as the output.
[0087] Specifically, during basic model training, the instantaneous values of the three-phase AC current (UVW) of the feed axis motor are first acquired using an AC / DC current probe. The AC waveform is sampled at a sampling rate of 200 K / s, and the values acquired by the data acquisition card are stored in a historical database as a CSV file. Then, the historical database is used to model the error of the feed system and obtain a reasonable alarm threshold for the online detection phase. This system uses a Long Short-Term Memory (LSTM) neural network model to capture the feed system's motion command from several cycles prior to the historical moment t, and stores the values from several cycles prior to historical moment t in the historical data. s Tool position P t ,in, P t The tool position at historical moments is used as input to the LSTM model. As output, the following objective function is used as the convergence function to optimize the LSTM model during the training phase. See equation (5):
[0088]
[0089] Where T train This represents the number of samples in the training set.
[0090] Ten feed rates were used during the training sample processing, with increments of 500 mm / min, covering a range of 500-5000 mm / min.
[0091] Based on the above embodiments, before the step of performing phase angle analysis on the current signal to obtain the current phase angle sequence at the monitoring time, the method further includes:
[0092] The current signal is denoised and filtered using a low-pass filter to obtain a processed current signal. This removes data noise and harmonic interference.
[0093] Based on the above embodiments, the shortest distances from the tool position and the predicted tool position to the whitelist trajectory curve are calculated respectively to obtain the contour error of the tool position and the contour error of the predicted tool position, including:
[0094] Using an iterative method, the point on the whitelist trajectory curve that has the shortest distance to both the tool position and the predicted tool position is found. A preset point is selected on the whitelist trajectory curve, and the point on the whitelist trajectory curve that has the shortest distance to both the tool position and the predicted tool position is used as the position point.
[0095] The tool position contour error is obtained by calculating the distance from the tool position to the shortest point; the tool prediction position contour error is obtained by calculating the distance from the predicted tool position to the shortest point. By calculating the shortest distances from both the tool position and the predicted tool position to the whitelist trajectory curve, the obtained tool position contour errors and predicted tool position contour errors are more accurate.
[0096] Specifically, the distance formula is used for calculation, as shown in equation (6):
[0097]
[0098] Among them, e t Refers to the contour error, x q y q z q These are the coordinates of the location point. These are the coordinates of the tool position or the coordinates of the predicted tool position, respectively.
[0099] Based on the above embodiments, the contour error of the tool position is monitored using the contour error of the predicted tool position, and the monitoring results are obtained, including:
[0100] The contour error of the predicted tool position is used to monitor the contour error of the tool position.
[0101] If the contour error of the predicted tool position is greater than the contour error of the tool position, then the monitoring result of normal machining status is obtained.
[0102] If the contour error of the predicted tool position is less than or equal to the contour error of the tool position, then a monitoring result indicating an abnormal machining state is obtained.
[0103] The CNC machine tool machining status monitoring device provided by the present invention is described below. The CNC machine tool machining status monitoring device described below and the CNC machine tool machining status monitoring method described above can be referred to in correspondence.
[0104] Please refer to the following: Figure 3 A CNC machine tool machining status monitoring device includes an acquisition module 310, a current analysis module 320, a motion stage acquisition module 330, an estimation module 340, a distance calculation module 350, and a judgment module 360.
[0105] The acquisition module 310 is used to acquire the whitelist trajectory curve after the CNC code file is processed in the CNC machine tool, the predicted tool position at the monitoring time, and the current signal at the monitoring time.
[0106] The current analysis module 320 is used to perform phase angle analysis on the current signal to obtain the current phase angle sequence at the monitoring time.
[0107] The motion phase acquisition module 330 is used to obtain the motion phase of the tool in the CNC machine tool based on the current phase angle sequence at the monitoring time and using a preset power consumption and trajectory correlation model.
[0108] The estimation module 340 is used to estimate the position of the tool during the movement stage using a preset heuristic rule, and to obtain the tool position in the CNC machine tool.
[0109] The distance calculation module 350 is used to calculate the shortest distance from the tool position and the predicted tool position to the whitelist trajectory curve, respectively, to obtain the contour error of the tool position and the contour error of the predicted tool position.
[0110] The judgment module 360 is used to monitor the contour error of the tool position using the contour error of the predicted tool position, and obtain the monitoring result.
[0111] This invention acquires the whitelist trajectory curve after processing the CNC code file in the CNC machine tool, the predicted tool position at the monitoring time, and the current signal at the monitoring time through the acquisition module 310; the current analysis module 320 obtains the current phase angle sequence at the monitoring time; the motion stage acquisition module 330 obtains the motion stage of the tool in the CNC machine tool; the estimation module 340 obtains the tool position in the CNC machine tool; and the distance calculation module 350 obtains the contour error of the tool position and the contour error of the predicted tool position. This enables non-disruptive monitoring of the machining state of the CNC machine tool, and further enables the monitoring of the accuracy of the CNC machine tool in machining the size, shape, and position of the workpiece.
[0112] The acquisition module is used to acquire the whitelist trajectory curves of the CNC code file after processing in the CNC machine tool, including:
[0113] Obtain the CNC code file from the CNC machine tool.
[0114] Lexical and syntactic analysis were performed on the CNC code file to obtain a CNC code file with correct lexical and syntactic syntax.
[0115] The coordinates of the desired trajectory points are obtained by parsing the lexical and syntactically correct CNC code file.
[0116] By employing a data sampling interpolation algorithm, the coordinates of the desired trajectory points are densified to obtain a series of desired trajectory coordinates as whitelist trajectory curves.
[0117] The acquisition module 310 is used to acquire the predicted tool position at the monitoring time, including:
[0118] Obtain the tool position for several cycles prior to the monitoring time.
[0119] Input the tool position of several cycles prior to the monitoring time into the preset target model to obtain the predicted tool position at the monitoring time.
[0120] The preset target model is trained by using the tool position of several cycles prior to the historical moment as the input of the basic model and the tool position of the historical moment as the output.
[0121] Before the step of performing phase angle analysis on the current signal to obtain the current phase angle sequence at the monitoring time, the current analysis module 320 also includes a processing module.
[0122] The processing module is used to perform noise reduction and filtering on the current signal using a low-pass filter to obtain the processed current signal.
[0123] The judgment module 360 is used to monitor the contour error of the tool position using the contour error of the predicted tool position, and obtain the monitoring result, including:
[0124] The contour error of the predicted tool position is used to monitor the contour error of the tool position.
[0125] If the contour error of the predicted tool position is greater than the contour error of the tool position, then the monitoring result of normal machining status is obtained.
[0126] If the contour error of the predicted tool position is less than or equal to the contour error of the tool position, then a monitoring result indicating an abnormal machining state is obtained.
[0127] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a CNC machine tool machining status monitoring method, which includes:
[0128] S1. Obtain the whitelist trajectory curve after processing the CNC code file in the CNC machine tool, the predicted tool position at the monitoring time, and the current signal at the monitoring time.
[0129] S2. Perform phase angle analysis on the current signal to obtain the current phase angle sequence at the monitoring time.
[0130] S3. Based on the current phase angle sequence at the monitoring time, the motion stage of the tool in the CNC machine tool is obtained using a preset power consumption and trajectory correlation model.
[0131] S4. Using preset heuristic rules, estimate the position of the tool during its movement phase to obtain the tool position in the CNC machine tool.
[0132] S5. Calculate the shortest distance from the tool position and the predicted tool position to the whitelist trajectory curve, respectively, to obtain the contour error of the tool position and the contour error of the predicted tool position.
[0133] S6. The contour error of the tool position is monitored using the contour error of the predicted tool position, and the monitoring result is obtained.
[0134] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0135] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is able to execute the CNC machine tool machining status monitoring method provided by the above methods, the method comprising:
[0136] S1. Obtain the whitelist trajectory curve after processing the CNC code file in the CNC machine tool, the predicted tool position at the monitoring time, and the current signal at the monitoring time.
[0137] S2. Perform phase angle analysis on the current signal to obtain the current phase angle sequence at the monitoring time.
[0138] S3. Based on the current phase angle sequence at the monitoring time, the motion stage of the tool in the CNC machine tool is obtained using a preset power consumption and trajectory correlation model.
[0139] S4. Using preset heuristic rules, estimate the position of the tool during its movement phase to obtain the tool position in the CNC machine tool.
[0140] S5. Calculate the shortest distance from the tool position and the predicted tool position to the whitelist trajectory curve, respectively, to obtain the contour error of the tool position and the contour error of the predicted tool position.
[0141] S6. The contour error of the tool position is monitored using the contour error of the predicted tool position, and the monitoring result is obtained.
[0142] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the CNC machine tool machining status monitoring method provided by the above methods, the method comprising:
[0143] S1. Obtain the whitelist trajectory curve after processing the CNC code file in the CNC machine tool, the predicted tool position at the monitoring time, and the current signal at the monitoring time.
[0144] S2. Perform phase angle analysis on the current signal to obtain the current phase angle sequence at the monitoring time.
[0145] S3. Based on the current phase angle sequence at the monitoring time, the motion stage of the tool in the CNC machine tool is obtained using a preset power consumption and trajectory correlation model.
[0146] S4. Using preset heuristic rules, estimate the position of the tool during its movement phase to obtain the tool position in the CNC machine tool.
[0147] S5. Calculate the shortest distance from the tool position and the predicted tool position to the whitelist trajectory curve, respectively, to obtain the contour error of the tool position and the contour error of the predicted tool position.
[0148] S6. The contour error of the tool position is monitored using the contour error of the predicted tool position, and the monitoring result is obtained.
[0149] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0150] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0151] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for monitoring the machining status of a CNC machine tool, characterized in that, include: Acquire the whitelist trajectory curve after processing the CNC code file in the CNC machine tool, the predicted tool position at the monitoring time, and the three-phase current signal of the motor at the monitoring time; Phase angle analysis was performed on the three-phase current signals to obtain the current phase angle sequence at the monitoring time; Based on the current phase angle sequence at the monitoring time, the motion stages of the tool in the CNC machine tool are obtained using a preset power consumption and trajectory correlation model. The motion stages include acceleration start-up, smooth operation, and deceleration braking stages. By using preset heuristic rules, the position of the tool during its movement phase is estimated, and the tool position in the CNC machine tool is obtained. Calculate the shortest distance from the tool position and the predicted tool position to the whitelist trajectory curve, respectively, to obtain the contour error of the tool position and the contour error of the predicted tool position; The contour error of the tool position is monitored using the contour error of the predicted tool position, and the monitoring result is obtained; If the contour error of the predicted tool position is greater than the contour error of the tool position, then the monitoring result of normal machining status is obtained. If the contour error of the predicted tool position is less than or equal to the contour error of the tool position, then a monitoring result indicating an abnormal machining state is obtained.
2. The method for monitoring the machining status of a CNC machine tool according to claim 1, characterized in that, Obtain the whitelist trajectory curve of the CNC code file after processing in the CNC machine tool, including: Obtain the CNC code file from the CNC machine tool; Lexical and syntactic analysis were performed on the CNC code file to obtain a CNC code file with correct lexical and syntactic syntax. The coordinates of the desired trajectory points are obtained by parsing the lexical and syntactically correct CNC code file. By employing a data sampling interpolation algorithm, the coordinates of the desired trajectory points are densified to obtain multiple desired trajectory coordinates. Generate a whitelist trajectory curve based on the desired trajectory coordinates of multiple columns.
3. The method for monitoring the machining status of a CNC machine tool according to claim 1, characterized in that, Obtain the predicted tool position at the monitoring time, including: Obtain the tool position for several cycles prior to the monitoring time; Input the tool position of several cycles before the monitoring time into the preset target model to obtain the predicted tool position at the monitoring time; The preset target model is trained by using the tool position of several cycles prior to the historical moment as the input of the basic model and the tool position of the historical moment as the output.
4. The method for monitoring the machining status of a CNC machine tool according to claim 1, characterized in that, Before the step of performing phase angle analysis on the current signal to obtain the current phase angle sequence at the monitoring time, the method further includes: The current signal is denoised and filtered using a low-pass filter to obtain the processed current signal.
5. The method for monitoring the machining status of a CNC machine tool according to claim 1, characterized in that, Calculate the shortest distance from the tool position and the predicted tool position to the whitelist trajectory curve, respectively, to obtain the contour error of the tool position and the contour error of the predicted tool position, including: Using an iterative method, find the point on the whitelist trajectory curve that has the shortest distance to both the tool position and the predicted tool position; Calculate the distance from the tool position to the shortest position point to obtain the contour error of the tool position; Calculate the distance from the predicted tool position to the shortest position point to obtain the contour error of the predicted tool position.
6. A CNC machine tool machining status monitoring device, characterized in that, include: The acquisition module is used to acquire the whitelist trajectory curve after the CNC code file is processed in the CNC machine tool, the predicted tool position at the monitoring time, and the three-phase current signal of the motor at the monitoring time; The current analysis module is used to perform phase angle analysis on the three-phase current signals to obtain the current phase angle sequence at the monitoring time; The motion phase acquisition module is used to obtain the motion phase of the tool in the CNC machine tool based on the current phase angle sequence at the monitoring time and using a preset power consumption and trajectory correlation model. The motion phase includes acceleration start-up, smooth operation, and deceleration braking phases. The estimation module is used to estimate the position of the tool during its movement phase using preset heuristic rules, thereby obtaining the tool position in the CNC machine tool. The distance calculation module is used to calculate the shortest distance from the tool position and the predicted tool position to the whitelist trajectory curve, respectively, to obtain the contour error of the tool position and the contour error of the predicted tool position. The judgment module is used to monitor the contour error of the tool position using the contour error of the predicted tool position, and obtain the monitoring result; if the contour error of the predicted tool position is greater than the contour error of the tool position, the monitoring result of normal machining status is obtained; if the contour error of the predicted tool position is less than or equal to the contour error of the tool position, the monitoring result of abnormal machining status is obtained.
7. The CNC machine tool machining status monitoring device according to claim 6, characterized in that, The acquisition module is used to acquire the whitelist trajectory curve of the CNC code file after processing in the CNC machine tool, including: Obtain the CNC code file from the CNC machine tool; Lexical and syntactic analysis were performed on the CNC code file to obtain a CNC code file with correct lexical and syntactic syntax. The coordinates of the desired trajectory points are obtained by parsing the lexical and syntactically correct CNC code file. By employing a data sampling interpolation algorithm, the coordinates of the desired trajectory points are densified to obtain multiple desired trajectory coordinates. Generate a whitelist trajectory curve based on the desired trajectory coordinates of multiple columns.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the CNC machine tool machining status monitoring method as described in any one of claims 1 to 5.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the CNC machine tool machining status monitoring method as described in any one of claims 1 to 5.