A method and system for core machine processing automation control

By constructing an automated control system for core extraction machining and optimizing the command transmission path through data processing and algorithms, the machining deviation problem caused by component movement synchronization and command delay in core extraction machining was solved, achieving efficient and stable machining results.

CN122284500APending Publication Date: 2026-06-26JIANGXI GAOJIA OPTOELECTRONICS TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGXI GAOJIA OPTOELECTRONICS TECH CO LTD
Filing Date
2026-05-25
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

During the core extraction process, the difficulty in synchronizing the actions of various components and the delay in command transmission lead to deviations in the matching between the tool path and the workpiece position, affecting the processing rhythm and accuracy stability.

Method used

The original dataset is constructed by acquiring motor rotation angle, speed and torque. The db4 wavelet transform is used to filter out noise, the dynamic time warping algorithm is used to extract operating features, the critical path algorithm is combined to generate a time-series dependency graph, cubic spline interpolation is used to smooth the path, the earliest deadline first algorithm is used to allocate time slots and link resources, the transmission path is dynamically selected, and the instruction execution timing is corrected by combining component motion conflict analysis and timing compensation value, so as to realize closed-loop feedback and real-time optimization of processing effect.

Benefits of technology

It achieves precise quantification of multi-component collaborative operation, smooth scheduling of instruction sequences, and efficient utilization of resources, solving the problems of instruction transmission delay and component motion interference, and improving machining accuracy and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122284500A_ABST
    Figure CN122284500A_ABST
Patent Text Reader

Abstract

This invention relates to the field of industrial control technology and discloses an automated control method and system for core extraction machining. The method includes acquiring motor rotation angle, speed, and torque; after data filtering, obtaining a sequence to be analyzed; based on the sequence to be analyzed, constructing coordination deviation characteristics, performing instruction matching, and analyzing the execution sequence to obtain a smooth timing framework; based on the smooth timing framework, allocating time slots to obtain a preliminary instruction sequence, and analyzing the execution layer response delay to obtain a response difference; based on the response difference, selecting the target transmission path through path optimization, and reconstructing the instruction link of the preliminary instruction sequence to obtain an optimized instruction sequence; based on the motor rotation angle, analyzing component motion conflicts and correcting the optimized instruction sequence to obtain a final instruction sequence; based on the final instruction sequence, performing simulated machining and adjusting the process based on the results of dynamic response characteristics; issuing the final instruction sequence for execution and performing real-time fine-tuning of the machining rhythm. This method improves machining stability under complex working conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial control technology, and in particular to an automated control method and system for core extraction machining. Background Technology

[0002] Currently, in the core extraction process, the equipment needs to achieve precise coordination between multiple components to cope with complex workpiece shapes and variable processing conditions. However, in actual operation, due to the difficulty in synchronizing the actions of various components and the delay in command transmission, deviations often occur in the matching of tool path and workpiece position, affecting the processing rhythm and accuracy stability. To meet the requirements of efficient and stable automated processing, it is urgent to realize the real-time perception and coordinated adjustment of the operating status of multiple components through an industrial control system, eliminate the interference caused by command delays, and improve the core extraction machine's adaptability to processing in complex environments.

[0003] In a prior art such as CN109773617B, the industrial control system issues motion commands to each moving component according to a preset trajectory, and each component executes independently according to a predetermined sequence. During machining, the system monitors the actual position and load status of each axis through sensors. When a component experiences a response lag due to load fluctuations, a time difference arises between the actual action of that component and other components. Simultaneously, the command transmission is delayed due to congestion, causing subsequent commands to arrive at a time deviating from the expected time. Consequently, the sequence of actions among multiple components becomes misaligned, thus affecting machining accuracy. The prior art, by issuing commands to each component independently according to a preset trajectory and relying on bus transmission and post-processing position adjustments, is prone to misalignment between components and susceptible to delays in command transmission.

[0004] Therefore, existing technologies suffer from low processing stability under complex working conditions. Summary of the Invention

[0005] This invention provides an automated control method and system for core extraction machining to improve machining stability under complex working conditions.

[0006] In a first aspect, to solve the above-mentioned technical problems, the present invention provides an automated control method for core extraction machining, comprising: Obtain the motor rotation angle, motor speed, and motor torque of the component to obtain the original dataset; Based on the original dataset, data filtering is performed to obtain the sequence to be analyzed, and based on the sequence to be analyzed, component operation coordination deviation characteristics are constructed to obtain coordination deviation characteristics; Based on the coordination deviation characteristics, instruction matching is performed to obtain a preliminary instruction set, and based on the preliminary instruction set, execution sequence logic analysis is performed to obtain a smooth timing framework; Based on the smooth timing framework, time slots and link resources are allocated to obtain a preliminary instruction sequence. Based on the preliminary instruction sequence, execution layer response delay analysis is performed to obtain the response difference. Based on the response difference, a transmission path is selected to obtain a target transmission path, and the initial instruction sequence is reconstructed based on the target transmission path to obtain an optimized instruction sequence. Based on the motor rotation angle, component motion conflict analysis is performed to obtain timing compensation values. Then, the optimized instruction sequence is corrected according to the timing compensation values ​​to obtain the final instruction sequence. Based on the final instruction sequence, a processing effect deviation analysis is performed to obtain the processing effect deviation result, and a dynamic response characteristic adjustment process is determined based on the processing effect deviation result. Based on the final instruction sequence, it is converted into a low-level machine code sequence and then sent to the device execution layer for execution, and the processing rhythm is fine-tuned in real time.

[0007] Secondly, the present invention provides an automated control system for core extraction machining, comprising: The data acquisition module is used to acquire the motor rotation angle, motor speed, and motor torque of the component to obtain the raw dataset; The feature construction module is used to filter data based on the original dataset to obtain the sequence to be analyzed, and to construct the component operation coordination deviation features based on the sequence to be analyzed to obtain the coordination deviation features. The sequence analysis module is used to perform instruction matching based on the coordination deviation characteristics to obtain a preliminary instruction set, and to perform execution sequence logic analysis based on the preliminary instruction set to obtain a smooth timing framework. The response analysis module is used to allocate time slots and link resources according to the smooth timing framework, obtain a preliminary instruction sequence, and perform execution layer response delay analysis based on the preliminary instruction sequence to obtain the response difference. The response optimization module is used to select the optimal transmission path based on the response difference to obtain the target transmission path, and to reconstruct the instruction link of the preliminary instruction sequence based on the target transmission path to obtain the optimized instruction sequence. The conflict correction module is used to analyze the component motion conflict based on the motor rotation angle, obtain the timing compensation value, and correct the instruction execution timing of the optimized instruction sequence based on the timing compensation value to obtain the final instruction sequence. The effect analysis module is used to perform processing effect deviation analysis based on the final instruction sequence, obtain processing effect deviation results, and determine whether to perform dynamic response characteristic adjustment process based on the processing effect deviation results. The output module is used to convert the final instruction sequence into a low-level machine code sequence and send it to the device execution layer for execution, and to fine-tune the processing rhythm in real time.

[0008] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention constructs an original dataset by acquiring motor rotation angle, speed and torque, extracts operating features through data filtering and dynamic time warping algorithm, and quantifies the coordination deviation features with Euclidean distance. Since db4 wavelet transform can effectively filter out sensor noise, and the dynamic time warping algorithm has scale invariance to changes in operating state, it solves the problem that existing technologies are difficult to accurately extract component coordination features from multi-source sensor data, and realizes accurate quantification of component operating deviation.

[0009] (2) The present invention matches the instruction set based on the coordination deviation characteristics, generates a time-series dependency graph through the critical path algorithm and performs path smoothing by combining cubic spline interpolation, and then uses the earliest deadline first algorithm to allocate time slots and link resources. Since the critical path algorithm can identify the dependency constraints between instructions, cubic spline interpolation ensures the continuity of the time sequence framework, solving the problems of disordered execution order of multi-component instructions and unreasonable allocation of time-series resources in the prior art, and realizing smooth scheduling of instruction sequences and efficient utilization of resources.

[0010] (3) This invention optimizes the transmission path through response difference analysis, filters and reconstructs the instruction link based on bandwidth occupancy and the number of queued messages, and corrects the instruction execution timing by combining component motion conflict analysis and timing compensation value. Since dynamic path selection can avoid congested links, the timing compensation value is calculated based on component spatial approximation rate and torque peak value, which solves the problem of difficult coordinated handling of instruction transmission delay and component motion interference in the prior art, and realizes the stability of instruction transmission and the security of multi-component collaboration.

[0011] (4) This invention simulates the final instruction sequence through a processing simulation model, calculates the normal distance between the simulation trajectory and the ideal processing surface to obtain the processing deviation value, and initiates the dynamic response characteristic adjustment process when the deviation exceeds the standard. Based on the path deviation ratio, the feedforward gain coefficient of the PID controller position loop is incrementally adjusted. At the same time, the actual execution frequency is extracted, synchronous execution is split into asynchronous execution, and an S-shaped acceleration and deceleration algorithm is used for speed smoothing. Since the deviation analysis realizes the closed-loop feedback of the processing effect, the gain adjustment and asynchronous splitting compensate for the insufficient dynamic response of the execution layer, solves the problem of lack of real-time compensation and dynamic adaptation capability in the existing technology, and realizes the closed-loop control of processing accuracy and real-time optimization of processing rhythm. Attached Figure Description

[0012] Figure 1 This is a schematic diagram of the automated control method for core extraction machining provided in the first embodiment of the present invention; Figure 2 This is a schematic diagram of the automated control system for core extraction machining provided in the second embodiment of the present invention. Detailed Implementation

[0013] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0014] Reference Figure 1 The first embodiment of the present invention provides an automated control method for core extraction machining, comprising the following steps: S11, obtain the motor rotation angle, motor speed and motor torque of the component to obtain the original dataset; S12, based on the original dataset, perform data filtering to obtain the sequence to be analyzed, and based on the sequence to be analyzed, construct the component operation coordination deviation characteristics to obtain the coordination deviation characteristics; S13, based on the coordination deviation characteristics, perform instruction matching to obtain a preliminary instruction set, and based on the preliminary instruction set, perform execution sequence logic analysis to obtain a smooth timing framework; S14. Based on the smooth timing framework, time slots and link resources are allocated to obtain a preliminary instruction sequence. Based on the preliminary instruction sequence, execution layer response delay analysis is performed to obtain the response difference. S15, Based on the response difference, perform transmission path optimization to obtain a target transmission path, and reconstruct the instruction link of the preliminary instruction sequence based on the target transmission path to obtain an optimized instruction sequence; S16, Based on the motor rotation angle, perform component motion conflict analysis to obtain timing compensation value, and perform instruction execution timing correction on the optimized instruction sequence based on the timing compensation value to obtain the final instruction sequence; S17. Based on the final instruction sequence, perform a processing effect deviation analysis to obtain the processing effect deviation result, and determine whether to perform a dynamic response characteristic adjustment process based on the processing effect deviation result. S18, based on the final instruction sequence, convert it into a low-level machine code sequence and send it to the device execution layer for execution, and perform real-time fine-tuning of the processing rhythm.

[0015] In step S11, the motor rotation angle, motor speed and motor torque of the component are obtained to obtain the original dataset.

[0016] Specifically, each moving component of the core extraction machine is equipped with a high-precision encoder and a torque sensor. The encoder outputs real-time angular position pulse signals of the motor rotor of each component, which are converted into motor angle values ​​by an internal counter, typically in degrees or radians. Simultaneously, the encoder calculates the motor speed by measuring the pulse change per unit time, typically in revolutions per minute (rpm). The torque sensor is installed at the connection between the motor output shaft and the load. It detects the shear deformation on the shaft using strain gauges, converts it into a voltage signal, and then performs an analog-to-digital conversion to obtain the motor torque value, typically in Newton-meters (Nm). The data acquisition card reads the above three sets of sensor data from all components in parallel at a fixed sampling period. At each sampling moment, a complete data record is recorded, including component identification, timestamp, motor angle, motor speed, and motor torque. After continuous acquisition for multiple sampling periods, all records are arranged in chronological order to form the raw dataset. Each record in the raw dataset corresponds to a snapshot of the operating state of each component at a sampling moment, providing basic data support for subsequent analysis of coordination deviations between components.

[0017] The significance of this step lies in establishing a unified digital representation of the operating status of multiple components during the processing, enabling subsequent processing to perform feature extraction and deviation analysis based on multi-source sensor data under the same time reference, thus avoiding misjudgments caused by asynchronous or inconsistent data sources.

[0018] In step S12, data filtering is performed based on the original dataset to obtain the sequence to be analyzed, and component operation coordination deviation features are constructed based on the sequence to be analyzed to obtain coordination deviation features, including: Based on the original dataset, noise is filtered out using db4 wavelet transform to obtain a denoised dataset; The time points in the denoised dataset where the motor torque exceeds a preset torque threshold are extracted as abnormal time points. These abnormal time points are then used as the center time, and preset time windows are extended forward and backward to obtain abnormal time periods. The data in the denoised dataset during the abnormal time period are filtered out to obtain the sequence to be analyzed; Based on the sequence to be analyzed, the operating state change features are extracted using a dynamic time warping algorithm to obtain the operating features; Calculate the Euclidean distance between the stated operating characteristics and the preset standard operating characteristics, and use it as the coordination deviation characteristic.

[0019] Specifically, when performing db4 wavelet transform noise filtering on the original dataset, the motor torque sequence of each component is used as the input signal, and the sequence length is the number of sampling points. The db4 wavelet transform employs a four-level decomposition, with each level dividing the signal into approximation coefficients and detail coefficients. The first-level decomposition uses a db4 wavelet filter to convolve and downsample the original torque sequence, obtaining the first-level approximation coefficients and the first-level detail coefficients. The second-level decomposition repeats the above operation on the first-level approximation coefficients, obtaining the second-level approximation coefficients and the second-level detail coefficients. This process continues until the fourth-level decomposition is completed, yielding the fourth-level approximation coefficients and the first to fourth-level detail coefficients. For the detail coefficients, a soft-thresholding denoising method is used. The threshold value is determined by multiplying the median absolute value of each level of detail coefficients by an adjustment factor, with the adjustment factor set to 0.6745. Detail coefficients less than the threshold are set to 0, and detail coefficients greater than or equal to the threshold are subtracted from the threshold. The processed detail coefficients and the fourth-level approximation coefficients are reconstructed using an inverse wavelet transform to obtain the denoised motor torque sequence. The same operation is performed on the motor torque sequence of all components, while the motor angle sequence and motor speed sequence are kept unchanged. The three are then aligned in time to form a denoised dataset.

[0020] After denoising, the denoised motor torque sequence is extracted from the denoised dataset. The torque threshold is determined by collecting denoised motor torque data from thirty complete processing cycles under continuous normal operating conditions, calculating the absolute torque value at each sampling moment, and taking the 99th percentile of all normal torque values ​​as the torque threshold. The denoised motor torque sequence is iterated, comparing the denoised motor torque value at each sampling moment with the torque threshold, and recording all sampling moments exceeding the torque threshold as abnormal time points. Each abnormal time point is used as the center moment. The length of the time window is determined by statistically analyzing the continuous duration of torque exceeding the torque threshold in the past one hundred events caused by sudden load changes, taking the maximum of these durations as the half-width of the time window, and extending this half-width before and after the center moment. Using each abnormal time point as the center, the preset time window is extended forward and backward to obtain several abnormal time periods. When multiple abnormal time periods overlap, they are merged into a single continuous abnormal time period. All data records falling within the abnormal time periods are selected from the denoised dataset, and these records are arranged chronologically to form the sequence to be analyzed.

[0021] The three parameters of motor angle, motor speed, and motor torque in the sequence to be analyzed are normalized. The normalization method for each parameter is to subtract the mean of the sequence from each value of that parameter and then divide by the standard deviation of the sequence, resulting in three normalized subsequences, called the normalized angle subsequence, normalized speed subsequence, and normalized torque subsequence, respectively. A dynamic time warping algorithm is used to extract the operating state change characteristics. For the normalized angle subsequence, it is used as the angle query sequence, and the standard angle subsequence in the pre-stored standard operating features is used as the angle reference sequence. For the normalized speed subsequence, it is used as the speed query sequence, and the standard speed subsequence in the standard operating features is used as the speed reference sequence. For the normalized torque subsequence, it is used as the torque query sequence, and the standard torque subsequence in the standard operating features is used as the torque reference sequence. The standard operating characteristics are constructed by collecting normal sequences to be analyzed from 30 normal processing cycles using the same torque threshold and time window. For each normal sequence to be analyzed, the three parameters are processed according to the normalization method described above. Then, the median of all normal sequences is taken at each sampling position of each parameter to obtain the standard angle subsequence, standard speed subsequence, and standard torque subsequence. The three subsequences together constitute the standard operating characteristics sequence.

[0022] The dynamic time warping algorithm is executed independently for each pair of query and reference sequences. First, a cumulative distance matrix is ​​constructed with dimensions equal to the query sequence length plus one multiplied by the reference sequence length plus one. The first row and first column of the matrix are initialized to infinity, and the origin is set to zero. Then, the matrix is ​​traversed row by row. For the i-th point in the query sequence and the j-th point in the reference sequence, the absolute difference between the two points is calculated as the local distance. The values ​​at positions i plus one and j plus one in the cumulative distance matrix are equal to the local distance plus the minimum of the cumulative distances of the three adjacent positions to its left, below, and lower left. After filling the complete cumulative distance matrix, the matrix is ​​backtracked from the lower right corner to the upper left corner; the positions traversed by the backtracking path are the warping path. The correspondence between matching points in the query and reference sequences is extracted along the warping path. The original parameter values ​​of each matching point in the query sequence are rearranged according to the warping path to obtain the warped feature vector of that parameter. After performing the dynamic time warping on the three parameters of angle, speed, and torque, the three warped feature vectors are concatenated end-to-end to form the running feature vector. The Euclidean distance between the running feature vector and the standard running feature vector is calculated by subtracting the corresponding elements, squaring the result, summing all the squared values, and taking the square root. The result is the coordination deviation feature.

[0023] The significance of this step lies in eliminating random noise in the sensor data through wavelet denoising, using torque over-limit screening to identify key time periods where coordination problems may exist, and then combining the dynamic time warping algorithm to eliminate the effects of stretching and deformation of the two sequences on the time axis, making the extracted running features robust to speed changes. Finally, Euclidean distance is used as a unified metric to provide quantifiable deviation basis for subsequent command matching.

[0024] In step S13, instruction matching is performed based on the coordination deviation characteristics to obtain a preliminary instruction set, and execution sequence logic analysis is performed based on the preliminary instruction set to obtain a smooth timing framework, including: Based on the coordination deviation characteristics and combined with the pre-stored adjustment instruction library, the K-nearest neighbor algorithm is used to perform instruction matching to obtain a preliminary instruction set containing instruction actions and execution times. Multiply the execution time by a preset time weight to obtain the delay coefficient; The initial instruction set is sorted in descending order according to the delay coefficient to obtain the priority instruction queue; Based on the priority instruction queue, a temporal dependency graph is generated using the critical path algorithm, and path smoothing is performed using cubic spline interpolation based on the temporal dependency graph to obtain a smooth temporal framework.

[0025] Specifically, the pre-stored adjustment instruction library is built offline. The construction process involves collecting records of adjustment instructions issued by operators or host computers when different coordination deviation characteristic values ​​occurred during historical processing. Each record includes the coordination deviation characteristic value, the corresponding instruction action name, and the execution time of the instruction action under standard operating conditions. The coordination deviation characteristic value in each record is discretized and used as the feature attribute of that instruction sample. The adjustment instruction library stores several such samples. For example, the coordination deviation characteristic values ​​and corresponding adjustment instructions that occurred in the most recent 1000 processing operations of the equipment are collected. The coordination deviation characteristic values ​​are divided into 100 equidistant intervals according to their numerical ranges, and the characteristic value in each interval is represented by the median of the interval. Each sample is stored as the median, the instruction action name, and the execution time of the action under standard operating conditions. The K-nearest neighbor algorithm determines the K value through cross-validation. Specifically, 80% of the samples in the instruction library are randomly selected as the training set, and the remaining 20% ​​are used as the validation set. K values ​​from 1 to 10 are tested sequentially, and the K value with the highest matching accuracy on the validation set is selected. This K value is then used for all subsequent matching operations. During matching, the absolute difference between the current coordination deviation feature and the coordination deviation feature value of each sample in the instruction library is calculated. This absolute difference is the expression of Euclidean distance in one-dimensional space. The K samples with the smallest absolute differences are selected, and all unique instruction actions are extracted from these K samples to form a preliminary instruction set. For each instruction action in the preliminary instruction set, the average execution time of its corresponding samples is taken as the execution time of that instruction action. The final preliminary instruction set contains several entries, each with an instruction action name and execution time.

[0026] The process for setting time-consuming weights involves collecting the actual execution time and expected execution time of each instruction across fifty consecutive complete processing cycles. The actual execution time is divided by the expected execution time to obtain the execution time ratio. This ratio is then averaged to determine the initial weight for each instruction. This initial weight directly reflects the degree of instruction delay or acceleration; the greater the actual execution time exceeds the expected time, the higher the ratio and the higher the weight. The initial weights of all instructions are then normalized so that the sum of the weights equals the total number of instructions. The normalized weight is the time-consuming weight. The product of this weight and the execution time is called the latency coefficient. All entries in the initial instruction set are sorted in descending order of latency coefficient to obtain a priority instruction queue. Instructions at the beginning of the queue have longer execution times and higher weights, and thus have a greater impact on the overall processing rhythm.

[0027] The critical path algorithm is used to generate a timing dependency graph. Based on the instructions in the priority instruction queue and the physical constraints of the equipment components, a dependency table is pre-generated. This table defines whether there are sequential constraints between any two instructions. For example, two actions of the same component must be executed sequentially, and different actions sharing the same power source must also be executed sequentially. Each instruction in the priority instruction queue is treated as a node. If instruction A must be executed before instruction B, a directed edge is drawn from A to B. All instruction pairs are traversed, and directed edges are added according to the dependency table to obtain a directed acyclic graph (DAG), which is the timing dependency graph. In this graph, there may be multiple paths from a node with an in-degree of zero to a node with an out-degree of zero. The weight of all edges on each path is taken as the delay coefficient of the subsequent instruction. The sum of all delay coefficients on each path is calculated, and the path with the largest sum is taken as the critical path. The sequence of nodes on the critical path is the core instruction sequence that affects the overall timing. The start and end times of these instructions determine the lower limit of the entire processing procedure.

[0028] It should be noted that the above dependency table is constructed by listing all moving parts of the equipment and their corresponding instructions; for any two actions of the same part, the order constraint is defined as the action executed first is executed first; for actions of different parts that share the same power source or have mechanical interference, the order is determined by consulting the equipment mechanical design manual; all instruction pairs with order constraints are entered into the dependency table, and each record contains the predecessor instruction and the successor instruction.

[0029] Cubic spline interpolation is used to smooth the time points on the critical path, resulting in a smoothed timing framework. The start time of each instruction on the critical path is used as the x-axis, and the instruction's sequence number in the priority instruction queue multiplied by a unit time interval is used as the y-axis, resulting in a series of discrete points. For each pair of adjacent discrete points, a cubic polynomial function is constructed. This function is equal to the given y-axis at its endpoints, and its first and second derivatives are continuous at internal nodes. Specifically, the x-coordinates of adjacent points are set to x-coordinate zero and x-coordinate one, and the y-coordinates are set to y-coordinate zero and y-coordinate one, respectively. The first derivative is zero at the left endpoint and one at the right endpoint. The four coefficients of the cubic polynomial are obtained by solving a system of linear equations. After constructing cubic polynomials for all pairs of adjacent points, these polynomials are concatenated in x-coordinate order to form a continuous and smooth curve. The curve is then resampled according to the original instruction timing to obtain the smoothed start and end times of each instruction. These time points constitute the smoothed timing framework. The smooth timing framework eliminates potential step-like abrupt changes in the original critical path, making the transition between instructions more continuous and contributing to the uniformity of subsequent time slot allocation.

[0030] The significance of this step lies in transforming the abstract coordination deviation characteristics into a specific set of instructions and actions, and optimizing the timing logic of instruction execution through critical path identification and spline interpolation, thus providing a timing benchmark for resource allocation that satisfies both dependency constraints and continuity.

[0031] In step S14, according to the smooth timing framework, time slots and link resources are allocated to obtain a preliminary instruction sequence. Based on the preliminary instruction sequence, execution layer response latency analysis is performed to obtain the response difference, including: Based on the smooth timing framework, time slots and link resources are allocated using the earliest deadline first algorithm to obtain a preliminary instruction sequence that includes communication link mode, execution time and execution action; The initial instruction sequence is sent to the driver, the sending time is obtained, and the moment when the driver receives the instruction and completes instruction parsing and prepares to execute it is recorded as the execution layer response time. Calculate the difference between the execution layer response time and the delivery time to obtain the response difference.

[0032] Specifically, the earliest deadline first algorithm is used for scheduling and allocation when multiple instructions compete for limited communication link resources and execution time slots. The process involves sorting all instructions in the smooth timing framework according to their deadlines, where the deadline is the smoothed end time of each instruction. First, the deadlines of all instructions are extracted, and the instruction with the earliest deadline is selected as the current instruction to be allocated. For this instruction, the available communication link resources are checked. Communication link resources include the physical channels between each driver and controller in the device execution layer, such as fieldbus channels, Ethernet channels, or dedicated control links between the controller and drivers. Each communication link can only transmit one instruction at a time. Meanwhile, time slot resources refer to time segments on the processing time axis. Each time slot corresponds to a fixed time length, which is set based on the minimum response cycle of the device execution layer. This minimum time interval is calculated by statistically analyzing the minimum time interval from instruction issuance to driver execution start during one hundred consecutive idle runs of the device, and then using this minimum time interval as the unit length of the time slot.

[0033] The allocation steps of the earliest deadline-first algorithm are as follows: For the instruction with the earliest deadline, provided that its execution time does not exceed the remaining time slot length, find an idle communication link and allocate a starting time slot so that the instruction can be transmitted and executed before the deadline. If multiple idle links exist at the current moment, the link with the lightest load is selected, and the load is determined by the link's packet occupancy rate in the past time slot. If there is no idle link, check if there are any instructions being transmitted but with lower priority. The priority is determined by the order of the deadlines, with earlier deadlines having higher priority. If there are instructions with lower priority, their link resources are preempted, and the preempted instructions are put back into the waiting queue. Repeat the above process until all instructions have been allocated communication links and starting time slots. After allocation, each instruction receives three attributes: communication link mode (e.g., using a fieldbus channel or an Ethernet channel), execution time (i.e., the actual time point corresponding to the allocated starting time slot), and execution action (the specific content of the instruction, such as moving a component to a specified position). The above attributes of all instructions are arranged in chronological order to form a preliminary instruction sequence.

[0034] The initial instruction sequence is sent from the controller to the corresponding driver. The system time at which the controller issues the instruction is recorded; this time is called the sending time. Upon receiving the instruction, the driver first parses it. Parsing includes verifying instruction integrity, decoding motion parameters, and calculating motion trajectory interpolation points. The moment the driver completes parsing and is ready to execute the instruction is recorded in the driver's internal timestamp register. The controller reads this register to obtain the moment the driver is ready to execute; this moment is called the execution layer response time. Both the sending time and the execution layer response time are measured in milliseconds. The difference between the execution layer response time and the sending time is calculated to obtain the response difference. The response difference reflects all delays experienced between the controller issuing the instruction and the driver being ready to execute, including bus transmission delay, driver parsing delay, and possible queuing delays.

[0035] The significance of this step lies in rationally allocating time slots and link resources through the earliest deadline priority algorithm, avoiding critical instructions from missing their deadlines due to resource contention, and obtaining quantized differences by measuring actual response delays to provide a basis for selecting the optimal transmission path in the future.

[0036] In step S15, based on the response difference, transmission path optimization is performed to obtain a target transmission path, and the initial instruction sequence is reconstructed based on the target transmission path to obtain an optimized instruction sequence, including: When the response difference does not exceed a preset response difference threshold, the preliminary instruction sequence is output as an optimized instruction sequence; When the response difference exceeds a preset response difference threshold, the bandwidth utilization rate and the number of queued messages of the currently available communication link are obtained to determine the available path status. Based on the available path status, communication links corresponding to bandwidth occupancy rates lower than a preset occupancy rate threshold and queued message counts less than a preset message count threshold are selected to obtain a candidate path list. Select the communication link with the lowest bandwidth utilization and the fewest queued messages from the candidate path list as the target transmission path; Based on the target transmission path, the communication link mode in the preliminary instruction sequence is modified to obtain an optimized instruction sequence.

[0037] Specifically, the process of determining the response difference threshold involves collecting response difference data for each instruction in fifty consecutive normal processing cycles, and taking the 95th percentile of all response differences as the response difference threshold. When the response difference does not exceed this threshold, it indicates that the latency of the current communication link is within an acceptable range, and path adjustment is not required. Therefore, the preliminary instruction sequence is directly output as the optimized instruction sequence. When the response difference exceeds this threshold, it indicates that there is a significant latency in the current communication link, and a better transmission path needs to be selected.

[0038] If the response difference exceeds a threshold, the status information of all available communication links between the current controller and each driver is first obtained. Available communication links include fieldbus channels, Ethernet channels, and backup control links. For each communication link, its current bandwidth utilization and queued message count are read through the link status monitoring module. The bandwidth utilization is calculated by dividing the number of data bits actually transmitted on the link within a fixed time window by the maximum number of bits that the link can transmit within that time window, and the result is expressed as a percentage. The queued message count refers to the number of data packets in the link's transmit buffer that have not yet been sent. Combining the bandwidth utilization and queued message count for each link is called the available path status of that link.

[0039] The bandwidth utilization threshold is the 85th percentile of the bandwidth utilization of all communication links during 100 consecutive normal processing cycles. Exceeding this value indicates that the link is close to saturation. The message count threshold is the 90th percentile of the number of queued messages on all communication links during 100 consecutive normal processing cycles. Exceeding this value indicates that the link is experiencing backlog. All available communication links are traversed, and links that simultaneously meet both conditions are selected: bandwidth utilization is below the utilization threshold and the number of queued messages is less than the message count threshold. Links meeting these conditions constitute a candidate path list.

[0040] For each communication link in the candidate path list, their current real-time load status is compared, and the link with the lowest bandwidth utilization is selected as the target transmission path. If multiple links have the same bandwidth utilization, the link with the fewest queued messages is further selected. This ensures the optimal physical channel for real-time transmission within the flattened topology of the control system. After determining the target transmission path, each instruction in the initial instruction sequence is modified. Each instruction in the initial instruction sequence originally contained three attributes: communication link mode, execution time, and execution action. The value of the communication link mode is replaced with the link identifier corresponding to the target transmission path, while the execution time and execution action remain unchanged. After all instructions are modified, they are rearranged in their original chronological order to obtain the optimized instruction sequence.

[0041] The significance of this step lies in dynamically selecting low-load, low-hop-count transmission paths by monitoring response latency in real time, thereby avoiding the accumulation of command delays caused by congested links and improving the real-time performance and reliability of command transmission.

[0042] In step S16, based on the motor rotation angle, component motion conflict analysis is performed to obtain timing compensation values. Then, based on these timing compensation values, the optimized instruction sequence is modified to correct the instruction execution timing, resulting in the final instruction sequence, including: Obtain the current motor rotation angle, and calculate the spatial coordinates of the component using a forward kinematics algorithm to obtain the component's spatial coordinates; Based on the spatial coordinates of the components, the Euclidean distance between adjacent components is calculated as the spatial approximation rate, and the components with spatial approximation rates lower than a preset safe distance threshold are selected to obtain a set of dangerous components. Obtain the motor torque corresponding to the set of hazardous components, extract the peak value, and obtain the instantaneous peak torque; The duration for which the instantaneous peak torque exceeds a preset peak torque threshold is counted to obtain the fluctuation duration; Based on the duration of the fluctuation, a timing compensation value is obtained by mapping through a preset timing compensation mapping relationship; Based on the optimized instruction sequence, the execution time is added to the timing compensation value to obtain the final instruction sequence.

[0043] Specifically, the motor rotation angle data is provided in real time by the encoder, with each component corresponding to a specific angle value. The specific process of the forward kinematics algorithm is as follows: calculate the spatial coordinate position of each component based on its motor rotation angle and the device's kinematic model. The device's kinematic model describes the mapping relationship from joint space to Cartesian space. This model is pre-established by measuring the length of each link and the joint offset. The link length is measured using a laser rangefinder to measure the vertical distance between adjacent joint axes, and the joint offset is measured using a vernier caliper to measure the distance along the axial direction between adjacent joint axes. Each parameter is measured three times, and the average value is recorded as a fixed parameter of the kinematic model. Taking a certain rotary joint component as an example, its spatial coordinates are obtained from the base coordinate system through a series of rotation and translation transformations. In the specific calculation, the motor rotation angle of the component is substituted into the joint variables in the kinematic model, and the transformation matrix of each link is calculated sequentially. Multiplying all transformation matrices yields the homogeneous transformation matrix from the base to the end of the component. Extracting the position component from this matrix yields the spatial coordinates of the component. The above process is repeated for all components to obtain the spatial coordinates of each component, and these coordinates constitute the component spatial coordinate set.

[0044] Based on the set of spatial coordinates of the components, the Euclidean distance for each pair of adjacent components is calculated. Adjacent components are defined based on the connection relationships in the equipment's mechanical structure, such as two moving parts on adjacent axes. The Euclidean distance is calculated by subtracting the corresponding coordinate components of the two components' spatial coordinates, squaring the result, summing the squared values ​​in all three directions, and finally taking the square root. This Euclidean distance is called the spatial proximity rate; a smaller spatial proximity rate indicates that the two components are closer, and the higher the risk of collision. The process of determining the safe distance threshold involves collecting the minimum spatial proximity rates of all adjacent components that have never collided during normal historical processing of the equipment, and taking the 85th percentile of these minimum values ​​as the safe distance threshold. All pairs of adjacent components are iterated through, and component pairs with spatial proximity rates lower than the safe distance threshold are selected. After removing duplicate components from these pairs, a set of hazardous components is formed.

[0045] Obtain the motor torque sequence for each component in the hazardous component set, derived from the denoised motor torque data set. For each hazardous component, extract the peak value from its motor torque sequence. The peak value extraction method involves sliding a fixed-length window along the time axis, the window length being one fluctuation period of the motor torque signal. Calculate the maximum torque value within the window, then slide the window one sampling point at a time, repeating the calculation to obtain the maximum torque values ​​within all windows. Select the maximum value from these maximum values ​​to obtain the instantaneous peak torque of that component. Perform the same operation on all components in the hazardous component set to obtain the instantaneous peak torque of each hazardous component.

[0046] The process of determining the peak torque threshold involves collecting the peak motor torque data of each component during thirty consecutive normal processing cycles, and taking the 99th percentile of all peak values ​​as the peak torque threshold. For each critical component, the instantaneous peak torque is then assessed to determine if it exceeds the peak torque threshold. The number of sampling points where the instantaneous peak torque of each critical component continuously exceeds the peak torque threshold is counted, and this number is multiplied by the sampling period to obtain the duration, which is called the fluctuation duration. A longer fluctuation duration indicates a greater abnormal impact on the component and a higher risk of collision.

[0047] The timing compensation mapping relationship is a lookup table pre-built through offline experiments. The construction process involves simulating different levels of component proximity and torque over-limit conditions on the device, recording the fluctuation duration under each condition, and determining the minimum timing compensation value to avoid collisions through multiple tests. The fluctuation duration is divided into several intervals from zero to the maximum test value, with each interval corresponding to a timing compensation value. The interval endpoints are divided at equal intervals, and the timing compensation value is the average of the compensation values ​​of all test samples within that interval. During use, the currently calculated fluctuation duration is compared with the interval endpoints in the lookup table to find the corresponding interval and output the corresponding timing compensation value.

[0048] It should be noted that in the time-series compensation mapping relationship, the range of fluctuation duration is from zero to the maximum fluctuation duration in the device's historical records. This range is divided into ten intervals, and the length of each interval is equal to the maximum value divided by ten. For each interval, the arithmetic mean of the time-series compensation values ​​of all experimental samples in that interval is taken as the output compensation value of that interval.

[0049] For each instruction in the optimized instruction sequence, its original execution time is added to a timing compensation value to obtain a new execution time. A positive timing compensation value indicates delayed execution to avoid collision risks. The execution actions and communication link methods remain unchanged. All instructions are then reordered according to their new execution times to obtain the final instruction sequence.

[0050] The significance of this step lies in the ability to identify potential collision risks in advance by analyzing the spatial position and torque anomalies of components in real time, and to proactively widen the action interval between components through timing compensation, thereby avoiding physical interference and ensuring the safety of the processing.

[0051] In step S17, based on the final instruction sequence, a processing effect deviation analysis is performed to obtain the processing effect deviation result. Then, based on the processing effect deviation result, it is determined whether to proceed with the dynamic response characteristic adjustment process, including: Based on the final instruction sequence, a simulation run is performed using a pre-built processing simulation model to obtain the simulation trajectory sequence; Calculate the normal distance between the simulated trajectory sequence and the preset ideal machining surface to obtain a set of normal distances, and take the maximum value of the set of normal distances as the machining deviation value; When the processing deviation value does not exceed the preset processing deviation threshold, the processing effect is deemed qualified; When the processing deviation value exceeds the preset processing deviation threshold, the processing effect is determined to be unqualified, and the dynamic response characteristic adjustment process is initiated.

[0052] Specifically, the machining simulation model is a pre-built neural network model using an offline data-driven method, used to simulate the motion trajectory of the tool relative to the workpiece when the equipment executes a given sequence of instructions. The construction process of the machining simulation model is as follows: Actual operating data of the equipment executing different instruction sequences during historical machining processes is collected. Each data point contains an input instruction sequence and a corresponding sequence of actual machining trajectory points. The input instruction sequence consists of several instructions, each including the instruction action, execution time, and communication link method. The actual machining trajectory point sequence is measured by a laser displacement sensor mounted on the spindle. Each trajectory point contains three spatial coordinate components of the tool center point in the workpiece coordinate system. A total of 10,000 data samples were collected, of which 8,000 were used for training and 2,000 for validation. The model adopts a long short-term memory network structure. The number of nodes in the input layer is equal to the feature dimension of a single instruction encoded multiplied by the time window length. The time window length is the maximum number of instructions in the final instruction sequence. Sequences shorter than the required length are zero-padded. The hidden layer contains two layers, each with 128 nodes, and the output layer has three coordinate components. During training, mean squared error was used as the loss function, and an adaptive moment estimation optimizer was employed. The training run consisted of 200 epochs, stopping when the validation set loss failed to decrease for ten consecutive epochs. After training, the model could output a corresponding simulation trajectory sequence based on the input final instruction sequence. Each point in the simulation trajectory sequence represented the predicted spatial coordinates of the tool center point at the corresponding time.

[0053] It should be further explained that single instruction encoding involves converting the instruction action name into one-hot encoding, with the dimension equal to the number of different action types in the instruction library; normalizing the execution time to the interval between 0 and 1; converting the communication link mode into an integer index; and concatenating the above three parts into a fixed-length feature vector, with the vector length equal to the one-hot encoding dimension plus 2.

[0054] The preset ideal machining surface is a parametric surface model pre-established based on the workpiece design drawings. For typical workpieces such as spherical or aspherical lenses, the ideal machining surface is given by the design equation, which expresses the mapping relationship between the spatial coordinates of each point on the surface and two surface parameters. The calculation process of the machining deviation value is as follows. For each trajectory point in the simulation trajectory sequence, the point closest to the trajectory point is first found on the ideal machining surface; this point is called the projection point. The search method for the closest point is to perform gradient descent iteration in the surface parameter domain, using the Euclidean distance from the trajectory point to a point on the surface as the objective function, iteratively updating the surface parameters until convergence, and finally obtaining the projection point. The Euclidean distance between the trajectory point and its projection point is calculated. Since the normal direction at the projection point is perpendicular to the surface, this Euclidean distance is the normal distance. The above calculation is repeated for all trajectory points in the simulation trajectory sequence to obtain the normal distance corresponding to each trajectory point. All normal distances constitute the normal distance set. The maximum value in the normal distance set is taken as the machining deviation value, which represents the maximum degree of tool deviation from the ideal surface during the entire machining process.

[0055] The process for determining the processing deviation threshold involves collecting processing deviation values ​​from the equipment over fifty consecutive qualified processing cycles, and taking the 95th percentile of these deviation values ​​as the processing deviation threshold. The currently calculated processing deviation value is then compared with the processing deviation threshold. When the processing deviation value does not exceed the threshold, the processing effect is deemed acceptable, and the adjustment process is not initiated. When the processing deviation value exceeds the threshold, the processing effect is deemed unacceptable, and the dynamic response characteristic adjustment process is initiated.

[0056] The dynamic response characteristic adjustment process is as follows: First, the ratio of all normal distances exceeding the processing deviation threshold in the normal distance set is statistically analyzed; this ratio is called the path deviation ratio. The deviation ratio threshold is determined by collecting the path deviation ratios of the equipment in thirty consecutive qualified processing cycles, and taking the 90th decimal place of these ratios as the deviation ratio threshold. The difference between the path deviation ratio and the deviation ratio threshold is calculated to obtain the excess ratio value. The position loop feedforward gain coefficient of the proportional-integral-derivative (PID) controller configured for each component in the equipment is obtained. This coefficient is used to compensate for position tracking errors; its initial value is the equipment's factory calibration value, which is recorded in the driver parameter table. During incremental adjustment, the coordination coefficient must not be less than 0.5 times the initial value and must not be greater than 1.5 times the initial value; if it exceeds this range, the boundary value is used. The excess ratio value is multiplied by a pre-set exceedance coefficient to obtain the coefficient increment.

[0057] The process of determining the transcendence coefficient involves adjusting the position loop feedforward gain coefficient in steps with different transcendence ratios during offline experiments. The changes in machining deviation are observed, and the step ratio that causes the machining deviation to decrease the fastest without causing system oscillation is selected as the transcendence coefficient. This coefficient is a dimensionless constant. Specifically, on the offline platform, a fixed transcendence ratio of 0.3 is used. Candidate coefficients from 0.01 to 0.5 are substituted into the system in steps of 0.01, and the percentage decrease in machining deviation after each adjustment is measured. The coefficient with the largest percentage decrease and no sustained system oscillation is selected as the transcendence coefficient. The oscillation criterion is that the fluctuation amplitude of the position loop output exceeds 10% of the steady-state value within five control cycles. The position loop feedforward gain coefficient is incrementally adjusted using the coefficient increment as the step size; that is, the new gain coefficient equals the original gain coefficient plus the coefficient increment. The adjusted gain coefficient is called the coordination coefficient. The coordination coefficient is then reconfigured in the proportional-integral-derivative (PID) controllers of each component, replacing the original position loop feedforward gain coefficient. After the configuration is completed, repeat the processing simulation model simulation and processing deviation value calculation in step S17. If the processing deviation value still exceeds the processing deviation threshold, repeat the above adjustment process until the processing deviation value meets the requirements or the maximum number of adjustments is reached.

[0058] The significance of this step lies in using simulation to evaluate the actual processing effect of the final instruction sequence in advance, discovering potential processing accuracy problems before the instructions are issued to the equipment, and improving the dynamic response characteristics by adjusting the feedforward gain coefficient of the proportional-integral-derivative controller in a closed loop, thereby avoiding the generation of defective products.

[0059] In step S18, the final instruction sequence is converted into a low-level machine code sequence and then sent to the device execution layer for execution, with real-time fine-tuning of the processing rhythm, including: Based on the final instruction sequence, it is converted into a low-level machine code sequence by a cross compiler and then sent to the device execution layer for execution. Obtain the instruction execution interval between two consecutive adjacent instructions in the final instruction sequence, and take the reciprocal of the instruction execution interval to obtain the actual execution frequency; Calculate the difference between the actual execution frequency and the preset execution frequency to obtain the execution frequency difference; Extract the time corresponding to the execution frequency difference exceeding the preset execution frequency difference threshold to obtain the insufficient time period, and filter out the final instruction sequence in the insufficient time period to obtain the abnormal instruction sequence; Based on the abnormal instruction sequence, the synchronous execution mode is split into asynchronous execution mode using the earliest deadline first algorithm to obtain the asynchronous execution instruction sequence. Then, the asynchronous execution instruction sequence is smoothed by the S-shaped acceleration and deceleration algorithm to obtain the optimized control sequence. The optimized control sequence replaces the abnormal instruction sequence, which is then converted into a low-level machine code sequence by a cross-compiler and sent to the device execution layer for execution.

[0060] Specifically, each instruction in the final instruction sequence includes an instruction action, execution time, and communication link mode. A cross-compiler is used to convert the final instruction sequence into a low-level machine code sequence. This compiler is pre-developed for the target controller's instruction set architecture and can map each instruction action to a corresponding opcode and operand. The conversion process involves traversing each instruction in the final instruction sequence, looking up the corresponding opcode in the compiler's built-in mapping table based on the instruction action name, converting the execution time into a timer count value, and converting the communication link mode into a port address. These three are then concatenated to form a fixed-length machine codeword. After all instructions have been converted, they are arranged in execution time order to obtain the low-level machine code sequence. The controller sends the low-level machine code sequence to each driver in the device's execution layer via the bus. After decoding, the drivers drive the motors to perform the corresponding actions.

[0061] During equipment operation, the actual execution of the final instruction sequence is monitored. The execution timestamp of each instruction in the final instruction sequence is extracted; this timestamp marks the expected moment when the instruction is scheduled for execution. Using the execution timestamps of two consecutive adjacent instructions as the calculation unit, the difference between the timestamps of the latter and former instructions is calculated to obtain the instruction execution interval, in seconds. The reciprocal of this execution interval is taken to obtain the actual execution frequency, in Hertz (Hz). This actual execution frequency directly reflects the controller's scheduling and execution rhythm of the instruction sequence, and is a true reflection of the control system's actual processing capability.

[0062] The process of determining the preset execution frequency involves setting a target execution frequency based on the workpiece machining process requirements. This value is calculated by dividing the feed rate specified in the process document by the feed per revolution, and the unit is Hertz (Hz). The actual execution frequency is subtracted from the preset execution frequency to obtain the execution frequency difference. The process of determining the execution frequency difference threshold involves collecting the absolute values ​​of the execution frequency differences in fifty consecutive normal machining cycles and taking the 95th percentile of these absolute values ​​as the execution frequency difference threshold. The entire machining process is iterated over the timeline. For each sampling moment, if the execution frequency difference exceeds the execution frequency difference threshold, that moment is marked as an insufficient moment. Consecutive insufficient moments constitute an insufficient time period. All instructions whose execution time falls within the insufficient time period are selected from the final instruction sequence; these instructions constitute an abnormal instruction sequence. The abnormal instruction sequence represents the set of instructions that cannot be completed on time under the current machining rhythm.

[0063] The earliest deadline first algorithm is used to split synchronous execution in an abnormal instruction sequence into asynchronous execution. Synchronous execution means that instructions from multiple components must start execution at the same time, while asynchronous execution means that instructions from each component can complete independently before their deadlines. The specific splitting process involves extracting the deadline of each instruction in the abnormal instruction sequence, where the deadline is the sum of the instruction's execution time and its execution duration. All instructions are then sorted in ascending order of their deadlines. For multiple instructions that need to be executed synchronously at the same time, the available execution resources are checked. If resources are sufficient, synchronization is maintained; if resources are insufficient, the start time of some instructions is shifted forward by one time slot unit. The method for determining the time slot unit length is the same as in step S14, ensuring that the instructions are executed at different times. The new instruction sequence obtained after the shift is called the asynchronous execution instruction sequence.

[0064] To eliminate speed abrupt changes introduced by asynchronous execution, an S-shaped acceleration / deceleration algorithm is used to smooth the speed of the asynchronous execution instruction sequence. The input data for the S-shaped acceleration / deceleration algorithm comes from the asynchronous execution instruction sequence, where each instruction includes the instruction action, execution time, and communication link method. The expected displacement difference and expected execution time difference between two adjacent instructions are extracted from the asynchronous execution instruction sequence. The expected displacement difference is obtained by calculating the linear distance between the target positions corresponding to the instruction actions in adjacent instructions; the target position for each instruction action is read from pre-stored position data in the machining process parameters. The expected execution time difference is the difference in execution times between two adjacent instructions, and the execution time is determined by the timestamp in the final instruction sequence. First, the expected displacement difference is divided by the expected execution time difference to obtain the average speed.

[0065] The entire motion process is divided into seven stages: acceleration, uniform acceleration, deceleration, constant speed, acceleration / deceleration, uniform deceleration, and deceleration. The duration of each stage is allocated according to a preset proportional coefficient, which is determined based on the acceleration rate of change limit of the motor driver, i.e., the maximum jerk, directly read from the technical specifications of the motor driver. The process of determining the proportional coefficient involves offline acquisition of operating data from the device under various combinations of desired execution time differences and different maximum jerks. For each combination, the time allocation ratio of the seven stages is adjusted in a stepwise manner. After each adjustment, simulation is used to check whether the second derivative of the velocity curve is continuous and whether the acceleration rate of change exceeds the maximum jerk. The ratio that satisfies the constraints and minimizes the peak acceleration of the velocity curve is selected as the optimal ratio for that combination. The optimal ratios for all combinations are stored in a two-dimensional lookup table, where the row index is the maximum jerk threshold and the column index is the desired execution time difference threshold. In practical use, based on the currently read maximum jerk value and the current expected execution time difference, bilinear interpolation is performed in a lookup table to obtain the time length proportions of the seven stages. The time length of each stage is equal to the expected execution time difference multiplied by the corresponding proportion coefficient.

[0066] Specifically, the acceleration / deceleration lookup table is constructed using a grid search method, with the time proportions of the seven stages as seven variables. Each variable ranges from 0 to 1 with a step size of 0.01, and the sum of the seven variables equals 1. For all combinations that satisfy the condition of a sum of 1, the acceleration change rate is calculated through simulation, and combinations whose acceleration change rate does not exceed the maximum jerk are retained. From these combinations, the combination that minimizes the peak acceleration of the velocity curve is selected as the optimal proportion under the expected execution time difference and the maximum jerk.

[0067] Within each stage, the jerk remains constant. The jerk is a positive constant during acceleration, zero during uniform acceleration, a negative constant during deceleration, zero during constant speed, a negative constant during acceleration / deceleration, zero during uniform deceleration, and a positive constant during deceleration. The constant value is obtained by multiplying the maximum jerk by a preset waveform coefficient, which is pre-calculated based on the proportion of each stage in the total time. Acceleration is obtained by integrating the jerk over time; at the start of each stage, the acceleration equals the acceleration value at the end of the previous stage. Velocity is obtained by integrating the acceleration over time; at the start of each stage, the velocity equals the velocity value at the end of the previous stage, with the initial velocity value being zero. Discrete sampling is performed on the time axis, with the sampling interval equal to the device control cycle length. Instantaneous velocity values ​​are calculated at each sampling moment. After calculation, each sampling moment and its corresponding instantaneous velocity value are combined into a control point. All control points are arranged in chronological order to form an optimized control sequence. Each control point contains a time value and a corresponding velocity command. The portion of the sequence that replaces the original exception instruction sequence is re-converted into a low-level machine code sequence using a cross-compiler and then sent to the device execution layer for execution.

[0068] The significance of this step lies in identifying the period of lag in the processing rhythm by monitoring the deviation between the execution frequency and the preset frequency in real time. By splitting synchronous execution into asynchronous execution and using an S-shaped acceleration and deceleration smoothing speed curve, the processing rhythm can be restored while ensuring processing accuracy, thus avoiding the loss of synchronization in the entire processing process due to a single point of delay.

[0069] It should be further explained that steps S17 and S18 are executed sequentially. Step S17 is executed first, and the dynamic response characteristic adjustment process is determined based on the processing effect deviation analysis results. If it needs to be started, the PID controller parameter configuration in this adjustment process is completed first, and step S18 is executed after the parameter configuration takes effect. If it does not need to be started, step S18 is executed directly. The real-time fine-tuning of the processing rhythm in step S18 is independent of the adjustment process in step S17. The two are complementary and do not repeat the adjustment.

[0070] Reference Figure 2 The second embodiment of the present invention provides an automated control system for core extraction machining, comprising: The data acquisition module is used to acquire the motor rotation angle, motor speed, and motor torque of the component to obtain the raw dataset; The feature construction module is used to filter data based on the original dataset to obtain the sequence to be analyzed, and to construct the component operation coordination deviation features based on the sequence to be analyzed to obtain the coordination deviation features. The sequence analysis module is used to perform instruction matching based on the coordination deviation characteristics to obtain a preliminary instruction set, and to perform execution sequence logic analysis based on the preliminary instruction set to obtain a smooth timing framework. The response analysis module is used to allocate time slots and link resources according to the smooth timing framework, obtain a preliminary instruction sequence, and perform execution layer response delay analysis based on the preliminary instruction sequence to obtain the response difference. The response optimization module is used to select the optimal transmission path based on the response difference to obtain the target transmission path, and to reconstruct the instruction link of the preliminary instruction sequence based on the target transmission path to obtain the optimized instruction sequence. The conflict correction module is used to analyze the component motion conflict based on the motor rotation angle, obtain the timing compensation value, and correct the instruction execution timing of the optimized instruction sequence based on the timing compensation value to obtain the final instruction sequence. The effect analysis module is used to perform processing effect deviation analysis based on the final instruction sequence, obtain processing effect deviation results, and determine whether to perform dynamic response characteristic adjustment process based on the processing effect deviation results. The output module is used to convert the final instruction sequence into a low-level machine code sequence and send it to the device execution layer for execution, and to fine-tune the processing rhythm in real time.

[0071] It should be noted that the automated control system for core extraction machining provided in this embodiment of the invention is used to execute all the process steps of the automated control method for core extraction machining described in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.

[0072] It should be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and 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. Furthermore, in the accompanying drawings of the system embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0073] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A method of core machine machining automation control, characterized by, include: Obtain the motor rotation angle, motor speed, and motor torque of the component to obtain the original dataset; Based on the original dataset, data filtering is performed to obtain the sequence to be analyzed, and based on the sequence to be analyzed, component operation coordination deviation characteristics are constructed to obtain coordination deviation characteristics; Based on the coordination deviation characteristics, instruction matching is performed to obtain a preliminary instruction set, and based on the preliminary instruction set, execution sequence logic analysis is performed to obtain a smooth timing framework; Based on the smooth timing framework, time slots and link resources are allocated to obtain a preliminary instruction sequence. Based on the preliminary instruction sequence, execution layer response delay analysis is performed to obtain the response difference. Based on the response difference, a transmission path is selected to obtain a target transmission path, and the initial instruction sequence is reconstructed based on the target transmission path to obtain an optimized instruction sequence. Based on the motor rotation angle, component motion conflict analysis is performed to obtain timing compensation values. Then, the optimized instruction sequence is corrected according to the timing compensation values ​​to obtain the final instruction sequence. Based on the final instruction sequence, a processing effect deviation analysis is performed to obtain the processing effect deviation result, and a dynamic response characteristic adjustment process is determined based on the processing effect deviation result. Based on the final instruction sequence, it is converted into a low-level machine code sequence and then sent to the device execution layer for execution, and the processing rhythm is fine-tuned in real time.

2. The core machine machining automation control method of claim 1, wherein, The process involves filtering the data based on the original dataset to obtain the sequence to be analyzed, and constructing component operation coordination deviation features based on the sequence to be analyzed, resulting in coordination deviation features, including: Based on the original dataset, noise is filtered out using db4 wavelet transform to obtain a denoised dataset; The time points in the denoised dataset where the motor torque exceeds a preset torque threshold are extracted as abnormal time points. These abnormal time points are then used as the center time, and preset time windows are extended forward and backward to obtain abnormal time periods. The data in the denoised dataset during the abnormal time period are filtered out to obtain the sequence to be analyzed; Based on the sequence to be analyzed, the operating state change features are extracted using a dynamic time warping algorithm to obtain the operating features; Calculate the Euclidean distance between the stated operating characteristics and the preset standard operating characteristics, and use it as the coordination deviation characteristic.

3. The core machine machining automation control method of claim 1, wherein, The process involves matching instructions based on the coordination deviation characteristics to obtain a preliminary instruction set, and then performing execution sequence logic analysis based on the preliminary instruction set to obtain a smooth timing framework, including: Based on the coordination deviation characteristics and combined with the pre-stored adjustment instruction library, the K-nearest neighbor algorithm is used to perform instruction matching to obtain a preliminary instruction set containing instruction actions and execution times. Multiply the execution time by a preset time weight to obtain the delay coefficient; The initial instruction set is sorted in descending order according to the delay coefficient to obtain the priority instruction queue; Based on the priority instruction queue, a temporal dependency graph is generated using the critical path algorithm, and path smoothing is performed using cubic spline interpolation based on the temporal dependency graph to obtain a smooth temporal framework.

4. The core machine machining automation control method of claim 1, wherein, The process involves allocating time slots and link resources according to the smooth timing framework to obtain a preliminary instruction sequence, and then performing execution layer response latency analysis based on the preliminary instruction sequence to obtain the response difference, including: Based on the smooth timing framework, time slots and link resources are allocated using the earliest deadline first algorithm to obtain a preliminary instruction sequence that includes communication link mode, execution time and execution action; The initial instruction sequence is sent to the driver, the sending time is obtained, and the moment when the driver receives the instruction and completes instruction parsing and prepares to execute it is recorded as the execution layer response time. Calculate the difference between the execution layer response time and the delivery time to obtain the response difference.

5. The core machine machining automation control method of claim 4, wherein, The step of optimizing the transmission path based on the response difference to obtain a target transmission path, and then reconstructing the instruction link of the preliminary instruction sequence based on the target transmission path to obtain an optimized instruction sequence, includes: When the response difference does not exceed a preset response difference threshold, the preliminary instruction sequence is output as an optimized instruction sequence; When the response difference exceeds a preset response difference threshold, the bandwidth utilization rate and the number of queued messages of the currently available communication link are obtained to determine the available path status. Based on the available path status, communication links corresponding to bandwidth occupancy rates lower than a preset occupancy rate threshold and queued message counts less than a preset message count threshold are selected to obtain a candidate path list. Select the communication link with the lowest bandwidth utilization and the fewest queued messages from the candidate path list as the target transmission path; Based on the target transmission path, the communication link mode in the preliminary instruction sequence is modified to obtain an optimized instruction sequence.

6. The core machine machining automation control method of claim 4, wherein, The step involves analyzing component motion conflicts based on the motor rotation angle to obtain timing compensation values, and then correcting the instruction execution timing of the optimized instruction sequence based on these compensation values ​​to obtain the final instruction sequence, including: Obtain the current motor rotation angle, and calculate the spatial coordinates of the component using a forward kinematics algorithm to obtain the component's spatial coordinates; Based on the spatial coordinates of the components, the Euclidean distance between adjacent components is calculated as the spatial approximation rate, and the components with spatial approximation rates lower than a preset safe distance threshold are selected to obtain a set of dangerous components. Obtain the motor torque corresponding to the set of hazardous components, extract the peak value, and obtain the instantaneous peak torque; The duration for which the instantaneous torque peak exceeds a preset peak torque threshold is counted to obtain the fluctuation duration; Based on the duration of the fluctuation, a timing compensation value is obtained by mapping through a preset timing compensation mapping relationship; Based on the optimized instruction sequence, the execution time is added to the timing compensation value to obtain the final instruction sequence.

7. The automated control method for core extraction machining according to claim 1, characterized in that, The process of analyzing processing effect deviations based on the final instruction sequence, obtaining processing effect deviation results, and determining whether to adjust dynamic response characteristics based on the processing effect deviation results includes: Based on the final instruction sequence, a simulation run is performed using a pre-built processing simulation model to obtain the simulation trajectory sequence; Calculate the normal distance between the simulated trajectory sequence and the preset ideal machining surface to obtain a set of normal distances, and take the maximum value of the set of normal distances as the machining deviation value; When the processing deviation value does not exceed the preset processing deviation threshold, the processing effect is deemed qualified; When the processing deviation value exceeds the preset processing deviation threshold, the processing effect is determined to be unqualified, and the dynamic response characteristic adjustment process is initiated.

8. The automated control method for core extraction machining according to claim 7, characterized in that, The dynamic response characteristic adjustment process includes: The path deviation ratio is obtained by calculating the percentage of the normal distance set that exceeds the processing deviation threshold. Calculate the difference between the path deviation ratio and the preset deviation ratio threshold to obtain the excess ratio value, and obtain the position loop feedforward gain coefficient of the PID controller of the component; Multiply the excess ratio value by a preset excess coefficient to obtain the coefficient increment; The position loop feedforward gain coefficient is incrementally adjusted using the coefficient increment as the step size to obtain the coordination coefficient, and the coordination coefficient is then reconfigured to the PID controller.

9. The automated control method for core extraction machining according to claim 1, characterized in that, The process of converting the final instruction sequence into a low-level machine code sequence and then sending it to the device execution layer for execution, while performing real-time fine-tuning of the processing rhythm, includes: Based on the final instruction sequence, it is converted into a low-level machine code sequence by a cross compiler and then sent to the device execution layer for execution. Obtain the instruction execution interval between two consecutive adjacent instructions in the final instruction sequence, and take the reciprocal of the instruction execution interval to obtain the actual execution frequency; Calculate the difference between the actual execution frequency and the preset execution frequency to obtain the execution frequency difference; Extract the time corresponding to the execution frequency difference exceeding the preset execution frequency difference threshold to obtain the insufficient time period, and filter out the final instruction sequence in the insufficient time period to obtain the abnormal instruction sequence; Based on the abnormal instruction sequence, the synchronous execution mode is split into asynchronous execution mode using the earliest deadline first algorithm to obtain the asynchronous execution instruction sequence. Then, the asynchronous execution instruction sequence is smoothed by the S-shaped acceleration and deceleration algorithm to obtain the optimized control sequence. The optimized control sequence replaces the abnormal instruction sequence, which is then converted into a low-level machine code sequence by a cross-compiler and sent to the device execution layer for execution.

10. An automated control system for core extraction machining, characterized in that, include: The data acquisition module is used to acquire the motor rotation angle, motor speed, and motor torque of the component to obtain the raw dataset; The feature construction module is used to filter data based on the original dataset to obtain the sequence to be analyzed, and to construct the component operation coordination deviation features based on the sequence to be analyzed to obtain the coordination deviation features. The sequence analysis module is used to perform instruction matching based on the coordination deviation characteristics to obtain a preliminary instruction set, and to perform execution sequence logic analysis based on the preliminary instruction set to obtain a smooth timing framework. The response analysis module is used to allocate time slots and link resources according to the smooth timing framework, obtain a preliminary instruction sequence, and perform execution layer response delay analysis based on the preliminary instruction sequence to obtain the response difference. The response optimization module is used to select the optimal transmission path based on the response difference to obtain the target transmission path, and to reconstruct the instruction link of the preliminary instruction sequence based on the target transmission path to obtain the optimized instruction sequence. The conflict correction module is used to analyze the component motion conflict based on the motor rotation angle, obtain the timing compensation value, and correct the instruction execution timing of the optimized instruction sequence based on the timing compensation value to obtain the final instruction sequence. The effect analysis module is used to perform processing effect deviation analysis based on the final instruction sequence, obtain processing effect deviation results, and determine whether to perform dynamic response characteristic adjustment process based on the processing effect deviation results. The output module is used to convert the final instruction sequence into a low-level machine code sequence and send it to the device execution layer for execution, and to make real-time fine adjustments to the processing rhythm.