A method and system for suppressing cogging force of a linear motor based on harmonic injection
By using an adaptive filter to process linear motor signals in real time and dynamically update the harmonic injection current distribution ratio, the problem of unstable cogging force compensation in linear motors is solved, achieving effective suppression and stable operation under all working conditions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 智驱动力(东莞)有限公司
- Filing Date
- 2026-05-09
- Publication Date
- 2026-07-10
AI Technical Summary
Existing technologies cannot effectively suppress cogging forces in linear motors in real time. In particular, the compensation effect decreases significantly under factors such as changes in motor temperature, changes in magnetic saturation, and aging of permanent magnets. Furthermore, existing harmonic injection methods are prone to voltage saturation and system runaway under high-speed or heavy-load conditions.
An adaptive filter is used to process the operating status signal in real time, extract the harmonic components caused by cogging force, dynamically update the distribution ratio of harmonic injection current, and control the operation of the linear motor through an inverter to form a closed-loop feedback mechanism to adapt to changes in motor status.
It achieves real-time and effective tooth cogging force compensation under various working conditions, avoids voltage saturation and system runaway, improves positioning accuracy and operational stability, and reduces additional losses.
Smart Images

Figure CN122371773A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motor technology, and in particular to a method and system for suppressing cogging force in a linear motor based on harmonic injection. Background Technology
[0002] In the field of linear motor control, cogging force is one of the key factors affecting its positioning accuracy and operational stability. Cogging force is generated by the interaction between the permanent magnet and the slotted iron core, manifesting as periodic thrust fluctuations, which cause speed pulsation and position errors when the motor is running at low speeds.
[0003] Existing technologies for suppressing cogging forces mainly fall into two categories: one is the structural optimization method, which weakens cogging forces by changing the design of the motor body. Common methods include adding chamfers or beveling at the edges of the magnetic poles, using permanent magnets of unequal thickness, and optimizing the tooth profile. This type of method needs to be implemented during the motor manufacturing stage and is not applicable to motors that have already been manufactured. The other category is the control compensation method, which suppresses the influence of cogging forces through active control. Common methods include offline calibration feedforward compensation, iterative learning control, and repetitive control.
[0004] However, both offline calibration feedforward compensation and iterative learning control methods are based on the assumption that "cogging force characteristics are fixed," meaning their compensation parameters are fixed values once determined. But in actual operation, rising motor temperature leads to a decrease in the magnetic properties of the permanent magnet, changes in load current alter the degree of magnetic circuit saturation, and long-term operation results in permanent magnet aging and mechanical wear. All these factors change the amplitude and phase characteristics of the cogging force, causing a mismatch in the pre-set compensation parameters and a significant decrease in compensation effectiveness. When extracting harmonic components of the cogging force, fast Fourier transform (FFT) is typically used for offline spectrum analysis, or a phase-locked loop (PLL) is used to track the fundamental frequency. The FFT method requires accumulating data for a complete cycle to complete the calculation, resulting in significant delays and failing to meet the requirements of real-time compensation. The PLL method is sensitive to noise and is prone to loss of lock under conditions of large speed fluctuations, leading to errors in harmonic phase extraction. Furthermore, existing harmonic injection methods only consider the suppression effect of thrust fluctuations when calculating the compensation current. When the motor is running in the high-speed zone or under heavy load conditions, the fundamental voltage is already close to the voltage output limit of the inverter. After the harmonic voltage is superimposed, it is very easy to trigger voltage saturation, resulting in current loop runaway, harmonic injection failure, and even system oscillation. Summary of the Invention
[0005] To address at least one of the aforementioned technical problems, this invention provides a method and system for suppressing cogging force in linear motors based on harmonic injection.
[0006] In a first aspect, the present invention provides a method for suppressing cogging force in a linear motor based on harmonic injection, the method comprising:
[0007] The linear motor's operating status signals are acquired in real time, and the operating status signals include at least position signals, speed signals, and phase current signals;
[0008] An adaptive filter is used to process the operating status signal online, extract the periodic harmonic components caused by cogging force, and identify the characteristics of the harmonic components in real time; the characteristics of the harmonic components include amplitude, frequency and phase characteristics;
[0009] The harmonic injection current used to compensate for cogging force is calculated in real time based on the characteristics of harmonic components, and the distribution ratio of the harmonic injection current between the d-axis and q-axis is determined according to the current operating status of the motor.
[0010] According to the allocation ratio, the harmonic injection current is superimposed with the fundamental current component in the drive current command to generate a compensated drive current command. Based on the compensated drive current command, the linear motor is controlled to run by the inverter.
[0011] The operating status of the linear motor after compensation is monitored, and the fluctuation information after compensation is fed back to the adaptive filter to dynamically update the parameters of the adaptive filter, the harmonic injection current and the corresponding distribution ratio.
[0012] Secondly, the present invention also provides a linear motor cogging force suppression system based on harmonic injection, the system comprising:
[0013] The signal acquisition unit is used to acquire the operating status signals of the linear motor in real time. The operating status signals include at least position signals, speed signals, and phase current signals.
[0014] The component extraction unit is used to process the operating status signal online using an adaptive filter, extract the periodic harmonic components caused by the cogging force, and identify the characteristics of the harmonic components in real time; the characteristics of the harmonic components include amplitude, frequency and phase characteristics;
[0015] The proportional distribution unit is used to calculate the harmonic injection current for compensating cogging force in real time based on the characteristics of harmonic components, and to determine the distribution ratio of the harmonic injection current between the d-axis and q-axis according to the current operating state of the motor.
[0016] The current compensation unit is used to superimpose the harmonic injection current and the fundamental current component in the drive current command according to the allocation ratio to generate a compensated drive current command. Based on the compensated drive current command, the inverter controls the operation of the linear motor.
[0017] The dynamic update unit is used to monitor the operating status of the linear motor after compensation, feed back the compensation fluctuation information to the adaptive filter, and dynamically update the parameters of the adaptive filter, the harmonic injection current and the corresponding allocation ratio.
[0018] Thirdly, the present invention also provides an electronic device including a processor and a memory, the memory being used to store computer program code, the computer program code including computer instructions, wherein when the processor executes the computer instructions, the electronic device performs a method as described in the first aspect above and any possible implementation thereof.
[0019] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor of an electronic device, cause the processor to perform a method as described in the first aspect above and any possible implementation thereof.
[0020] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0021] This invention employs a closed-loop structure: "using an adaptive filter to process the operating status signal online and extract the periodic harmonic components caused by cogging force," and "feeding back the compensated fluctuation information to the adaptive filter to dynamically update the filter's parameters, harmonic injection current, and corresponding allocation ratio." This allows the filter's extracted and injected parameters to be updated in real time in response to changes in the motor's operating state. When the temperature rises, the magnetic saturation changes, or the permanent magnet ages, the feedback loop can promptly detect the residual amount of the compensated fluctuation and drive the adaptive filter to adjust its parameters, maintaining the optimal compensation state at all times. This is fundamentally different from the "one-time fixed compensation" of existing offline calibration methods, significantly improving the method's adaptability to changes in operating conditions.
[0022] This invention employs an adaptive filter to process the operating status signal online, updating the filtered output step-by-step without accumulating whole-cycle data, thus eliminating the inherent computational delay of the FFT method. Simultaneously, the parameters of the adaptive filter are automatically adjusted based on the real-time error signal, effectively suppressing the influence of measurement noise and overcoming the vulnerability of the phase-locked loop (PLL) method to lock-in during speed fluctuations. This enables real-time identification of harmonic component amplitude, frequency, and phase, providing a reliable basis for the accurate calculation of subsequent harmonic injection current.
[0023] This invention achieves its goals by "superimposing the harmonic injection current with the fundamental current component in the drive current command according to a distribution ratio" and "feedback the compensated fluctuation information to an adaptive filter to dynamically update the harmonic injection current and its corresponding distribution ratio." When the superimposed total voltage approaches the inverter's output limit, the feedback loop detects a decrease in compensation effectiveness and drives the adaptive filter to reduce the amplitude of the harmonic injection current or adjust the dq-axis distribution ratio, thus bringing the total voltage back to a safe range. This avoids the problem of injection failure or even system runaway due to voltage saturation in existing technologies, ensuring the effectiveness of compensation across the entire speed range.
[0024] This invention establishes a closed-loop parameter adjustment mechanism by "feeding the compensated fluctuation information back to the adaptive filter, dynamically updating the parameters of the adaptive filter, the harmonic injection current, and the corresponding allocation ratio." This mechanism uses the compensated fluctuation information as the basis for adjustment. When the parameter adjustment direction is correct, the fluctuation information decreases, and the adjustment step size can be increased accordingly to accelerate convergence. When the parameter adjustment direction is incorrect, causing the fluctuation to increase, the negative change in the fluctuation information can promptly correct the adjustment direction. This feedback adjustment method based on fluctuation information ensures that the parameter update process always points in the direction of decreasing fluctuation, avoiding divergence or oscillation that may occur with open-loop parameter adjustment, and guaranteeing the stability of the system throughout the entire adjustment process.
[0025] This invention achieves intelligent allocation of compensation tasks between the d and q axes by "determining the distribution ratio of harmonic injection current between the d and q axes based on the current operating state of the motor." When the q-axis current is small, the entire harmonic injection is handled by the q-axis, utilizing the efficient thrust response characteristics of the q-axis current. When the q-axis current is large, i.e., close to the current limit, part of the harmonic injection is transferred to the d-axis, utilizing the d-axis current to generate compensation thrust while avoiding additional copper losses caused by q-axis current overload. This condition-optimized allocation strategy minimizes the additional losses caused by harmonic injection while ensuring cogging force suppression, thus improving the overall system operating efficiency.
[0026] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention or the background art, the accompanying drawings used in the embodiments of the present invention or the background art will be described below.
[0028] Figure 1 A flowchart illustrating a method for suppressing cogging force in a linear motor based on harmonic injection, provided in an embodiment of the present invention;
[0029] Figure 2 This is a schematic diagram of a linear motor cogging force suppression system based on harmonic injection, provided as an embodiment of the present invention. Detailed Implementation
[0030] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0031] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0032] Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for suppressing cogging force in a linear motor based on harmonic injection, provided as an embodiment of the present invention. Figure 1 As shown, the method includes:
[0033] S10. Real-time acquisition of the operating status signal of the linear motor, wherein the operating status signal includes at least position signal, speed signal and phase current signal;
[0034] S20. The operating status signal is processed online using an adaptive filter to extract the periodic harmonic components caused by the cogging force and to identify the characteristics of the harmonic components in real time; the characteristics of the harmonic components include amplitude, frequency and phase characteristics.
[0035] S30. Calculate the harmonic injection current for compensating cogging force in real time based on the characteristics of harmonic components, and determine the distribution ratio of the harmonic injection current between the d-axis and q-axis based on the current operating status of the motor.
[0036] S40. According to the allocation ratio, the harmonic injection current is superimposed with the fundamental current component in the drive current command to generate a compensated drive current command. Based on the compensated drive current command, the linear motor is controlled to run through the inverter.
[0037] S50: Monitor the operating status of the linear motor after compensation, feed back the compensation fluctuation information to the adaptive filter, and dynamically update the parameters of the adaptive filter, harmonic injection current and corresponding allocation ratio.
[0038] Existing offline calibration feedforward compensation methods use fixed compensation parameters, which cannot adapt to changes in cogging force characteristics caused by factors such as temperature variations, changes in magnetic saturation, and permanent magnet aging during motor operation. This results in a decrease in compensation effectiveness as operating conditions drift. Harmonic extraction methods (such as FFT) have inherent computational delays, cannot meet real-time compensation requirements, and are sensitive to noise, making it difficult to balance extraction accuracy and real-time performance.
[0039] Therefore, this invention aims to construct a fully closed-loop adaptive harmonic suppression architecture of "sensing-extraction-decision-injection-feedback" to achieve online tracking and self-optimization of cogging force compensation parameters in response to motor operating conditions. Although cogging force is periodic, its harmonic characteristics (amplitude, frequency, and phase) are not constant—temperature affects the remanence density of permanent magnets, load current affects the magnetic circuit saturation, and long-term operation can lead to mechanical wear and magnet aging. Therefore, only by enabling the compensation system to "sense changes and adjust autonomously" can optimal suppression effects be maintained under global operating conditions. The core of this embodiment lies in the adoption of a three-in-one approach: "online extraction using an adaptive filter + closed-loop feedback of fluctuation information + intelligent dq axis allocation." The adaptive filter processes the real-time operating signal, updating it step-by-step without accumulating full-cycle data, achieving low-latency, high-precision extraction of harmonic components. The compensated fluctuation information is fed back to the adaptive filter, forming a self-updating closed loop that ensures the filter's extraction characteristics and injection strategy always converge towards minimizing fluctuation.
[0040] Specifically, in this embodiment, the position, speed, and phase current signals of the linear motor are acquired in real time. These signals serve as the foundational inputs for subsequent harmonic extraction and feedback adjustment. The acquired operating status signals are input to an adaptive filter. This filter processes the input signals online, automatically separating the periodic harmonic components caused by cogging forces and identifying their amplitude, frequency, and phase characteristics in real time. The filter parameters are not fixed but dynamically updated based on subsequent feedback information. Based on the extracted harmonic characteristics, the parameters of the harmonic current to be injected are calculated in real time. Simultaneously, the current operating status of the motor (such as q-axis current amplitude and motor speed) is determined, and the allocation ratio of the harmonic injection current between the d-axis and q-axis is decided—the q-axis is prioritized under light loads, while the d-axis is allocated under heavy loads. According to the allocation ratio, the harmonic injection current is vector-superimposed with the fundamental current component in the drive current command to generate a corrected drive current command, which drives the linear motor through the inverter. The operating status of the compensated motor (mainly speed fluctuations) is monitored, and the fluctuation information is fed back to the adaptive filter, triggering parameter updates. The filter automatically adjusts its extraction parameters based on the residual fluctuation, while the amplitude and distribution ratio of the harmonic injection current are also corrected accordingly. This feedback loop enables the system to continuously approach the optimal compensation state.
[0041] By introducing a closed-loop feedback mechanism, the feedback loop can promptly detect changes in the compensation effect when the motor temperature rises, the magnetic saturation level changes, or the permanent magnet ages. This allows the filter to automatically adjust its parameters, ensuring the compensation effect remains at its optimal level. Existing offline methods cannot solve this problem. The adaptive filter can output harmonic characteristics step-by-step without accumulating whole-cycle data, eliminating the inherent delay of the FFT method and meeting the requirements of real-time compensation. Simultaneously, the filter suppresses measurement noise, overcoming the vulnerability of the phase-locked loop (PLL) method to lock-up during speed fluctuations. By dynamically allocating the dq-axis harmonic current according to the motor's operating state, it avoids the surge in copper losses caused by adding harmonic injection when the q-axis current is large, minimizing additional losses while ensuring the compensation effect. The feedback closed loop can detect compensation failure caused by voltage saturation, automatically reducing the harmonic injection amplitude or adjusting the allocation ratio, ensuring the effectiveness of compensation under high-speed or heavy-load conditions and avoiding the problems of injection failure or even system runaway in existing technologies when voltage is limited. Using the compensated fluctuation information as the basis for parameter adjustment, a closed loop of "fluctuation detection - parameter update - effect verification" is formed, ensuring that each parameter adjustment points in the direction of reducing fluctuation and avoiding divergence or oscillation that may be caused by open-loop parameter adjustment.
[0042] In one embodiment, step S10 specifically acquires position signals, speed signals, and phase current signals. Cogging force has a periodic characteristic, and its spatial period is determined by the motor's pole pitch τ. The phase of the cogging force differs at different positions. Only by knowing the accurate position of the mover can the extracted harmonic components be correlated with a specific spatial position, thereby calculating the injection phase required for the compensation current. If the position signal is missing, it is impossible to determine how many electrical angles the current compensation should lead or lag behind, and the harmonic injection will lose its phase reference. The essence of cogging force is thrust fluctuation, and the most direct manifestation of thrust fluctuation is speed fluctuation. Under constant load torque, for every positive thrust peak generated by the cogging force, the motor speed will correspondingly experience an upward fluctuation; when the thrust reaches a negative trough, the speed will correspondingly decrease. Therefore, the speed fluctuation waveform is the most intuitive manifestation of cogging force. Since the injected harmonic current is ultimately superimposed on the original drive current, it is applied to the motor windings through the inverter. Therefore, it is necessary to acquire phase current signals in real time, on the one hand to obtain the fundamental current component for subsequent superposition calculations, and on the other hand to monitor whether the actual injected harmonic current accurately tracks the command value.
[0043] To collect the above three signals, the following method can be used:
[0044] Position signal acquisition: A high-resolution optical or magnetic displacement sensor with a resolution better than 1 μm is installed on the linear motor mover. The sampling frequency is set to acquire one position point every 0.1 mm of movement at the motor's rated speed. The signal output from the position sensor is level-converted and filtered by a signal conditioning circuit before being sent to the quadrature encoder pulse (QEP) interface of a digital signal processor (DSP) or field-programmable gate array (FPGA). The real-time absolute position value of the mover is calculated by edge counting.
[0045] Speed signal acquisition: This embodiment does not directly use a speed sensor for measurement, but instead performs differential calculations on the acquired position signals to obtain the speed signal. Specifically, the position difference between two adjacent sampling periods is divided by the sampling period time to obtain the instantaneous speed at that moment. To suppress high-frequency noise caused by differential calculations, a first-order low-pass filter is applied after the differential calculation, with the cutoff frequency set to 3 to 5 times the mechanical resonant frequency of the motor.
[0046] Phase current signal acquisition: High-precision Hall current sensors (the third phase current is calculated using Kirchhoff's current law) are connected in series at the two phase outputs of the inverter. The sensor range is set to 1.5 times the peak value of the motor's rated current, and the sampling frequency is synchronized with the PWM carrier frequency, typically set to 10kHz to 20kHz. The current sensor output is converted into a digital value by an analog-to-digital converter (ADC), and after zero-point drift correction and calibration coefficient compensation, the true instantaneous value of the phase current is obtained.
[0047] In one embodiment, in step S20, the filter employs a transversely structured adaptive finite impulse response (FIR) filter, using the velocity signal acquired in step S10 as the main input signal of the adaptive filter. This velocity signal contains periodic velocity fluctuation components caused by cogging force, as well as other components such as load disturbance and measurement noise. Simultaneously, using the electrical angle obtained after processing the position signal acquired in step S10 as a reference, an orthogonal reference signal with the same frequency as the electrical angle is constructed using a sine / cosine generator. To extract higher harmonic components from the cogging force, harmonic reference signals with frequencies doubling the electrical angle are further constructed.
[0048] The adaptive filter adopts a transverse structure, and its core working process is as follows:
[0049] First, the filter sums the current reference signal with the internally stored weighting coefficients to calculate the current filter output value, which represents a real-time estimate of the velocity fluctuation caused by the cogging force.
[0050] Secondly, the filtered output value is compared with the fluctuation component in the measured velocity signal to obtain the error signal. The magnitude of this error signal directly reflects the degree of deviation between the current estimate and the actual fluctuation.
[0051] Then, based on the error signal and the reference signal, the filter automatically adjusts its internal weight coefficients according to a preset adaptive algorithm (such as the least mean square algorithm or its normalized form). The adjustment aims to minimize the square of the error signal, that is, to make the filter output continuously approximate the actual cogging force fluctuation waveform.
[0052] The process of calculating errors and adjusting coefficients described above is repeated once in each sampling period. After dozens to hundreds of iterations, the filter weight coefficients gradually converge to the optimal value, at which point the filter output can accurately reproduce the velocity fluctuation component caused by the cogging force. Once the filter converges, based on the final stable weight coefficient values, the three key characteristics of the cogging force harmonic components can be calculated using simple trigonometric functions: the amplitude reflects the strength of the cogging force; the phase reflects the leading or lagging relationship of the fluctuation relative to the motor position; and the frequency is directly determined by the derivative of the electrical angle with respect to time, and is proportional to the motor's operating speed. For the multiple harmonic components present in the cogging force, this embodiment uses multiple parallel adaptive filters to process them separately. Each filter independently tracks a specific order of harmonic component, outputting the amplitude, frequency, and phase characteristics of that order. Finally, the estimation results of all orders are synthesized to obtain a complete cogging force harmonic model.
[0053] In one embodiment, the real-time identification of harmonic component characteristics includes dynamic calculation of amplitude, frequency, and phase.
[0054] Frequency domain analysis of the filtered signal is performed using sliding discrete Fourier transform to extract the dominant harmonic order. The formulas for calculating the amplitude and phase of harmonic components are as follows:
[0055]
[0056]
[0057] In the formula, For the first Current values at each sampling point The number of sampling points within one electrical cycle. , These are amplitude and phase, respectively.
[0058] Traditional methods are typically offline, meaning that traditional FFT requires waiting for a complete cycle (N points) of data to be collected before calculation, resulting in a lag. In contrast, this embodiment uses the "sliding discrete Fourier transform" algorithm, which updates the spectrum result every time a new data point arrives, enabling "real-time tracking" of cogging force changes and greatly improving the dynamic response speed of the system.
[0059] In one embodiment, step S30 is mainly based on the characteristics of the cogging force harmonic components extracted in step S20, namely amplitude, frequency and phase, and first calculates the harmonic current parameters required to be injected to counteract the cogging force.
[0060] Because there is a definite electromagnetic relationship between cogging force and thrust, in order to generate a compensating thrust that is equal in magnitude and opposite in direction to the cogging force, the amplitude of the injected harmonic current should be proportional to the amplitude of the extracted cogging force harmonics. The proportionality coefficient is determined by the thrust constant of the motor. Simultaneously, the compensating thrust needs to precisely cancel out the cogging force in spatial phase. Therefore, the phase of the injected current should be offset by a specific electrical angle from the phase of the extracted cogging force harmonics. This offset is determined by the motor winding distribution characteristics and the delay characteristics of the current control. For the fundamental and harmonic components present in the cogging force, this embodiment calculates the corresponding harmonic injection current parameters to form a superposition command for multi-order harmonic injection currents.
[0061] Specifically, this embodiment does not simply allocate all harmonic injection current to the q-axis, but rather dynamically optimizes the distribution ratio of harmonic injection current between the d-axis and q-axis based on the current operating state of the motor. The specific judgment logic is as follows:
[0062] First, obtain the real-time amplitude of the motor's q-axis current, which reflects the motor's load level. Simultaneously, obtain the motor's current operating speed to determine if it is in the high-speed operating region. Second, based on the range of the q-axis current amplitude, execute the following three-stage allocation strategy:
[0063] When the q-axis current amplitude is at a low level, it indicates that the motor load is light, and the q-axis current has sufficient margin to carry additional harmonic components. At this time, all harmonic injection current is distributed to the q-axis, while the harmonic injection current to the d-axis is zero. This distribution method fully utilizes the efficient response characteristics of the q-axis current to thrust generation, making control implementation the simplest and most direct.
[0064] When the q-axis current amplitude rises to a moderate level, it indicates a heavy load. Continuing to increase harmonic current along the q-axis will cause it to approach the limiting value, leading to a sharp increase in copper losses and insufficient control margin. At this point, a portion of the harmonic injection current is transferred to the d-axis, utilizing the thrust characteristic of the d-axis current to share the compensation burden. The transfer ratio gradually increases with the q-axis current amplitude, ensuring that the q-axis current always stays away from the limiting boundary.
[0065] When the q-axis current amplitude reaches a high level, it indicates that the motor is close to full-load operation. Further increases in the q-axis current will directly trigger current limiting, causing the control system to lose its regulating capability. At this time, harmonic injection current is preferentially distributed to the d-axis, while the q-axis retains only the minimum harmonic components required to maintain system stability.
[0066] To avoid thrust shock caused by abrupt changes in the distribution ratio, this embodiment sets a hysteresis transition region between the three distribution intervals. When the q-axis current changes near the interval boundary, the distribution ratio changes gradually according to a preset ramp function, rather than switching abruptly. At the same time, the distribution ratio is fine-tuned according to the motor speed: in the low-speed region, priority is given to ensuring compensation accuracy, and the total amount of harmonic injection is appropriately increased; in the high-speed region, priority is given to ensuring voltage margin, the total amount of harmonic injection is appropriately reduced, and the transfer ratio to the d-axis is increased.
[0067] In a preferred embodiment, determining the distribution ratio of the harmonic injection current between the d-axis and the q-axis can also be achieved in the following manner:
[0068] Introducing amplitude compensation coefficient With phase compensation angle ;
[0069] The d-axis component of the harmonic injection current and q-axis components Calculated using the following nonlinear mapping relationship:
[0070]
[0071]
[0072] In the formula, According to motor speed Dynamic adjustment As the benchmark coefficient, It is a velocity attenuation factor used to suppress the injection current amplitude at high speeds to prevent voltage saturation.
[0073] This embodiment aims to reconstruct the traditional two-step approach of "first determining the magnitude of the injected current and then deciding on the dq axis allocation" into an integrated calculation method of "directly generating the dq axis harmonic current components based on nonlinear mapping relationships".
[0074] The thrust fluctuation caused by cogging force has a periodic characteristic, and its angular frequency has a definite multiple relationship with the electrical angle θ of the motor. To generate a compensating thrust equal in magnitude but opposite in direction to the cogging force, the injected harmonic current must also exhibit a sinusoidal waveform that varies with time. The traditional approach is to uniformly represent the harmonic injection current as a sinusoidal function, and then decompose it onto the dq axis through coordinate transformation in subsequent steps. This approach allows the harmonic injection current to be directly given in the form of dq axis components, skipping the intermediate uniform representation and coordinate transformation steps.
[0075] Phase compensation angle This is used to correct phase deviations caused by factors such as controller delay, filter phase lag, and inverter dead-time effects. Ideally, the injected harmonic current should be spatially aligned exactly against the cogging force. However, from harmonic feature extraction to the actual application of the harmonic current to the winding, multiple stages occur, including the calculation delay of the digital controller, the PWM modulation delay, and the switching delay of the power devices. Each stage introduces additional phase lag. Without compensation, the actual phase of the injected current will lag behind the target phase, leading to a decrease in compensation effectiveness or even positive feedback. The preset angle used to offset these system delays can be obtained through offline calibration or online adaptive adjustment.
[0076] Amplitude compensation coefficient Used to dynamically adjust the intensity of the injected current according to the motor's operating speed. In the formula... The design exhibits a decreasing functional relationship with increasing speed. The physical basis for this design is as follows: at low speeds, cogging force is the primary factor affecting motion accuracy, requiring strong harmonic injection to suppress it; at high speeds, due to the low-pass filtering effect of mechanical inertia, speed fluctuations caused by cogging force are weakened, and voltage utilization is already close to its limit. Excessive harmonic injection could easily trigger voltage saturation. Therefore, attenuating the injection amplitude according to the reciprocal of the square root of the speed automatically balances the conflicting needs of "pursuing high accuracy in the low-speed range" and "avoiding voltage saturation in the high-speed range."
[0077] Furthermore, The calculation formula contains item, The calculation formula contains This structure makes the harmonic injection current actually a current with an electrical angular velocity. The magnitude of the resultant vector of a rotating spatial vector is The direction is relative to the q-axis by a factor of A fixed offset angle is determined. When this harmonic current vector is superimposed on the fundamental current vector, they form a vector composition relationship. Because harmonic currents contain... The term n is usually greater than 1 (the fundamental order of the cogging force is generally not 1). The harmonic current and the fundamental current have different frequencies. The result of their synthesis is a waveform with a changing envelope, rather than a simple addition of amplitudes.
[0078] This implementation method directly provides... and The analytical expression eliminates the coordinate transformation step, reducing the computational load in the digital controller and thus lowering the delay between harmonic extraction and current injection. By automatically adjusting the intensity of the harmonic injection current according to the motor speed—strong injection current at low speeds to ensure cogging force suppression and weak injection current at high speeds to avoid voltage saturation risks—the entire control scheme can operate stably and effectively across the entire speed range without requiring separate calibration of injection parameters for different speed intervals. Phase compensation angle. The introduction of this feature enables this implementation to actively counteract the phase lag caused by each stage in the process from harmonic detection to harmonic injection. The function relationship of attenuation with increasing speed ensures that the harmonic injection current automatically narrows in the high-speed region. At this point, if the fundamental voltage is already close to the inverter output limit, the harmonic voltage components will not add excessively, thereby reducing the risk of the total voltage vector exceeding the DC bus voltage. Compared to the fixed amplitude injection method without speed adaptation, this implementation method provides better system robustness under high-speed conditions.
[0079] In one embodiment, step S40 superimposes the harmonic injection current with the fundamental current component in the drive current command according to the allocation ratio to generate a compensated drive current command.
[0080] Preferably, the generation of the compensated drive current command includes:
[0081] The fundamental current component and the harmonic injection current are vector superimposed, and a voltage feedforward limiting mechanism is introduced.
[0082] If the magnitude of the superimposed voltage vector Exceeding the inverter DC bus voltage If the value is 85%, then the updated harmonic injection current amplitude is calculated using the following formula. :
[0083]
[0084]
[0085] In the formula, For voltage limiting threshold, and The voltage component generated by the fundamental current. The estimated voltage amplitude required for injecting harmonic current; ensuring that the voltage operating range of the inverter is not exceeded while suppressing cogging force.
[0086] In a motor control system, the drive current command is regulated by the current loop to generate a voltage command. The amplitude of this voltage command is limited by the inverter's DC bus voltage, Udc. When the fundamental voltage is already high (e.g., under high-speed or heavy-load conditions), the total voltage amplitude, after being superimposed with harmonic voltages, is likely to exceed the inverter's linear modulation range, leading to voltage saturation. Once voltage saturation occurs, the actual output voltage cannot track the command value, the current loop becomes uncontrolled, harmonic injection fails, and in severe cases, system oscillation may occur. This implementation sets the trigger threshold to 85% of Udc, rather than 100%. This is because the inverter needs to maintain a certain voltage margin when approaching full modulation to ensure the dynamic response capability of the current regulator and to cope with transient overvoltages. Keeping the limit within the linear modulation region avoids the nonlinear distortion caused by entering the overmodulation region. In the calculation formula, the molecule Indicates how much margin the current fundamental voltage has from the voltage limit threshold; denominator This is the estimated voltage required by the harmonic current itself. Dividing the two yields a scaling factor between 0 and 1. Multiplying this factor by the original harmonic current amplitude Ah gives the new amplitude after reduction. This ensures that harmonic voltages are compressed just within the available voltage margin.
[0087] Traditional methods often manifest as sudden current runaway and harmonic injection failure when voltage saturation occurs, causing the system to jump from normal operation to a fault state. This implementation method, by proactively detecting voltage margin and reducing harmonic injection amplitude, keeps the voltage within the linear modulation region, avoiding saturation and abrupt system state changes, thus maintaining control continuity and stability. The amplitude reduction strategy does not simply shut down harmonic injection; instead, it proportionally compresses the harmonic current based on the remaining voltage margin. When the voltage margin is sufficient, the compression factor is close to 1, and harmonic injection is almost unaffected; when the voltage margin is tight, the compression factor decreases accordingly, but some compensation capability is still retained. This "use only what margin is available" strategy maximizes the preservation of cogging force suppression effect while ensuring system safety.
[0088] In one embodiment, after generating the compensated drive current command in step S40, the linear motor is controlled to run by the inverter; then, in step S50, the operating status of the compensated linear motor is monitored, and the compensated fluctuation information is fed back to the adaptive filter to dynamically update the parameters of the adaptive filter, the harmonic injection current and the corresponding allocation ratio.
[0089] Preferably, the parameter update process of the adaptive filter includes:
[0090] electrical angle of position signal As input, generate orthogonal signals. and Feedback adjustment corrects the error between the quadrature signal and the harmonic components in the actual phase current. Minimize; where the variable step size factor The update formula is:
[0091]
[0092] In the formula, It is the minimum step size constant. This is the convergence speed adjustment coefficient. To prevent the denominator from being too small, a regularization constant is needed. The step size is the discrete time step; when the error is large, a large step size is used to speed up convergence, and when the error is small, a small step size is used to improve accuracy.
[0093] In this process, the electrical angle of the position signal As a reference, a pair of orthogonal reference signals are generated. and These two signals constitute the basis functions for harmonic extraction. The adaptive filter weights and sums the reference signal and weighting coefficients to obtain the estimated harmonic components, then subtracts these from the harmonic components in the actual phase current to obtain the error signal. This error reflects the current filter's accuracy in estimating cogging force harmonics. Step size factor The update follows these rules: when the error When it is large, The contribution was significant, making As the error approaches a larger value, the filter adjusts the weight coefficients rapidly with large steps to accelerate convergence; when the error... When approaching zero, Approaching the minimum value The filter is finely adjusted in small steps to reduce steady-state fluctuations. (The formula contains...) This term is used to prevent the step size from becoming too small due to an excessively small denominator, thus ensuring the smoothness of the adjustment process.
[0094] Fixed-step-size algorithms face an inherent trade-off: large step sizes result in fast convergence but large steady-state fluctuations, while small step sizes offer high accuracy but slow convergence. This implementation overcomes this contradiction through a variable-step-size mechanism: when the filter starts up or sudden changes in operating conditions cause large errors, a large step size is automatically used to quickly approximate the true value; when the filter is close to convergence, it automatically switches to a small step size to reduce steady-state error. This balances both aspects, shortening the response time while maintaining extraction accuracy.
[0095] In one specific implementation, the dynamic adjustment of the adaptive filter parameters, harmonic injection current, and corresponding allocation ratio includes:
[0096] Construct a feedback correction loop based on the Lyapunov stability criterion;
[0097] Define Lyapunov functions The error ; These are the actual and target values of the injected current, respectively.
[0098] If continuous Within a cycle The average rate of decrease is less than the set threshold. If the system is in a critically stable state, then the bandwidth of the adaptive filter is broadened. And fine-tune the phase of the harmonic injection current. In order to find the globally optimal compensation point.
[0099] The error between the actual value and the target value of the injected current As state variables, construct Lyapunov functions The value of this function reflects the degree of deviation between the actual injected current and the target value. Within each control cycle, the system calculates the Lyapunov function value in real time for the current moment. And compare it with historical values. Specifically, the system continuously monitors for m periods. The average value is used to calculate the rate of decrease relative to the previous monitoring window.
[0100] When continuous Within a cycle The average rate of decrease is less than the set threshold. When this happens, it indicates that the current parameter adjustment direction can no longer further optimize the system state, and the system has entered a "critical stable state." At this point, it suggests that the system may have fallen into a local optimum rather than a global optimum.
[0101] To this end, the system performs the following two steps: First, it widens the bandwidth of the adaptive filter. With the bandwidth widened, the filter becomes more sensitive to signal components over a wider frequency range, enabling it to capture harmonic components that were previously filtered out due to insufficient bandwidth and may carry better compensation effects. Secondly, the phase of the harmonic injection current is fine-tuned. Phase fine-tuning slightly alters the spatial direction of the compensating thrust to detect if a phase position is more effective at counteracting the cogging force than the current phase point. After performing the widening and fine-tuning operations, the system is re-evaluated. The changing trend. If after adjustment... If the rate of decrease recovers to above the threshold, it indicates that the local optimum has been escaped, and the system continues to optimize along the new gradient direction; if the effect is still not improved after adjustment, the current parameters are maintained until the operating conditions change.
[0102] Traditional gradient descent algorithms tend to cause parameters to converge to a local optimum closest to the initial value, rather than a global optimum. This implementation monitors the descent rate of the Lyapunov function to identify critical states that appear stable but are not optimal. It then uses active perturbation mechanisms, including bandwidth widening and phase fine-tuning, to force the system out of local optima and find better global compensation parameters.
[0103] See Figure 2 In one embodiment, the present invention also provides a linear motor cogging force suppression system based on harmonic injection, the system comprising:
[0104] The signal acquisition unit 100 is used to acquire the operating status signals of the linear motor in real time. The operating status signals include at least position signals, speed signals, and phase current signals.
[0105] The component extraction unit 200 is used to process the operating status signal online using an adaptive filter, extract the periodic harmonic components caused by the cogging force, and identify the characteristics of the harmonic components in real time; wherein, the characteristics of the harmonic components include amplitude, frequency and phase characteristics;
[0106] The proportional distribution unit 300 is used to calculate the harmonic injection current for compensating cogging force in real time based on the characteristics of harmonic components, and to determine the distribution ratio of the harmonic injection current between the d-axis and q-axis according to the current operating state of the motor.
[0107] The current compensation unit 400 is used to superimpose the harmonic injection current and the fundamental current component in the drive current command according to the allocation ratio to generate a compensated drive current command, and control the linear motor to run through the inverter based on the compensated drive current command.
[0108] The dynamic update unit 500 is used to monitor the operating status of the linear motor after compensation, feed back the compensation fluctuation information to the adaptive filter, and dynamically update the parameters, harmonic injection current and corresponding allocation ratio of the adaptive filter.
[0109] It is understood that the system provided in this embodiment has functions or includes modules that can be used to execute the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0110] The present invention also provides an electronic device including a processor and a memory, the memory being used to store computer program code, the computer program code including computer instructions, wherein when the processor executes the computer instructions, the electronic device performs a method as described in any of the above possible implementations.
[0111] The present invention also provides a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor of an electronic device, cause the processor to perform a method as described in any of the above possible implementations.
[0112] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
Claims
1. A method for suppressing cogging force in a linear motor based on harmonic injection, characterized in that, The method includes: The linear motor's operating status signals are acquired in real time, and the operating status signals include at least position signals, speed signals, and phase current signals; An adaptive filter is used to process the operating status signal online, extract the periodic harmonic components caused by cogging force, and identify the characteristics of the harmonic components in real time; the characteristics of the harmonic components include amplitude, frequency and phase characteristics; The harmonic injection current used to compensate for cogging force is calculated in real time based on the characteristics of harmonic components, and the distribution ratio of the harmonic injection current between the d-axis and q-axis is determined according to the current operating status of the motor. According to the allocation ratio, the harmonic injection current is superimposed with the fundamental current component in the drive current command to generate a compensated drive current command. Based on the compensated drive current command, the linear motor is controlled to run by the inverter. The operating status of the linear motor after compensation is monitored, and the fluctuation information after compensation is fed back to the adaptive filter to dynamically update the parameters of the adaptive filter, the harmonic injection current and the corresponding allocation ratio.
2. The method for suppressing cogging force of a linear motor based on harmonic injection according to claim 1, characterized in that, The parameter update process of the adaptive filter includes: electrical angle of position signal As input, generate orthogonal signals. and Feedback adjustment corrects the error between the quadrature signal and the harmonic components in the actual phase current. Minimize; where the variable step size factor The update formula is: ; In the formula, It is the minimum step size constant. This is the convergence speed adjustment coefficient. To prevent the denominator from being too small, a regularization constant is needed. is the discrete time step.
3. The method for suppressing cogging force of a linear motor based on harmonic injection according to claim 1, characterized in that, The real-time identification of harmonic component characteristics includes dynamic calculation of amplitude, frequency, and phase. Frequency domain analysis of the filtered signal is performed using sliding discrete Fourier transform to extract the dominant harmonic order. The formulas for calculating the amplitude and phase of harmonic components are as follows: ; ; In the formula, For the first Current values at each sampling point The number of sampling points within one electrical cycle. , These are amplitude and phase, respectively.
4. The method for suppressing cogging force of a linear motor based on harmonic injection according to claim 3, characterized in that, Determining the distribution ratio of the harmonic injection current between the d-axis and q-axis includes: Introducing amplitude compensation coefficient With phase compensation angle ; The d-axis component of the harmonic injection current and q-axis components Calculated using the following nonlinear mapping relationship: ; ; In the formula, According to motor speed Dynamic adjustment As the benchmark coefficient, This is the velocity decay factor.
5. The method for suppressing cogging force of a linear motor based on harmonic injection according to claim 3, characterized in that, The generated compensated drive current command includes: The fundamental current component and the harmonic injection current are vector superimposed, and a voltage feedforward limiting mechanism is introduced. If the magnitude of the superimposed voltage vector Exceeding the inverter DC bus voltage If the value is 85%, then the updated harmonic injection current amplitude is calculated using the following formula. : ; ; In the formula, For voltage limiting threshold, and The voltage component generated by the fundamental current. The estimated voltage amplitude required for harmonic current injection.
6. The method for suppressing cogging force of a linear motor based on harmonic injection according to claim 3, characterized in that, The dynamic adjustment of the adaptive filter parameters, harmonic injection current, and corresponding allocation ratio includes: Construct a feedback correction loop based on the Lyapunov stability criterion; Define Lyapunov functions The error ; These are the actual and target values of the injected current, respectively. If continuous Within a cycle The average rate of decrease is less than the set threshold. This will broaden the bandwidth of the adaptive filter. And adjust the phase of the harmonic injection current. In order to find the globally optimal compensation point.
7. A linear motor cogging force suppression system based on harmonic injection, characterized in that, The system includes: The signal acquisition unit is used to acquire the operating status signals of the linear motor in real time. The operating status signals include at least position signals, speed signals, and phase current signals. The component extraction unit is used to process the operating status signal online using an adaptive filter, extract the periodic harmonic components caused by the cogging force, and identify the characteristics of the harmonic components in real time; the characteristics of the harmonic components include amplitude, frequency and phase characteristics; The proportional distribution unit is used to calculate the harmonic injection current for compensating cogging force in real time based on the characteristics of harmonic components, and to determine the distribution ratio of the harmonic injection current between the d-axis and q-axis according to the current operating state of the motor. The current compensation unit is used to superimpose the harmonic injection current and the fundamental current component in the drive current command according to the allocation ratio to generate a compensated drive current command. Based on the compensated drive current command, the inverter controls the operation of the linear motor. The dynamic update unit is used to monitor the operating status of the linear motor after compensation, feed back the compensation fluctuation information to the adaptive filter, and dynamically update the parameters of the adaptive filter, the harmonic injection current and the corresponding allocation ratio.
8. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store computer program code, the computer program code including computer instructions, wherein when the processor executes the computer instructions, the electronic device performs the linear motor cogging force suppression method based on harmonic injection as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which includes program instructions that, when executed by a processor of an electronic device, cause the processor to perform the linear motor cogging force suppression method based on harmonic injection as described in any one of claims 1 to 6.