A method for self-adaptive compensation of presser foot pressure in jeans sewing process
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-13
- Publication Date
- 2026-08-11
AI Technical Summary
[0004]本申请提供一种牛仔衣缝制过程中压脚压力自适应补偿方法,旨在解决上述背景技术中提到的现有技术存在的问题或问题之一
(1)本申请通过构建以主轴旋转相位为时间基准的动力学表征框架,有效克服了传统压脚压力控制中依赖布料厚度、速度等孤立参数进行经验式拟合或规则查表所导致的建模片面性与工况适应能力差的问题。现有技术普遍采用静态传感器获取单一物理量(如布料高度、压缩形变)并映射至固定压力设定,难以应对牛仔面料在水洗后硬挺度变化、拼接区域厚度突变、缝制轨迹转弯送布阻力波动等复杂动态场景,极易引发跳线、褶皱或断针。本方案摒弃对外部传感元件和预设规则库的依赖,转而挖掘缝制过程中固有的机械节律特征,利用高分辨率编码器同步采集机针位移、压脚微振动、布料应变等多源信号,提取每个主轴周期内四个关键事件点相对于零相位的角度偏移,形成具有强时序一致性与物理可解释性的“动力学相位指纹”。该指纹天然耦合了布料弹性、送布惯性、线张力响应及机构动态响应等多种影响因素,能够在不显式测量任何单一参数的前提下,实现对当前缝制状态的高维隐式表征,显著提升了系统对不同牛仔织物类型(如斜纹、直纹、弹力布)及非稳态操作(加速、减速、拐角)的泛化识别能力,从而为后续压力调节提供更具判别性的感知基元。
Smart Images

Figure CN122546646A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent control technology for automated garment sewing equipment, and in particular to an adaptive compensation method for presser foot pressure during denim garment sewing. Background Technology
[0002] In the field of intelligent control technology for automated garment sewing equipment, precise control of presser foot pressure is crucial for improving sewing consistency and efficiency, especially in the sewing process of high-strength, multi-layered fabrics such as denim. This control addresses dynamic changes in fabric elasticity, thickness gradient, feed inertia, and sewing speed. Most existing intelligent sewing equipment employs pressure compensation strategies based on physical parameters such as fabric thickness, sewing speed, and fabric type. Mainstream solutions include dynamic measurement using thickness sensors, closed-loop needle load feedback, spindle encoder height trajectory mapping, and pressure adjustment based on empirical rule bases or lookup tables. These technologies can respond to significant changes in fabric thickness or sewing speed to a certain extent and are widely used in automated production lines for industrial flatbed sewing machines, zigzag sewing machines, and coverstitch sewing machines. With the rise of deep learning and multimodal data fusion, some systems are also attempting to integrate acoustic, image, and stress sensing technologies to enhance the overall intelligence of pressure control.
[0003] The main problems with existing technologies are as follows: First, mainstream pressure compensation strategies often model single physical parameters such as thickness and speed in isolation, failing to effectively capture the true dynamic coupling relationship between the needle, fabric, and presser foot during the spindle rotation cycle. This causes pressure adjustment to lag behind the rapid fluctuations in the sewing state, affecting sewing consistency and stitch quality. Second, empirical lookup table methods and fixed rule bases rely on a large number of prior work condition classifications, making it difficult to cover all denim fabric types and complex rhythms such as temporary splicing and curve transitions in actual production, resulting in weak generalization ability and high maintenance costs. Third, some systems using signal feedback closed loops have limited adaptability to multi-source disturbances such as high-frequency mechanical noise and material elasticity fluctuations, exhibiting periodic mismatch and slow response in the pressure control stage. Furthermore, the underlying mechanisms of dynamic rhythmic characteristics such as spindle rotation phase and needle plate strain have not been fully explored and utilized, limiting the high accuracy and real-time performance of strategy generation. Summary of the Invention
[0004] This application provides an adaptive compensation method for presser foot pressure during the sewing process of denim garments, which aims to solve one of the problems or issues of the prior art mentioned in the background section.
[0005] This application provides a method for adaptive compensation of presser foot pressure during denim garment sewing, specifically including: S1: Acquire high-resolution absolute position signals, presser foot bar micro-vibration signals, and fabric surface strain response signals in the needle plate area during the rotation cycle of the sewing machine spindle, and integrate the above multi-source synchronous sampling sequences into a four-dimensional original sewing dynamics dataset.
[0006] S2: Based on the four-dimensional original sewing dynamics dataset, perform time-domain segmentation and slicing processing on each spindle rotation cycle to extract the timestamp data of four key event points: the moment when the needle penetrates the fabric, the moment when the presser foot contacts the fabric, the moment when the fabric undergoes maximum deformation, and the moment when the stitch locks in.
[0007] S3: Calculate the angular offset of each event point relative to the zero phase of the main axis based on the timestamp data of the four key event points, and combine the angular offsets to construct a dynamic phase fingerprint vector that characterizes the coupling features of the current fabric elasticity, thickness gradient and feed inertia.
[0008] S4: Construct the input nodes of the graph neural network model using the dynamic phase fingerprint vector sequence of multiple consecutive cycles, and generate the edge weight data of the graph neural network model by jointly encoding the time difference and phase difference between adjacent event points.
[0009] S5: Input the graph structure containing the node and edge weight data into the graph neural network model, and output the pressure adjustment command increment for the next sewing cycle by mapping the phase fingerprint evolution law of different denim fabrics under speed change or turning conditions.
[0010] S6: Dynamically correct the set value of the current closed-loop controller of the presser foot actuator based on the pressure adjustment command increment to generate a real-time current control signal.
[0011] S7: Monitor the actual presser foot pressure response curve after executing the real-time current control signal, and determine whether the deviation between the actual presser foot pressure response curve and the expected pressure trajectory exceeds the preset sewing consistency threshold condition.
[0012] S8: If the deviation is determined to exceed the sewing consistency threshold condition, the hidden layer parameters of the graph neural network model are updated using the dynamic phase fingerprint vector of the current cycle and the measured deviation data to optimize the generation accuracy of subsequent pressure adjustment command increments.
[0013] This application provides a method for adaptive compensation of presser foot pressure during denim garment sewing, which has the following beneficial effects: (1) This application effectively overcomes the problems of modeling bias and poor adaptability caused by relying on isolated parameters such as fabric thickness and speed for empirical fitting or rule lookup in traditional presser foot pressure control by constructing a dynamic characterization framework with the spindle rotation phase as the time reference. Existing technologies generally use static sensors to acquire single physical quantities (such as fabric height and compression deformation) and map them to fixed pressure settings. This makes it difficult to cope with complex dynamic scenarios such as changes in stiffness of denim fabric after washing, sudden changes in thickness in splicing areas, and fluctuations in fabric feeding resistance when the sewing trajectory turns. This can easily lead to skipped stitches, wrinkles, or broken needles. This solution abandons the reliance on external sensing elements and preset rule bases, and instead explores the inherent mechanical rhythm characteristics in the sewing process. It uses a high-resolution encoder to synchronously collect multi-source signals such as needle displacement, presser foot micro-vibration, and fabric strain, and extracts the angular offset of four key event points relative to the zero phase in each spindle cycle, forming a "dynamic phase fingerprint" with strong temporal consistency and physical interpretability. This fingerprint naturally couples multiple influencing factors such as fabric elasticity, fabric feeding inertia, line tension response, and mechanism dynamic response. It can achieve a high-dimensional implicit representation of the current sewing state without explicitly measuring any single parameter, significantly improving the system's generalized recognition ability for different denim fabric types (such as twill, straight weave, and stretch fabric) and non-steady-state operations (acceleration, deceleration, and cornering), thus providing more discriminative sensing primitives for subsequent pressure adjustment.
[0014] (2) Based on the above phase fingerprint sequence, this application introduces a graph neural network model to establish an implicit mapping relationship from historical sewing beats to the optimal presser foot pressure adjustment amount, realizing an essential leap from "passive response" to "active following" in control strategy. Traditional methods are limited by open-loop lookup tables or hysteresis feedback mechanisms, often resulting in problems such as large adjustment delays and discontinuous responses, especially when frequently switching sewing types or handling heterogeneous spliced fabrics, making it difficult to ensure consistent stitch quality. This scheme constructs a spatiotemporal graph structure from phase fingerprints of multiple consecutive cycles, with nodes representing key event points and edge weights jointly encoded by the time difference and phase difference between adjacent events, enabling the model to capture the dynamic evolution trend and abnormal disturbance propagation path during the sewing process. After offline training, the model can learn the complex nonlinear relationship between the phase pattern evolution and ideal pressure increment of different types of denim fabrics under various process actions. During online operation, it updates the input and outputs the pressure adjustment command increment for the next cycle in real time after each beat is completed, directly driving the current closed-loop controller to act on the presser foot actuator. This mechanism eliminates the need for pre-stored sewing data packages, does not rely on force feedback closed loops or motor hysteresis compensation tables, avoids tedious manual adjustments and model adaptation processes, significantly improves the sensitivity and continuity of control response, ensures the completion of the perception-decision-execution closed loop within hundreds of milliseconds, and significantly enhances the consistency and stability of the sewing process.
[0015] (3) The overall solution uses the dynamic rhythm generated by the sewing system itself as the basis for sensing and control coordination, and constructs a technical path that can achieve intelligent adaptive adjustment without additional hardware expansion, which has high engineering practicality and production line compatibility. Unlike the existing technology that requires the addition of thickness sensors, Hall elements, ultrasonic detection devices or complex mechanical adjustment structures (such as electromagnetic linkage mechanisms, U-shaped elastic elements + strain gauge combinations), this solution only needs to integrate a standard absolute position encoder at the spindle end and reuse the existing presser foot drive system to achieve closed-loop optimization control under all working conditions. This not only reduces the system complexity and maintenance cost, but also avoids the signal delay, calibration error and environmental interference problems caused by multi-sensor fusion. At the same time, the proposed phase fingerprint extraction method has good interpretability and transferability, and is easy to extend to various machine platforms such as industrial flat seam, zigzag seam and coverstitch seam, which is suitable for the comprehensive needs of high quality, high efficiency and high flexibility in the automated production line of denim garments. By embedding pressure decision into the mechanical rhythm evolution process, a paradigm shift from "parameter-driven" to "process-driven" is truly realized, providing a new idea for the intelligent upgrading of sewing equipment.
[0016] In summary, this solution, by establishing a dynamic characterization system based on the principal axis phase and an adaptive control mechanism driven by a graph neural network, achieves a comprehensive improvement in the real-time performance, robustness, and generalization of presser foot pressure adjustment. It overcomes the bottlenecks of traditional methods, such as insufficient modeling under varying working conditions, slow response, and reliance on human experience. It forms a closed-loop intelligent sewing system with autonomous perception, learning, and decision-making capabilities, providing reliable and scalable technical support for high-quality automated sewing of complex fabrics, especially highly variable denim fabrics. Attached Figure Description
[0017] Figure 1 This is the main flowchart of an adaptive compensation method for presser foot pressure during the sewing process of denim garments.
[0018] Figure 2 This is a sub-flowchart of an adaptive compensation method for presser foot pressure during the sewing process of denim garments.
[0019] Figure 3 This is another sub-flowchart of a method for adaptive compensation of presser foot pressure during the sewing process of denim garments. Detailed Implementation
[0020] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0021] The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0022] like Figure 1 As shown, this application provides an adaptive compensation method for presser foot pressure during denim garment sewing, specifically including: S1: Acquire high-resolution absolute position signals, presser foot bar micro-vibration signals, and fabric surface strain response signals in the needle plate area during the rotation cycle of the sewing machine spindle, and integrate the above multi-source synchronous sampling sequences into a four-dimensional original sewing dynamics dataset.
[0023] S2: Based on the four-dimensional original sewing dynamics dataset, perform time-domain segmentation and slicing processing on each spindle rotation cycle to extract the timestamp data of four key event points: the moment when the needle penetrates the fabric, the moment when the presser foot contacts the fabric, the moment when the fabric undergoes maximum deformation, and the moment when the stitch locks in.
[0024] S3: Calculate the angular offset of each event point relative to the zero phase of the main axis based on the timestamp data of the four key event points, and combine the angular offsets to construct a dynamic phase fingerprint vector that characterizes the coupling features of the current fabric elasticity, thickness gradient and feed inertia.
[0025] S4: Construct the input nodes of the graph neural network model using the dynamic phase fingerprint vector sequence of multiple consecutive cycles, and generate the edge weight data of the graph neural network model by jointly encoding the time difference and phase difference between adjacent event points.
[0026] S5: Input the graph structure containing the node and edge weight data into the graph neural network model, and output the pressure adjustment command increment for the next sewing cycle by mapping the phase fingerprint evolution law of different denim fabrics under speed change or turning conditions.
[0027] S6: Dynamically correct the set value of the current closed-loop controller of the presser foot actuator based on the pressure adjustment command increment to generate a real-time current control signal.
[0028] S7: Monitor the actual presser foot pressure response curve after executing the real-time current control signal, and determine whether the deviation between the actual presser foot pressure response curve and the expected pressure trajectory exceeds the preset sewing consistency threshold condition.
[0029] S8: If the deviation is determined to exceed the sewing consistency threshold condition, the hidden layer parameters of the graph neural network model are updated using the dynamic phase fingerprint vector of the current cycle and the measured deviation data to optimize the generation accuracy of subsequent pressure adjustment command increments.
[0030] Step S1: Acquire high-resolution absolute position signals, presser foot bar micro-vibration signals, and fabric surface strain response signals within the sewing machine spindle rotation cycle, and integrate the above multi-source synchronous sampling sequences into a four-dimensional original sewing dynamics dataset. Specifically, this includes: S1.1: Perform absolute angle calculation on the pulse sequence output by the sewing machine spindle encoder to generate a high-resolution spindle absolute position signal with a unique zero-position reference, and establish a unified time-domain reference coordinate system for the calculation of timestamps of all subsequent event points.
[0031] The pulse sequence output by the sewing machine spindle encoder is received, multi-channel digital pulse data from a high-resolution absolute position encoder is received, and preset encoder resolution parameters and zero-position calibration values are loaded as initial input conditions.
[0032] The cumulative angle is derived by integrating the encoder pulse sequence through pulse counting, and the number of pulses is normalized by using a sampling period with a fixed time reference to obtain a high-precision continuous angle value.
[0033] To address potential pulse jitter and undercounting issues, a phase interpolation correction mechanism is introduced. By detecting the difference between the pulse increment and the theoretical rotation rate within adjacent sampling periods, the normalized angle value is interpolated and adjusted to ensure the monotonicity and accuracy of the angle sequence.
[0034] In the process of angle derivation, the zero-position calibration value is used as the only reference point. The current angle value is mapped to the absolute phase range through angle offset calculation, and the zero position is guaranteed not to drift in each rotation cycle.
[0035] The formula for calculating the absolute principal axis angle is expressed using MathML: Where P is the current cumulative pulse count, P0 is the pulse count value corresponding to the zero position, R is the total resolution of one revolution of the encoder, and θ is the calculated absolute phase angle (unit: °).
[0036] This solution and correction method transforms the original pulse sequence into a high-resolution principal axis absolute position signal with a unique zero position and continuous monotonically increasing, thereby establishing a unified time-domain reference coordinate system and providing a benchmark for the subsequent timestamp calculation of all event points.
[0037] S1.2: Based on the time-domain reference coordinate system provided by the high-resolution spindle absolute position signal, the original analog voltage signal collected by the presser foot lever accelerometer is bandpass filtered and time-domain aligned to generate a presser foot lever micro-vibration signal that eliminates mechanical high-frequency noise interference and is strictly synchronized with the spindle phase.
[0038] A time-domain reference coordinate system based on the high-resolution spindle absolute position signal is used to receive the raw analog voltage signal output from the presser foot accelerometer and confirm the sampling frequency and amplitude range. The raw analog voltage signal is input to a bandpass filter module, where filter parameters are set according to a preset center frequency and bandwidth. The center frequency is determined based on the inherent vibration frequency of the presser foot during normal sewing, and the bandwidth is determined based on mechanical resonance characteristics and noise spectrum distribution. Convolution operations are performed on the filter coefficients to remove slow-varying fabric feed components below the low cutoff frequency and irregular mechanical noise components above the high cutoff frequency, retaining the effective signal components related to the presser foot vibration state in the mid-frequency band. The bandpass-filtered presser foot accelerometer signal is then time-domain aligned with the high-resolution spindle absolute position signal. Synchronous interpolation is used to adjust the presser foot accelerometer sampling timestamp to ensure strict correspondence with the time index of the spindle phase signal. During alignment, the time difference between the original presser foot signal sampling points and the spindle signal sampling points is calculated, and synchronous samples are generated using interpolation formulas. Based on the time-domain alignment results, amplitude normalization is performed on the synchronization signal. The normalization coefficient is determined using the maximum and minimum vibration amplitudes within the spindle rotation period, mapping the signal range to a standardized interval for subsequent feature extraction. Throughout the processing chain, filtering and alignment transformation convert the results of the previous step into a micro-vibration signal of the presser foot lever that eliminates high-frequency mechanical noise interference and ensures strict phase synchronization of the spindle, achieving high-fidelity extraction of the synchronization signal.
[0039] For example, in the denim sewing process of an industrial flatbed sewing machine, the sampling frequency of the presser foot accelerometer is set to 5000 Hz, the analog voltage output range is 0~3.3 V, and the high-resolution spindle encoder output signal resolution is 1024 pulses per revolution. The bandpass filter module is set with a low cutoff frequency of 35 Hz, a high cutoff frequency of 180 Hz, and a center frequency of 110 Hz. After filtering the original presser foot signal, the signal noise power is significantly reduced. During time-domain alignment, the average lag between the original presser foot signal sampling index and the spindle phase signal index is 0.4 ms. The synchronization sample value is calculated according to the interpolation formula, and the normalization coefficient is taken from the current cycle amplitude range of 2.5 V~0.2 V. After normalization, the signal amplitude range is fixed at -1~1. When extracting features from this signal, it can stably capture the micro-vibration changes at the moment of contact and separation between the presser foot and the fabric, enhancing the temporal consistency and state discrimination accuracy of multi-cycle phase features.
[0040] S1.3: Using the high-resolution spindle absolute position signal as a trigger reference, the multi-channel resistance change data output by the flexible strain array in the needle plate area is spatially weighted and fused and time-series interpolated to generate a strain response signal of the fabric surface in the needle plate area that characterizes the local deformation dynamics of the fabric and is precisely matched with the spindle rotation period.
[0041] When acquiring multi-channel resistance change data of the flexible strain array in the needle plate area, the output of each channel is used as the input of the original electrical signal sequence. The acquisition process uses the zero-position phase reference point provided by the high-resolution spindle absolute position signal as a unified trigger reference. Spatial weighted fusion processing is performed on the resistance change sequence of each channel. Weighting coefficients are set according to the geometric coordinate distribution of each sensing node of the strain array on the needle plate, and the resistance changes of similar nodes are summed according to the weight ratio to form the fused local deformation signal. During the formation of the fused signal, the weight setting value for the core area nodes is higher than that for the edge area nodes to enhance the sensitivity to the deformation of the fabric in the middle of the needle plate. The fused local deformation signal is subjected to time-series interpolation processing based on the periodic phase index of the spindle absolute position signal. In the interval where the phase difference spans the continuous sampling period, cubic spline interpolation is applied to generate the deformation sequence of missing phase points, thereby ensuring that the strain signal is evenly distributed among the multi-source data points within the spindle rotation period. For the interpolation processing, the interpolation function is used to satisfy the conditions of continuity of deformation change and smoothness of the second derivative, and the value of the interpolation point is calculated. After forming a complete interpolated deformation sequence, abnormal amplitudes are eliminated by combining the fused signal. The anomaly criterion is based on the amplitude fluctuation threshold within the zero-position phase period, eliminating isolated high-amplitude points caused by processing vibration or noise. Through the above spatial weighted fusion and temporal interpolation processing, the multi-channel resistance change data of the flexible strain array is transformed into a strain response signal of the fabric surface in the needle plate area that characterizes the local deformation dynamics of the fabric and is precisely matched with the rotation period of the main shaft, achieving strict synchronization between strain perception and mechanical rhythm.
[0042] For example, in the case of a denim garment with a flat seam, the fabric surface strain array in the needle plate area contains a 4×4 sensor node matrix, with each node sampling at a frequency of 5kHz and a high-resolution principal axis absolute position signal resolution of 0.1°. Spatial weighting coefficients are set as follows: 0.15 for the center node of the needle plate, 0.10 for the secondary center node, and 0.05 for the edge nodes. After acquiring the resistance change data of each node, the weighted summation yields a fused signal amplitude range of 0.02Ω to 0.35Ω. Cubic spline interpolation is performed with the principal axis phase as the horizontal axis and the fused signal as the vertical axis, with interpolation coefficients P0=0.12, P1= With values of 0.08, P2=0.04, and P3=0.01, continuous deformation curves are generated across the main axis phase angle range of 0° to 360°. An anomaly rejection rule with an amplitude fluctuation threshold of 0.40Ω is applied to the interpolation curves, eliminating three isolated high-amplitude points. This results in a smooth fabric surface strain response signal that is synchronized with the main axis cycle. Applying this signal significantly improves the accuracy of determining the maximum deformation moment of denim fabric under different sewing rhythms.
[0043] S1.4: The high-resolution spindle absolute position signal, presser foot bar micro-vibration signal, and fabric surface strain response signal in the needle plate area are processed by multi-dimensional tensor splicing at a uniform sampling frequency to generate a four-dimensional original sewing dynamics dataset containing timestamp indexes and multi-source physical quantity mapping relationships.
[0044] Step S2: Based on the four-dimensional original sewing dynamics dataset, each spindle rotation cycle is segmented in the time domain to extract timestamp data for four key event points: the moment the needle penetrates the fabric, the moment the presser foot begins to contact the fabric, the moment the fabric experiences maximum deformation, and the moment the stitch locks in. Specifically, this includes: S2.1: Perform spindle rotation cycle boundary detection processing on the original four-dimensional sewing dynamics dataset. Use the zero-crossing features of the high-resolution absolute position signal or specific angle markers to identify the start and end times of each complete sewing beat, so as to generate a periodic slice sequence containing multiple independent spindle rotation cycle segments.
[0045] Periodic boundary analysis was performed on the absolute position signal of the spindle in the four-dimensional original sewing dynamics dataset to map the angle data in the signal to a unified zero-phase reference coordinate system in order to establish a phase calibration benchmark for each spindle rotation cycle.
[0046] A zero-crossing detection operator is applied to the mapped spindle absolute position signal to extract the moment when the signal crosses the zero phase point, and phase continuity is verified to eliminate false zero points caused by noise or false triggering.
[0047] Specific angle markers are retrieved in the sequence after zero-point confirmation, such as the matching relationship between preset angle marker values and the spindle rotation phase. The matching criteria are used to locate the start and end key angle positions in each cycle.
[0048] The confirmed start and end angles are paired to form a set of periodic time segments covering the complete selvage beat.
[0049] Slicing is performed on the set of periodic time periods to generate a sequence of periodic slices containing multiple independent spindle rotation period segments, along with period numbers and start and end time indices as metadata.
[0050] By constructing the above-mentioned periodic slice sequence, the four-dimensional raw sewing dynamics data generated in the previous step is transformed into structured periodic segmented data, which forms the basis for a unified time-domain slice for subsequent extraction of key event timestamps.
[0051] For example, in an industrial flat-seam denim garment sewing scenario, a high-resolution encoder outputs an absolute position signal of 10,000 pulses per revolution, with the zero-phase reference point set as the position of the first pulse output by the encoder. Applying a zero-crossing detection operator and a 2ms phase continuity window to the mapped angle data significantly reduces the false zero-point detection rate. Under this condition, a specific angle marker of 180° is set to assist in confirming the midpoint of the cycle, with a starting angle of 0° and an ending angle of 360°, corresponding to timestamps of 0ms and 40ms (at a sewing speed of 1500 stitches / minute). After pairing, a single-cycle time period [0ms, 40ms] data block is formed and numbered cycle #001. Repeating this process yields a slice sequence from cycle #001 to cycle #050. This sequence contains start and end time indices and cycle number metadata, which can be used in the next step for accurate extraction of the needle penetration moment into the fabric. In actual testing, the time error for cycle boundary identification using this method is less than 0.1ms, demonstrating a significant improvement in the accuracy of key event timestamps.
[0052] S2.2: Perform a penetration event feature extraction operation based on the needle displacement component in the periodic slice sequence. By calculating the extreme point of displacement difference and combining it with the abrupt change edge of the micro-vibration signal of the presser foot bar, determine the precise moment when the needle tip pierces the fabric surface, and output the timestamp data of the moment when the needle penetrates the fabric.
[0053] S2.3: The contact state criteria are analyzed using the micro-vibration signal components of the presser foot rod in the periodic slice sequence. The short-time energy envelope detection method is used to capture the vibration mode jump point caused by the physical contact between the bottom surface of the presser foot and the surface of the fabric, so as to obtain the timestamp data of the start time of the presser foot contacting the fabric.
[0054] S2.4: Perform deformation peak search processing based on the strain response signal of the fabric surface in the needle plate area of the periodic slice sequence, locate the maximum extreme point of strain amplitude within the time window from the moment the needle penetrates the fabric to the moment the stitch is formed, so as to determine the timestamp data of the moment of maximum fabric deformation.
[0055] The system receives multi-channel fabric surface strain response signals from a flexible strain array in the needle plate region, which are then processed by spatial weighted fusion and temporal interpolation. The analysis range is defined as the strain data sequence within the time window from the moment the needle penetrates the fabric to before the stitch is formed.
[0056] Dynamic amplitude envelope analysis is performed on the strain data within the time window. Local peak samples are extracted from each channel signal using sliding window extremum detection. The synchronicity of peak occurrence is evaluated through a multi-channel correlation coefficient matrix to eliminate spurious peaks caused by single-channel noise.
[0057] Peak samples that meet the synchronization criterion are input into the deformation amplitude statistics module. The normalized amplitude comparison is used to determine the global maximum amplitude point, and the corresponding time index is extracted as the candidate fabric maximum deformation moment.
[0058] Secondary verification is performed on candidate moments. The deformation event intensity score is calculated by combining the abrupt change of the micro-vibration signal of the presser foot bar in the periodic slice sequence with the change of strain amplitude gradient. Threshold screening is used to ensure that the determined moment corresponds to the actual physical deformation peak event. The event point with the higher score value is confirmed as the moment of maximum fabric deformation, and the corresponding timestamp data is generated.
[0059] By performing deformation peak search processing and intensity scoring verification, the periodic slice sequence from the previous step is transformed into a precise timestamp of the maximum deformation moment of the fabric, enabling accurate positioning of the fabric deformation peak event and providing a key time reference for subsequent phase fingerprint construction.
[0060] For example, for denim fabric with a thickness of 2.5mm and a weft elastic modulus of 320MPa, under the condition of a sewing machine spindle speed of 1200rpm, the strain response signal from the moment the needle penetrates to 0.15s before the stitch lock is selected as the analysis window, with a sliding window length of 2ms and a movement step of 0.5ms. After multi-channel amplitude envelope extraction, a synchronous peak was found in 3 channels at 0.072s, with a normalized amplitude A of 0.86, a strain gradient G of 4.2, and a periodic signal standard deviation σ of 0.15. Substituting these values into the calculation of the deformation event intensity score S, a score of approximately 3.14 was obtained, exceeding the preset threshold of 2.5. This moment was confirmed as the moment of maximum fabric deformation, and the timestamp data of 0.072s was output. The deformation moment extracted under these conditions is consistent with the fabric deformation synchronization verification results recorded by high frame rate cameras, significantly improving the peak positioning accuracy and stabilizing the temporal consistency of phase fingerprint generation.
[0061] S2.5: Combining the timestamp data of the needle penetrating the fabric, the presser foot contacting the fabric at the beginning, and the fabric at the moment of maximum deformation, the signal waveform of the stitch locking stage is matched with the timing logic. Based on the synchronization relationship between the feed dog movement phase and the thread tension release characteristics, the moment when the stitch is closed is locked, so as to finally generate a sewing event timestamp sequence containing complete time information of four key event points.
[0062] A unified time-domain mapping was performed on the timestamp data of the needle penetration moment, the presser foot contact with the fabric start moment, and the moment of maximum fabric deformation to establish a phase reference index for each event point within the spindle rotation cycle. Based on this index, the feed dog displacement signal and the thread tension feedback signal were separated from the four-dimensional original sewing dynamics dataset to ensure strict alignment of the data with the zero phase of the spindle. Phase peak and valley detection was performed on the feed dog displacement signal to extract the time markers of the feed dog completing the rising, falling, and horizontal feeding processes, and the phase difference was calculated to match the synchronization relationship between fabric displacement and thread tension fluctuations. Short-time correlation coefficient analysis was applied to the thread tension feedback signal to identify the amplitude drop point during the tension release phase, and time-series cross-validation was performed with the feed dog movement phase markers to locate the start and end of the stitch locking phase. Dual-condition logic judgment (phase difference threshold, tension drop amplitude threshold) was used to filter false locking events, and the precise timestamp of the locking end moment was calculated using an interpolation algorithm. This timestamp is combined with the timestamps of the previous three events to form a sewing event timestamp sequence containing complete time information of four key events: needle penetration, presser foot contact, fabric deformation, and stitch locking. Through temporal logic matching and multi-signal feature cross-validation, the result of the previous step is transformed into a standardized event time index, achieving high-precision identification of the locking moment and full-cycle sewing dynamic feature annotation.
[0063] For example, an industrial flatbed sewing machine is equipped with a photoelectric feed dog displacement sensor (sampling frequency 2 kHz, accuracy 0.05 mm) and a tension sensor (sampling frequency 1 kHz, accuracy 0.02 N) to collect data from one spindle rotation cycle during denim sewing. The three time stamps for needle penetration, presser foot contact, and fabric deformation are 0.120 s, 0.135 s, and 0.148 s, respectively. After establishing a phase reference index, the peak-valley detection results of the feed dog displacement signal show that the locking phase begins at 0.152 s and ends at 0.165 s. The tension signal experiences a sudden amplitude drop at 0.165 s (from 2.8 N to 2.1 N). Short-time correlation coefficient analysis confirms that the feed dog is at the end of a stable horizontal displacement at this moment, with a phase difference of 0.015 × ω (where ω is the spindle angular velocity). A dual-condition logic judgment satisfies the phase difference threshold ≤ 0.02 × ω and the tension drop ≥ 0.5 N, determining the end of locking at 0.165 s. The interpolation algorithm (tooth pitch displacement interpolation accuracy 0.001 s) is used to correct the moment of engagement completion to 0.1648 s, ultimately forming a timestamp sequence [0.120 s, 0.135 s, 0.148 s, 0.1648 s], achieving high-precision labeling of four key events. The output results are used for subsequent phase offset calculation, effectively improving the timing consistency and working condition adaptability of the pressure compensation strategy generation.
[0064] like Figure 2As shown, step S3 involves calculating the angular offset of each event point relative to the zero phase of the main axis based on the timestamp data of the four key event points, and combining the angular offsets to construct a dynamic phase fingerprint vector characterizing the coupling characteristics of the current fabric elasticity, thickness gradient, and feed inertia. Specifically, this includes: S3.1: Obtain the spindle zero-phase reference point data for the current sewing cycle, as well as four original timestamp data: the moment the needle penetrates the fabric, the moment the presser foot contacts the fabric, the moment the fabric undergoes maximum deformation, and the moment the stitch locks in. Based on the assumption of a constant spindle rotational angular velocity, perform time-domain normalization on the four original timestamp data to generate four initial phase angle values corresponding to the spindle rotation circumference.
[0065] S3.2: Receive the four initial phase angle values and the spindle zero-phase reference point data, and use the angle difference to calculate the relative phase offset operation to calculate the four independent phase angle offsets of each key event point relative to the spindle zero-phase reference point.
[0066] The system receives four initial phase angle values obtained after time-domain normalization and the corresponding principal axis zero-phase reference point data, and establishes a unified angle calculation benchmark to eliminate the influence of zero-position drift in different periods.
[0067] Each initial phase angle value and the spindle zero-phase reference point data are input into the angle difference calculation module. This module performs the difference calculation based on the circumferential phase properties, ensuring that all angle offsets are within the range of 0 ≤ θ < 360.
[0068] The difference calculation process is corrected by wrapping. For cases with negative values or more than one revolution, the modulo operation (Δθ+360)mod360 is used to obtain the phase offset that is consistent with the physical rotation direction.
[0069] The four phase offsets after wrap correction are stored in a structured array in the order of event points, and the correspondence with the key event points of the stitching is maintained, which facilitates subsequent vector construction and feature mapping.
[0070] The structured array is precision corrected, and a floating-point weighted average method is used to introduce the local mean of historical periodic phase data to compensate for the instantaneous measurement fluctuations of a single period, thereby forming a stable independent phase angle offset output.
[0071] By using angle difference calculation and surround correction processing, the initial phase angle value of the previous step is transformed into four independent phase angle offsets that eliminate zero drift and have physical direction consistency, thereby realizing the standardized quantitative expression of the key event phase of the current sewing cycle.
[0072] S3.3: Based on the four independent phase angle offsets, multi-dimensional vector space mapping technology is used to arrange and combine the discrete angle values according to a preset time sequence logic to construct a preliminary dynamic phase feature vector that includes the elastic response of the sewing material, the thickness gradient change and the fabric feeding inertia characteristics.
[0073] Based on the four independent phase angle offsets calculated in the previous sub-step—needle penetration, presser foot contact, maximum fabric deformation, and stitch locking—a set of temporal logic arrangement rules is established to map the position of each angle offset according to the event occurrence order in the sewing machine spindle rotation cycle. The mapped angle offset vectors are normalized, mapping each component value to a unified [0, 2π) phase domain to ensure comparability of vectors under different working conditions. According to the preset event sequence, the four normalized phase components are written into the corresponding dimension positions in the multi-dimensional vector space in a fixed index order, forming a preliminary temporally consistent multi-dimensional phase vector skeleton. Using the multi-dimensional vector space mapping, each component in the skeleton vector is read, and the phase value is projected onto a physical characteristic subspace containing elastic response, thickness gradient change, and fabric feed inertia characteristics using a mapping matrix. For the generation of the mapping matrix, based on the correspondence between statistical parameters in the fabric type database and actual working conditions, feature preservation maximization is used to determine the projection weights of each subspace. After performing the projection operation, the components output from the three physical characteristic subspaces are combined with the original skeleton phase value to form an extended vector. A nonlinear correction component for the elastic response, a gradient magnitude component for the thickness gradient, and an inertial phase delay component for the fabric feed inertia are inserted into the extended vector to form a preliminary dynamic phase feature vector capable of characterizing various coupling features. Through the above multi-dimensional vector space mapping process, the independent phase angle offset results from the previous step are transformed into a preliminary dynamic phase feature vector possessing characteristics of the fabric elastic response, thickness gradient change, and fabric feed inertia, thus achieving a structured expression of the coupling features of the sewing state.
[0074] S3.4: Obtain the preliminary dynamic phase feature vector and historical periodic phase fluctuation statistical parameters, and perform dynamic weighted correction processing on each component in the vector to generate the final dynamic phase fingerprint vector that can eliminate random noise interference and strengthen the expression of coupling features.
[0075] The system receives a preliminary dynamic phase feature vector containing the elastic response of the sewing fabric, thickness gradient changes, and fabric feeding inertia characteristics, along with historical periodic phase fluctuation statistical parameters as input data. It performs a joint normalization operation of the standard deviation and mean on the historical periodic phase fluctuation statistical parameters to form a dimensionless fluctuation weight reference system. Based on the fluctuation weight reference system, it calculates the weight adjustment coefficients for each component of the preliminary dynamic phase feature vector, using an exponential decay function to reduce the weight of high-fluctuation components and enhance the weight of low-fluctuation and stable components. It then performs element-wise multiplication of the weight adjustment coefficients with the preliminary dynamic phase feature vector to generate a dynamically weighted intermediate fingerprint vector. The intermediate fingerprint vector undergoes sliding window mean filtering to eliminate the instantaneous disturbance of random noise on the phase features and maintain the temporal consistency of each component. Finally, it performs a weighted fusion of the filtered intermediate fingerprint vector with the historical periodic phase feature mean vector, with the fusion coefficient calculated based on the similarity between the current sewing rhythm and historical working conditions. The final output is a dynamic phase fingerprint vector that strengthens the expression of coupled features and significantly suppresses random noise. By using an adaptive weight allocation and temporal filtering fusion processing method, the preliminary dynamic phase feature vector from the previous step is transformed into a final dynamic phase fingerprint vector with high robustness and high discriminative power, thereby improving the stability and generalization ability of sewing state feature extraction.
[0076] like Figure 3 As shown, step S4 involves constructing the input nodes of a graph neural network model using a sequence of dynamic phase fingerprint vectors spanning multiple consecutive periods, and generating edge weight data for the graph neural network model based on the joint encoding of time and phase differences between adjacent event points. Specifically, this includes: The graph neural network model is a graph-structured deep learning model specifically designed for predicting presser foot pressure in the sewing process. It extracts spatiotemporal coupling features between nodes from the dynamic phase fingerprint vectors of multiple consecutive sewing cycles and maps the pressure adjustment command increment for the next sewing beat. The model uses four key event points in each sewing cycle (needle penetration, presser foot contact, maximum fabric deformation, and stitch locking) as graph nodes, and uses the joint encoding of the time difference and phase difference between corresponding event points in adjacent cycles as edge weights. Through a multi-head graph attention mechanism and graph convolutional layers, it captures the lag in the transmission of sewing rhythm changes and fabric mechanical properties, achieving adaptive pressure compensation for different denim fabrics under complex conditions such as speed changes and turns, ultimately outputting the pressure adjustment command increment.
[0077] The graph neural network model adopts an architecture that combines multi-layer graph convolution with attention mechanisms, and consists of the following core modules: Graph Structure Input Layer: Receives a graph structure tensor input generated by S4, containing a set of node feature embeddings (size: number of periods × number of event point types × feature dimension) and a normalized edge weight matrix. This layer is responsible for verifying the dimensionality consistency of the input data and performing an optional initial linear transformation on the node features.
[0078] Multi-headed graph attention layer Head Graph Attention: Multiple parallel attention heads (e.g., 4) are set up, each independently calculating the attention coefficients between nodes. The calculation process for a single head is as follows: linear transformation is performed on the node features, the original scores between adjacent nodes are calculated, and then the attention coefficients are obtained through softmax normalization. The output of each head is the weighted aggregated hidden state of the node. The outputs of multiple heads are fused by concatenation or averaging to enhance the model's ability to express features coupled with different patterns.
[0079] Graph Convolutional Layer: This layer consists of 2 to 3 stacked graph convolutional layers, used to extract multi-hop dependencies between nodes. Each graph convolutional layer uses a feature aggregation formula based on edge weights. Where A norm It is a normalized adjacency matrix (edge weights are embedded), W (l) σ is the learnable hidden layer weight matrix (i.e., the main component of the "hidden layer parameters"), and σ is a nonlinear activation function (such as ReLU). Residual connections are introduced to mitigate oversmoothing.
[0080] Feature filtering and aggregation module: Frequency-domain-based feature filtering operations (such as attenuating high-frequency components after performing a Fast Fourier Transform on the node feature matrix) are added between convolutional layers to suppress local noise caused by sudden changes in sewing speed. Then, a high-dimensional sewing state feature map is obtained through global average pooling or node-by-node feature concatenation.
[0081] Fully connected regression head: Maps the high-dimensional feature map to a single numerical value, namely the pressure regulation command increment, through a two-layer fully connected network. The first layer outputs the intermediate representation followed by ReLU activation, and the second layer outputs the scalar prediction value. Finally, after temporal smoothing filtering and range limiting, the final pressure regulation command increment is output.
[0082] Construction method: Offline training phase: Data Acquisition: Under various denim fabrics (different thicknesses and elastic moduli) and sewing conditions (uniform speed, acceleration, deceleration, turning), a large number of dynamic phase fingerprint vectors and corresponding ideal pressure adjustment command increments during sewing cycles were collected (labels can be obtained through expert optimization or iterative experiments). The data were then constructed into a graph-structured sample as described in S4. Loss function: The mean squared error (MSE) is used as the loss between the predicted pressure regulation command increment and the true label. At the same time, a smoothing constraint term (such as the regularization of the prediction difference between adjacent samples) can be added to improve the temporal continuity of the output command. Optimizer and hyperparameters: Adam optimizer, initial learning rate 0.001, batch size 32, 100 training epochs, 10 early stopping epochs. Graph attention heads 4, graph convolutional layers 3, node hidden state dimension 64, edge weights normalized using softmax; Lightweight design: Limit the number of output channels of graph convolutional layers (not exceeding 128), use depthwise separable convolutions instead of fully connected layers (if applicable), and perform 8-bit integer quantization on the model to keep the model size within 2MB, making it suitable for embedded deployment.
[0083] Online reasoning stage: After each sewing cycle, S4 constructs the graph structure tensor within the current local window; The input graph neural network model is propagated forward to obtain the pressure adjustment command increment for the next cycle. The inference latency is controlled within 5ms, which meets the requirements of real-time sewing control.
[0084] Online fine-tuning (S8 triggered): When S7 detects that the sewing consistency deviation exceeds the threshold, it triggers the online fine-tuning mechanism of the model. This mechanism uses the dynamic phase fingerprint vector of the current cycle and the measured pressure deviation data to perform gradient updates on the hidden layer parameters of the model (including the weight matrix of the graph convolutional layer, the transformation matrix of the attention layer, and the weights of the fully connected layer) in a small number of steps (e.g., 5-10 steps) through the backpropagation algorithm, generating the model parameter update increment, and writing the updated weights back to the original model, thereby achieving rapid adaptation to the current fabric characteristics and optimizing the generation accuracy of subsequent pressure adjustment command increments.
[0085] By employing a graph neural network model, end-to-end learning was achieved, encompassing the spatiotemporal coupling characteristics of the sewing process and the presser foot pressure adjustment commands. This significantly improved sewing consistency across different denim fabrics and sewing conditions while maintaining real-time performance. The model's hidden layer parameters were obtained through offline training and continuously optimized during operation using S8's online fine-tuning mechanism, thereby continuously improving the prediction accuracy of pressure adjustment command increments.
[0086] S4.1: Obtain the dynamic phase fingerprint vector sequence output by multiple consecutive sewing cycles, and perform sliding window truncation processing on the dynamic phase fingerprint vector sequence based on the timestamp index to generate a local dynamic phase fingerprint tensor dataset containing the current time and historical time series information, and establish the temporal context range of the graph neural network model input.
[0087] The system receives the final dynamic phase fingerprint vector sequence of multiple consecutive sewing cycles output from step S3 as input data. Each vector contains the phase angle offset value and timestamp information for four key events corresponding to the cycle: needle penetration, presser foot contact, maximum fabric deformation, and stitch locking. A full-time domain data index table is built based on the timestamp index, arranged in the order of the sewing cycles. The phase fingerprints of each cycle are mapped to a one-dimensional time series storage structure in chronological order to ensure the continuity and correct order of subsequent truncation processing. A sliding window length parameter L and a step size parameter S are set. A fixed-length window truncation operation is performed in the full-time domain data index table based on the timestamp index. Each truncation includes the current cycle and the previous L cycles. The phase fingerprint vector for one historical period is used, with the window starting position advancing S periods forward each time to achieve rolling updates of temporal information. Tensor stacking is performed on the phase fingerprint vector set within the extracted window, arranging the four-dimensional phase offset vector of each period along the time axis to form a two-dimensional intermediate tensor of size N×4. A corresponding timestamp index is appended to the first dimension of the tensor as an explicit temporal marker, allowing the model to retain absolute temporal information during feature learning. Based on the structure of the stacked tensor, each element is normalized, and the angle offset values are mapped proportionally according to a preset maximum phase range, ensuring that the numerical scale under different periods and operating conditions is within a unified range, improving the stability and comparability of the model input. The normalized two-dimensional intermediate tensor is expanded with a feature dimension to form a local dynamics phase fingerprint tensor dataset conforming to the lightweight graph neural network input specification. This dataset simultaneously carries current and historical temporal information, thereby establishing the temporal context range for subsequent node construction and edge weight calculation. By using the sliding window truncation and tensor quantization methods described above, the dynamic phase fingerprint vector sequence from the previous step is transformed into a local dynamic phase fingerprint tensor dataset with temporal coherence and scale uniformity, thus achieving the expected technical effect of providing a standardized temporal context benchmark for graph neural network input.
[0088] S4.2: Based on the local dynamic phase fingerprint tensor dataset, extract the feature components of four key event points in each cycle, and use vector space mapping to instantiate the feature components of the four key event points into independent node objects in the graph neural network model to generate a node feature embedding set containing information on needle penetration, presser foot contact, fabric deformation and stitch locking status.
[0089] The input conditions include a local dynamic phase fingerprint tensor dataset output by S4.1, which contains feature components of four key event points within multiple consecutive sewing cycles, indexed by timestamp, corresponding to needle penetration of fabric, presser foot contact with fabric, maximum fabric deformation, and stitch locking state, respectively.
[0090] The local dynamic phase fingerprint tensor dataset is subjected to periodic iterative decomposition processing to extract the numerical components of the four key event points periodically, ensuring that the extraction order is consistent with the temporal index within the tensor to maintain the spatiotemporal correspondence between nodes.
[0091] The extracted event point feature components are subjected to numerical normalization and unit conversion.
[0092] The normalized feature components are fed into the vector space for mapping. Based on the preset node type labels, needle penetration, presser foot contact, fabric deformation, and stitch locking are mapped into independent node objects. Each node object contains a three-dimensional data structure of numerical features, node category, and timestamp index.
[0093] Feature embedding operations are performed on the node's three-dimensional data structure. A linear transformation matrix is used to encode the angle offset value and event category into a fixed-dimensional embedding vector, ensuring that different nodes are comparable and computable in a low-dimensional space.
[0094] Through the above processing method, the local dynamic phase fingerprint tensor of the previous step is transformed into a set of node feature embeddings containing information on needle penetration, presser foot contact, fabric deformation and stitch locking state, thereby realizing node instantiation and unified representation for graph neural network input.
[0095] S4.3: Receive the node feature embedding set and identify the temporal connection relationship of corresponding event points in adjacent cycles, calculate the time interval difference between adjacent event points and the difference of the main shaft rotation phase angle, so as to generate the original spatiotemporal difference measurement parameter pair characterizing the sewing rhythm change rate and the synchronization of mechanical motion.
[0096] The system receives a set of embedded node features as input and parses the periodic index of each node in the set and its corresponding key event point identifier.
[0097] A periodic sequence mapping table is established based on periodic index information, and nodes of the same event point in adjacent periods are paired in chronological order and the pairing relationship is recorded.
[0098] Read the timestamp data of the paired nodes and perform high-precision differential calculations to obtain the time interval difference between corresponding event points in adjacent periods.
[0099] Read the phase angle offset of the paired node, perform phase difference calculation to obtain the spindle rotation phase angle difference of the corresponding event points in adjacent cycles.
[0100] The time interval difference and the spindle rotation phase angle difference are combined into a pair of original spatiotemporal difference measurement parameters, and each pair of parameters is labeled with an event point category identifier and a period position identifier.
[0101] Through the above processing method, the node feature embedding set of the previous step is transformed into a pair of original spatiotemporal difference measurement parameters that can be used to characterize the rate of change of sewing rhythm and the synchronicity of mechanical movement, so as to realize the quantitative characterization of the spatiotemporal correlation between adjacent periodic event points.
[0102] For example, in the denim sewing scenario of an industrial flatbed sewing machine, assuming that the dynamic phase fingerprint vectors of five consecutive cycles have been instantiated into a set of node feature embeddings, the timestamps of the needle penetration event points in each cycle are 10.005ms, 10.011ms, 10.019ms, 10.024ms, and 10.031ms, respectively, and the corresponding phase angle offsets are 45.0°, 45.8°, 46.5°, 47.2°, and 48.0°, respectively. Calculating using the above formula, the time interval difference sequence between adjacent cycles is: 0.006 seconds for the first pair, 0.008 seconds for the second pair, 0.005 seconds for the third pair, and 0.007 seconds for the fourth pair; the phase angle difference sequence is: 0.8 degrees for the first pair, 0.7 degrees for the second pair, 0.7 degrees for the third pair, and 0.8 degrees for the fourth pair. Each pair of differences is combined into a parameter pair, such as the first parameter pair being 0.006, 0.8, and an event point category label "needle penetration" and a cycle position label "1→2" are added. This processing significantly improves the model's sensitivity to rhythm changes and phase synchronization features in subsequent edge weight calculations, thereby enhancing the stability of the pressure compensation strategy under high-speed sewing.
[0103] S4.4: Based on the original spatiotemporal difference measurement parameters, perform nonlinear joint encoding operation, and use an exponential decay kernel function to perform weighted fusion processing on the time interval difference and the main shaft rotation phase angle difference to generate a normalized edge weight numerical matrix that reflects the transmission hysteresis and coupling strength of the mechanical properties of the seam material.
[0104] Based on the original spatiotemporal difference measurement parameter pairs output from the previous sub-step, a nonlinear joint encoding operation object is constructed, specifying that each parameter pair contains two components: a time interval difference and a spindle rotation phase angle difference. The time interval difference is normalized, mapping it to a dimensionless value range centered at zero and with an amplitude limited by a preset maximum beat interval, ensuring the comparability of rhythm changes at different ratios during the encoding process. The spindle rotation phase angle difference is similarly normalized, converting it into a standardized angle offset value synchronized with the needle movement rhythm to eliminate the influence of gear ratio differences between different sewing machine models. The normalized time interval difference and normalized phase angle difference are used as input components of an exponential decay kernel function, and a weighted fusion calculation is performed. This calculation relies on the two-parameter form of the kernel function, where the decay rate is independently adjusted for the time and phase components to reflect the different transmission lag characteristics of the fabric's mechanical properties in the time and phase domains.
[0105] The fusion results are filled into the normalized edge weight matrix in the order of node connections. The row and column indices of the matrix correspond to the unique identifiers of the event nodes, ensuring that the weight of each edge accurately maps the propagation lag and coupling strength of the connected event points. Through the above nonlinear joint encoding and weight fusion processing, the original spatiotemporal difference measure from the previous step is transformed into a normalized edge weight matrix with physical meaning that can be directly used for feature propagation in graph neural networks, achieving a unified representation of the sewing rhythm and mechanical coupling characteristics.
[0106] S4.5: Integrate the node feature embedding set with the normalized edge weight numerical matrix, perform topology assembly operation according to graph data structure specifications, map discrete nodes and weighted edges into a unified adjacency list storage format, generate a graph structure input tensor with complete spatiotemporal evolution characteristics, and complete the graph data construction for the stress decision model.
[0107] Step S5: Input the graph structure containing the node and edge weight data into the graph neural network model, and output the pressure adjustment command increment for the next sewing cycle by mapping the phase fingerprint evolution of different denim fabrics under variable speed or turning conditions. Specifically, this includes: S5.1: Tensor encapsulation is performed on the node data containing the dynamic phase fingerprint vector sequence and the edge weight data generated by joint encoding to construct a graph structure tensor dataset that conforms to the input specification of graph neural network models, providing a standardized data base for subsequent feature propagation.
[0108] The node feature embedding set and normalized edge weight matrix output from the lightweight graph structure input tensor construction step are subjected to input normalization verification to ensure that the field numbering, dimension arrangement and storage format of the data structure are consistent with the input protocol of the graph neural network model.
[0109] The node feature embedding set is reordered dimensionally according to a preset topological index sequence to avoid feature propagation path failure due to index misalignment when different periodic event points are in the same batch of inference.
[0110] The numerical precision of the normalized edge weight matrix is uniformly converted to floating-point type and threshold pruning is performed to eliminate the nonlinear interference of extreme weight values on the initial aggregation stage of the model.
[0111] The processed node feature set and edge weight matrix are assembled into an adjacency list structure, and the tensor generation function is called to encapsulate it into a T-dimensional graph tensor, where the node feature tensor and the edge weight tensor maintain completely consistent indices within the same batch processing unit.
[0112] During the tensor encapsulation process, batch time index markers and periodic phase reference values are embedded, and the principal axis zero-phase reference information is stored through the tensor attribute field to ensure that the model automatically matches the time coordinates during inference.
[0113] By using the tensor encapsulation processing method described above, the topological data from the previous step is transformed into a standardized graph structure tensor dataset that conforms to the lightweight graph neural network input specification, thereby achieving data consistency and spatiotemporal index traceability in the subsequent feature propagation stage.
[0114] For example, in an automated production line of an industrial flatbed sewing machine, dynamic phase fingerprint vectors are continuously collected for eight cycles. Each cycle contains feature embeddings of four key event points. The node feature vector dimension is set to 16 dimensions, and the normalized edge weight matrix is 4×4. The node feature set is arranged in the order of event points: needle penetration, presser foot contact, fabric deformation, and stitch locking. The normalized edge weight values are limited to the range of [0.001, 0.95]. In the tensor encapsulation function, the batch time index is set to 0~7, and the principal axis zero phase reference value is 0°. The final generated graph structure tensor T is a three-dimensional structure, where the first dimension is the batch length (8), the second dimension is the number of nodes (4), and the third dimension is the feature dimension (16). The edge weight tensor and the node feature tensor share the index. In this embodiment, the encapsulated graph structure tensor is input into the lightweight graph neural network inference, which can maintain the stable transmission of spatiotemporal coupling features between event points in the subsequent multi-head graph attention mechanism stage, significantly improving the transient response stability of the model's output pressure adjustment command increment.
[0115] S5.2: Perform multi-head graph attention mechanism operation based on the graph structure tensor dataset to aggregate the time difference and phase difference correlation features between adjacent event points and generate a node hidden state embedding vector sequence that characterizes the spatiotemporal coupling characteristics of the sewing process.
[0116] Based on the node feature embedding set and normalized edge weight matrix in the graph structure tensor dataset, the set of adjacent nodes and weight distribution corresponding to each node in the multi-head graph attention mechanism are determined. For each attention head, the node's own feature vector and the feature vectors of its adjacent nodes are received, and a feature dimension transformation is performed through a linear mapping matrix to generate a set of feature candidate vectors with a unified dimension. A correlation score is calculated for the set of feature candidate vectors and the edge weight numerical matrix using the following attention score formula: Where a is the attention weight vector, W is the feature transformation matrix, and h i with h j Let be the feature vectors of node i and node j, respectively, and || denote the vector concatenation operation. The correlation score is normalized according to the node adjacency relationship to obtain the attention coefficient α. ij The calculation formula is: Where N(i) is the set of adjacent nodes of node i, e ij This is the original attention score of node i for node j. The attention coefficients are weighted and summed with the feature vectors of adjacent nodes. Under a multi-head mechanism, the weighted sums from different attention heads are then processed by feature concatenation or averaging to generate a sequence of node hidden state embedding vectors representing the spatiotemporal coupling characteristics of the sewing process. Through the multi-head graph attention mechanism, the node and edge structure data from the previous step are transformed into high-dimensional node hidden state features that highlight the synergistic effect of phase difference and time difference, thereby enhancing the expression of the coupling pattern of key event points in the sewing process.
[0117] S5.3: The node hidden state embedding vector sequence is used to perform multi-level feature extraction and nonlinear transformation processing through graph convolutional layers to explore the deep evolution law of dynamic phase fingerprint of different denim fabrics under acceleration, deceleration and turning conditions, and output a high-dimensional sewing state feature map.
[0118] The sequence of hidden state embedding vectors of the nodes is received as the input carrier for the graph convolutional layer. For each node's feature embedding value, an edge weight combination matrix with neighboring nodes is established to determine the initial mapping of the feature propagation path. The first layer of graph convolution is performed on the input carrier, employing a feature aggregation function based on edge weights. The hidden state vectors of neighboring nodes are accumulated and summed according to normalized weights, and a nonlinear activation function is applied to the accumulated result to enhance the identification ability of coupled features. The updated node feature matrix output from the first layer is input into the second layer of graph convolution. A multi-neighborhood convolution kernel is used to simultaneously aggregate the features of first-order and second-order neighbors, forming a cross-period dynamic phase feature propagation chain. Batch normalization is used to suppress feature amplitude drift caused by sewing speed fluctuations. A third layer of graph convolution is constructed based on the second layer output. A residual connection strategy is used to retain the original hidden state embedding vectors and the feature mapping results after convolution. Linear superposition is used to achieve the fusion of deep and shallow features, improving the model's adaptability to complex fabric thickness gradients and fabric feeding inertia changes. A feature filtering mechanism based on frequency domain decomposition is introduced during the convolution calculation process. After transforming the node feature matrix to the frequency domain, high-frequency components are attenuated to remove local abrupt noise interference and enhance the expression of low-frequency structural patterns. Aggregation and normalization operations are performed on the node feature matrix after multi-layer convolution and feature filtering to align the feature outputs of different levels to a unified dimension, forming a high-dimensional feature map representing the current sewing state. Through multi-level feature extraction and nonlinear transformation, the node hidden state embedding vector sequence from the previous step is transformed into a high-dimensional sewing state feature map covering the deep evolution of denim fabric under acceleration, deceleration, and turning conditions, thus optimizing the data foundation for the pressure compensation strategy.
[0119] For example, in the denim sewing scenario of an industrial flatbed sewing machine, a sequence of dynamic phase fingerprint vectors for 20 consecutive cycles is acquired, and the node hidden state embedding vector is output through step S5.2. The feature dimension of each node is set to 64. When the input sequence matrix and normalized edge weight data are processed by the first layer of graph convolution, the kernel size is set to 1, the activation function is ReLU, and the output matrix dimension is 64×20. This matrix is then input into the second layer of multi-neighbor graph convolution, with kernel sizes of 1 and 2 to cover first-order and second-order neighbors. The edge weights are calculated using an exponential decay kernel function, and the output matrix dimension is expanded to 128×20 and batch normalized to maintain a mean of 0 and a standard deviation of 1. The third layer of convolution uses residual connections to linearly superimpose the initial hidden state embedding with the high-dimensional feature matrix after convolution. The superposition coefficient is dynamically adjusted according to the node feature variance. During convolution, a Fast Fourier Transform (FFT) is performed on the node feature matrix to obtain its frequency domain representation. High-frequency components with normalized amplitudes exceeding 0.8 are filtered out, and then an inverse transform is performed back to the time domain to eliminate spike noise caused by rapid changes in sewing speed. The final high-dimensional feature map formed by the above processing chain has a dimension of 256×20. Inspection showed that the correlation coefficients between each dimension component and the target pressure adjustment amount were generally significantly improved. In this scenario, the model can stably output pressure compensation commands that adjust synchronously with changes in fabric condition, achieving a significant improvement in sewing consistency.
[0120] S5.4: Perform a fully connected layer mapping regression operation based on the high-dimensional sewing state feature map to establish a nonlinear mapping relationship between the sewing state feature space and the control quantity of the presser foot actuator, and generate an initial pressure compensation prediction value.
[0121] The system receives the high-dimensional sewing state feature map output after graph convolutional layer processing, extracts the complete feature components of the latent state embedding vector of each node, and arranges and combines them with the phase offset encoding according to the preset node order to form a high-dimensional feature matrix for regression mapping.
[0122] The high-dimensional feature matrix is input into the fully connected layer structure, and a linear combination operation is performed on each row of feature vectors according to the weight matrix of the layer to generate the first-stage feature projection result containing the intermediate representation of each control quantity.
[0123] The first-stage feature projection results are subjected to element-wise operations using a nonlinear activation function to introduce nonlinear segmentation capability of the feature space and enhance the adaptability of the mapping relationship to the sewing state under complex working conditions.
[0124] The activated feature projection results are input into a continuous fully connected layer regression unit. In this regression unit, a mapping operation is performed based on the weight coefficients trained according to the minimum mean square error criterion. The initial pressure compensation prediction value is calculated using the following formula: Where y is the initial pressure compensation prediction value, w is the weight coefficient of the fully connected layer, and x is the hidden state feature component of the node.
[0125] The regression output results are scaled and normalized to eliminate the impact of differences in the dimensions of different features on the prediction accuracy and to ensure that the weight distribution of each control component in the final mapping relationship is reasonable.
[0126] Through the above fully connected mapping regression processing method, the high-dimensional sewing state feature map of the previous step is transformed into a quantitative initial pressure compensation prediction value, realizing the nonlinear and precise correspondence between the sewing state feature space and the control quantity of the presser foot actuator.
[0127] S5.5: Perform time-series smoothing filtering and range limiting processing on the initial pressure compensation prediction value to eliminate high-frequency noise interference in the model inference process and ensure the physical feasibility of the control command, and finally output the pressure adjustment command increment for the next sewing cycle.
[0128] The initial pressure compensation prediction value generated by the fully connected layer mapping regression is received as the input condition for this sub-step.
[0129] The initial pressure compensation prediction value is subjected to time-series smoothing filtering. A sliding window mean filter is used. Under the condition that the window length matches the sewing cycle, the continuous prediction value sequence is averaged to reduce the high-frequency oscillation component that occurs during the model inference process and maintain the continuity of the pressure adjustment command in phase.
[0130] The smoothed predicted values are input into a bandpass constrained filter to filter out signal components whose frequency components are lower than the minimum mechanical response frequency of the sewing machine or higher than the natural frequency of the presser foot actuator, in order to reduce ultra-low frequency drift and high frequency structural noise.
[0131] Based on the physical limit constraint model, the range limiting calculation is performed on the filtered predicted value. The upper and lower limits are set according to the maximum and minimum pressure that the presser foot actuator can withstand. When the predicted value exceeds the limit, it is smoothly returned to the limit range through a soft cutoff function to prevent over-adjustment or under-adjustment from causing mechanical damage or a decrease in sewing quality.
[0132] A nonlinear compression function is used to compress the amplitude of the predicted value after amplitude limiting, so that the rate of change of the pressure regulation command is slowed down in the range close to the extreme value, ensuring the controllability of pressure change in high-load sewing scenarios.
[0133] Through the above smoothing filtering and range limiting processing, the initial pressure compensation prediction value generated in the previous step is transformed into a pressure regulation command increment that eliminates high-frequency noise and meets hardware physical constraints, thereby achieving the stability and physical feasibility of the output control signal.
[0134] Step S6: Dynamically correct the setpoint of the current closed-loop controller of the pressure foot actuator based on the pressure adjustment command increment to generate a real-time current control signal. Specifically, this includes: S6.1: Obtain the pressure adjustment command increment output by the graph neural network model of the previous sewing cycle and the dynamic phase fingerprint vector of the current cycle. Based on the time difference between the moment when the needle penetrates the fabric and the moment when the presser foot contacts the fabric contained in the dynamic phase fingerprint vector, calculate the dynamic response hysteresis coefficient under the current sewing condition to quantify the mechanical delay time required for the actuator to generate actual pressure change from receiving the command.
[0135] The input conditions include the pressure adjustment command increment output by the graph neural network model in the previous sewing cycle and the dynamic phase fingerprint vector of the current cycle.
[0136] Based on the timestamp data of the moment when the needle penetrates the fabric and the moment when the presser foot contacts the fabric in the dynamic phase fingerprint vector, a time difference calculation is performed to obtain the actual delay time between the two event points.
[0137] A correspondence is established between the delay time and the length of the spindle rotation cycle, and the delay time is converted into a phase difference value based on the assumption that the spindle angular velocity is constant.
[0138] The phase difference value is corrected by inertia using a mechanical system response model to compensate for the additional response delay caused by the mass and friction characteristics of the presser foot.
[0139] By combining the corrected delay time with the excitation time constant of the actuator's electromagnetic coil, the dynamic response hysteresis coefficient is calculated. This coefficient quantifies the combined mechanical and electromagnetic delay time required for the actuator to generate an actual pressure change from receiving a command, thus enabling parameter preparation for the next step of timing phase advance compensation.
[0140] By using the above processing method, the result of the previous step is transformed into dynamic response hysteresis coefficient data representing the current sewing condition, thereby achieving the expected technical effect of providing hysteresis compensation input for the generation of the presser foot pressure target trajectory.
[0141] S6.2: The dynamic response lag coefficient is used to perform timing phase advance compensation on the pressure adjustment command increment to generate the desired pressure target trajectory containing the pre-compensation amplitude, so as to eliminate the pressure response lag caused by the mechanical inertia of the presser foot lever and the inductance characteristics of the electromagnetic coil, and ensure that the desired pressure target trajectory and the spindle rotation phase are strictly synchronized.
[0142] Based on the dynamic response hysteresis coefficient and pressure adjustment command increment obtained in the previous sub-step, the hysteresis coefficient is selected as the time-domain correction factor and bound to the amplitude of the pressure adjustment command increment. The pressure adjustment command increment is mapped to the phase domain of the spindle rotation cycle, and a time-series function of the pressure adjustment amplitude changing with the spindle rotation angle is established using a phase-domain signal reconstruction method. The convolution calculation of the time-series function and the hysteresis coefficient is performed to generate a lead compensation term in the phase domain. This compensation term provides a positive correction for the mechanical inertia of the actuator in the amplitude direction and a time-domain lead adjustment for the inductance characteristics of the electromagnetic coil in the phase direction. Constraints are applied to the compensation term using a phase reconstruction matrix to ensure that the compensated phase node remains consistent with the spindle zero-phase reference point. Through amplitude synthesis, the original pressure adjustment command increment and the lead compensation term are vector-superimposed to form the desired pressure target trajectory containing the pre-compensated amplitude. The desired pressure target trajectory corresponds one-to-one with the spindle rotation phase, achieving strict synchronization between pressure adjustment and sewing rhythm. This processing method transforms the result of the previous step into a desired pressure target trajectory containing pre-compensated amplitude, achieving the technical effect of eliminating mechanical delay and precisely synchronizing with the main shaft phase.
[0143] For example, in the case of flat sewing of denim garments, the spindle speed is configured to 1500 rpm, the hysteresis coefficient of the presser foot actuator is measured to be 0.004 seconds, and the phase lead corresponds to 2. π The pressure adjustment command increment function exhibits a three-peak waveform within the main axis phase range of 0 to 2π, with peak values of 20N, 18N, and 16N respectively. In the hysteresis compensation calculation, the waveform is shifted forward by a phase lead, and the amplitude at each point is multiplied by 0.85 to form a lead compensation term. The desired pressure target trajectory obtained after amplitude synthesis leads the original trajectory by a phase lead at key peaks, and the amplitude is increased by approximately 15%. Verification shows that the synchronization error between the presser foot pressure response curve and the main axis phase is significantly reduced when executing this trajectory, improving stitch uniformity and avoiding stitch length fluctuations caused by uneven fabric feeding.
[0144] S6.3: Read the real-time coil current value fed back by the current sensor integrated inside the presser foot actuator, and input the desired pressure target trajectory into the presser foot pressure-current nonlinear mapping model. Convert the desired pressure target trajectory into a theoretical driving current reference value through a combination of table lookup and linear interpolation, so as to establish a precise correspondence between pressure demand and electromagnetic driving force.
[0145] The real-time coil current value output by the internal current sensor of the pressure foot actuator is read as the feedback signal input, and the signal is synchronously sampled at the millisecond level to ensure that it is strictly consistent with the time reference of the desired pressure target trajectory.
[0146] The target pressure trajectory data generated in the previous sub-step is input into the pre-calibrated pressure-current nonlinear mapping model of the pressure foot. This model stores the current parameters corresponding to different pressure ranges in the form of multiple fitting curves.
[0147] During the mapping model invocation process, a table lookup operation is performed on each pressure setpoint in the desired pressure target trajectory to retrieve the current calibration data that falls into the nearest pressure range, and the starting pressure, ending pressure, starting current, and ending current corresponding to that range are recorded.
[0148] For the current range boundary values obtained from the table lookup, linear interpolation is performed on the pressure difference between the desired pressure setpoint and the range boundary to generate the theoretical driving current value corresponding to the target pressure point.
[0149] When the desired pressure target trajectory is a continuous curve, batch interpolation calculations are performed on adjacent set points to form a continuous theoretical driving current reference trajectory, thereby realizing a point-to-point mapping between pressure demand and electromagnetic driving force.
[0150] Through the above table lookup and interpolation processes, the desired pressure target trajectory is converted into a theoretical driving current reference value with physical constraints, providing an accurate electric driving target for subsequent deviation compensation and closed-loop control.
[0151] S6.4: Calculate the instantaneous current deviation signal based on the theoretical driving current reference value and the real-time coil current value, and input the instantaneous current deviation signal into the proportional-integral-derivative controller with a variable gain strategy. By dynamically adjusting the proportional gain and integral time constant according to the current sewing speed, a current correction amount is generated to eliminate steady-state error and suppress high-frequency jitter.
[0152] The input conditions include the theoretical driving current reference value calculated by the pressure-current nonlinear mapping model of the presser foot, and the real-time coil current value fed back by the current sensor inside the presser foot actuator.
[0153] The instantaneous current deviation signal is obtained by performing a differential operation between the theoretical driving current reference value and the real-time coil current value.
[0154] The instantaneous current deviation signal is input to a proportional-integral-derivative controller employing a variable gain strategy, and the proportional gain K is adjusted accordingly. p and integration time constant T i Dynamic adjustments are made based on the ratio of the current sewing speed to a predetermined speed threshold, and the variable gain coefficient K is calculated accordingly. p ′.
[0155] After performing the proportional adjustment operation, T will be used when calculating the integral term. i Corrected to dynamic integral time constant T i ′.
[0156] Using the modified K p ′ and T i ′, combined with the instantaneous current deviation signal ΔI, perform proportional, integral and differential operations to obtain the current correction amount.
[0157] By using a variable gain proportional integral differential processing method, the deviation between the theoretical driving current reference and the real-time feedback from the previous step is converted into a current correction amount that eliminates steady-state error and suppresses high-frequency jitter, thereby achieving high-precision pressure control of the presser foot actuator under different sewing speed conditions.
[0158] S6.5: The current correction amount is superimposed on the theoretical driving current reference value to generate the final real-time current control signal, and the final real-time current control signal is sent to the power drive module of the presser foot actuator to drive the electromagnetic coil to generate an adaptively changing magnetic field force, thereby realizing the adaptive compensation action of the presser foot on the denim fabric.
[0159] Step S7: Monitor the actual presser foot pressure response curve after executing the real-time current control signal, and determine whether the deviation between the actual presser foot pressure response curve and the expected pressure trajectory exceeds the preset sewing consistency threshold condition. Specifically, this includes: S7.1: The real-time current control signal output by the current closed-loop controller of the presser foot actuator is sampled at high frequency, and the collected electrical signal is converted into a sequence of instantaneous presser foot pressure response curves that characterize the actual force using a piezoelectric force sensor, so as to obtain the original pressure feedback dataset containing high-frequency vibration noise.
[0160] The real-time current control signal output by the current closed-loop controller of the pressure foot actuator is subjected to high-frequency synchronous sampling at the power drive module to construct a current timing data sequence that strictly corresponds to the spindle rotation phase. This current timing data sequence is input to a dedicated signal conditioning circuit, where impedance matching and charge amplification techniques are used to amplify the amplitude and remove DC bias from the weak electrical signal acquired by the piezoelectric force sensor, maintaining the signal dynamic range consistent with the full-scale range of the analog-to-digital converter. The conditioned piezoelectric force sensor output signal undergoes analog-to-digital conversion, using a high-precision ADC for quantization. The sampling bit width is no less than 16 bits to ensure the fidelity of the force signal details, and timestamp alignment is achieved using the same clock source as the current sampling. When converting the quantized force signal sequence into a physical pressure value, the pressure foot calibration equation is invoked. The mapping calculation from the sensor output voltage to the instantaneous force is achieved through pre-stored force-pressure curve fitting coefficients. Its mathematical expression is: Where P is the instantaneous presser foot pressure value, V is the sensor quantization voltage value, K is the proportional coefficient, and B is the bias correction coefficient. The instantaneous presser foot pressure values are arranged in chronological order of sampling time to generate a complete sequence of instantaneous presser foot pressure response curves. High-frequency vibration noise components introduced by mechanical impact and fabric texture are retained in the sequence to form the original pressure feedback dataset. Through high-frequency synchronous sampling and physical quantity mapping processing, the real-time current control signal from the previous step is transformed into the original pressure feedback dataset with time index and amplitude information, serving as the input data base for subsequent denoising and trajectory comparison.
[0161] For example, in the design of a piezoelectric force sensor built into an industrial flatbed sewing machine, a sensor with a range of 0-500N and a sensitivity of 2mV / N is selected, matched with a charge amplifier with an input impedance of 1MΩ and a magnification factor set to 50. Synchronous acquisition of current and force signals is achieved under conditions of a sampling rate of 20kHz and a sampling bit width of 16 bits. The conditioned sensor voltage value V varies between 0-5V. The instantaneous pressure foot pressure is calculated by substituting the calibration coefficients K=100N / V and B=0N into the above formula. For example, when the quantized voltage value is 3.25V, the instantaneous pressure calculation process is: P=100·3.25+0, resulting in P=325N. This instantaneous pressure value is arranged in the sampling order to form a pressure curve with a length of 400 points (corresponding to a 20ms cycle). High-frequency vibration noise components with amplitudes within the ±5N range are visible at the end of the curve, providing complete raw data input for subsequent wavelet denoising methods. This processing significantly improves the amplitude accuracy and time synchronization of the pressure response curve, ensuring the effectiveness of coupled feature extraction.
[0162] S7.2: Based on the original pressure feedback dataset, a sliding window wavelet threshold denoising method is used for filtering to remove high-frequency random interference components caused by mechanical transmission gaps and fabric surface roughness, thereby generating a smooth actual presser foot pressure response curve that retains key dynamic characteristics.
[0163] S7.3: Based on the dynamic phase fingerprint vector of the current sewing beat, retrieve the pre-stored ideal mapping relationship library, reconstruct the expected pressure trajectory baseline that strictly corresponds to the phase state, and establish standard reference timing data for measuring sewing consistency.
[0164] The input conditions are the dynamic phase fingerprint vector of the current sewing beat and the index interface of the pre-stored ideal mapping relation library.
[0165] Based on the dynamic phase fingerprint vector, feature matching operation is performed, and the phase offset of the four key event points in the fingerprint vector is used as a multi-dimensional retrieval key value and input into the index module of the mapping relation library.
[0166] Within the index module, a hash mapping combined with a KD-tree structure is used to perform multi-level similarity comparisons on the phase state templates in the database, and to calculate the Euclidean distance and sequence phase consistency score between the current vector and each template vector.
[0167] The target template with the highest matching degree with the current dynamic phase fingerprint vector is selected by using the set similarity threshold, and the ideal presser foot pressure trajectory parameter set corresponding to the template is extracted.
[0168] The extracted set of ideal presser foot pressure trajectory parameters is reconstructed in the time domain, and the time scale of the template trajectory is mapped to a standardized timestamp sequence under the zero-phase reference of the current cycle principal axis.
[0169] An interpolation algorithm is applied to generate a continuous baseline of the expected pressure trajectory based on a standardized timestamp sequence, ensuring strict alignment with the measured pressure curve in terms of sampling frequency and timing.
[0170] This retrieval and reconstruction process transforms the dynamic phase fingerprint vector from the previous step into standard reference time series data, enabling the construction of a baseline for the expected pressure trajectory used to measure sewing consistency.
[0171] For example, when an automated denim sewing machine is sewing a thickness gradient section, its dynamic phase fingerprint vector components are: needle penetration offset angle 45°, presser foot contact offset angle 88°, maximum deformation offset angle 132°, and stitch locking offset angle 210°. The mapping database pre-stores the ideal pressure trajectory reference parameter set corresponding to this phase pattern, including 200 periodic sampling points and a pressure peak of 2.5N. During retrieval, the KD tree returns the template with the highest matching degree after comparing three layers of nodes, with an Euclidean distance of 0.85 and a phase consistency score of 92. The template trajectory is reconstructed and mapped to the zero-phase starting point of the current spindle cycle using a time scale, and a baseline of the expected pressure trajectory at a sampling frequency of 1kHz is generated by cubic spline interpolation. In the subsequent alignment comparison, the root mean square error and peak deviation of this baseline and the actual pressure curve can be directly calculated in S7.4, verifying that the baseline accurately reflects the ideal presser foot pressure variation law under the current sewing state.
[0172] S7.4: Align the actual presser foot pressure response curve with the expected pressure trajectory baseline point by point in time and perform differential calculation to calculate the root mean square error and peak deviation of the two in the complete sewing cycle, thereby generating comprehensive deviation index data that characterizes the degree of deviation of sewing consistency.
[0173] The consistency of the timestamp index of the actual pressure response curve of the press foot after wavelet threshold denoising and the baseline of the expected pressure trajectory is checked. Sampling points with slight offsets are corrected in the time domain by phase interpolation to ensure that the time coordinates of the instantaneous pressure values of the two curves are completely consistent in the same period.
[0174] By performing point-by-point difference calculations on the actual presser foot pressure response curve after time alignment and the expected pressure trajectory baseline, a differential signal sequence containing instantaneous pressure differences within a complete sewing cycle is obtained.
[0175] The differential signal sequence is squared to eliminate the influence of the sign of the positive and negative differences on the error aggregation, thus forming a squared difference sequence.
[0176] The summation operation is performed on the squared difference sequence, and the total number of valid sampling points participating in the operation is recorded. The overall deviation within the period is calculated using the root mean square error formula.
[0177] After the root mean square error is calculated, the maximum value in the square difference sequence is retrieved and square rooted to obtain the peak deviation within the period, which is used to assess the magnitude of the moment of the most severe deviation.
[0178] The root mean square error value and the peak deviation value are combined into a set of comprehensive deviation index data, and the corresponding period's dynamic phase fingerprint code is added to form a standardized comparison dataset that can be used for subsequent consistency threshold judgment.
[0179] Through the above chain operation, the time-aligned pressure curve is transformed into a comprehensive deviation index that reflects the degree of deviation in sewing consistency, thereby realizing the structured output of deviation detection data.
[0180] For example, when performing the shoulder splicing process on an industrial flat-seam machine for denim garments, the sampling frequency is set to 500Hz, and the effective sampling points are 2500. After time-domain correction, the difference signal between the actual pressure curve and the expected trajectory shows the maximum deviation near point 1250. Squaring and summing the difference signals yields a total squared difference of 1.105 × 10³. Applying this to the root mean square error formula, the root mean square error is 0.664, the maximum squared difference is 2.89, and the square root yields a peak deviation of 1.701. The comprehensive deviation index data consists of the root mean square error (RMSE) of 0.664 and the peak deviation of 1.701, along with the dynamic phase fingerprint vector [0.13, 0.41, 0.67, 0.92] for that period. This data is used for subsequent logical judgment with the preset consistency threshold of 0.65. The verification results show that under this condition, the RMSE is slightly higher than the threshold, and the peak deviation is significantly increased. The system will then enter the online model fine-tuning process to adapt to the pressure response mismatch caused by the sudden change in the thickness of the shoulder seam material.
[0181] S7.5: Based on the comprehensive deviation index data and the preset sewing consistency threshold condition, a logical comparison and judgment is performed. If it is determined that the comprehensive deviation index data exceeds the threshold range, an online fine-tuning trigger command for the model is generated. Otherwise, a normal sewing status maintenance signal is output to complete the closed-loop monitoring process of this step.
[0182] The sewing consistency threshold is a preset criterion used to determine whether the deviation between the actual presser foot pressure response curve and the expected pressure trajectory is acceptable. This threshold consists of two parts: a root mean square error threshold and a peak deviation threshold, which respectively measure the overall deviation of the pressure response and the maximum instantaneous deviation throughout the entire sewing cycle. When the combined deviation index (the combination of root mean square error and peak deviation) between the actual pressure curve and the expected trajectory exceeds this threshold, the system determines that the sewing consistency is unacceptable and triggers the online fine-tuning mechanism of the model; otherwise, it maintains the current control strategy to ensure stable sewing quality.
[0183] The sewing consistency threshold condition is a binary tuple: Where: ε RMSE The maximum permissible root mean square error value, reflecting the overall deviation tolerance of the pressure response throughout the entire sewing cycle, ε peak The maximum allowable peak deviation reflects the tolerance for instantaneous pressure fluctuations (such as sudden changes in fabric thickness or abnormal fabric feeding).
[0184] Both conditions must be met simultaneously (or one condition can be met according to business logic, usually both conditions must be met simultaneously). In practical applications, the logic can be configured as "AND" (meaning that both conditions must not exceed the limit to be considered qualified) or "OR" (meaning that either condition must not exceed the limit to be considered unqualified) according to the sewing process requirements.
[0185] Setup method: (a) Fixed thresholds based on process requirements: Based on the quality requirements of different seam areas of the denim jacket (such as pockets, side seams, and shoulders), pre-set experience thresholds. For example: Standard straight stitch: ε RMSE =0.65, ε peak =1.5; Corner or thick material overlap: ε RMSE =0.85, ε peak =2.0.
[0186] (ii) Statistical thresholds based on historical data: Collect pressure deviation data from a large number of qualified sewing cycles (confirmed by quality inspection), calculate the statistical distribution of root mean square error and peak deviation (mean μ and standard deviation σ), and set the threshold to μ+k. σμ+k σ (k is usually taken as 2 or 3). This method can adapt to different fabrics and working conditions.
[0187] (III) Dynamic adaptive threshold: During system operation, the threshold is updated in real time based on the deviation distribution of the most recent qualified cycles, enabling the system to automatically adapt to environmental changes (such as fabric batch differences). The dynamic update formula can use an exponentially weighted moving average.
[0188] By using a sewing consistency threshold condition, the effect of presser foot pressure control is quantitatively evaluated and adaptively adjusted, ensuring sewing quality stability and rapid response capability under abnormal working conditions.
[0189] Step S8: If the deviation exceeds the sewing consistency threshold, the hidden layer parameters of the graph neural network model are updated using the dynamic phase fingerprint vector of the current cycle and the measured deviation data to optimize the generation accuracy of subsequent pressure adjustment command increments. Specifically, this includes: S8.1: Obtain the dynamic phase fingerprint vector of the current sewing section and the actual presser foot pressure response curve, calculate the pressure trajectory deviation value between the two based on the preset sewing consistency threshold condition, and quantize the pressure trajectory deviation value into an error gradient signal for model correction.
[0190] S8.2: Based on the error gradient signal and the dynamic phase fingerprint vector sequence of the previous section, construct a local graph structure perturbation dataset containing node feature update amount and edge weight adjustment coefficient to characterize the degree of nonlinear mismatch between the phase evolution law and pressure output under the current sewing condition.
[0191] S8.3: Utilize the local graph structure perturbation dataset to execute the backpropagation algorithm, perform differential iterative calculations on the hidden layer weight matrix connecting each event point node in the graph neural network model, and generate model parameter update increments for the current denim fabric characteristics.
[0192] The input condition is a local graph structure perturbation dataset constructed by S8.2. This dataset contains a quantitative description of the node feature update amount and edge weight adjustment coefficient, which is used to characterize the nonlinear mismatch between the current dynamic phase fingerprint and the pressure output.
[0193] Batch gradient calculation is performed on the feature update amount of each node in the local graph structure perturbation dataset. The gradient solution of the state vector of each hidden layer node of the lightweight graph neural network is obtained by using the chain partial derivative method of backward dependency to obtain the sensitive direction and magnitude of the hidden state.
[0194] The gradients of each node are mapped to the connection matrix, and the edge weight gradient backpropagation process is performed. The edge weight gradient matrix is generated based on the product relationship between the composite weights encoded by time difference and phase difference and the node feature gradients.
[0195] The node gradient matrix and the edge weight gradient matrix are jointly normalized to eliminate the iterative offset caused by scale differences and ensure that the update step size of each parameter is within a stable range during gradient propagation.
[0196] The normalized gradient is input into the hidden layer weight matrix update mechanism, and the weights are adjusted by a variable step size gradient descent method based on the error gradient signal. The step size factor is dynamically adjusted according to the error variance within the period to ensure a balance between convergence rate and accuracy under different denim fabric working conditions.
[0197] By using the gradient backpropagation and weight update processing methods described above, the perturbation data from the previous step is transformed into quantitative model parameter update increments, thereby achieving adaptive optimization of the lightweight graph neural network under the current denim fabric working conditions.
[0198] S8.4: The hidden layer parameters of the graph neural network model are weighted and fused according to the model parameter update increment to complete the online reconstruction of the internal mapping logic of the model, thereby outputting an updated graph neural network model with adaptive correction capability.
[0199] The algorithm receives the model parameter update increment generated in sub-step S8.3 and the hidden layer parameter matrix of the current graph neural network model, and establishes a weight fusion calculation framework based on node feature update amounts and edge weight adjustment coefficients. Based on this framework, it first performs element-wise multiplication of the weight update increment with the original parameter value on the parameter components of each hidden layer weight matrix to preserve the directional characteristics of the original parameters and introduce local correction information for the current sewing conditions. For multidimensional parameter components with coupling relationships, multidimensional vector normalization is used to map the updated parameter components to a unified scale range, ensuring the stability of the numerical distribution between different neural layers and preventing parameter overshoot. The algorithm receives the normalized hidden layer update matrices and performs a weighted accumulation operation based on adaptive fusion coefficients. According to the fusion weight matrix output by the above formula, an immediate replacement operation is performed on the mapping logic of each hidden layer, and a consistency check mechanism is used to detect the effectiveness of the updated weight matrix matching the model topology. By reconstructing the closed loop of the internal parameters of the graph neural network using the verified fusion weight matrix, the model can have the ability to adaptively correct for different denim fabrics and sewing conditions while keeping the overall structure unchanged. Through weighted fusion processing, the result of the previous step is transformed into an updated set of hidden layer parameters of the lightweight graph neural network, realizing the online mapping logic reconstruction of the stress compensation strategy generation model.
[0200] S8.5: Call the updated graph neural network model to receive the dynamic phase fingerprint vector sequence of the next cycle for inference calculation, so as to generate a new pressure adjustment command increment with optimized accuracy, and realize the continuous closed-loop iteration of the presser foot pressure compensation strategy.
[0201] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this invention.
[0202] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains. The terms “first,” “second,” “third,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the elements or objects preceding “comprising” or “including” encompass the elements or objects listed following “comprising” or “including” and their equivalents, and do not exclude other elements or objects. The “multiple” mentioned in the embodiments of this application refers to two or more. A and / or B indicate three possibilities: A; B; and A and B.
[0203] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for adaptive compensation of presser foot pressure during denim garment sewing, specifically including: S1: Acquire high-resolution absolute position signal, presser foot bar micro-vibration signal and fabric surface strain response signal in the needle plate area during the rotation cycle of the sewing machine spindle, and integrate the above multi-source synchronous sampling sequence into a four-dimensional original sewing dynamics dataset; S2: Based on the four-dimensional original sewing dynamics dataset, the time domain segmentation and slicing process is performed on each spindle rotation cycle to extract the timestamp data of four key event points: the moment when the needle penetrates the fabric, the moment when the presser foot contacts the fabric, the moment when the fabric is at its maximum deformation, and the moment when the stitch locks in. S3: Calculate the angular offset of each event point relative to the zero phase of the main axis based on the timestamp data of the four key event points, and combine the angular offsets to construct a dynamic phase fingerprint vector that characterizes the coupling characteristics of the current fabric elasticity, thickness gradient and feed inertia. S4: Construct the input nodes of the graph neural network model using a sequence of dynamic phase fingerprint vectors from multiple consecutive cycles, and generate the edge weight data of the graph neural network model by jointly encoding the time difference and phase difference between adjacent event points. S5: Input the graph structure containing node and edge weight data into the graph neural network model, and output the pressure adjustment command increment for the next sewing cycle by mapping the phase fingerprint evolution law of different denim fabrics under variable speed or turning conditions. S6: Dynamically correct the setpoint of the current closed-loop controller of the presser foot actuator based on the pressure regulation command increment to generate a real-time current control signal.
2. The method for adaptive compensation of presser foot pressure during denim garment sewing according to claim 1, characterized in that, The graph neural network model includes a graph structure input layer, a multi-head graph attention layer, a graph convolutional layer, a feature filtering and aggregation module, and a fully connected regression head.
3. The method for adaptive compensation of presser foot pressure during denim garment sewing according to claim 1, characterized in that, Following S6, the following is also included: S7: Monitor the actual presser foot pressure response curve after executing the real-time current control signal, and determine whether the deviation between the actual presser foot pressure response curve and the expected pressure trajectory exceeds the preset sewing consistency threshold condition. S8: If the judgment deviation exceeds the sewing consistency threshold, the hidden layer parameters of the graph neural network model are updated using the dynamic phase fingerprint vector of the current cycle and the measured deviation data to optimize the generation accuracy of subsequent pressure adjustment command increments.
4. The method for adaptive compensation of presser foot pressure during denim garment sewing according to claim 1, characterized in that, S3 specifically includes: The system acquires the spindle zero-phase reference point data for the current sewing cycle, as well as four original timestamp data: the moment the needle penetrates the fabric, the moment the presser foot contacts the fabric, the moment the fabric undergoes maximum deformation, and the moment the stitch locks in. Based on the assumption of a constant spindle rotation angular velocity, the system performs time-domain normalization on the four original timestamp data to generate four initial phase angle values corresponding to the spindle rotation circumference. Receive four initial phase angle values and spindle zero-phase reference point data, perform relative phase offset calculation to calculate the four independent phase angle offsets of each key event point relative to the spindle zero-phase reference point; Based on four independent phase angle offsets, a multi-dimensional vector space mapping technique is used to arrange and combine discrete angle values according to a preset time sequence logic in order to construct a preliminary dynamic phase feature vector. The preliminary dynamic phase feature vector and historical periodic phase fluctuation statistical parameters are obtained. The components within the vector are dynamically weighted and corrected to generate the final dynamic phase fingerprint vector that can eliminate random noise interference and enhance the expression of coupled features.
5. The method for adaptive compensation of presser foot pressure during denim garment sewing according to claim 4, characterized in that, The preliminary dynamic phase eigenvectors include the elastic response of the sewing material, the thickness gradient change, and the feed inertia characteristics.
6. The method for adaptive compensation of presser foot pressure during denim garment sewing according to claim 1, characterized in that, S4 specifically includes: The dynamic phase fingerprint vector sequence of multiple consecutive sewing cycles is obtained. Based on the timestamp index, the dynamic phase fingerprint vector sequence is subjected to sliding window truncation processing to generate a local dynamic phase fingerprint tensor dataset containing current time and historical time series information, thus establishing the temporal context range of the graph neural network model input. Based on the local dynamic phase fingerprint tensor dataset, feature components of four key event points in each cycle are extracted. The feature components of the four key event points are instantiated as independent node objects in the graph neural network model to generate a set of node feature embeddings. The feature embedding set of the receiving node is used to identify the temporal connection relationship of corresponding event points in adjacent periods. The time interval difference and the principal axis rotation phase angle difference between adjacent event points are calculated to generate the original spatiotemporal difference measurement parameter pair. Based on the original spatiotemporal difference measurement parameters, a nonlinear joint encoding operation is performed, and the time interval difference and the spindle rotation phase angle difference are weighted and fused to generate a normalized edge weight numerical matrix that reflects the transmission hysteresis and coupling strength of the mechanical properties of the sewing material. By integrating the node feature embedding set with the normalized edge weight numerical matrix, and performing topology assembly operations, discrete nodes and weighted edges are mapped to a unified adjacency list storage format to generate a graph structure input tensor with complete spatiotemporal evolution characteristics, thus completing the graph data construction for the stress decision model.
7. The method for adaptive compensation of presser foot pressure during denim garment sewing according to claim 6, characterized in that, The node feature embedding set includes information on needle penetration, presser foot contact, fabric deformation, and stitch locking status.
8. The method for adaptive compensation of presser foot pressure during denim garment sewing according to claim 6, characterized in that, The original spatiotemporal difference measurement parameter characterizes the rate of change of sewing rhythm and the synchronization of mechanical motion.
9. The method for adaptive compensation of presser foot pressure during denim garment sewing according to claim 1, characterized in that, S5 specifically includes: Tensor encapsulation is performed on node data containing dynamic phase fingerprint vector sequences and edge weight data generated by joint encoding to construct a graph structure tensor dataset that conforms to the input specification of graph neural network models, providing a standardized data base for subsequent feature propagation; Multi-head graph attention mechanism is performed on graph structure tensor dataset to aggregate temporal and phase difference correlation features between adjacent event points and generate node hidden state embedding vector sequence. By using the node hidden state embedding vector sequence to perform multi-level feature extraction and nonlinear transformation processing through graph convolutional layers, we can explore the deep evolution law of dynamic phase fingerprint of different denim fabrics under acceleration, deceleration and turning conditions, and output a high-dimensional sewing state feature map. Perform fully connected layer mapping and regression operations based on the high-dimensional sewing state feature map to establish a nonlinear mapping relationship between the sewing state feature space and the control quantity of the presser foot actuator, and generate initial pressure compensation prediction values. The initial pressure compensation prediction value is subjected to time-series smoothing filtering and range limiting processing to eliminate high-frequency noise interference in the model inference process and ensure the physical feasibility of the control command. Finally, the pressure adjustment command increment for the next sewing cycle is output.
10. The method for adaptive compensation of presser foot pressure during denim garment sewing according to claim 9, characterized in that, The node hidden state embedding vector sequence characterizes the spatiotemporal coupling characteristics of the sewing process.