Multi-shaft motor control system based on ARM and ASIC

Through the multi-axis motor control system based on ARM and ASIC, the problems of multi-axis synchronous drift and path conflict in cabin spraying operations are solved, and high-precision and stable multi-axis synchronous motion control is achieved, which improves the system's fault tolerance and operating efficiency.

CN120301254APending Publication Date: 2025-07-11JIANGSU JUNHECHEN ELECTRONIC TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510434076.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

In the existing multi-axis motion control system, in a highly closed, strong interference and high-precision cabin spraying operation environment, there are problems of multi-axis synchronous drift, control failure and path conflict, making it difficult to achieve long-term and high-frequency synchronous motion control.

Method used

The multi-axis motor control system based on ARM and ASIC is adopted. The path planning and state prediction are performed through the control processing module, the real-time execution module performs hardware logic synchronization, the state mirroring building module monitors differences in real time, and the path compensation module is used to dynamically call candidate track segments to realize path self-recovery and synchronization operations.

Benefits of technology

It significantly improves the consistency and synchronization accuracy of multi-axis execution, reduces motion drift phenomenon, improves path control continuity and stability in complex environments, and enhances the system's fault tolerance and operating efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120301254A_ABST
    Figure CN120301254A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-axis motor control system based on an ARM and an ASIC, and particularly relates to the technical field of multi-axis motor control, and the system comprises a control processing module, a real-time execution module, a state mirror image construction module and a path compensation module. The control processing module generates a target trajectory in combination with a multi-axis task and spatial constraints, and constructs a prediction model; the real-time execution module realizes multi-axis synchronous control through a hardware sequencer; the state mirror image construction module maintains a difference state of feedback and prediction in real time; the path compensation module dynamically calls candidate track fragments according to the difference vector when the path compensation module is abnormal, and path self-recovery is completed; according to the method, the multi-axis path synchronization precision is improved, the intelligent selection and space adaptation capability of path compensation is enhanced, meanwhile, a feedback anomaly recognition and fault-tolerant control mechanism in an interference state is provided, the track continuity in a cabin complex environment and the stability of a control system are ensured, and the comprehensive effects of high precision, high robustness and uninterrupted operation are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of multi-axis motor control. More specifically, the present invention relates to a multi-axis motor control system based on ARM and ASIC. Background Art

[0002] In the process of intelligent manufacturing and automated shipbuilding, industrial robots are increasingly widely used in fields such as spraying, welding, and assembly. Among them, robotic equipment for surface spraying operations on the internal special-shaped structures of the hull (such as narrow cabins, curved inner walls, etc.) faces technical challenges far beyond traditional operating platforms because it needs to operate in a special environment with high enclosure, strong interference, and high-precision requirements. Spraying robots usually have multiple motion axes (joints) and need to achieve high-speed, precise, and long-time synchronous motion control to ensure the coherence of the spraying trajectory and the consistency of coverage.

[0003] Currently, the mainstream multi-axis motion control systems mainly adopt control architectures based on DSP (Digital Signal Processor) or general MCU (Micro Control Unit). These control systems mostly rely on software interrupts and timing polling mechanisms to achieve synchronization between multiple axes and motion trajectory calculation. Although they can meet most control requirements in standard industrial environments, obvious technical defects are exposed in the following specific scenarios:

[0004] Multi-axis synchronous drift problem: In the spraying operation inside the ship's cabin, the robot often needs to maintain multi-axis synchronous motion at the millisecond level for several consecutive hours to match the curved paths of complex inner walls. In the long-term operation of traditional control systems, there are problems such as task queuing delays and cache refresh asynchronization, resulting in slight "phase drift" in the motion trajectories between multiple motor axes, misalignment of the spraying path or uneven thickness. In severe cases, the entire spraying task is scrapped.

[0005] Control failure problem in a strong electromagnetic interference environment: There are a large number of high-power devices (welding machines, frequency converters, communication devices, etc.) in the cabin environment, bringing strong electromagnetic interference. In this environment, communication systems based on general-purpose IO or CAN bus are prone to data packet loss or misjudgment, causing motor step loss or motion interruption, and there are obvious safety hazards.

[0006] Complex path space conflict problem: The enclosed special-shaped space poses higher requirements for the trajectory prediction and cooperative control accuracy of the robot. Traditional control systems mostly adopt simplified models in the path planning process and are difficult to achieve real-time obstacle avoidance and rapid switching of redundant paths, often resulting in control dead zones or path conflicts between robotic arms, and even causing physical collisions. Therefore, the present invention proposes a multi-axis motor control system based on ARM and ASIC to solve the above problems. Summary of the Invention

[0007] To achieve the above object, the present invention provides the following technical solutions:

[0008] A multi-axis motor control system based on ARM and ASIC, comprising:

[0009] A control processing module, configured to perform path planning according to a multi-axis motion task, construct a motion state prediction model, and generate target trajectory data in combination with preset spatial structure constraints in a complex operating environment;

[0010] A real-time execution module, configured to generate a pulse width modulation signal, execute position control, collect motor feedback by using hardware logic without relying on an interrupt scheduling structure, and complete multi-axis synchronization operations in a fixed time sequence through an on-chip hardware sequencer;

[0011] A state mirror construction module, configured to dynamically maintain a mirror of the current multi-axis motion state in the control processing module, and calculate the difference vector between the feedback value and the predicted value in real time;

[0012] A path compensation module, configured to dynamically call alternative path segments from a preset candidate trajectory set according to the difference vector when it is detected that the feedback error exceeds the mirror threshold or an external disturbance triggers a path anomaly, so as to achieve path self-recovery and ensure motion coherence;

[0013] Among them, the candidate trajectory set is preset according to the modeling of a closed cabin structure, and the path compensation module judges the conflict level according to the cabin wall curvature or the inter-axis space distance, and automatically selects the minimum offset path as the repair solution to improve the continuity and accuracy of path control in a complex environment.

[0014] In a preferred embodiment, during the path planning process, the control processing module constructs a target attitude sequence by using a pre-built three-dimensional surface model for the geometric features of the closed cabin in the cabin operation environment, and combines the path continuity of the sequence within the local cabin wall curvature range to perform initial generation of candidate trajectories;

[0015] During the generation of candidate trajectories, the control processing module adopts a position point density adaptive interpolation method, sets the sampling distribution density according to the change rate of the cabin wall surface, and introduces multiple fitting function models during the trajectory vector transformation process, specifically including any one of a multi-segment cubic spline function, a Bessel function, and a minimum deformation path function, and selects the optimal fitting method according to the current spatial continuity parameter.

[0016] In a preferred embodiment, the real-time execution module completes multi-axis synchronous output through a hardware sequencer. In the sequencing mechanism, independent time slots are allocated for each motor axis, and within each control cycle, the update of its pulse width modulation signal and the acquisition of feedback data are precisely scheduled according to the time slot. The time slots are initialized according to a fixed priority level and a time offset algorithm, where the offset algorithm realizes staggered updates based on the axis number multiplied by the reference interval of the time slot to prevent signal concentration conflicts.

[0017] In a preferred embodiment, when constructing the mirror state of a multi-axis motor, the state mirror construction module simultaneously maintains a set of timing index caches. This cache records the differences between the feedback values and predicted values of each axis in recent several control cycles, calculates the mean change rate of the error through a sliding window mechanism, and sets a judgment threshold to determine whether the cumulative trend of the deviation is predictable.

[0018] If the current trend value exceeds the judgment threshold, the control processing module calculates an advance adjustment factor according to the trend direction. The adjustment factor is obtained by coupling the current deviation change slope with the axis-level inertia model, predicting the synchronous fluctuations occurring in the next cycle.

[0019] In a preferred embodiment, when the path compensation module calls a candidate trajectory segment to repair the current path anomaly, it first performs a vector similarity analysis on the difference vector between the current feedback state and the target path, and then sequentially compares the spatial consistency index, the bulkhead curvature adaptation index, and the multi-axis angle conflict level of each path segment in the preset candidate trajectory set.

[0020] The multi-axis angle conflict level is generated based on the linkage angle sequence between the axes, and the conflict level index is obtained by comparing the cumulative change in joint angles with the spatial boundary constraint value.

[0021] In the selection of path segments, the path compensation module always preferentially selects the path segment with the smallest offset and the lowest conflict level to avoid physical interference in complex sections of the cabin structure.

[0022] In a preferred embodiment, according to the dynamic change characteristics of the cabin operation tasks, the control processing module sets the three tasks of path advancement, path anomaly detection, and state mirror refresh as independent priority queues respectively, and dynamically adjusts the scheduling frequencies of each task according to the current operation stability.

[0023] The operation stability is obtained by calculating the ratio of the feedback signal stability rate index to the interference response sensitivity.

[0024] The feedback signal stability rate index is defined as: within a set sliding time window, the number of cycles in which the change amplitude of the feedback signal is lower than the stability threshold in consecutive cycles is divided by the total number of cycles in the window, and the resulting ratio is the feedback signal stability rate.

[0025] The interference response sensitivity is defined as the ratio of the time required for the feedback signal to reach the steady-state interval after an external disturbance event is triggered to the time of the last stable period before the disturbance occurs;

[0026] When the job stability value is higher than the preset job scheduling threshold, the scheduling mechanism will increase the occupancy ratio of path anomaly detection and reduce the path advancement rate, so as to achieve a conservative handling of the unstable state. When the environment is stable, the scheduling focus switches to path planning advancement to improve job efficiency.

[0027] In a preferred embodiment, when the state mirror construction module analyzes the difference between the feedback value and the predicted value, it simultaneously calculates the first derivative and the second derivative of the change rate of the multi-axis feedback signal, and sets a mutation determination threshold for detecting the continuity and non-linearity degree of feedback anomalies;

[0028] If there are second derivative fluctuations exceeding the mutation determination threshold within three consecutive control cycles, and the change rate cross negative slope exceeds three times, it is determined as a sudden feedback disorder caused by interference rather than mechanical error fluctuations;

[0029] At this time, the control freezing mechanism is automatically enabled. In the frozen state, the path advancement is paused, the state mirror is kept stable, and the standby path preloading function is started to prepare for rapid recovery, ensuring the fault tolerance and safety stability of the control system in the complex interference environment of the cabin.

[0030] In a preferred embodiment, when the path compensation module calls the path segments in the candidate trajectory set, it constructs a path selection scoring function, which is based on three indicators: one is the angle difference between the direction vector of the path segment and the direction vector of the current trajectory, the second is the spatial error between the end feedback attitude point and the trajectory fitting point, and the third is the synchronization delay estimation value of this trajectory segment;

[0031] After the scoring calculation, all candidate trajectories are scored and sorted, and only the trajectory segments with a total score higher than the path stability threshold are retained. Before the path switch is executed, the path compensation module inserts a transition segment with a slow-changing curvature between the tail of the current trajectory segment and the head of the new path segment through local curvature estimation. The slow-changing segment is constructed by five-point mean median interpolation to ensure that there is no mutation at the trajectory splicing point and maintain the smoothness of the path repair action and the rhythm continuity of the spraying movement.

[0032] In a preferred embodiment, when the control processing module constructs the motion state prediction model, it calculates the dynamic delay compensation amount by fusing the actual execution time of the current path segment, the time delay of the feedback signal, and the rotational inertia parameters of each motor axis. This compensation amount is used to correct the timing position of the target path point in advance;

[0033] The calculation process of the compensation amount includes the following steps:

[0034] Collect the execution times and feedback response times of consecutive multiple cycles in the acquisition path segment, and construct a slope ratio model between the mean feedback delay and the execution time growth curve to describe the timing deviation trend under the current control state;

[0035] Based on the moment of inertia of each axis under the current load, establish an inertia response adjustment factor for each axis by referring to the empirical mapping relationship between the rotational acceleration and the unit displacement delay;

[0036] Multiply the adjustment factor by the output result of the slope ratio model to obtain the dynamic delay compensation amount, and apply it to the time tags of the target path points respectively on an axis-by-axis basis to generate the target state sequence after advance correction.

[0037] The technical effects and advantages of the present invention:

[0038] The present invention constructs a motion state prediction model through a control processing module, and combines multi-dimensional factors such as execution time, feedback delay, and axis-level moment of inertia to calculate the dynamic delay compensation amount for advancing and correcting the time tags of the target path points. This mechanism no longer relies on static settings or empirical coefficients, but responds in real time to the actual timing deviation trend in the control system, and adapts to the response differences brought by different motor axes due to load, inertia, or feedback lag. Through the "feedforward compensation" of the path advancement rhythm, the system can significantly improve the consistency and synchronization accuracy of multi-axis execution in the cabin environment with long paths, multiple postures, and high-frequency switching, reduce the cumulative error, and effectively suppress the motion drift phenomenon.

[0039] The present invention introduces a path scoring function in the path compensation module, and takes the three indicators of the direction angle difference, the attitude matching error, and the synchronization delay estimation value as the core evaluation dimensions, and combines the spatial structure information of the candidate path segment to perform multi-dimensional scoring and optimization. Compared with the traditional compensation logic that relies on manual intervention or fixed priority order, this scoring mechanism can automatically screen the optimal path segment according to the current execution state, dynamically construct a gradually changing curvature transition segment, and ensure the continuity and smoothness of path splicing. This strategy is especially suitable for complex situations such as asymmetric bulkheads, curved surface intersections, and insufficient space redundancy in the closed space structure of the cabin, and can greatly improve the real-time performance, physical adaptability, and trajectory output stability of trajectory repair.

[0040] The present invention introduces a joint determination mechanism of the change trend of the second derivative of the feedback error and the number of times of slope crossing in the state mirror construction module, which is used to highly sensitively identify the feedback disorder behavior caused by sudden interference, and combines the control freezing strategy and the standby path preloading mechanism to achieve fast fault tolerance processing for the mutated interference state. Without relying on manual intervention, the system can automatically pause path advancement, lock the state mirror and prepare an alternative path. When the feedback returns to the stable range, it can quickly and smoothly switch to resume the normal operation rhythm. In the cabin operation scenario with frequent electromagnetic interference, serious structural shielding, and unpredictable feedback jitter, this mechanism can significantly improve the fault tolerance ability and operation continuity of the control system, reduce the system misstop rate, and ensure the task completion efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] For the convenience of those skilled in the art to understand, the present invention will be further described below in conjunction with the accompanying drawings;

[0042] Figure 1 It is a schematic diagram of a multi-axis motor control system based on ARM and ASIC in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0043] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

[0044] Refer to Figure 1 The following embodiments are obtained:

[0045] Embodiment 1:

[0046] A multi-axis motor control system based on ARM and ASIC includes:

[0047] A control processing module configured to perform path planning according to multi-axis motion tasks, construct a motion state prediction model, and generate target trajectory data in combination with preset spatial structure constraints in a complex operation environment; the control processing module is the brain of the entire system, responsible for receiving upper-layer task instructions, and planning an executable path according to specific multi-axis motion targets; when planning the path, geometric constraints in the environment (such as narrow cabin space and curved walls) will be considered; constructing a motion state prediction model, that is, calculating in advance the position or state that the motor should be in at a future moment for comparison with the actual feedback value; its core task is: "figure out how to go and give the target trajectory".

[0048] The real-time execution module is configured to generate pulse-width modulation signals, perform position control, collect motor feedback using hardware logic without relying on an interrupt scheduling structure, and complete multi-axis synchronization operations in a fixed timing through an on-chip hardware sequencer. The real-time execution module is the "hands, feet and nerves" of the system, specifically responsible for executing motion control commands at high speed and with high precision. All real-time generation of motor control signals (such as pulse-width modulation PWM), position detection, feedback collection, etc. are all completed here. To avoid delays or conflicts caused by traditional interrupt-based scheduling, a hardware sequencer design is adopted to ensure that multi-axis synchronization actions are executed under strict timing. Its essential role is: "truly and safely execute the planned path".

[0049] The state mirror construction module is configured to dynamically maintain a mirror of the current multi-axis motion state in the control processing module and calculate the difference vector between the feedback value and the predicted value in real time. The responsibility of the state mirror construction module is to "create a virtual self" and compare in real time. It will maintain a "mirror copy" in the control processing module that is highly consistent with the actual motor operating state. By continuously comparing the predicted value and the actual feedback value, a difference vector is generated to determine whether the motion deviates from the expectation. The difference vector can be used to adjust the path step size in advance or trigger an exception mechanism.

[0050] The path compensation module is configured to dynamically call alternative path segments from a preset candidate trajectory set according to the difference vector when it detects that the feedback error exceeds the mirror threshold or an external disturbance triggers a path anomaly, so as to achieve path self-recovery and ensure motion coherence. When the system is running and there is an excessive feedback error or external interference (such as electromagnetic waves), the original path may "become impassable" or "fail". The path compensation module will immediately call a new path segment from the candidate trajectory set to replace the current path. And adjust the connection method between the new path and the original path according to the difference vector (such as selecting the minimum offset, minimum conflict path). Ensure that the robot can "avoid problems and continue to move forward" even in a complex environment.

[0051] Among them, the candidate trajectory set is preset according to the modeling of the enclosed cabin structure. The path compensation module judges the conflict level according to the curvature of the cabin wall or the distance between axes, and automatically selects the minimum offset path as the repair solution to improve the continuity and accuracy of path control in a complex environment.

[0052] ARM (Reduced Instruction Set Processor): A low-power and high-efficiency processor architecture widely used in embedded systems, such as smartphones, industrial controllers, etc. Its role in this system: undertake high-level logic processing tasks such as task scheduling, path calculation, and mirror construction.

[0053] ASIC (Application Specific Integrated Circuit): A chip customized for a specific function, not general-purpose but with extremely high performance; its role in this system: undertaking underlying control tasks with high speed and fixed timing, such as multi-axis synchronous execution, feedback acquisition, interference filtering, etc.

[0054] The core advantage of the entire system lies in: ARM is responsible for "thinking and computing", ASIC is responsible for "doing and sensing", and through the state mirroring and path compensation mechanism, an intelligent control closed-loop that can operate stably and reliably even in the cabin operation environment is achieved.

[0055] During the path planning process of the control processing module, in view of the geometric characteristics of the enclosed cabin in the cabin operation environment, a target pose sequence is constructed using a pre-built three-dimensional surface model, and combined with the path continuity within the local cabin wall curvature range of this sequence, the initial generation of candidate trajectories is carried out. During the generation of candidate trajectories, the control processing module adopts a position point density adaptive interpolation method, sets the sampling distribution density according to the change rate of the cabin wall surface, and introduces multiple fitting function models during the trajectory vector transformation process, including any one of the multi-segment cubic spline function, Bezier function, and minimum deformation path function, and selects the optimal fitting method according to the current spatial continuity parameter to ensure that when the subsequent path compensation module calls the trajectory segment, the trajectory segment already has high matching, high fitting degree, and good spatial safety margin, thereby improving the smoothness and adaptability of path repair.

[0056] In the present invention, the spatial structure inside the cabin usually has significant geometric irregularities, especially manifested in features such as long curved surfaces, asymmetric inner walls, nested support structures, etc. To adapt to such spaces, the pre-built three-dimensional surface model can be generated by lidar scanning, structure modeling software (such as ReCap or SolidWorks), forming digital cabin data including parameters such as inner wall point cloud, key connection surfaces, and cabin section height. The target pose sequence is the basis for trajectory planning constructed by arranging the "desired pose" (including position and attitude angle) of the spraying end effector in this three-dimensional model in the form of a time axis.

[0057] Path continuity specifically refers to the smoothness of the curvature change and position continuity of the trajectory on the cabin wall surface here. By analyzing the change amplitude of the tangent direction between consecutive poses, it is judged whether there are jumps or unstable segments in the trajectory segment. The local cabin wall curvature range is defined as the average normal curvature within the local neighborhood of the pose point, reflecting the spatial bending degree of the cabin wall at this point. Its influence on trajectory generation is that when the local curvature changes steeply, the path continuity requirement is high, and the interpolation strategy needs to encrypt sampling to ensure smooth movement.

[0058] During the candidate trajectory generation process, the control processing module adopts a position point density adaptive interpolation method. This method means that in the initial stage of path generation, instead of presetting fixed-spacing sampling points, the sampling density is dynamically adjusted according to the change rate of the cabin wall surface. The change rate can be evaluated by the included angle between three consecutive points or the normal change gradient; if the continuous change of the wall surface is large, the corresponding interpolation point spacing is reduced to improve the fineness and responsiveness of trajectory fitting.

[0059] In the existing multi-axis path control system, in order to make the control target move smoothly along the environmental boundary or constraint area, a class of mathematical fitting functions is often introduced during the path generation and correction process to connect discrete sampling points into a continuous and smooth motion trajectory. This type of function model is mainly used in the process of trajectory vector transformation: fitting the transition section between attitude point sets to make the control instructions differentiable and executable continuously; compressing the motion discontinuity caused by path mutations; matching the complex environmental boundary morphology.

[0060] The following are three fitting function models widely used in existing control technologies and their specific implementation methods:

[0061] Multi-segment cubic spline function fitting method: The cubic spline function \(P_i(t)\) is a piecewise cubic polynomial function constructed between every two adjacent path points, and it is ensured that the function values, derivatives, and second derivatives are continuous at the connection points of each segment. In practical applications:

[0062] First, number the path points in order and construct it in the form of:

[0063] \(P_i(t)=a_i + b_i*t + c_i*t^2 + d_i*t^3\), where \(t\in[0,1]\);

[0064] It can also be expressed as: \(P\) i (t)=a i +b i ·t + c i ·t 2 +d i ·t 3 ;

[0065] The coefficients \(a_i - d_i\) of each segment are obtained by solving a system of linear equations with continuous positions, first derivatives, and second derivatives of the path points; the overall final path segment remains "curve smooth" and "direction stable", which is suitable for most path segments with mild curvature changes. This fitting method is suitable for the trajectory construction of regular surfaces, straight sections of cabins, and circular arc sections. The advantages are fast fitting speed and low memory consumption, and it is often used in the trajectory generation modules of processing robots and collaborative arms.

[0066] Bessel function fitting method: The Bessel fitting method is often used in areas where the path change direction is relatively complex, and the overall path shape is controlled by control points. Its typical application is to construct a cubic Bessel curve:

[0067] The curve shape is determined by using the starting point P0, the ending point P3, and two intermediate control points P1 and P2. The functional representation is: B(t) = (1 - t)^3 * P0 + 3(1 - t)^2 * t * P1 + 3(1 - t) * t^2 * P2 + t^3 * P3, where t ∈ [0, 1]; the parameter variable t represents the position on the curve. As t changes from 0 to 1, B(t) represents a point on the curve; it can also be expressed as:

[0068] B(t) = (1 - t) 3 ·P0 + 3(1 - t) 2 ·t·P1 + 3(1 - t)·t 2 ·P2 + t 3 ·P3;

[0069] By reasonably arranging the intermediate control points, the "bending direction, amplitude, and softness" of the curve can be controlled;

[0070] In the "spatial bending segments" generated at the corners of the cabin, arc transitions, and between complex support columns, Bessel curve fitting can reduce the direction jumps caused by path switching points. This fitting method has been widely used in control systems such as the navigation path of service robots and the spatial compensation segment of spraying robotic arms, with the advantages of both control flexibility and clear geometric expression.

[0071] Minimum deformation path function fitting method: This function model constructs the path as "the path with the minimum deformation between target points", often based on function objectives such as minimum deformation energy or minimum bending energy, such as the integral of the square of the minimum second derivative: The construction optimization objective is to minimize the change in the curvature of the overall path, such as minimizing ∫(d 2 x / dt 2 ) 2 dt; The intermediate control points of the path are obtained by using the constrained optimization method to minimize the deformation degree of the overall path shape while meeting the requirements of the starting and ending points; it is especially suitable for working conditions with high requirements for path flexibility and high robustness in closed spaces. This method is widely used in industrial spraying robots, in-cabin maintenance robots, and spatial trajectory avoidance path design scenarios, and is suitable for replacing the time-consuming process of manually planning path generation.

[0072] Although the above function model can effectively support basic trajectory construction and path continuity guarantee, a unified logic has not been established in the directions of multi-function switching, adaptive interpolation, and dynamic adaptation of bulkhead geometry. At the same time, after a path anomaly occurs, most of the existing methods require manual intervention for recalculation and do not have the ability of "automatic switching and alternative call of trajectory segments", resulting in low recovery efficiency and high risk of control interruption.

[0073] The control processing module selects the optimal fitting method according to the current space continuity parameter, that is, automatically switches the interpolation strategy in different cabin segments. For example, spline functions are used for fitting in straight segments or regular arc segments, while Bezier functions or deformed path functions are switched to for compensation fitting when crossing the interface or the structural transition region. This switching is automatically completed based on the continuity discrimination factor, avoiding manual intervention.

[0074] The finally generated candidate trajectories have high matching (i.e., the fitting degree and the curvature error of the three-dimensional bulkhead are less than the set threshold), high fitting degree (continuous between segments, smooth curvature change), and good spatial safety margin (maintaining the minimum safety distance from the bulkhead), so as to ensure that the path compensation module does not need to recalculate the environmental constraints when calling these trajectory segments, and can directly replace the execution trajectory, improving the smoothness and adaptability of path repair.

[0075] For example, in a cabin spraying scenario, the robot needs to continuously move along the bottom arc area of the inner wall. The curvature of this area changes at about 50 degrees per meter. After the control processing module identifies this change rate in the initial path generation stage, it uses dense interpolation and selects the Bezier function to fit this section of the trajectory. Compared with fixed spacing + linear fitting, the system significantly reduces the posture mutation points in the simulated path call, thus avoiding the "trajectory fault" after path compensation and ensuring the uniformity of the spraying trajectory.

[0076] The real-time execution module completes the multi-axis synchronous output through the hardware sequencer. In this sequencing mechanism, an independent time slot is allocated for each motor axis, and the pulse width modulation signal update and feedback data acquisition are precisely scheduled according to this time slot in each control cycle. The time slots are initialized according to the fixed priority level and time offset algorithm. The offset algorithm realizes staggered update based on the axis number multiplied by the time slot reference interval to prevent signal concentration conflicts. To ensure the synchronous accuracy in the high electromagnetic interference environment of the cabin, the sequencer is equipped with interference stability filtering logic, which automatically compares the signal consistency before and after the execution of each time slot. If the deviation exceeds the allowable range, the soft pause mechanism is triggered to delay the output, ensuring the rhythm stability at the physical output level and the multi-axis synchronous consistency.

[0077] In traditional multi-axis control, task scheduling usually relies on an interrupt-triggered mechanism, that is, the processor interrupts the service program at different times to process the instructions of each axis. However, there are problems such as delay accumulation and uneven response when the task is intensive in interrupt scheduling. The present invention adopts a non-interrupt structure, that is, the real-time execution module independently generates the control signals of each axis (such as the PWM pulse width modulation signal used to drive the power device) through a preset hardware logic circuit, without the need for the central processor to issue an interrupt instruction. Specifically, this module may include: a PWM signal generator circuit (based on a counter and a comparator); a motor encoder feedback reading circuit (such as a Hall sensor, a rotary encoder signal sampling module); a multi-axis data buffer and a synchronous clock unit. These hardware units are controlled by a unified clock source and sequentially execute tasks such as "signal output, feedback reading, and position update" within a fixed time slice, avoiding timing overlap or jitter.

[0078] In the Sequencer mechanism, the control system no longer sends signals to all axes at a "unified time point", but divides a complete control cycle (such as 1 millisecond) into several sub-time slots, and each time slot is exclusively used to control a certain motor axis. For example: If the system controls six motor axes and a control cycle is 600 microseconds; the width of each time slot is set to 100 microseconds; the 1st - 6th time slots are respectively bound to axis 1 to axis 6, and the PWM refresh and position sampling tasks are sequentially executed; in this way, after one round, each axis completes the tasks within 1 millisecond, and there is no resource conflict between them. This structure ensures: synchronous execution (each axis completes all necessary operations within the cycle); non-overlap (avoiding signal line or internal bus competition); timing determinacy (the execution order of time slices is fixed).

[0079] The time slot initialization adopts a simple and efficient algorithm: based on the axis number N, take N × time slot interval as the start offset time of this axis; for example, if the axis number is 3 and the reference interval is 100 microseconds, then axis 3 will start to execute at the 300th microsecond of the current cycle; all time slots are arranged in axis order, and the task scheduling priority is fixed, which can avoid multiple axes requesting resources at the same time, resulting in bus congestion or signal jitter. This mechanism belongs to a hardware-level polling timing scheduling strategy, which does not require the participation of the operating system, has a low implementation cost, and is suitable for embedded control platforms or inside ASIC chips.

[0080] In the cabin, equipment such as electric welding, frequency converters, and radars will generate transient high-frequency electromagnetic interference, which seriously affects signal transmission (especially PWM and feedback lines). The present invention adopts an interference-stabilized filtering logic, and its implementation method is as follows: within each time slot: in the first step, sample the current feedback signal and record its stability flag (such as voltage noise, level change frequency); in the second step, sample the same feedback signal again at the end of the task; judge the difference between the two sampled values before and after; if the difference exceeds the set level fluctuation threshold (such as ±5%), it is considered to be affected by interference, and the soft pause mechanism is triggered.

[0081] The soft pause mechanism does not immediately skip the axis control, but rather: delays the output or feedback sampling of the axis; waits for a "redundant time slice" to be inserted for compensation execution; ensures that the output signal is highly consistent with the expected stable value, and then continues to schedule the next axis. This mechanism enables the avoidance of output rhythm disorders or data errors from entering the control system even in the presence of short-term interference in a harsh environment, thereby enhancing the synchronization stability and control accuracy of the entire multi-axis system.

[0082] For example, in a closed area of the cabin, a robot controls six independent motors. Originally, an interrupt-based scheduling was used. When high-frequency interference occurred, the feedback signal deviated, resulting in a disordered control sequence. After adopting the structure of the present invention, a 600-microsecond cycle is set by the hardware sequencer, with a 100-microsecond time slot allocated for each axis, and feedback consistency detection is added within each time slot. In the test, even when the electromagnetic interference lasted for 120 microseconds, the system successfully resisted misjudgment through the soft pause mechanism, and the six-axis synchronization error was reduced to ±2 microseconds, far better than the existing average level of ±20 microseconds.

[0083] When the state mirror construction module constructs the mirror state of the multi-axis motor, it simultaneously maintains a set of timing index caches, which record the differences between the feedback values and predicted values of each axis in recent control cycles. The system calculates the mean change rate of the error through a sliding window mechanism and sets a judgment threshold to determine whether the deviation accumulation trend is predictable. If the current trend value exceeds the judgment threshold, the control processing module calculates an advance adjustment factor according to the trend direction. The adjustment factor is obtained by coupling the current deviation change slope with the axis-level inertia model, indicating the possible synchronization fluctuations in the next cycle. In the path update stage of the control processing module, this adjustment factor is directly used to correct the interpolation step size between path points, thereby reducing the risk of synchronization drift during long-term high-speed operation of the system in the cabin.

[0084] "State mirror" refers to a "software-layer virtual state copy" maintained for each motor axis inside the control processing module. This copy simulates the theoretical operating state that the motor should be in currently. It is a target state deduced based on path planning output, control instruction execution timing, and dynamic models. By comparing with actual sensor feedback (such as position encoders, speedometers) data, the actual operating state can be dynamically evaluated for deviation from the theoretical state.

[0085] The "difference vector" is the difference between the current predicted value and the actual feedback value of each motor axis in each control cycle, which usually includes multiple components such as position differences (X, Y, Z) and attitude differences (angles Pitch, Yaw, Roll) in three-dimensional space. The value and direction of this vector reflect the system synchronization accuracy and control response deviation.

[0086] A difference buffer array is established for each motor axis inside the system, and each item of this array contains a timestamp and a difference vector value. For example, if the system control cycle is 1 millisecond and the set cache length is 100, the system will continuously store the difference vector data within 100 cycles, which enables the system to perform dynamic analysis on the "difference change trend".

[0087] The sliding window mechanism is a local mean calculus method based on traversing the difference cache section with a fixed step size, specifically including: setting the window size W (for example, 10 cycles); calculating the average difference vector modulus length, that is, avg_Δ, for each window; calculating the mean difference of consecutive multiple windows, and then obtaining the "mean change rate" R = avg_Δ(n) - avg_Δ(n - 1); n and n - 1 respectively represent two adjacent numbered windows. If this R value steadily increases, it indicates that the system error is continuously expanding and has a "predictable offset trend". The system presets a group of "change rate determination thresholds", such as 0.02 mm / ms, as the criterion for whether to enter "early intervention".

[0088] The calculation of the adjustment factor is part of the system's predictive control, and its formulaic expression is as follows: the deviation change slope S = d(Δ) / dt, which is obtained by fitting the difference values of consecutive cycles; the axis-level inertia model is predefined as a "delay amplification factor" K_i, which can be deduced based on parameters such as the load moment of inertia, transmission efficiency, and reduction ratio of this motor axis, and can be obtained through existing technologies such as the expert assignment method or machine learning models such as convolutional neural network models and fuzzy inference engines that have been pre-trained; finally, the adjustment factor A = S × K_i, and its positive or negative value determines whether the path is early interpolation or contraction interpolation, and the absolute value determines the adjustment amplitude.

[0089] When the system generates the target trajectory for the next cycle, it multiplies the interpolation spacing ΔL of each path point by the inverse direction correction amount of the adjustment factor A to form a new step size ΔL' = ΔL - A, achieving fine-tuning of the path advancement speed. This processing method is essentially a "feedforward compensation control based on error trend" and has the following advantages: it can actively perform fine-tuning before the error expands, avoiding sudden trajectory correction; when operating at high speed or during long-distance operation of the cabin body, it effectively reduces synchronous drift (for example, the end effector is 1 - 2 millimeters ahead of or behind the planned position); it is particularly suitable for application scenarios with high requirements for long-term continuous path consistency in enclosed special-shaped structures such as ship cabins.

[0090] Take a multi-axis spraying robot spraying a 20-meter path on the cabin wall as an example. If the control cycle is 2 milliseconds, the system detects that the difference vector continues to grow in the first 10 seconds of operation, and the growth rate reaches 0.015mm / ms, triggering the calculation of the adjustment factor. Since this path segment has an inertial amplification effect in the forward propulsion direction (inertia factor K = 1.5), the final calculated adjustment factor is A = 0.015×1.5 = 0.0225. The system fine-tunes the path point interpolation step from 0.8mm to 0.7775mm, so that the actuator slows down slightly in advance and suppresses the drift trend. Through this mechanism, the cumulative error is reduced from 2.4mm after 10 seconds to within 0.6mm.

[0091] When the path compensation module calls the candidate trajectory segment to repair the current path anomaly, it first performs a vector similarity analysis on the difference vector between the current feedback state and the target path, and then compares the spatial consistency index, bulkhead curvature adaptation index and multi-axis angle conflict level of each path segment in the preset candidate trajectory set. The multi-axis angle conflict level is based on the linkage angle sequence generation method between the axes, and the conflict level index is obtained by comparing the cumulative joint angle change with the spatial boundary constraint value. In the path segment selection, the path compensation module always gives priority to the path segment with the smallest offset and the lowest conflict level to avoid physical interference in the complex section of the cabin structure. During the path compensation process, a flexible transition strategy is introduced for the curvature mutation segment at the path switching point, so that a continuous and smooth curvature transition is formed between the repair segment trajectory and the current trajectory, thereby ensuring that the continuity of the spraying operation is not interrupted.

[0092] In the present invention, the path compensation module has the ability to evaluate and make decisions on the path. When the current execution path cannot continue to execute due to abnormal feedback (such as excessive position deviation, feedback loss), the system needs to immediately select the path segment that best suits the current environment and control state from the candidate trajectory set. The candidate trajectory set has been generated in the early stage according to the geometric characteristics of the cabin, and is structured and saved as multiple discrete path segments. Each path segment contains: the coordinates and direction of the path start and end points; local cabin wall curvature information; multi-axis motion sequence and synchronization rhythm; spatial redundancy identification (minimum distance from the cabin wall) and other metadata.

[0093] The first step of "vector similarity analysis" means: performing angle analysis between the current feedback state vector (such as the position and direction of the end effector) and the initial vector of the candidate path segment, and using the direction cosine value to measure the degree of similarity: similarity = (V1*V2) / (||V1||×||V2||).

[0094] Where V1 is the current feedback direction vector, and V2 is the starting direction vector of the candidate trajectory segment. If the similarity is close to 1, it means that the direction consistency is high and it is suitable for cutting in and executing.

[0095] Subsequently, filter the paths in sequence according to the following three indicators: Spatial consistency indicator: Measure the continuity between the candidate trajectory segment and the current path segment in the entire three-dimensional cabin coordinate system; mainly calculate the position offset, direction mutation amplitude, contact bulkhead position error, etc. between the two paths; the spatial consistency can be represented by a weighted scoring function, for example, using the position difference and direction angle as weighted inputs.

[0096] Bulkhead curvature adaptation indicator: Extract the local bulkhead curvature value on the candidate path segment and compare it with the known curvature of the current cabin section; if the curvature discontinuity is too large (such as a <30% difference), it is considered that the path segment has good adaptability; it can prevent the path segment from conflicting with the cabin boundary or having abnormal wall attachment after cutting in.

[0097] Multi-axis angle conflict level: Extract the multi-axis linkage angle change sequence required for the path segment and perform conflict analysis; compare the cumulative joint angle change amount (the sum of angles per unit time Δθ_total) with the preset spatial constraint value (such as the maximum inter-axis composite angle, i.e., the spatial rotation tolerance); calculate a "conflict index" through the ratio of the two, and the higher the value, the more likely it is that mechanical interference will occur due to excessive inter-axis angles during path execution; the system sets a conflict index threshold (such as more than 360 degrees per second is a high risk), and paths above the threshold will be excluded.

[0098] The linkage angle sequence is the angle change schedule generated by the control system for each motor axis when planning the path, usually the sum of the angles rotated by each joint in each time period: The system calculates the total angle change in multiple periods through a sliding window and compares it with the allowable inter-axis composite rotation amplitude of the spatial boundary (such as nearby obstacles, walls, floors) where the path segment is located.

[0099] The conflict level index can be set as: Conflict index = Δθ_total / Spatial rotation tolerance. The larger the index, the more likely it is that self-collision, out-of-bounds or abnormal posture of the robotic arm may occur during path execution.

[0100] The path compensation module scores the candidate trajectory segments using a priority sorting mechanism. The scoring rules give priority to the following two factors: the minimum Euclidean distance between the starting position and the current feedback state; whether the multi-axis conflict level is at the lowest level (such as the "safe" level) to ensure the physical operation safety after the path enters; if multiple paths have the same score, further compare their dynamic stability during subsequent execution, such as curvature smoothness, execution time estimation, etc., and finally determine the optimal path.

[0101] During the path compensation process, a flexible transition strategy is introduced for the curvature mutation section at the path switching point, enabling a continuous and smooth curvature transition between the repaired section trajectory and the current trajectory, thereby ensuring the continuity of the spraying operation is not interrupted. Specifically: When the system executes a path segment switch, there may be a curvature mutation (i.e., tangent direction mutation, pose corner) between the new path segment and the currently executed path. The flexible transition strategy includes but is not limited to: Transition segment interpolation: Introduce several "transition points" in the middle of the path connection points, and generate a smooth curve through methods such as five-point median interpolation and spline fitting; Deceleration segment insertion: Add a short deceleration segment before entering the new path segment to slow down the actuator movement and smoothly adjust the direction; Transition angle limit: Limit the direction change rate in the transition segment (e.g., the included angle shall not exceed 5 degrees within every 10 ms) to prevent motion jitter; Through this strategy, the system can achieve continuous and smooth transition after path reconstruction during operations such as bulkhead spraying and welding, without problems such as spraying wire breakage, trajectory jitter, and attitude misalignment, ensuring the stability and coverage quality of the spraying operation.

[0102] For example, in a certain corner area in the middle of the cabin, when the spraying robot executes a task, the feedback deviates by 5 mm due to geomagnetic interference. The system determines that the current path fails. The path compensation module compares the three path segments with the highest scores in the candidate set. One of the path segments has the smallest included angle with the current direction (cosine value 0.98), and at the same time its multi-axis conflict level is the lowest (conflict index 0.6), and the distance between the starting point of the path segment and the current pose is only 4 mm. The system then selects this segment and generates a 20-mm transition curvature segment through interpolation to complete the smooth switch. The entire compensation process is completed within 10 ms without interrupting the spraying operation.

[0103] According to the dynamically changing characteristics of the cabin operation tasks, the control processing module sets the three tasks of path advancement, path anomaly detection, and status mirror refresh as independent priority queues respectively, and dynamically adjusts the scheduling frequency of each task according to the current operation stability. The operation stability is jointly calculated from the ratio of the feedback signal stability rate index to the interference response sensitivity. When its value is higher than the preset operation scheduling threshold, the scheduling mechanism will increase the occupancy ratio of path anomaly detection and reduce the path advancement rate, so as to achieve a conservative handling of the unstable state. When the environment is stable, the system scheduling focus switches to path planning advancement to improve the operation efficiency. This dynamic scheduling strategy enables the system to achieve adaptive task resource allocation according to the actual cabin working conditions, improving the dual performance of stability and efficiency.

[0104] During the operation of the system, since the cabin operation tasks usually include multiple task types such as multi-axis trajectory control, anomaly judgment, and feedback analysis, it is easy to generate processing resource conflicts or response delays. Therefore, the control processing module divides the above three key tasks - path advancement, path anomaly detection, and status mirror refresh - into three asynchronous priority queues.

[0105] Path advancement queue: mainly processes waypoint advancement, attitude calculation, and target state generation, with default high priority; Path anomaly detection queue: responsible for collecting feedback differences, identifying anomaly points, and scheduling compensation; State mirror refresh queue: updates the feedback state cache, judges the trend of the difference vector, and performs early intervention calculations. Each queue has an independent scheduling interval (for example: path advancement is defaulted to once every 5 milliseconds, mirror refresh is once every 10 milliseconds, and anomaly detection is once every 8 milliseconds). The system dynamically adjusts these frequencies based on the job status to ensure reasonable allocation of resources at different task stages.

[0106] The system defines job stability (hereinafter referred to as "stability index") as a parameter reflecting the stability degree of the current in-cabin control system, and the calculation method is as follows:

[0107] Feedback signal stability rate index (hereinafter referred to as "stability rate"): counts the number of cycles in which the feedback signals (such as position, speed, etc.) fluctuate significantly (exceeding the error threshold) within a sliding time window (such as 2 seconds); calculates the stability rate in the way of "number of stable cycles ÷ total number of cycles"; for example: within 2 seconds, a total of 200 samples are taken, and 180 feedback changes are within ±1 millimeter, then the stability rate is 0.9.

[0108] Interference response sensitivity: when an external disturbance occurs (such as electromagnetic interference, load mutation), the time required for the system to respond to the feedback signal and enter a stable state again (referred to as the recovery time); and forms a ratio with the last stable cycle time (such as 200 milliseconds) before the disturbance occurs; if the recovery time is 600 milliseconds and the previous stable period is 300 milliseconds, then the response sensitivity is 600÷300 = 2.0.

[0109] The system presets a job scheduling threshold (such as 0.4). If the calculated stability index is lower than this threshold, it indicates that the in-cabin operation environment is in an unstable state (for example, large feedback fluctuations and slow interference recovery). At this time, the system automatically switches the scheduling strategy: increases the scheduling frequency of the path anomaly detection queue (such as from every 8ms to every 3ms); at the same time, reduces the path advancement frequency (such as from every 5ms to every 15ms); the state mirror refresh frequency maintains a medium level for continuous trend tracking. This strategy is called the "conservative control mode", which is used to enhance the robustness when the control system faces greater uncertainties and prevent the system from entering an oscillating or off-track state. When the job stability index recovers to be higher than the threshold (such as above 0.5), the system switches to the "advancement priority mode", that is: resumes the high-speed scheduling of path advancement (such as every 5ms); moderately reduces the path anomaly detection and state refresh frequencies (such as every 10 - 15ms); gives priority to ensuring the path coverage accuracy and the continuity of the spraying rhythm. This strategy enables the system to "fast forward and fast exit", that is, quickly advance in the stable area and automatically converge the control behavior in the unstable area, realizing the "dynamic linkage between the control system and the environmental state".

[0110] Example: During a 20-minute spiral spraying process on the bulkhead, when the control system entered the narrow section at the bottom of the cabin, it detected that the feedback error fluctuation exceeded ±3 mm, the stability rate dropped to 0.7, the interference response time reached 800 ms, and the system automatically calculated the stability index to be 0.35, which was lower than the scheduling threshold. Immediately, it entered the conservative control mode, stretched the path advancement interval from 5 ms to 15 ms, encrypted the anomaly detection to once every 3 ms, enhanced the path adjustment ability, and the spraying did not interrupt. When the system ran to the curved surface area, the stability index recovered to 0.61, and the system automatically restored the advancement priority mode, the spraying rhythm increased by more than 20%, and the trajectory reconstruction events decreased by 80%.

[0111] When analyzing the difference between the feedback value and the predicted value, the state mirror construction module calculates the first derivative and the second derivative of the change rate of the multi-axis feedback signal simultaneously, and sets a mutation determination threshold to detect the continuity and non-linearity degree of the feedback anomaly. If there are fluctuations in the second derivative exceeding the mutation determination threshold within three consecutive control cycles, and the cross negative slope of the change rate exceeds three times, it is determined as a sudden feedback disorder caused by interference rather than mechanical error fluctuations. At this time, the system automatically enables the control freezing mechanism, pauses the path advancement in the frozen state, maintains the stability of the state mirror, and starts the standby path preloading function to prepare for a quick recovery, ensuring the fault tolerance and safety stability of the control system in the complex interference environment of the cabin.

[0112] Based on the real-time monitoring of the deviation between the feedback value (such as the position and speed of each axis) and the predicted value, in order to accurately judge the nature of the change trend of the deviation, the first derivative and the second derivative analysis in the differential mathematical principle are introduced.

[0113] First derivative (change rate): It represents the change speed of the feedback value on the time axis, that is, Δ value / Δ time, and is used to judge whether the feedback is slowly changing or rapidly jumping.

[0114] Second derivative (acceleration / mutation rate): It represents the change trend of the change rate itself, that is, the "curvature" of the feedback change. A positive value indicates continuous growth, and a negative value indicates a rapid decline.

[0115] For example, if the feedback value is the position quantity P(t), then: the first derivative is dP / dt: representing the speed; the second derivative is d 2 P / dt 2 : representing the acceleration or mutation degree. The system calculates the second derivative of all controlled axes in each control cycle and stores it in the real-time operation buffer. The system presets a mutation determination threshold, such as: the second derivative change exceeds ±50 mm / s 2 ; indicating that the state of a certain axis undergoes a non-linear rapid jump, which may not be caused by normal movement but by external factors such as interference, communication jitter, and electrical noise.

[0116] The judgment mechanism essentially constitutes a combined mutation - trend recognition mechanism, which is judged in two layers:

[0117] Judgment of numerical amplitude: If the second derivative exceeds the mutation threshold three times continuously (e.g., > ±50mm / s 2 ), it indicates that the feedback behavior is not a stable fluctuation but a sudden jump. Judgment of slope direction (number of negative crossings): The system records the change direction of the change rate (i.e., the first derivative); if there are more than three positive - negative direction crossings in three changes, it means that the feedback "changes direction frequently" in a very short time; this type of feedback form is often caused by high - frequency interference or electromagnetic crosstalk and does not have the response inertia that a mechanical actuator should have. After meeting the above two conditions, the system defines this state as "sudden feedback disorder", which is different from ordinary mechanical errors (such as encoder step loss, shaft - end looseness, etc.), and a more reliable recovery strategy must be adopted.

[0118] The "control freeze mechanism" is a soft - interrupt - type fault - tolerant control strategy, which specifically includes the following processing steps: Pause of path advancement: Stop the scheduling of the path advancement queue; prevent continuous movement in the abnormal feedback state, resulting in trajectory deviation or physical interference. Freezing of state mirror: The state mirror within the current control cycle is no longer updated, and the most recent stable state is retained; avoid the introduction of mirror drift by abnormal feedback and protect the reference benchmark for subsequent path recovery. Pre - loading of alternative path: When the system suddenly freezes, it selects the path segment closest to the current path and with the highest direction consistency from the candidate trajectory set and loads it into the alternative path buffer; once the feedback state stabilizes within the threshold, it can switch to the alternative trajectory to continue the operation within 1 cycle. This mechanism can significantly improve the control stability and self - recovery ability of the robot in the closed cabin environment with high interference, high - dynamic variable load.

[0119] For example, in the spraying operation of a cabin ventilation pipe, when the robot passes through the metal slit of the hatch, affected by the interference of the adjacent frequency - converter cable, the position feedback of its fourth axis suddenly increases by +32mm / s 2 , - 51mm / s2, +46mm / s 2 within 3 cycles, and the direction of the first derivative continuously changes with 4 negative crossings. According to the mutation judgment rule, the system immediately activates the freeze mechanism: pauses the path advancement for 3 cycles; keeps the mirror static; pre - loads the new path segment starting from +10mm in the current direction and constructs a slow - change transition segment; when the feedback recovers to fluctuate within ±5mm / s, the system smoothly reconnects in the fourth cycle, the spraying is not interrupted, and the overall control precision error is controlled within 1.5mm.

[0120] When the path compensation module calls path segments in the candidate trajectory set, it constructs a path selection scoring function. This scoring function is based on three metrics: First, the angular difference between the direction vector of the path segment and the current trajectory direction vector; second, the spatial error between the end feedback pose point and the trajectory fitting point; third, the synchronization delay estimate of this trajectory segment. After scoring calculations, all candidate trajectories are scored and sorted, and only the trajectory segments with a total score higher than the third path stability threshold are retained. Before performing path switching, the path compensation module inserts a transition segment with a gradually changing curvature between the tail of the current trajectory segment and the head of the new path segment through local curvature estimation. The transition segment is constructed by five-point mean median interpolation to ensure no mutation at the trajectory splicing point and maintain the smoothness of the path repair action and the rhythm continuity of the spraying movement.

[0121] The path scoring function is a composite evaluation mechanism used to quantify the advantages and disadvantages among multiple candidate trajectory segments, ensuring that the selected path is the most suitable in terms of geometric direction, execution connection, and system synchronization. The scoring function takes three technical metrics as inputs, which are described as follows:

[0122] The angular difference between the direction vector of the path segment and the current trajectory direction vector: The current trajectory direction vector is the unit direction vector of the tail segment of the current trajectory; the candidate path segment direction vector is the direction vector of the first segment of this path fragment; the cosine value of the angle between the two vectors is calculated by the following formula: cosθ = (V1·V2) / (||V1||×||V2||); the obtained angular difference θ = arccos(cosθ), with the unit of radian or degree; the score of this item is set as S1 = 1-(θ / θ_max), indicating that the more consistent the direction, the higher the score, and θ_max is the preset angle acceptance threshold.

[0123] The spatial error between the end feedback pose point and the trajectory fitting point: The pose point includes six degrees of freedom of position (X, Y, Z) and pose (Roll, Pitch, Yaw); the system compares the current end feedback pose with the fitting pose of the starting point of the candidate path; the following evaluation method can be adopted, for example: S2 = 1-((ΔP / P_max)+w×(ΔAngle / A_max)) where ΔP is the position error, ΔAngle is the angle error, w is the angle weight; the smaller the error, the higher the score of this item, and A_max is the preset error acceptance threshold.

[0124] Synchronization Delay Estimation of Trajectory Segment: It is used to measure the delay response trend of a path segment during execution relative to the current system scheduling cycle; it is estimated based on the execution time required for each control point in the path segment and compared with the current system feedback delay model; the following scoring model can be used: S3 = 1 - (EstimatedDelay / MaxAllowedDelay); if the path segment can be quickly docked with the current scheduling cycle, the score is high. S3: This value is the score of the third scoring index, which is used to measure the time synchronization degree of the candidate path segment with the overall control rhythm of the system during execution. The value range is from 0 to 1, and the larger the value, the better, indicating that the path segment has good time matching and small delay, and the control system can switch to this segment more quickly and seamlessly.

[0125] EstimatedDelay (Estimated Delay): It is the maximum estimated time error (unit: ms) that the system predicts will occur in multi-axis synchronization after the control system switches from the current state to the selected candidate trajectory segment. Its calculation sources may include: the speed / acceleration difference between the current execution end state and the starting point of the new path segment; the controller transmission cycle delay; the state mirror cache update lag; the communication delay, etc.; for example: if the current trajectory end speed is 120 mm / s and the expected speed of the starting point of the new path segment is 80 mm / s, and the system estimates that the "speed leveling" process will take 30 ms, then EstimatedDelay = 30.

[0126] MaxAllowedDelay (Maximum Allowed Delay): It is the maximum delay threshold that the system sets for tolerating path segment switching. This value is predefined based on specific applications (such as the requirements for spraying continuity), for example, it may be set to 50 ms in a spraying robot.

[0127] The final scoring function Score_total can be in the form of a weighted average: Score_total = α × S1 + β × S2 + γ × S3; where α, β, and γ are manually set weight coefficients, and the system adjusts this ternary weight according to the type of operation task (such as precise tracking, tolerance of error, etc.). The system sets the third path stability threshold (for example, 0.75), which represents the "lowest acceptable standard for path fitting quality". If the total score of the candidate trajectory segment is lower than this value, it will not participate in the path switching candidate queue to prevent control oscillations or off-track caused by path mismatch. After sorting, the path segment with the highest score is retained and enters the waiting-to-be-called state of the path replacement module.

[0128] The system sets the third path stability threshold (for example, 0.75), which represents the "lowest acceptable standard for path fitting quality". If the total score Score_total of the candidate trajectory segment is lower than this value, it will not participate in the path switching candidate queue to prevent control oscillations or off-track caused by path mismatch. After sorting, the path segment with the highest score is retained and enters the waiting-to-be-called state of the path replacement module.

[0129] Local curvature estimation refers to extracting the last 3 points of the current path and the first 3 points of the new path, and fitting the curvature respectively; if the curvature difference exceeds the set smoothing threshold (e.g., > 0.03mm -1 ), a slow-changing section needs to be inserted. For example, during the operation on the arc-shaped wall of the cabin, the robot's execution path segment is interrupted due to feedback drift, and the path compensation module retrieves 5 candidate path segments. Through the calculation of the scoring function, among them: the direction angle of the third path segment is 8 degrees; the end position error is 4mm, and the attitude error is 3 degrees; the synchronous delay estimation is 40ms (the system tolerance is 60ms); the final score is 0.81, and it enters the path replacement process. Before path splicing, the system detects that the curvature at the end of the current path is 0.021mm -1 , and the curvature at the head of the new path is 0.044mm -1 , and the difference exceeds the smoothing threshold. The system constructs 5 transition points through five-point mean interpolation to generate a slow-changing curvature connection section with a length of 15mm. The trajectory switches smoothly within 10 milliseconds, the spraying trajectory is not interrupted, and the visual residue is uniform without streaks.

[0130] When constructing the motion state prediction model, the control processing module calculates the dynamic delay compensation amount by fusing the actual execution time of the current path segment, the time delay of the feedback signal, and the moment of inertia parameters of each motor axis. This compensation amount is used to correct the timing position of the target path point in advance.

[0131] The calculation process of the compensation amount includes the following steps:

[0132] First, collect the execution time and feedback response time of multiple consecutive cycles in the path segment, and construct a slope ratio model between the mean feedback delay and the execution time growth curve to describe the timing deviation trend under the current control state; secondly, based on the moment of inertia of each axis under the current load, establish an inertia response adjustment factor for each axis by referring to the empirical mapping relationship between the rotational acceleration and the unit displacement delay; finally, multiply the adjustment factor by the output result of the slope ratio model to obtain the dynamic delay compensation amount, and apply it to the time label of the target path point respectively for each axis to generate the pre-corrected target state sequence.

[0133] The compensation correction factor for each motor axis is independently set according to its physical structure and operating load, which can adapt to the dynamic response differences between different axes, enhance the accuracy consistency of the target path prediction during long-term complex operations, and is especially suitable for the trajectory control requirements in high-inertia interaction scenarios in the cabin operation environment.

[0134] The dynamic delay compensation amount is an active adjustment amount used to solve the problem of inconsistent prediction and actual path in multi-axis systems under complex loads, signal lag, and uneven inertial response. By quantifying the time error and predicting its trend, the path points are adjusted in advance so that the actuator can approximate the expected trajectory as closely as possible during actual operation.

[0135] Execution time: refers to the ideal execution cycle (unit: millisecond) from when the control processing module issues an instruction to the target path point; feedback response time: refers to the time interval for the instruction to generate position feedback at the execution layer (such as a motor); the system sets a sliding period window (such as 20 cycles) within each path segment and records these two types of time parameters for each cycle in real time; calculate respectively: mean feedback delay: that is, the average of the feedback response times in the sliding window; execution time growth trend: fit a time growth curve (such as linear regression or sliding increment) within the window; calculate the slope ratio T_bias of the two, which characterizes the growth trend of the system time deviation under the control state, that is, whether the current delay is increasing or stabilizing.

[0136] The moment of inertia parameter is obtained by the initial calibration of the robot or derived from the end load + transmission mechanism structure modeling (unit: kg·m 2 );The system maintains an empirical function library that defines the relationship model between the moment of inertia and the unit position delay. For example: Delay_unit = f(J) ≈ a×J^0.5 + b; J is the moment of inertia of the axis; Delay_unit represents the response time delay under unit acceleration; a and b are empirical fitting coefficients; for the current actual load state (such as load lifting, nozzle lifting and lowering), the system dynamically selects or calculates the inertia response adjustment factor K_i for this axis based on the J value.

[0137] The dynamic delay compensation amount A_i is calculated independently for each axis and can be: A_i = K_i×T_bias; used to correct the path point time tag T_corrected in advance: T_corrected = T_original - A_i; which means that this point should have been executed at time T_original, but due to the inertia and feedback lag of the current axis, it needs to be executed in advance by A_i to align with the real execution path. The system updates the time series of the entire path to generate a set of "target state sequences" adjusted in advance, and this sequence is transmitted to the real-time execution module for execution.

[0138] This mechanism avoids the rough adjustment mode of the "uniform compensation amount" and customizes the delay correction value for each motor axis, which is suitable for the following situations: some axes bear heavy loads (such as a spray gun installed at the end) and have a large moment of inertia; some axes are composite joints with serious action inertia coupling; the path during cabin operation is long, the structure is complex, and the attitude changes greatly. Without adjustment, cumulative position errors will occur, resulting in off-track or uneven coverage.

[0139] For example, in the spray painting operation of a 20-meter bulkhead weld, the third axis of the robot (the load nozzle) has a moment of inertia of 0.036 kg·m 2 , and the system detects within a certain path that: the average execution time is 80 ms, and the average feedback response time is 92 ms; the slope ratio is T_bias = 1.15; combining with the delay mapping function of the third axis, K_3 = 14.8 ms is obtained; calculating A_3 = 1.15 × 14.8 = 17.02 ms; the system uses this value to correct the path point time in advance, moving each point forward by 17 ms on average to maintain a coherent rhythm. Finally, it is verified that the spray painting trajectory offset is reduced from ±2.5 mm to ±0.6 mm, and the end effector of the robot is highly aligned with the expected trajectory under a complex curved path.

[0140] The above formulas are all dimensionless and take their numerical calculations. The formulas are obtained by collecting a large amount of data for software simulation to get a formula closest to the actual situation. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0141] It should be understood that in various embodiments of the present application, the magnitudes of the serial numbers of the above processes do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0142] Those of ordinary skill in the art can realize that the modules and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0143] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices, and modules described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0144] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present application, and all should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A multi-axis motor control system based on ARM and ASIC, characterized in that, Including: A control processing module, configured to perform path planning according to a multi-axis motion task, construct a motion state prediction model, and generate target trajectory data by combining preset spatial structure constraints in a complex operating environment; A real-time execution module, configured to generate a pulse width modulation signal, perform position control, collect motor feedback by using hardware logic without relying on an interrupt scheduling structure, and complete multi-axis synchronization operations in a fixed time sequence through an on-chip hardware sequencer; A state mirror construction module, configured to dynamically maintain a mirror of the current multi-axis motion state in the control processing module, and calculate the difference vector between the feedback value and the predicted value in real time; A path compensation module, configured to dynamically call alternative path segments from a preset candidate trajectory set according to the difference vector when it is detected that the feedback error exceeds the mirror threshold or an external disturbance triggers a path anomaly, so as to achieve path self-recovery and ensure motion coherence; Among them, the candidate trajectory set is preset according to the modeling of a closed cabin-like structure. The path compensation module judges the conflict level according to the cabin wall curvature or the inter-axis space distance, and automatically selects the minimum offset path as the repair solution to improve the continuity and accuracy of path control in a complex environment.

2. The multi-axis motor control system based on ARM and ASIC according to claim 1, wherein, During the path planning process, the control processing module constructs a target attitude sequence by using a pre-built three-dimensional surface model for the geometric characteristics of the closed cabin in the cabin operation environment, and combines the path continuity of the sequence within the local cabin wall curvature range to generate an initial candidate trajectory; During the generation of the candidate trajectory, the control processing module adopts a position point density adaptive interpolation method, sets the sampling distribution density according to the change rate of the cabin wall surface, and introduces multiple fitting function models during the trajectory vector transformation process, specifically including any one of a multi-segment cubic spline function, a Bessel function, and a minimum deformation path function, and selects the optimal fitting method according to the current spatial continuity parameter.

3. The multi-axis motor control system based on ARM and ASIC according to claim 2, wherein, The real-time execution module completes multi-axis synchronous output through a hardware sequencer. In the sequencing mechanism, an independent time slot is allocated for each motor axis, and the update of its pulse width modulation signal and the acquisition of feedback data are accurately scheduled according to this time slot in each control cycle. The time slots are initialized according to a fixed priority level and a time offset algorithm, and the offset algorithm realizes staggered update based on the axis number multiplied by the time slot reference interval to prevent signal concentration conflicts.

4. A multi-axis motor control system based on ARM and ASIC according to claim 3, wherein When constructing the multi-axis motor mirror state, the state mirror construction module simultaneously maintains a set of timing index caches, which record the differences between the feedback values and the predicted values of each axis in recent several control cycles, calculates the error mean change rate through a sliding window mechanism, and sets a judgment threshold to judge whether the deviation accumulation trend is predictable; If the current trend value exceeds the judgment threshold, the control processing module calculates an advance adjustment factor according to the trend direction. The adjustment factor is obtained by coupling the current deviation change slope with the axis-level inertia model, indicating the synchronous fluctuation occurring in the next cycle.

5. A multi-axis motor control system based on ARM and ASIC according to claim 4, characterized in that, When the path compensation module calls a candidate trajectory segment to repair the current path anomaly, it first performs a vector similarity analysis on the difference vector between the current feedback state and the target path, and sequentially compares the spatial consistency index, the cabin wall curvature adaptation index, and the multi-axis angle conflict level of each path segment in the preset candidate trajectory set; The multi-axis angle conflict level is generated based on the way of generating the linkage angle sequence between axes, and the conflict level index is obtained by comparing the cumulative change in joint angles with the spatial boundary constraint value; In the selection of path segments, the path compensation module always preferentially selects the path segment with the smallest offset and the lowest conflict level to avoid physical interference in the complex section of the cabin structure.

6. The multi-axis motor control system based on ARM and ASIC according to claim 5, wherein, According to the dynamic change characteristics of the cabin operation tasks, the control processing module sets the three tasks of path advancement, path anomaly detection, and status mirror refresh as independent priority queues respectively, and dynamically adjusts the scheduling frequency of each task according to the current operation stability; The operation stability is obtained by calculating the ratio of the feedback signal stability rate index to the disturbance response sensitivity; The feedback signal stability rate index is defined as: within the set sliding time window, the number of cycles in which the change amplitude of the feedback signal is lower than the stability threshold in consecutive cycles is divided by the total number of cycles in the window, and the resulting ratio is the feedback signal stability rate; The disturbance response sensitivity is defined as: after the external disturbance event is triggered, the ratio of the time required for the feedback signal to reach the steady state interval to the time of the last stable cycle before the disturbance occurs; When the operation stability value is higher than the preset operation scheduling threshold, the scheduling mechanism will increase the occupancy ratio of path anomaly detection and reduce the path advancement rate, so as to achieve a conservative treatment of the unstable state. When the environment is stable, the scheduling focus switches to path planning advancement to improve operation efficiency.

7. A multi-axis motor control system based on ARM and ASIC according to claim 6, characterized in that, When analyzing the difference between the feedback value and the predicted value, the status mirror construction module calculates the first derivative and the second derivative of the change rate of the multi-axis feedback signal at the same time, and sets a mutation determination threshold to detect the continuity and non-linearity of feedback anomalies; If there is a second derivative fluctuation exceeding the mutation determination threshold within three consecutive control cycles, and the cross negative slope of the change rate exceeds three times, it is determined as a sudden feedback disorder caused by interference rather than a mechanical error fluctuation; At this time, the control freeze mechanism is automatically enabled. In the frozen state, the path advancement is paused, the status mirror is kept stable, and the standby path preloading function is started to prepare for a quick recovery, ensuring the fault tolerance and safety stability of the control system in the complex interference environment of the cabin.

8. A multi-axis motor control system based on ARM and ASIC according to claim 7, characterized in that, When the path compensation module calls the path segments in the candidate trajectory set, it constructs a path selection scoring function, which is based on three indicators: one is the angle difference between the direction vector of the path segment and the current trajectory direction vector, the second is the spatial error between the end feedback attitude point and the trajectory fitting point, and the third is the synchronization delay estimation value of this trajectory segment; After the scoring calculation, all candidate trajectories are scored and sorted, and only the trajectory segments with a total score higher than the path stability threshold are retained. Before the path switch is executed, the path compensation module inserts a transition segment with a slow-changing curvature between the tail of the current trajectory segment and the head of the new path segment through local curvature estimation. The slow-changing segment is constructed by five-point mean median interpolation to ensure that there is no mutation at the trajectory splicing point and maintain the smoothness of the path repair action and the rhythm continuity of the spraying movement.

9. The multi-axis motor control system based on ARM and ASIC according to claim 8, wherein, When constructing the motion state prediction model, the control processing module calculates the dynamic delay compensation amount by fusing the actual execution time of the current path segment, the time delay of the feedback signal, and the moment of inertia parameters of each motor axis. This compensation amount is used to correct the timing position of the target path point in advance; The calculation process of the compensation amount includes the following steps: Collect the execution time and feedback response time of multiple consecutive cycles in the path segment, and construct a slope ratio model between the mean feedback delay and the execution time growth curve to describe the timing deviation trend under the current control state; Based on the moment of inertia of each axis under the current load, establish an inertia response adjustment factor for each axis by referring to the empirical mapping relationship between the rotational acceleration and the unit displacement delay; Multiply the adjustment factor by the output result of the slope ratio model to obtain the dynamic delay compensation amount, and apply it to the time tag of the target path point in units of axes respectively to generate the target state sequence after advance correction.

Citation Information

Cited By

  • Electrical module energy distribution control method and system

    CN120879505A

  • Automobile die manufacturing management system fused with situation awareness mechanism

    CN120996419A

  • Aluminum alloy round aluminum rod production process optimization control method

    CN121254786A

  • Precise motion control method and system for multi-axis linkage direct-driving-force tool turret machine

    CN121386604A