Method and apparatus for optimizing feed rate
By collecting machine tool data to identify the dividing points and optimizing the feed rate, the problem of lagging feed rate adjustment in die-casting blank processing was solved, realizing efficient utilization of machine tool performance and protection of cutting tools, and improving processing efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG HONGTU TECHNOLOGY (HOLDINGS) CO LTD
- Filing Date
- 2026-05-20
- Publication Date
- 2026-07-21
AI Technical Summary
When machining die-cast blanks, existing machine tools have conservative feed rate settings and are difficult to automatically adjust according to real-time load, resulting in slow machining speed, increased time consumption, and limited machine tool performance. Furthermore, they cannot effectively cope with real-time dynamic changes in cutting depth and width, affecting machining accuracy and equipment performance.
By collecting machine tool processing data, identifying the dividing points and dividing the cutting sub-intervals, calculating the coefficient of variation to optimize the feed rate, and using the OPC UA protocol to connect with the machine tool, the feed rate of the tool is optimized by adaptive adjustment based on the spindle load power.
It enables precise adjustment of feed rate based on load fluctuations, maximizing machine tool performance, shortening machining time, extending tool life, reducing costs, and improving machining accuracy and efficiency.
Smart Images

Figure CN122425551A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine tool cutting control technology, and more specifically, to a method and apparatus for optimizing feed rate. Background Technology
[0002] As the automotive industry moves towards lightweighting and new energy, aluminum-magnesium alloy die castings have become a core manufacturing component. From traditional engine blocks and gearbox housings to emerging new energy vehicle battery trays and integrated die-cast body structural parts, these components are characterized by large size, thin walls, and complex internal cavities. However, during the die casting process, the geometric dimensional consistency of the blank is often difficult to control precisely due to the impact of high-pressure injection, mold thermal deformation, and differences in cooling shrinkage. In particular, the actual machining allowance in areas such as parting line flash, gate residue, and draft angles often exhibits non-linear dynamic fluctuations. This "thousands of blanks, thousands of faces" state creates an irreconcilable contradiction with the automotive industry's pursuit of extreme production speed and micron-level precision control, posing a severe challenge to existing fixed-parameter machining methods. Facing these large-volume, structurally complex die-cast parts, existing technologies suffer from the following pain points: (1) The parameter setting falls into the contradiction between "conservative" and "aggressive", which restricts the production cycle. Due to the thermal deformation of the die casting mold, the fluctuation of the casting process and the residue of the release agent, the machining allowance of the die casting blank is often inconsistent. In order to prevent the machine from crashing or the tool from breaking due to the sudden increase of local allowance, the process personnel often set the feed rate of the tool based on the harsh working conditions at the maximum allowance. This results in the machine tool having a very low load in most of the "light cutting" strokes, failing to make full use of the equipment potential, resulting in a long single-piece machining cycle, which is difficult to meet the high production capacity delivery requirements of the automotive industry. If an aggressive feed rate is adopted: when encountering casting hard skin or allowance accumulation, the instantaneous increase in cutting force and heat can easily cause the thin-walled die casting to deform or accelerate tool wear, resulting in the critical dimension being out of tolerance; (2) Die castings generally have characteristics such as draft angle, parting surface flash and gate residue, which cause the cutting depth and width to change dynamically in real time when the tool executes the same machining path. However, the traditional G code adopts a rigid constant feed mechanism, that is, one line of instructions corresponds to a fixed feed rate. This mechanism cannot automatically adjust according to real-time load, resulting in the inability to increase speed in low-load sections and the inability to protect against sudden load changes, thus restricting the dynamic performance of high-end CNC machine tools. Summary of the Invention
[0003] This application provides a method and apparatus for optimizing feed rate, which can solve the problem that existing machine tools, when machining ballast blanks, have conservative feed rate settings that are difficult to automatically adjust according to real-time load, resulting in slow machining speeds, increased machining time, and limitations on machine tool performance. To achieve this objective, this application provides the following solutions.
[0004] According to one aspect of the embodiments of this application, a feed rate optimization method is provided, the method comprising: Collect machining data from the machine tool, search for the segmentation points in the machining data, and the segmentation points correspond to the locations where the cutting conditions change abruptly; The cutting sub-intervals are divided using the dividing points, and the optimization coefficients of each cutting sub-interval are calculated based on the coefficients of variation of the cutting sub-intervals, wherein the coefficients of variation are calculated based on the spindle load power of the machine tool. The feed rate of the tool is optimized based on the optimization coefficients.
[0005] In one possible implementation, the acquisition of machine tool machining data includes: A connection with the machine tool is established based on a preset protocol, which includes the OPC UA protocol; Once the connection is confirmed to be successful, the machine tool's machining data is collected at preset intervals. The machining data includes spindle load power, tool number, feed rate, programmed coordinate data, and spindle speed. Store the processing data.
[0006] In one possible implementation, storing the processing data includes: The processing data is cached in a double-ended queue using the acquisition thread; If the main thread detects the end signal of the machine tool's machining, then the background thread writes the data in the double-ended queue into the machining file, and after writing the machining file, the double-ended queue is cleared.
[0007] In one possible implementation, searching for segmentation points in the processed data includes: Non-optimized target instructions in the machining data are filtered out, and the cutting instructions in the machining data are completed to obtain a time-series dataset; The split point is searched based on the time-series dataset.
[0008] In one possible implementation, searching for the segmentation points based on the time-series dataset includes: Substitute the time series data into the target cost function, and use the target cost function to search for the segmentation point; The objective cost function is:
[0009] In the formula, As the dividing point, For the i-th split point, Let be the fitting cost function between the i-th split point and the (i+1)-th split point. Let be the spindle load power corresponding to the i-th segmentation point. is the penalty coefficient, and n is the total number of split points.
[0010] In one possible implementation, the optimization coefficients for each cutting sub-interval are calculated based on the coefficient of variation of the cutting sub-intervals, including: The standard deviation and mean are calculated based on the spindle load power of the cutting sub-interval, and the coefficient of variation is calculated based on the standard deviation and the mean. If the coefficient of variation is determined to be less than or equal to a preset value, then the target power of the cutting sub-interval is obtained, and the optimization coefficient is calculated based on the target power.
[0011] In one possible implementation, the target power is the average power at the top of the cutting sub-interval, and the optimization coefficient is calculated based on the target power, including: The target power is input into the optimization coefficient calculation formula to calculate the optimization coefficient, which is:
[0012] In the formula, To optimize the coefficients, = k is the influence coefficient. For cutting width, Let x be the cutting depth, and y be the influencing factors. Where L is the average power and L is the tool setting. This is the maximum tool setting.
[0013] In one possible implementation, optimizing the tool feed rate based on the optimization coefficient includes: The original feed rate of the tool is obtained based on the machining data; The target feed rate of the tool is calculated based on the original feed rate and the optimization coefficient.
[0014] In one possible implementation, the method includes: Obtain the machining program file of the machine tool and determine the instruction line corresponding to the division point in the machining program file; The instruction line is split according to the coordinates of the split point to obtain the split instruction; The optimized feed rate is mapped to the split command.
[0015] According to one aspect of the embodiments of this application, an electronic device is provided, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described above.
[0016] The beneficial effects of the technical solutions provided in this application are: The feed rate optimization method provided in this application includes: collecting machining data from the machine tool, searching for segmentation points in the machining data, and identifying the locations where abrupt changes occur in the cutting conditions based on these segmentation points; dividing the cutting sub-intervals using these segmentation points, calculating the optimization coefficient for each cutting sub-interval based on the coefficient of variation of the sub-intervals (the coefficient of variation is calculated based on the spindle load power of the machine tool); and optimizing the tool feed rate based on the optimization coefficient. This application's embodiments can accurately identify load fluctuation points during the machining process, and adaptively optimize the feed rate based on these load fluctuation points and the spindle load power. This maximizes the utilization of machine tool performance while ensuring the spindle is not overloaded, significantly shortening machining time, avoiding abnormal tool breakage caused by blindly increasing speed, extending the service life of expensive tools, and reducing the tool consumption cost per unit. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.
[0018] Figure 1 A flowchart of the feed rate optimization method provided in the embodiments of this application; Figure 2 A schematic diagram of a data acquisition interface provided in an embodiment of this application; Figure 3 A schematic diagram of the processing documents provided in the embodiments of this application; Figure 4 This is a schematic diagram of the tool position setting provided in the embodiments of this application; Figure 5 A schematic diagram illustrating the modification record of the processing procedure provided in the embodiments of this application; Figure 6 Comparison diagram of the processing code before and after optimization provided in the embodiments of this application; Figure 7 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0019] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.
[0020] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” indicates implementation as “A,” or implementation as “A,” or implementation as “A and B.”
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0022] The technical solutions of this application and their effects are described below through several exemplary embodiments. It should be noted that the following embodiments can be referenced, borrowed from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0023] The feed rate optimization method and apparatus provided in this application are intended to solve at least one technical problem existing in the prior art.
[0024] In this embodiment, the feed rate optimization method of this application can be used on the server or client side of a machine tool and other devices that can be used for machine tool processing control.
[0025] In one embodiment, the systems housing the server and client can be typical Industrial Internet of Things (IIoT) hardware architectures. The server can be the control system of a CNC machine tool (such as a Siemens 828D / 840D SL or FANUC Oi-MF). The server enables OPC UA service functionality, acting as a data producer and exposing data nodes (NodeIDs) externally via the TCP / IP protocol. The client can be an industrial control computer or an edge computing gateway, which executes the feed rate optimization method of this application and connects to the server via an Ethernet physical link.
[0026] Optionally, such as Figures 1-6As shown, the feed rate optimization method of this application includes: S101: Collects machining data from the machine tool and searches for segmentation points in the machining data.
[0027] Optionally, the split point corresponds to the location where the cutting condition changes abruptly. By identifying the split point, load fluctuation points caused by flash or taper during the cutting process can be identified for feed rate optimization.
[0028] Optionally, the machining data of the machine tool is collected, including: establishing a connection with the machine tool based on a preset protocol, such as the OPC UA protocol; confirming a successful connection; collecting the machining data of the machine tool at preset intervals, including spindle load power, tool number, feed rate, programmed coordinate data, and spindle speed; and storing the machining data. The preset protocol can also be MTConnect (Manufacturing Technology Connect), PROFIBUS / PROFINET, NC-Link, or other types of communication protocols.
[0029] In one embodiment, such as Figure 2 As shown, the client can establish a communication connection with the CNC machine tool server using the OPC UA protocol and display a data acquisition interface after connection. This interface can display real-time acquired machining data. The client can have a built-in automatic certificate management module (using functions from existing open-source Python libraries). After the client starts, it first performs a security environment self-check, checking if SSL security certificate files (cert.der and key.pem) exist in the program's root directory. If the certificate is found to be missing, it calls an encryption algorithm library (such as Python's Cryptography library) to automatically execute the certificate generation logic. This logic includes: 1. Generate a 2048-bit RSA private key.
[0030] 2. Build a self-signed certificate in X.509 format and set its validity period (e.g., 365 days).
[0031] 3. Persistently write the public and private keys to disk. This step ensures that the client can be authenticated through the machine tool server's "Basic256Sha256" high-strength security policy, solving the problem of connection failures caused by cumbersome certificate configuration in industrial settings.
[0032] The client loads the generated self-signed certificate and initiates a handshake request to the machine tool's IP address (e.g., opc.tcp: / / 192.168.1.100:8193), establishing a communication connection with the server through this handshake request.
[0033] Optionally, after the client establishes a connection with the server, machining data is collected at preset intervals, which can be 10ms, 15ms, or other time intervals. The machining data may also include workpiece coordinates, program status, and other data related to transient cutting characteristics of the machine tool.
[0034] Optionally, storing the processing data includes: using the acquisition thread to cache the processing data into a double-ended queue; if the main thread detects the machine tool's processing completion signal, then using a background thread to write the data in the double-ended queue into a processing file, and after writing the processing file, clearing the double-ended queue.
[0035] Optionally, the machining completion signal can be detected by detecting the machine tool's operating status. Specifically, when the machine tool's operating status changes from "machining" to "stopped," a machining completion signal can be detected, triggering asynchronous storage and writing the data in the double-ended queue into the machining file.
[0036] In one embodiment, the acquisition thread (main thread) pushes real-time data packets (timestamp, power, x, y, z) of the processed data into a double-ended queue (Deque) in memory. During the writing process, the main thread monitors the machine tool's operating status nodes in real time. When the monitoring results indicate that a processing completion signal has been detected, a fast storage operation is performed: the queue writing is momentarily paused (at the microsecond level), and all processed data in the queue (due to dual-thread acquisition to avoid data acquisition interruption and data loss during automatic saving) is deeply copied to a temporary memory block, and the original queue is immediately cleared. Write permissions for the acquisition thread are then restored. Asynchronous transfer: A separate IO thread (background thread) is started to serialize the data in the temporary memory block and write it to the processing file. This double-ended queue and asynchronous transfer method ensures that the foreground data acquisition never lags and that there is zero data loss, and also solves the speed mismatch problem between high-frequency acquisition (100Hz) and low-speed disk IO.
[0037] In one embodiment, such as Figure 3 As shown, the machining file can be an Excel file, which can include information such as machine tool machining-related G-codes, spindle load power, workpiece coordinates, spindle speed, feed rate, and running status codes.
[0038] Optionally, searching for split points in the machining data includes: filtering out non-optimized target instructions in the machining data and completing the cutting instructions in the machining data to obtain a time-series dataset; and searching for split points based on the time-series dataset.
[0039] Optionally, non-optimized target instructions can be non-optimizable instructions such as rapid traverse or tapping (e.g., instructions unrelated to machine tool cutting).
[0040] Optionally, the non-continuous cutting instructions can be sequence-completed according to the logic of the preceding and following code to construct a continuous cutting load time series dataset (i.e., time series dataset).
[0041] In one embodiment, after the machining data is written to the machining file (such as an Excel file), G0 (rapid traverse) instruction lines and non-optimized target instructions such as drilling and tapping are filtered out. After filtering out the instructions, for common omissions in NC programs (such as writing only the coordinates without G1 in consecutive G1 instructions), the ffill() method of the Pandas library is used to fill down the instruction column to construct a continuous and complete time-series dataset.
[0042] Optionally, when executing a long-distance linear or circular interpolation cutting command, although the program instructions are continuous, the actual cutting process often exhibits multi-stage load characteristics due to the geometric features of the die casting (such as the entry point, draft angle change point, parting line flash position, and the junction of internal cavity ribs). The positions corresponding to these geometric features during the cutting process are found by searching for the segmentation points.
[0043] Optionally, the time-series data may include Y-axis coordinates (tool coordinates) and power waveforms related to machine tool processing. A linear penalty algorithm can be used to scan the acquired time-series data, minimizing the penalty cost function (objective cost function) to find the points where the statistical characteristics (mean or variance) of the data undergo significant abrupt changes, i.e., "change points." These "change points" physically correspond precisely to the locations where the cutting conditions undergo fundamental changes (e.g., from "empty cutting" to "full cutting," or from "smooth cutting" to "intermittent cutting"). The algorithm uses the identified change points as segmentation points, logically discretizing the original long instruction segment into several independent sub-intervals, and recording the precise coordinate position corresponding to each change point, generating "new node" markers. These markers are used to obtain the cutting sub-intervals.
[0044] In one embodiment, searching for the segmentation point based on the time-series dataset includes: substituting the time-series data into a target cost function, and using the target cost function to search for the segmentation point; the target cost function is:
[0045] In the formula, As the dividing point, For the i-th split point, Let be the fitting cost function between the i-th split point and the (i+1)-th split point. Let be the spindle load power corresponding to the i-th segmentation point. The penalty coefficient is used to prevent overfitting (to prevent too many split points), and n is the total number of split points. This is achieved by minimizing the objective cost function. Find an optimal set of split points using this method. The identified segmentation points physically correspond to abrupt changes in working conditions during the die-casting cutting process (such as the infeed point, the starting point of flash cutting, and the end point of draft angle).
[0046] Optionally, the fitting cost function can be based on the squared error of the mean (L2 norm), the absolute error (L1), a Gaussian model or Poisson distribution based on probability statistics, or the regression residuals of a regression model, etc. Specifically, the L2 norm can be used to find the optimal split point by minimizing the variance.
[0047] S102: Divide the cutting sub-intervals using the dividing points, and calculate the optimization coefficient of each cutting sub-interval based on the coefficient of variation of the cutting sub-intervals.
[0048] Optionally, the coefficient of variation is calculated based on the spindle load power of the machine tool. This method of using the coefficient of variation to calculate optimization coefficients resolves the contradiction between the traditional "one line, one speed" mechanism of G-code and the dynamic changes in actual cutting load.
[0049] Optionally, after obtaining the split point, a list List[Node_Index] containing all variable point line numbers (the line number of the instruction line where the split point is located) can be generated (this list is used to record the workpiece coordinates corresponding to the split point, which are used to determine the rewriting of the G code used for processing after the processing path needs to be segmented).
[0050] Optionally, the optimization coefficient for each cutting sub-interval is calculated based on the coefficient of variation of the cutting sub-interval, including: calculating the standard deviation and mean based on the spindle load power of the cutting sub-interval, and calculating the coefficient of variation based on the standard deviation and mean; if the coefficient of variation is determined to be less than or equal to a preset value, then the target power of the cutting sub-interval is obtained, and the optimization coefficient is calculated based on the target power.
[0051] Optionally, the spindle load power corresponding to different workpiece coordinates in the cutting sub-interval can be obtained through machining data. Based on the spindle load power, the mean and standard deviation corresponding to each cutting sub-interval can be calculated, and then the coefficient of variation can be calculated using the mean and standard deviation. Here, the standard deviation σ represents the dispersion of load fluctuations, the mean μ represents the average load magnitude, and the coefficient of variation eliminates the influence of the absolute load magnitude, purely reflecting the relative stability of the cutting process.
[0052] In one embodiment, the coefficient of variation can be calculated as follows: % In the formula, Represents the coefficient of variation. Indicates standard deviation, This represents the mean.
[0053] In one embodiment, dangerous operating conditions such as "low load but high chatter" often occur in the machining of thin-walled die-cast parts. At this time, although the average power is very low, the standard deviation σ is very large. The value of the coefficient of variation can reflect this situation, avoiding speed-up in machining parts where spindle vibration is large or other unsuitable conditions, thus increasing the safety of the algorithm.
[0054] Optionally, the preset value can be a safety threshold for identifying unsteady cutting. This preset value can be 15%, 14%, or other values used to distinguish between unsteady and steady cutting.
[0055] In one embodiment, the preset value can be 15%. If the coefficient of variation CV > 15%, the segment is determined to be an unsteady cutting process (there are unstable cutting processes such as oscillation, intermittent cutting, and poor chip removal). The optimization coefficient can be forcibly locked at 1.0 (no speed increase) to prioritize machining safety.
[0056] Optionally, when optimizing the feed rate through spindle load power, a target power is needed as the optimization benchmark. Based on the conservative starting point of traditional CNC machining feed rate, this application aims to improve speed and efficiency. Therefore, the target power can be the average value of the top power in the cutting sub-range. The average value of the top power can be the average value of the spindle load power data in the cutting sub-range that is in the top 30% of the spindle load power data.
[0057] Optionally, when the coefficient of variation is less than or equal to a preset value, the coefficient can be optimized using the first calculation formula. The calculation can be performed using the following formula: *
[0058] in, The influence coefficient, , For cutting width and cutting depth, Let x and y be the average power, and x and y be the influencing factors. The target power.
[0059] To facilitate practical production use, the first calculation formula can be simplified as follows: , = .
[0060] Optionally, in actual production, factors such as the material, workmanship, and type of the cutting tool itself can significantly affect cutting stability. Therefore, a weighted correction of a preset tool setting L can be introduced (e.g., 0 = disable optimization, 1 = conservative, 2 = balanced, 3 = aggressive). Finally, the optimization coefficient formula is:
[0061] In the formula, To optimize the coefficients, = k is the influence coefficient. For cutting width, Let x be the cutting depth, and y be the influencing factors. Where L is the average power and L is the tool setting. This is the maximum tool setting.
[0062] In one embodiment, such as Figure 4 As shown, the client or server can have a tool setting interface. Through this interface, the tool setting corresponding to different tool numbers can be set. When optimizing the feed rate, the optimization coefficient of different tools can be obtained based on the tool setting.
[0063] S103: Optimize the tool feed rate based on the optimization coefficient.
[0064] Optionally, optimizing the tool feed rate based on the optimization coefficient includes: obtaining the original feed rate of the tool based on the machining data; and calculating the target feed rate of the tool based on the original feed rate and the optimization coefficient.
[0065] In one embodiment, the target feed rate = optimization coefficient * original feed rate.
[0066] Optionally, after obtaining the target feed rate, the machining program file can be optimized based on the target feed rate. The method of this application includes: obtaining the machining program file of the machine tool; determining the instruction lines corresponding to the split points in the machining program file; splitting the instruction lines according to the coordinates of the split points to obtain split instructions; and mapping the optimized feed rate to the split instructions.
[0067] Optionally, it can be determined whether the line number of the machining program file is in the list of variable line numbers. If so, the instruction line corresponding to that line number is identified as the instruction line corresponding to the split point, and the instruction line is split. In this way, the original long instruction of the instruction line is forcibly physically split into multiple consecutive short instructions. For example, a long-distance cutting instruction can be split into a "light load speed-up segment" and a "heavy load speed-stabilizing segment"; and the target feed rate (F value) calculated for each independent sub-interval can be mapped to each of the new instructions after splitting.
[0068] Optionally, such as Figure 5 As shown, to facilitate subsequent viewing and adjustment, a machining program modification record can also be generated when splitting instructions. This modification record stores the modification information for each instruction line.
[0069] In one embodiment, the machining program file can be the original MPF program file (which is the machining program G code file used by the machine tool), scanned line by line.
[0070] Logic control: When the scanned row number $N$ exists in the generated variable point list List[Node_Index], it indicates that the row instruction (such as a long straight line interpolation) spans different load conditions.
[0071] Processing procedure: Perform a "physical interruption" operation. For example: Input: N100 G1 Y500.0 F1000 Operation: Based on the workpiece coordinates corresponding to the variable point (split point) (assuming Y=200.0), split the row into two rows.
[0072] Output: N100 G1 Y200.0 (First half, corresponding to operating condition A) N101 G1 Y500.0 (Second half, corresponding to working condition B) And insert the “XINZENG” mark in the corresponding position for tracking.
[0073] The calculated target feed rates for each cutting sub-interval are mapped and applied to the newly split instruction lines.
[0074] The final optimized program, NC_Optimization.MPF, containing the speed-changing logic, is generated. A comparison of the code before and after optimization is shown in the image below. Figure 6 As shown ( Figure 6 The left image shows the code before modification, and the right image shows the code after modification.
[0075] This application has the following advantages: 1. Improve production efficiency and shorten production cycle time. By using a variable point detection algorithm, the low-load "light cutting zone" in die casting processing is accurately identified, and the feed speed of this section is increased by using a machine tool power margin optimization algorithm. This shortens the single-piece processing cycle and increases production line capacity without increasing equipment investment.
[0076] 2. Increase cutting stability and reduce product quality and production safety risks associated with efficiency improvements. The system innovatively introduces the coefficient of variation (CV) as a quantitative criterion for judging cutting stability, which can keenly capture the fluctuation characteristics during the cutting process. Even if the machine tool load is very low, as long as excessive fluctuations are detected (such as chatter in thin-walled parts), the system will immediately prohibit optimization and efficiency improvement. This mechanism effectively solves the problem of low-load chatter being misjudged as a safe zone, and fundamentally prevents deformation of thin-walled die-cast parts caused by algorithm misjudgment.
[0077] In one alternative embodiment, an electronic device is provided, such as Figure 7 As shown, Figure 7 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this application.
[0078] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), a FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0079] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the figure, but this does not indicate that there is only one bus or one type of bus.
[0080] The memory 4003 may be ROM (Read-Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read-Only Memory), CD-ROM (Compact Disc Read-Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.
[0081] The memory 4003 stores computer programs that execute embodiments of this application, and its execution is controlled by the processor 4001. The processor 4001 executes the computer programs stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.
[0082] Among them, electronic devices can be any electronic product that can interact with an object, such as personal computers, tablets, smartphones, personal digital assistants (PDAs), game consoles, interactive network television (IPTV), smart wearable devices, etc.
[0083] The electronic device may also include network devices and / or object devices. The network devices include, but are not limited to, a single network server, a server group consisting of multiple network servers, or a cloud consisting of a large number of hosts or network servers for cloud computing.
[0084] The networks in which the electronic devices are located include, but are not limited to, the Internet, wide area networks, metropolitan area networks, local area networks, and virtual private networks (VPNs).
[0085] The terms "first," "second," "third," "fourth," "1," "2," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the illustrations or text descriptions.
[0086] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.
[0087] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application without departing from the technical concept of this application also fall within the protection scope of the embodiments of this application.
Claims
1. A method for optimizing feed rate, characterized in that, The method includes: Collect machining data from the machine tool, search for the segmentation points in the machining data, and the segmentation points correspond to the locations where the cutting conditions change abruptly; The cutting sub-intervals are divided using the dividing points, and the optimization coefficients of each cutting sub-interval are calculated based on the coefficients of variation of the cutting sub-intervals, wherein the coefficients of variation are calculated based on the spindle load power of the machine tool. The feed rate of the tool is optimized based on the optimization coefficients.
2. The feed rate optimization method according to claim 1, characterized in that, The processing data collected from the machine tool includes: A connection with the machine tool is established based on a preset protocol, which includes the OPC UA protocol; Once the connection is confirmed to be successful, the machine tool's machining data is collected at preset intervals. The machining data includes spindle load power, tool number, feed rate, programmed coordinate data, and spindle speed. Store the processing data.
3. The feed rate optimization method according to claim 2, characterized in that, The processing data is stored as follows: The processing data is cached in a double-ended queue using the acquisition thread; If the main thread detects the end signal of the machine tool's machining, then the background thread writes the data in the double-ended queue into the machining file, and after writing the machining file, the double-ended queue is cleared.
4. The feed rate optimization method according to claim 1, characterized in that, The search for segmentation points in the processed data includes: Non-optimized target instructions in the machining data are filtered out, and the cutting instructions in the machining data are completed to obtain a time-series dataset; The split point is searched based on the time-series dataset.
5. The feed rate optimization method according to claim 4, characterized in that, Searching for the segmentation points based on the time-series dataset includes: Substitute the time series data into the target cost function, and use the target cost function to search for the segmentation point; The objective cost function is: In the formula, As the dividing point, For the i-th split point, Let be the fitting cost function between the i-th split point and the (i+1)-th split point. Let be the spindle load power corresponding to the i-th segmentation point. is the penalty coefficient, and n is the total number of split points.
6. The feed rate optimization method according to claim 1, characterized in that, The optimization coefficients for each cutting sub-interval are calculated based on the coefficient of variation of the cutting sub-intervals, including: The standard deviation and mean are calculated based on the spindle load power of the cutting sub-interval, and the coefficient of variation is calculated based on the standard deviation and the mean. If the coefficient of variation is determined to be less than or equal to a preset value, then the target power of the cutting sub-interval is obtained, and the optimization coefficient is calculated based on the target power.
7. The feed rate optimization method according to claim 6, characterized in that, The target power is the average power at the top of the cutting sub-interval. The optimization coefficient is calculated based on the target power, including: The target power is input into the optimization coefficient calculation formula to calculate the optimization coefficient, which is: In the formula, To optimize the coefficients, = k is the influence coefficient. For cutting width, Let x be the cutting depth, and y be the influencing factors. Where L is the average power and L is the tool setting. This is the maximum tool setting.
8. The feed rate optimization method according to claim 1, characterized in that, The step of optimizing the tool feed rate according to the optimization coefficient includes: The original feed rate of the tool is obtained based on the machining data; The target feed rate of the tool is calculated based on the original feed rate and the optimization coefficient.
9. The feed rate optimization method according to claim 1, characterized in that, The method includes: Obtain the machining program file of the machine tool and determine the instruction line corresponding to the division point in the machining program file; The instruction line is split according to the coordinates of the split point to obtain the split instruction; The optimized feed rate is mapped to the split command.
10. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method according to any one of claims 1 to 9.