A sweeping vibration control method applied to magnetic levitation motors

By performing parameter pre-calculation and low-complexity computation in the sweeping control of magnetic levitation motors, the real-time computation burden under resource-constrained conditions is resolved, thereby improving the stability and safety of sweeping control.

CN122137310APending Publication Date: 2026-06-02AICHUANGXIN (SHENZHEN) TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
AICHUANGXIN (SHENZHEN) TECH CO LTD
Filing Date
2026-01-30
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In the existing technology, the sweeping and vibration composite control of magnetic levitation motors has a large real-time calculation burden on resource-constrained microcontrollers, resulting in calculation timeouts, output jitter, and decreased control accuracy within the control cycle, as well as unsafe issues when switching drive directions.

Method used

By pre-calculating sweeping and vibration control parameters during power-on/gear shifting/mode switching, a set of sweeping and vibration control parameters is generated. In each control cycle, a PWM signal is generated by step-up updating or table lookup, reducing the amount of real-time calculation. Low-complexity calculation is used to process the direction and amplitude of the target driving quantity, ensuring the safety and stability of the motor drive.

Benefits of technology

It significantly reduces the real-time computational load of sweep vibration composite control, improves the stability of PWM updates, reduces the risk of output jitter, and enhances the reliability of the drive circuit and the consistency of mode switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122137310A_ABST
    Figure CN122137310A_ABST
Patent Text Reader

Abstract

This application relates to a sweeping vibration control method for a magnetic levitation motor, comprising receiving power-on and / or gear shift and / or mode switching signals, acquiring sweeping control parameters and vibration control parameters corresponding to the current mode; performing pre-calculation of operating parameters based on the parameters to obtain a set of sweeping control parameters and a set of vibration control parameters for subsequent cycle control, wherein the parameter set includes step-type parameters and / or lookup table-type parameters. Cyclicly following a preset control cycle, sweeping component control values ​​and vibration component control values ​​are generated based on the parameter set and superimposed to form a target driving quantity; the target driving quantity is subjected to sign determination and amplitude limiting, and a target PWM value is output; the driving direction is determined according to the sign and the upper or lower switching device is selected for activation; a PWM driving signal is output according to the target PWM value, and a dead zone is inserted during commutation to avoid shoot-through. A PWM sequence can be pre-generated and output via a lookup table, and the scaling is implemented using shift operations to reduce the computational load during operation and improve control stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electric toothbrushes, and more particularly to a sweeping vibration control method applied to a magnetic levitation motor. Background Technology

[0002] To improve cleaning efficiency and comfort, electric toothbrushes typically use a motor to drive the brush head to produce vibration, oscillation, or a combination of both. Among these, the scheme using a magnetic levitation motor to achieve a combined sweeping and vibration output can achieve good dynamic response and output consistency within a relatively small size, and is therefore used in sweeping and vibrating toothbrushes. To achieve switching between different cleaning modes (such as different sweeping angles, sweeping speeds, vibration frequencies, and vibration intensities), the control system generally needs to modulate the motor drive waveform in real time. This is usually done using PWM to control the drive circuit, and is coordinated with motor commutation logic to complete forward and reverse drive.

[0003] In existing technologies, the control process of combined sweeping and vibration drives often requires real-time calculation and updating of multiple sets of control quantities within a short control cycle. For example, sweeping component control values ​​and vibration component control values ​​are generated simultaneously and synthesized to obtain the target driving quantity. Then, the driving direction is determined based on the sign of the target driving quantity, and the corresponding PWM is output. Since sweeping and vibration usually have different frequency / period characteristics, and the parameters change when switching modes, the controller needs to frequently perform multiplication, division, scaling, limiting, and commutation determination operations. When using a resource-constrained microcontroller (such as one lacking hardware multipliers / dividers), real-time calculations will bring high computing power and timing pressure, which can easily cause calculation timeouts, output jitter, or decreased control accuracy within the control cycle, and further lead to unstable user experience, increased noise, or increased power consumption.

[0004] Furthermore, in sweep vibration composite control, the target driving quantity typically undergoes synthesis, limiting, and commutation output stages. Improper handling during mode switching or commutation can lead to transient anomalies during drive direction switching or unsafe switching of upper and lower switching devices in the drive circuit, resulting in shoot-through risks, device overheating, or decreased reliability. Therefore, ensuring effective sweep vibration composite control while reducing real-time computational burden during operation, improving the stability of parameter switching and periodic control, and ensuring safe commutation control of the drive circuit are key technical challenges that control methods for this type of product need to address. Summary of the Invention

[0005] The purpose of this application is to solve the problems of high computational power requirements and heavy burden of real-time PWM update in the above-mentioned sweeping composite control.

[0006] According to one aspect of this application, a sweeping vibration control method for a magnetic levitation motor is provided, comprising: S10. Receive power-on signal and / or shift signal and / or mode switching signal, and collect sweep control parameters and vibration control parameters corresponding to the current mode; S20. Based on the sweeping control parameters and vibration control parameters, perform pre-calculation of operating parameters to obtain the sweeping control parameter set and vibration control parameter set for subsequent periodic control; S30. Perform the operation cycle control cyclically according to the preset control cycle, generate sweeping component control values ​​based on the sweeping control parameter set, and generate vibration component control values ​​based on the vibration control parameter set. S40. Combine the sweeping component control value and the vibration component control value to obtain the target driving amount; S50. Determine the motor driving direction based on the sign of the target driving quantity, and output a PWM driving signal corresponding to the amplitude of the target driving quantity; The sweeping control parameter set and the vibration control parameter set include at least step-type parameters and / or lookup table-type parameters for updating the PWM within the control cycle, and the running cycle control completes the PWM adjustment based on the pre-calculated results within each control cycle.

[0007] Preferably, S10 includes: S11. Receive user key input, host computer instructions or control signals and parse them to obtain the mode / gear identifier; S12. Using the mode / gear identifier as an index, query a preset mode parameter table to obtain parameter records corresponding to the mode / gear identifier. The parameter records include at least the vibration force coefficient, sweeping angle coefficient, vibration frequency, and sweeping speed. S13. Based on the vibration force coefficient, determine the vibration-related amplitude control parameters, based on the sweeping angle coefficient, determine the sweeping-related amplitude control parameters, based on the vibration frequency, and based on the sweeping speed, determine the sweeping-related period control parameters, thereby forming the sweeping control parameters and the vibration control parameters, and output the sweeping control parameters and the vibration control parameters to the operation parameter pre-calculation step for use.

[0008] Preferably, the parameter record further includes a preset scaling factor and / or a preset constant field for reducing the amount of calculation during operation. S13 converts the vibration force coefficient, sweeping angle coefficient, vibration frequency and sweeping speed into the amplitude control parameter and period control parameter based on the preset scaling factor and / or preset constant field.

[0009] Preferably, the pre-calculation in S20 includes: S21. Obtain the preset control cycle time and PWM maximum value parameters; S22. Based on the vibration force coefficient and the maximum PWM value parameter, calculate the maximum PWM value of the vibration period, and calculate the vibration step value based on the vibration frequency and the control cycle time. S23. Based on the sweeping angle coefficient and the maximum PWM value parameter, calculate the maximum PWM value of the sweeping cycle, and calculate the sweeping step value based on the sweeping speed and the maximum PWM value of the sweeping cycle. S24. Store the maximum PWM value of the vibration period, the vibration step value, the maximum PWM value of the sweeping period, and the sweeping step value as step-type parameters in the vibration control parameter set and the sweeping control parameter set.

[0010] Preferably, the step S30, which involves cyclically executing the operation cycle control according to a preset control cycle, includes: S31. In each control cycle, read the sweep step value and the maximum PWM value of the sweep cycle from the sweep control parameter set, update the current sweep cycle value by incrementing or decrementing according to the sweep step value, and switch the update direction when the current sweep cycle value reaches the maximum PWM value of the sweep cycle or its opposite, so as to generate sweep component control value. S32. In each control cycle, read the vibration step value and the maximum PWM value of the vibration cycle from the vibration control parameter set, update the current vibration cycle value by incrementing or decrementing according to the vibration step value, and switch the update direction when the current vibration cycle value reaches the maximum PWM value of the vibration cycle or its opposite, so as to generate vibration component control values. S33. In each control cycle, the sweeping component control value and the vibration component control value are combined to form the target driving quantity.

[0011] Preferably, S40 includes: S41. In each control cycle, the sweeping component control value and the vibration component control value are superimposed to obtain the target driving amount; S42. Limit the amplitude of the target driving quantity so that it does not exceed the preset PWM output range, and use it as the target PWM value of the PWM driving signal.

[0012] Preferably, the generation and processing of the target driving quantity in each control cycle are implemented using low-computing-power computation, including: The target driving quantity is sign-determined to obtain a direction flag. When the target driving quantity is less than 0, its inverse is taken to obtain the target PWM amplitude. When the target driving quantity is greater than or equal to 0, it is taken as the target PWM amplitude. The target PWM amplitude is compared with a preset PWM upper limit value to perform amplitude limiting, and the PWM duty cycle corresponding to the target PWM amplitude is output after amplitude limiting. In each control cycle, only addition, subtraction, taking the opposite number, comparison operations, and / or table lookup operations are performed to reduce the computational load of cycle control.

[0013] Preferably, the output of the PWM drive signal corresponding to the target drive amplitude in step S50 includes: S51. Determine the driving direction according to the sign of the target driving quantity. When the target driving quantity is positive, determine the first driving direction. When the target driving quantity is negative, determine the second driving direction. S52. Select the upper switch device or the lower switch device in the motor drive circuit according to the driving direction, wherein the upper switch device is turned on and the lower switch device is turned off in the first driving direction, and the lower switch device is turned on and the upper switch device is turned off in the second driving direction. S53. Generate a PWM duty cycle according to the amplitude of the target driving quantity and output it to the turned-on switching device to drive the magnetic levitation motor to run.

[0014] Preferably, in step S52, selecting the upper or lower switching device includes: S54. Before switching from an on upper switch device to an on lower switch device, or from an on lower switch device to an on upper switch device, the currently on switch device shall be turned off first. S55. Insert a preset dead time after shutdown; S56. After the dead time ends, the switching device corresponding to the target direction is turned on to avoid direct connection between the upper and lower switching devices.

[0015] Preferably, the pre-calculation of operating parameters further includes: Before the motor enters the running state, at least one set of PWM control sequences for multiple control cycles is pre-generated based on the sweep control parameter set and / or the vibration control parameter set, and the PWM control sequences are stored in a lookup table array; The operation cycle control reads the corresponding PWM value from the lookup table array in each control cycle by looking up the table to generate the sweep component control value and / or the vibration component control value, thereby replacing the online calculation of the sweep cycle value and / or the vibration cycle value. The operation cycle control updates the lookup table index or counter in each control cycle to locate the corresponding PWM value in the lookup table array. Furthermore, when scaling operations are involved in the pre-calculation or the table lookup index calculation, shift operations are used to implement division and / or multiplication in order to adapt to processors that do not have multipliers and / or dividers and reduce the amount of computation during operation.

[0016] This application offers the following advantages: By pre-calculating the sweep control parameters and vibration control parameters during power-on / gear shifting / mode switching, a set of sweep control parameters and a set of vibration control parameters containing step-type parameters and / or lookup table parameters are formed. This allows the generation and synthesis of sweep and vibration components to be completed simply by calling the pre-calculated results during the operation phase according to a preset control cycle, significantly reducing the real-time computational load and computational power consumption within the cycle. By superimposing the sweep and vibration components to obtain the target driving quantity, and using low-complexity operations such as sign determination, taking the opposite number, and comparison limiting to handle direction and amplitude, the real-time performance and stability of PWM updates can be improved, reducing the risk of output jitter. By selecting the upper / lower switching device to conduct according to the sign of the target driving quantity and combining it with dead-time control, the risk of commutation shoot-through can be reduced, improving the reliability of the drive circuit. Furthermore, by pre-generating the PWM control sequence and outputting it through a lookup table, and by replacing multiplication and division with shift operations, it can adapt to resource-constrained processors, further reducing the computational burden during operation and improving the consistency of mode switching and sweep / vibration composite control. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0018] Figure 1 This is a logic block diagram of a sweeping vibration control method for a magnetic levitation motor according to an embodiment of this application. Detailed Implementation

[0019] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings. Preferred embodiments of this application are shown in the drawings. However, this application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the disclosure of this application.

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0021] Please refer to Figure 1One embodiment of this application provides a sweeping vibration control method applied to a magnetic levitation motor, comprising: S10. Receive the power-on signal and / or shift signal and / or mode switching signal, and acquire the sweep control parameters and vibration control parameters corresponding to the current mode. In this step, it should be noted that when the power-on signal, shift signal, or mode switching signal arrives, the controller enters the "mode parameter loading" process. The controller first parses the current mode / gear identifier (e.g., obtained from button presses, host computer commands, or control signals), and then reads a set of basic parameters corresponding to the mode from the preset mode parameter table to describe the target characteristics of the sweep-vibration composite output. The basic parameters typically include at least: sweep angle related parameters (or angle coefficient B), sweep speed parameter S, vibration frequency parameter P, and vibration force related parameters (or force coefficient A). Furthermore, the mode parameter table can further store scaling coefficients, constant fields, or calibration parameters so that the "mode parameters" can be quickly mapped to "calculated parameters that can be used for PWM control" later, reducing the real-time calculation pressure during operation from the source.

[0022] S20. Based on the sweeping control parameters and vibration control parameters, perform pre-calculation of operating parameters to obtain the sweeping control parameter set and vibration control parameter set for subsequent periodic control. It should be noted that the key to this implementation is that the "pre-calculation of operating parameters" occurs after the mode is determined and before entering periodic control. In this stage, the controller, based on the sweeping / vibration basic parameters obtained in S10 and combined with system preset constants (such as the maximum PWM value PWM_MAX, control cycle time, etc.), pre-calculates the set of control parameters to be directly called during operation.

[0023] For the vibration side: First, calculate the maximum PWM amplitude of the vibration period (e.g., determined by the vibration intensity coefficient A and PWM_MAX), and then calculate the vibration step value by combining the vibration frequency P and the control cycle time, so that the target vibration waveform can be formed by simply increasing / decreasing the step value during operation.

[0024] For the sweeping side: First, calculate the maximum PWM amplitude of the sweeping cycle (e.g., determined by the sweeping angle coefficient B and PWM_MAX), then combine this with the sweeping speed S to calculate the sweeping step value. In actual implementation, to adapt to low-computing-power MCUs, the calculation of the sweeping step value can introduce a calibration scaling constant such as "8192", and implement division scaling by right shifting the number of bits (e.g., right shifting 13 bits) to avoid multiplication and division operations during runtime.

[0025] Furthermore, the controller can generate a "PWM sequence array / lookup table array" during the pre-calculation stage, pre-calculating and storing the PWM values ​​to be output in multiple control cycles, so that the PWM can be obtained by looking up the table during operation, without having to generate the sweep / vibration cycle value online in real time.

[0026] In summary, the output of S20 is a set of sweep control parameters and vibration control parameters with "stepping parameters and / or lookup table parameters" as the core, which will directly support the low computing power cycle control of the subsequent S30.

[0027] S30. The operating cycle control is executed cyclically according to a preset control cycle. Sweep component control values ​​are generated based on the sweep control parameter set, and vibration component control values ​​are generated based on the vibration control parameter set. In this step, it should be noted that the preset control cycle can be set to 50µs to meet the time resolution requirements of the sweep-vibration composite control. Within each control cycle, the controller enters a high-frequency loop, prioritizing low-complexity computations for PWM updates. If the stepping method is used: the controller reads the sweep step value / maximum sweep PWM and vibration step value / maximum vibration PWM from the parameter set, and updates the "current sweep period value and current vibration period value" by incrementing or decrementing; when the maximum PWM or its opposite is reached, the update direction is switched, thereby forming the sweep component control value and vibration component control value (corresponding to the periodic changes of the sweep and vibration waveforms).

[0028] If a lookup table method is used: the controller maintains a lookup table index or counter, and the index increments or rewinds every cycle, directly reading the sweep component value and / or vibration component value of the current cycle from the pre-generated PWM sequence.

[0029] Through the above mechanism, each cycle of operation mainly performs addition, subtraction, comparison, inversion, index update and table lookup, without relying on multiplication and division, thereby ensuring that PWM updates are completed stably within a short control cycle.

[0030] S40. The sweep component control value and the vibration component control value are synthesized to obtain the target driving quantity. In this step, it should be noted that the sweep component and vibration component are obtained by "superposition synthesis" in this embodiment, that is, the two are added together to form the target PWM control quantity for this cycle (which can be understood as the target PWM value or its equivalent driving quantity). Considering the safety range of the drive circuit and the motor, the synthesized target driving quantity usually needs to be limited: saturation limiting is performed when the target driving quantity exceeds the upper limit of the preset PWM output range; symmetrical limiting is also performed when it is less than the lower limit (if a signed representation is used). This limiting process can be achieved through simple comparison, which meets the design goal of low-computing-power cycle control.

[0031] S50. Determine the motor drive direction based on the sign of the target drive quantity, and output a PWM drive signal corresponding to the amplitude of the target drive quantity. In this step, it should be noted that: this embodiment achieves direction control based on the "sign" of the target drive quantity and duty cycle control based on the "amplitude". When the target driving quantity is positive, it is determined as the first driving direction; when the target driving quantity is negative, it is determined as the second driving direction, and the target PWM amplitude can be obtained by taking the opposite number of the negative value.

[0032] At the drive circuit execution level, direction switching can be achieved by selecting to turn on the upper or lower switching device (e.g., upper MOS / lower MOS): forward conduction turns on the upper switch and turns off the lower switch, reverse conduction turns on the lower switch and turns off the upper switch, while outputting the PWM duty cycle corresponding to the target PWM amplitude.

[0033] To prevent shoot-through of the up / down switching devices, when switching directions or switching up / down, the currently active device is first turned off, then a preset dead time is inserted, and the target direction device is turned on after the dead time ends, thereby improving reliability and safety.

[0034] By employing "sign direction determination + amplitude PWM + dead zone protection", a stable sweeping vibration composite drive output for the magnetic levitation motor is achieved.

[0035] The sweep control parameter set and vibration control parameter set include at least step-type parameters and / or lookup table-type parameters for updating the PWM within the control cycle. The running cycle control completes the PWM adjustment based on the pre-calculated results within each control cycle.

[0036] The technical solution implemented in this embodiment can pre-calculate the key parameters required for sweep vibration control and pre-generate the optional PWM sequence during power-on / gear shifting / mode switching. This allows the motor to perform PWM adjustments mainly through step updates or table lookups within a short control cycle (e.g., 50µs) during operation, thereby significantly reducing the real-time computational load and computing power requirements during operation and improving the determinism and stability of cycle control. Simultaneously, by superimposing and synthesizing sweep and vibration components, a composite drive output of sweep and vibration is achieved. Through direction control based on the target drive quantity sign, PWM duty cycle output based on amplitude, and dead-zone protection mechanism, the risk of commutation shoot-through is reduced, the safety of the drive circuit and the reliability of the system are improved, and the consistency and stability of mode switching and sweep vibration output are enhanced.

[0037] Furthermore, S10 includes: S11. Receive user button input, host computer instructions, or control signals and parse them to obtain the mode / gear identifier. In this step, it should be noted that after receiving user button input, host computer instructions, or other control signals, the controller does not directly enter PWM output. Instead, it first parses and debounces / verifies the input signal (e.g., confirming short / long button presses, instruction verification, etc.) to obtain a uniquely determined mode / gear identifier. This mode / gear identifier is used to characterize the sweeping vibration combination requirements corresponding to the current brushing mode and serves as the trigger basis for subsequent parameter loading and pre-calculation. In other words, this implementation uses "mode determination" as a prerequisite for entering pre-calculation and periodic control to avoid waveform instability caused by frequent parameter changes during operation.

[0038] S12. Using the mode / gear identifier as an index, query the preset mode parameter table to obtain the parameter record corresponding to the mode / gear identifier. The parameter record includes at least the vibration intensity coefficient, sweep angle coefficient, vibration frequency, and sweep speed. In this step, it should be noted that the mode / gear identifier is used as an index value to access the preset mode parameter table. The mode parameter table can be stored in memory as an array, structure table, or key-value mapping, allowing parameter reading to be completed in constant time during mode switching. The parameter record includes at least the vibration intensity coefficient, sweep angle coefficient, vibration frequency, and sweep speed, used to characterize the vibration amplitude, sweep amplitude, vibration speed, and sweep speed, respectively. Furthermore, the parameter record may also include scaling factors, constant fields, or calibration parameters, allowing subsequent scaling of the parameters to be implemented using shift operations (e.g., converting a division by a fixed factor into a right shift), to adapt to processors without multipliers and / or dividers and reduce computational burden.

[0039] S13. Based on the vibration force coefficient, determine the vibration-related amplitude control parameters; based on the sweep angle coefficient, determine the sweep-related amplitude control parameters; based on the vibration frequency, determine the vibration-related periodic control parameters; and based on the sweep speed, determine the sweep-related periodic control parameters, thus forming the sweep control parameters and vibration control parameters. These sweep control parameters and vibration control parameters are then output to the pre-calculation step of the operating parameters. It should be noted that this step is not simply "declaring parameters," but rather converting the basic quantities such as coefficients / frequency / speed read from S12 into control quantity types that can be directly used in subsequent pre-calculation and periodic control, thereby completing the mapping from the "mode parameter space" to the "PWM control parameter space." Specifically: Based on the vibration intensity coefficient, vibration-related amplitude control parameters are generated, which can be combined with the PWM maximum value parameter to determine the maximum PWM amplitude of the vibration. Based on the sweep angle coefficient, sweep-related amplitude control parameters are generated so that they can be combined with the PWM maximum value parameter to determine the maximum PWM amplitude of the sweep. Based on the vibration frequency, vibration-related periodic control parameters are generated, which can be coordinated with the control period time to determine the periodic update rhythm of the vibration (e.g., for subsequent calculation of vibration step values ​​or generation of vibration lookup table sequences). Based on the sweeping speed, sweeping-related periodic control parameters are generated, enabling the determination of the sweeping periodic update rhythm (e.g., for subsequent calculation of sweeping step values ​​or generation of sweeping lookup table sequences).

[0040] In engineering implementation, to further reduce computational overhead during operation, the amplitude / cycle control parameters obtained in this step can carry or introduce preset scaling constants, and when division scaling is required, it can be done by right shifting by a number of bits (e.g., right shifting by 13 bits) to reduce multiplication and division overhead. Finally, the resulting sweep control parameters and vibration control parameters are output to the operation parameter pre-calculation step for centralized calculation of step-type parameters and / or generation of lookup table arrays, so that the operation cycle control stage can mainly rely on addition, subtraction, comparison, and lookup table to complete PWM adjustment.

[0041] The technical solution implemented in this embodiment can bring forward mode parsing, parameter table index reading, and parameter type mapping to the mode determination stage, making the acquisition path of the basic parameters required for sweeping and vibration clear, the switching response fast, and repeatable. Furthermore, by introducing scaling constants and shift substitutions for multiplication and division, the parameter conversion process is adapted to low-power processors. Further, the amplitude control parameters and period control parameters formed in S13 provide a unified input for subsequent pre-calculation, allowing for the calculation of step-type parameters and / or lookup table sequences in one go after mode switching. This significantly reduces the real-time computation load in each control cycle during operation, improves the timing stability and output consistency of the sweeping-vibration composite control, and reduces the risk of PWM jitter caused by computation timeouts.

[0042] Furthermore, the parameter record also includes preset scaling factors and / or preset constant fields for reducing the amount of calculation during operation. S13 converts the vibration force coefficient, sweeping angle coefficient, vibration frequency and sweeping speed into amplitude control parameters and period control parameters based on the preset scaling factors and / or preset constant fields.

[0043] It should be noted that the preset scaling coefficient and / or preset constant field are preferably stored together with the parameter records in the mode parameter table. This is used to solidify the conversion relationship from "vibration force coefficient, sweeping angle coefficient, vibration frequency, sweeping speed" to "amplitude control parameter, period control parameter" under different modes. This allows S13 to complete the proportional conversion and dimensional unification mainly with low-complexity calculations when performing parameter conversion, and outputs the converted amplitude control parameter and period control parameter in a structured form to the running parameter pre-calculation step for further generation of step-type parameters and / or lookup-type parameters. By constantizing / coefficientizing the conversion relationship, the reliance on complex arithmetic operations during runtime is reduced, and the determinism of parameter loading and conversion during mode switching is improved.

[0044] The technical solution implemented in this embodiment can solidify the mode-related conversion relationship along with the parameter record, making the parameter conversion process simpler and more stable, thereby reducing the computational burden and timing risks during operation. At the same time, the amplitude control parameters and period control parameters are provided to the pre-calculation stage in a form that is closer to the final control quantity, which is conducive to quickly forming a parameter set that can be directly used for period control after mode switching, and improving the consistency and real-time performance of the sweep vibration composite control output.

[0045] Furthermore, the pre-calculations in S20 include: S21. Obtain the preset control cycle time and the PWM maximum value parameter. In this step, it should be noted that the preset control cycle time is used to constrain the update rhythm of the PWM parameters. In this embodiment, it is preferable to set the control cycle to a relatively short fixed period to meet the time resolution requirements of the sweep vibration composite control. The control cycle can be 100µs, 50µs, etc. The PWM maximum value parameter is used to characterize the available upper limit of the PWM duty cycle or PWM count (e.g., related to timer resolution or drive circuit limitations), serving as a reference quantity when subsequently mapping abstract parameters such as "force / angle" to "PWM amplitude". After the mode is determined, the controller obtains the above two global / platform parameters, ensuring that the subsequent pre-calculation process has a unified dimension and boundary.

[0046] S22. Based on the vibration intensity coefficient and the maximum PWM value parameter, the maximum PWM value of the vibration period is calculated, and the vibration step value is calculated based on the vibration frequency and control cycle time. In this step, it should be noted that the vibration-side pre-calculation prioritizes converting "vibration intensity" into "outputtable PWM amplitude range" to obtain the maximum PWM value of the vibration period. The maximum PWM value of the vibration period can be determined by multiplying the vibration intensity coefficient A and PWM_MAX to achieve linear adjustment of the vibration amplitude with intensity changes at different levels. Subsequently, the vibration step value is calculated by combining the vibration frequency and control cycle time, so that during operation, only incremental / decremental updates of the vibration period value are needed in each control cycle to form the target vibration waveform. The introduction of the "step value" here is to transform the periodic changes that might otherwise require real-time calculation into simple addition and subtraction operations during operation, thereby reducing the computational burden within the cycle.

[0047] S23. Based on the sweep angle coefficient and the maximum PWM value parameter, calculate the maximum PWM value of the sweep period, and calculate the sweep step value based on the sweep speed and the maximum PWM value of the sweep period. In this step, it should be noted that the sweep side pre-calculation also first maps the "sweep angle requirement" to the "sweep PWM amplitude range" to obtain the maximum PWM value of the sweep period. The maximum PWM value of the sweep period can be determined by multiplying the sweep angle coefficient B and PWM_MAX to achieve sweep amplitude adjustment with the angle parameter at different levels. Subsequently, the sweep step value is calculated based on the sweep speed and the maximum PWM value of the sweep period, so that during operation, sweep component control values ​​can be generated by incrementally increasing / decreasing the sweep period value. In engineering implementation, to adapt to resource-constrained processors, a fixed scaling constant (e.g., using 8192 as the scaling factor) can be introduced into the step value calculation, and the corresponding proportional scaling can be completed through shift operations (e.g., division of 8192 can be achieved by right shifting 13 bits), thereby reducing multiplication and division overhead and improving pre-calculation efficiency.

[0048] S24. Store the maximum PWM value of the vibration period, the vibration step value, the maximum PWM value of the sweep period, and the sweep step value as step-type parameters in the vibration control parameter set and the sweep control parameter set. In this step, it should be noted that: in this embodiment, the maximum PWM value of the vibration period, the vibration step value, the maximum PWM value of the sweep period, and the sweep step value are written into the vibration control parameter set and the sweep control parameter set in a structured form as "step-type parameters" for direct use during the operation cycle control phase. In this way, during operation, it is unnecessary to repeatedly perform mode-related amplitude conversions and step calculations; instead, only the parameter set needs to be read and lightweight operations such as addition, subtraction, comparison, and direction switching need to be performed to complete the PWM update. At the same time, this parameter set organization method also facilitates the replacement of the entire set of parameters at once during gear shifting / mode switching, reducing the risk of inconsistency during the parameter update process.

[0049] The technical solution implemented in this embodiment can, after the mode is determined, pre-calculate the maximum PWM amplitude and step value of the vibration side and sweeping side based on the preset control cycle time and the maximum PWM value parameter, and store the results in the control parameter set. This allows the generation of sweeping and vibration components to be mainly achieved through step updates during each control cycle in the motor operation phase, thereby significantly reducing the real-time computing burden and improving the accessibility and stability of short-cycle control. At the same time, by using fixed scaling and displacement operations to replace some multiplication and division operations in the pre-calculation stage, it further adapts to low-computing-power processors, improves the parameter update efficiency and sweeping output consistency after mode switching, and reduces PWM jitter and the risk of control instability caused by insufficient computing power.

[0050] Furthermore, the operation cycle control in S30, which is executed cyclically according to a preset control cycle, includes: S31. Within each control cycle, read the sweep step value and the maximum PWM value of the sweep cycle from the sweep control parameter set. Update the current sweep cycle value by incrementing or decrementing according to the sweep step value. Switch the update direction when the current sweep cycle value reaches the maximum PWM value of the sweep cycle or its opposite, to generate the sweep component control value. In this step, it should be noted that after the start of the cycle control, the controller directly reads the sweep step value and the maximum PWM value of the sweep cycle from the sweep control parameter set within each control cycle and maintains a "current sweep cycle value" and its corresponding "update direction flag" (incrementing or decrementing). The controller updates the current sweep cycle value by adding or subtracting according to the sweep step value; when the current sweep cycle value reaches the maximum PWM value of the sweep cycle, the update direction is switched from incrementing to decrementing; when the current sweep cycle value reaches the opposite of the maximum PWM value of the sweep cycle, the update direction is switched from decrementing to incrementing. By using this "step-by-step accumulation / subtraction + threshold-to-reverse-direction" mechanism, a periodic sweep control waveform can be generated without complex waveform calculations, and its output is the sweep component control value. Since each control cycle only involves addition, subtraction, comparison, and direction bit flipping, it can meet the real-time requirements within short control cycles (e.g., 50µs).

[0051] S32. Within each control cycle, the vibration step value and the maximum PWM value of the vibration period are read from the vibration control parameter set. The current vibration period value is updated incrementally or decrementally according to the vibration step value. When the current vibration period value reaches the maximum PWM value of the vibration period or its opposite, the update direction is switched to generate the vibration component control value. It should be noted in this step that the generation method of the vibration component is similar to that of the sweep component, also employing a step update and threshold flipping mechanism. Within each control cycle, the controller reads the vibration step value and the maximum PWM value of the vibration period from the vibration control parameter set, and updates the "current vibration period value" incrementally or decrementally according to the vibration step value. When the current vibration period value reaches the maximum PWM value of the vibration period or its opposite, the update direction is switched, thus forming a periodic vibration control waveform as the vibration component control value. Since the vibration frequency is usually higher than the sweep frequency, by pre-calculating the frequency influence into the vibration step value during the pre-calculation stage, different frequencies of vibration output can be achieved using the same low-complexity update logic during runtime, avoiding the introduction of high-overhead calculations such as multiplication, division, or trigonometric functions during runtime.

[0052] S33. Within each control cycle, the sweep component control value and the vibration component control value are combined to form the target drive quantity. In this step, it should be noted that after obtaining the sweep component control value and the vibration component control value, the controller uses a superposition synthesis method to obtain the target drive quantity within each control cycle, that is, adding the two together to obtain the comprehensive drive control quantity for this cycle. This synthesis result is used to subsequently determine the instantaneous magnitude and direction of the PWM output, thereby achieving a composite output of sweep and vibration in the same motor drive link. To ensure output safety and drive consistency, the synthesized target drive quantity can be limited and its sign processed in subsequent steps to ensure it meets the allowable PWM range of the drive circuit and maintains clear commutation logic.

[0053] The technical solution implemented in this embodiment can unify the control processes of sweeping and vibration, two different dynamic characteristics, into a periodic generation mechanism of "step update + threshold flip". This allows low-overhead operations such as addition, subtraction, comparison, and direction switching to be performed mainly in each control cycle during operation, thereby significantly reducing the real-time computing power requirement and improving the execution determinism in short control cycles. At the same time, by superimposing and synthesizing the sweeping and vibration components, the motor can achieve composite output of sweeping and vibration under the same drive frame. Since the upper limit of amplitude and step parameters have been determined in the pre-calculation stage, the waveform generation during operation is more stable and it is easier to maintain consistency after mode switching, reducing the risk of PWM jitter and control discontinuity.

[0054] Furthermore, the S40 includes: S41. Within each control cycle, the sweep component control value and the vibration component control value are superimposed to obtain the target driving quantity. In this step, it should be noted that this embodiment employs a direct superposition strategy for the sweep component control value and the vibration component control value within each control cycle, adding the control values ​​of both at the same time to obtain the target driving quantity. This target driving quantity can be understood as the equivalent PWM control quantity expected to be applied to the motor drive in this cycle, simultaneously carrying the low-frequency oscillation trend of sweeping and the high-frequency excitation component of vibration, thereby achieving a combined sweep and vibration output under the same drive link. Since the superposition operation is merely an addition operation, combined with the component control values ​​obtained through the aforementioned step update or table lookup, the synthesis calculation can be completed within a short control cycle, avoiding the introduction of complex waveform synthesis or filtering operations.

[0055] S42. Limit the amplitude of the target driving quantity to ensure it does not exceed the preset PWM output range, thus using it as the target PWM value for the PWM driving signal. In this step, it should be noted that the superimposed target driving quantity may exceed the output range allowed by the drive circuit or PWM counter due to the superposition of sweep and vibration components at their peak values. Therefore, amplitude limiting is necessary to ensure output safety and consistency. Amplitude limiting can be implemented using a saturation limiting method: when the amplitude of the target driving quantity is greater than the preset PWM output upper limit, it is limited to the upper limit; when the amplitude of the target driving quantity is less than the allowable range, it remains unchanged. This process is preferably implemented through comparison operations (e.g., comparing the target driving quantity with the upper limit threshold), which is a low-computing-power operation. Furthermore, the result after limiting is used as the target PWM value input to subsequent direction determination and switching device drive output steps, thereby avoiding distortion, abnormal heating, or protection triggering caused by overdrive.

[0056] The technical solution implemented in this embodiment can achieve the composite synthesis of sweeping and vibration control quantities through simple superposition operations in each control cycle, thereby obtaining the target driving quantity without increasing complex calculations. Furthermore, by limiting the target driving quantity, the target PWM value is always kept within the preset PWM output range, improving the safety and controllability of the PWM output and reducing the risk of overdrive caused by peak superposition. Simultaneously, both superposition and limiting can be completed using low-complexity operations such as addition and comparison, further ensuring real-time performance and stability within short control cycles and reducing output jitter and waveform discontinuities after mode switching.

[0057] Furthermore, the generation and processing of the target driving quantity within each control cycle are implemented using low-computing-power computation, including: The sign of the target driving quantity is determined to obtain the direction indicator. When the target driving quantity is less than 0, its inverse is taken to obtain the target PWM amplitude. When the target driving quantity is greater than or equal to 0, it is taken as the target PWM amplitude.

[0058] The target PWM amplitude is compared with the preset PWM upper limit value to perform amplitude limiting, and the PWM duty cycle corresponding to the target PWM amplitude is output after amplitude limiting.

[0059] In each control cycle, only addition, subtraction, taking the opposite number, comparison operations, and / or table lookup operations are performed to reduce the computational load of cycle control.

[0060] This implementation uniformly expresses the "direction information" and "amplitude information" of the target driving quantity as signed numbers in each control cycle, thereby enabling direction determination and PWM amplitude acquisition with minimal basic computation. Specifically, the controller first determines the sign of the target driving quantity to obtain a direction flag: when the target driving quantity is less than 0, the direction flag indicates reverse driving, and the inverse of the target driving quantity (equivalent to 0 minus the target driving quantity) is taken to obtain the target PWM amplitude; when the target driving quantity is greater than or equal to 0, the direction flag indicates forward driving, and the target PWM amplitude is directly taken from the target driving quantity itself. Subsequently, the target PWM amplitude is compared with a preset PWM upper limit value and saturation limiting is performed: if the target PWM amplitude exceeds the upper limit, it is clamped to the upper limit; otherwise, it remains unchanged. The limited target PWM amplitude is used to generate the PWM duty cycle (e.g., converted to the corresponding duty cycle value according to the PWM counting reference or timer period) and output to the subsequent drive circuit control logic.

[0061] To further adapt to resource-constrained processors and ensure execution within short control cycles, this implementation method relies only on basic operations such as addition, subtraction, taking the opposite number, and comparison within each control cycle. For steps such as duty cycle conversion, scaling, or index updates, the required values ​​can be obtained by looking up tables based on pre-calculation results. When fixed-rate scaling is involved, shift operations are used instead of multiplication and division operations, thereby avoiding the introduction of high-overhead arithmetic operations during runtime.

[0062] The technical solution implemented in this embodiment can unify the direction determination, amplitude extraction, and amplitude limiting of the target driving quantity into a low-complexity process such as sign judgment, inversion, and threshold comparison. This makes the critical calculation path within each control cycle predictable and time-consuming, significantly reducing the dependence on processor computing power and hardware multiplication and division capabilities, thus making it easier to meet the real-time control requirements of short control cycles. At the same time, by ensuring that the PWM output does not go out of bounds through saturation limiting, and by achieving stable commutation control in conjunction with the direction flag, the risk of jitter caused by overdrive and waveform abrupt changes can be reduced, improving the stability and consistency of the sweep composite output, and helping to maintain the continuity and reliability of control behavior when switching modes or changing parameters.

[0063] Furthermore, the PWM drive signal output in S50 corresponding to the target drive amplitude includes: S51. Determine the driving direction based on the sign of the target driving quantity. When the target driving quantity is positive, determine the first driving direction; when the target driving quantity is negative, determine the second driving direction. In this step, it should be noted that the controller uses the sign of the target driving quantity as the most direct direction criterion, thus avoiding additional direction calculations. Specifically, when the target driving quantity is positive, it corresponds to the first driving direction; when the target driving quantity is negative, it corresponds to the second driving direction. This direction determination result can be represented by a direction flag bit, and together with the subsequent PWM amplitude, constitutes the core control quantity for the drive output. Since sign determination is a simple comparison operation, it can be stably executed within a short control cycle, maintaining consistency with the aforementioned low-computation processing chain of "only addition / subtraction / comparison / inversion / table lookup".

[0064] S52. Select the upper or lower switching device in the motor drive circuit to be turned on according to the driving direction. Specifically, in the first driving direction, the upper switching device is turned on and the lower switching device is turned off; in the second driving direction, the lower switching device is turned on and the upper switching device is turned off. In this step, it should be noted that the motor drive circuit preferably adopts a switching bridge arm structure that includes both upper and lower switching devices (e.g., one arm of a half-bridge / full-bridge composed of upper and lower MOS). The controller selects the corresponding device to be turned on according to the driving direction obtained in S51 to achieve the switching of the motor terminal voltage polarity: in the first driving direction, the upper switching device is turned on and the lower switching device is turned off; in the second driving direction, the lower switching device is turned on and the upper switching device is turned off. This method directly completes direction control using the on / off state of the hardware switch, decoupling the direction switching from the PWM output: the direction is determined by the on / off device, and the amplitude is determined by the PWM duty cycle, thereby simplifying the control logic and reducing the probability of errors.

[0065] S53. Generate a PWM duty cycle according to the amplitude of the target driving quantity and output it to the activated switching device to drive the magnetic levitation motor. In this step, it should be noted that the controller generates the PWM duty cycle based on the amplitude of the target driving quantity and loads this PWM output onto the selected activated switching device in S52 to form the actual drive for the motor. The duty cycle can be generated directly using the "target PWM amplitude" as the PWM count comparison value (e.g., corresponding to the timer period / count upper limit), or by looking up a table / proportional conversion to obtain the corresponding PWM duty cycle parameter. To meet low computational requirements, it is preferable to use a lookup table or simple proportional mapping during operation to avoid complex multiplication and division operations. By outputting the PWM duty cycle to the selected switching device, the motor obtains driving energy matching the amplitude of the target driving quantity, thereby achieving the instantaneous driving torque output required for the combined sweeping and vibration control.

[0066] The technical solution implemented in this embodiment can quickly determine the driving direction using the sign of the target driving quantity, and switch the motor driving polarity by selecting the upper / lower switching devices, making the direction control path simple and fast-responding. Simultaneously, a PWM duty cycle is generated based on the amplitude of the target driving quantity and output to the corresponding switching devices, making amplitude modulation and direction switching independent and the control more stable. Combined with the aforementioned low-computational-power amplitude extraction and limiting processing, this implementation can reliably complete direction determination, switching device selection, and PWM output within a short control cycle, reducing computational pressure and control jitter risk during operation, and improving the real-time performance and consistency of the magnetic levitation motor sweep vibration composite drive.

[0067] Furthermore, in S52, the selection of the upper or lower switching device includes: S54. Before switching from an on top switch to an on bottom switch, or from an on bottom switch to an on top switch, first turn off the currently on switch. It's important to note in this step that when the drive direction changes or when switching between the on and off switches is required, the controller does not simply "see-saw" turn one on and one off; instead, it first turns off the currently on switch. This turn-off action can be achieved by clearing the corresponding gate drive signal, disabling the PWM output channel, or setting the duty cycle to zero, ensuring the currently on switch reliably enters the off state. This is done to eliminate the risk of overlapping conduction caused by device turn-off delay, drive propagation delay, or incomplete gate charge release, creating a time window for the subsequent safe turn-on of devices in the target direction.

[0068] S55. Insert a preset dead time after shutdown. In this step, it should be noted that after shutting down the currently active device, the controller inserts a preset dead time. The dead time is used to cover the inherent delay difference between the upper and lower switching devices during the shutdown / turn-on process, ensuring that neither device is simultaneously active at any given time. The dead time can be implemented by a timer or by keeping both devices off for several control cycles; its value can be set according to the device switching speed, gate drive capability, and system safety margin, and can be found in the specific implementation parameters in the instruction manual.

[0069] S56. After the dead time ends, the switching device corresponding to the target direction is turned on to avoid shoot-through between the upper and lower switching devices. In this step, it should be noted that after the dead time ends, the controller turns on the switching device corresponding to the target direction again and restores the PWM duty cycle applied to the drive channel of that device, thereby achieving smooth and safe direction switching. Through the three-stage process of "first turn off—insert dead time—then turn on," no shoot-through current path is generated between the upper and lower switching devices, avoiding instantaneous short circuits in the drive power supply, reducing device heating, EMI impact, and reliability risks. It also helps maintain the controllability and consistency of direction switching during the sweep vibration composite control process.

[0070] The technical solution implemented in this embodiment can introduce a clear turn-off and dead-zone protection process when the upper / lower switching devices switch on, effectively suppressing the overlapping conduction of upper and lower devices caused by device switching delay and drive propagation delay, thereby avoiding shoot-through risk and improving the safety and reliability of the drive circuit. At the same time, this process makes the direction switching process smoother and more controllable, reduces the current surge and output jitter caused by commutation transients, and helps the sweeping composite drive maintain stable output near mode switching or waveform zero crossing and improve the overall lifespan and consistency of the system.

[0071] Furthermore, the pre-calculation of operating parameters also includes: Before the motor enters the running state, at least one set of PWM control sequences for multiple control cycles is pre-generated based on the sweep control parameter set and / or vibration control parameter set, and the PWM control sequences are stored in a lookup table array. It should be noted that, in this embodiment, in addition to generating step-type parameters before the motor enters the running state, the "PWM values ​​to be used in each control cycle during operation" can be further pre-processed offline as sequence data. Specifically, the controller, based on the sweep control parameter set and / or vibration control parameter set, discretizes or iteratively generates the target waveform according to a preset control cycle to obtain a PWM control sequence covering multiple control cycles, and writes this PWM control sequence into a lookup table array. The PWM control sequence can be generated only for the sweep component, only for the vibration component, or two sets of sequences can be generated simultaneously for both the sweep and vibration components; alternatively, a "synthesized target PWM sequence" can be generated to further reduce the computational load during operation. In this way, the increasing and decreasing process of "current sweep cycle value / current vibration cycle value" no longer needs to be maintained online during operation; instead, storage is used to convert computational power.

[0072] In each control cycle, the runtime control reads the corresponding PWM value from the lookup table array via a lookup table to generate sweep component control values ​​and / or vibration component control values. This replaces the online calculation of sweep period and / or vibration period values. The runtime control updates the lookup table index or counter in each control cycle to locate the corresponding PWM value in the lookup table array. It should be noted that after entering runtime control, the controller updates the lookup table index or counter in each control cycle (e.g., the index increments and wraps back after reaching the end of the sequence), and reads the corresponding PWM value from the lookup table array based on this index to directly generate the sweep component control values ​​and / or vibration component control values, thus replacing the online calculation of sweep period and / or vibration period values. To adapt to different frequencies or sweep speeds, the update step size of the lookup table index can be determined in the pre-calculation stage, or implemented by switching PWM sequences of different lengths / sampling densities in different modes; thus, without increasing the computational complexity during runtime, it balances multi-mode output requirements and waveform accuracy.

[0073] Furthermore, when scaling operations are involved in pre-computation or lookup index calculations, shift operations are used to implement division and / or multiplication to adapt to processors without multipliers and / or dividers and reduce the computational load during runtime. It should be noted that when generating PWM control sequences during the pre-computation stage or updating lookup indexes during runtime, if scaling (e.g., normalization of fixed ratios, step size conversion, or duty cycle mapping) is involved, shift operations can be used to implement division and / or multiplication to avoid performing high-overhead multiplication and division operations on resource-constrained processors. Division of fixed ratio constants can be achieved by right-shifting the corresponding number of bits, thereby completing scaling conversions with lower instruction overhead and improving the timing margin of control per cycle.

[0074] The technical solution implemented in this embodiment can pre-define the PWM variation law of sweeping / vibration into a lookup table array before operation. This allows the required PWM value to be obtained in each control cycle during operation through "index update + table lookup," significantly reducing reliance on online step iteration, waveform generation, and complex calculations. This further reduces the computational load of cycle control and improves the determinism of execution under short control cycles. Simultaneously, by using shifting to achieve proportional scaling, it can adapt to processors without multipliers and / or dividers, improving the efficiency and consistency of PWM mapping and index updates in different modes. Overall, this solution leverages storage computing power to reduce the risk of PWM output jitter and computation timeouts, and is beneficial for maintaining the stability and repeatability of the sweeping / vibration composite output in multi-level / multi-mode switching scenarios.

[0075] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A sweeping vibration control method applied to a magnetic levitation motor, characterized in that, include: S10. Receive power-on signal and / or shift signal and / or mode switching signal, and collect sweep control parameters and vibration control parameters corresponding to the current mode; S20. Based on the sweeping control parameters and vibration control parameters, perform pre-calculation of operating parameters to obtain the sweeping control parameter set and vibration control parameter set for subsequent periodic control; S30. Perform the operation cycle control cyclically according to the preset control cycle, generate sweeping component control values ​​based on the sweeping control parameter set, and generate vibration component control values ​​based on the vibration control parameter set. S40. Combine the sweeping component control value and the vibration component control value to obtain the target driving amount; S50. Determine the motor driving direction based on the sign of the target driving quantity, and output a PWM driving signal corresponding to the amplitude of the target driving quantity; The sweeping control parameter set and the vibration control parameter set include at least step-type parameters and / or lookup table-type parameters for updating the PWM within the control cycle, and the running cycle control completes the PWM adjustment based on the pre-calculated results within each control cycle.

2. The sweeping vibration control method applied to a magnetic levitation motor according to claim 1, characterized in that, S10 includes: S11. Receive user key input, host computer instructions or control signals and parse them to obtain the mode / gear identifier; S12. Using the mode / gear identifier as an index, query a preset mode parameter table to obtain parameter records corresponding to the mode / gear identifier. The parameter records include at least the vibration force coefficient, sweeping angle coefficient, vibration frequency, and sweeping speed. S13. Based on the vibration force coefficient, determine the vibration-related amplitude control parameters, based on the sweeping angle coefficient, determine the sweeping-related amplitude control parameters, based on the vibration frequency, determine the vibration-related period control parameters, and based on the sweeping speed, determine the sweeping-related period control parameters, thereby forming the sweeping control parameters and the vibration control parameters, and output the sweeping control parameters and the vibration control parameters to the operation parameter pre-calculation step for use.

3. The sweeping vibration control method applied to a magnetic levitation motor according to claim 2, characterized in that, The parameter record also includes a preset scaling factor and / or a preset constant field for reducing the amount of calculation during operation. S13 converts the vibration force coefficient, sweeping angle coefficient, vibration frequency and sweeping speed into the amplitude control parameter and period control parameter based on the preset scaling factor and / or preset constant field.

4. The sweeping vibration control method applied to a magnetic levitation motor according to claim 2, characterized in that, The pre-calculation in S20 includes: S21. Obtain the preset control cycle time and PWM maximum value parameters; S22. Based on the vibration force coefficient and the maximum PWM value parameter, calculate the maximum PWM value of the vibration period, and calculate the vibration step value based on the vibration frequency and the control cycle time. S23. Based on the sweeping angle coefficient and the maximum PWM value parameter, calculate the maximum PWM value of the sweeping cycle, and calculate the sweeping step value based on the sweeping speed and the maximum PWM value of the sweeping cycle. S24. Store the maximum PWM value of the vibration period, the vibration step value, the maximum PWM value of the sweeping period, and the sweeping step value as step-type parameters in the vibration control parameter set and the sweeping control parameter set.

5. The sweeping vibration control method for magnetic levitation motors according to claim 4, characterized in that, The S30 step of cyclically executing the operation cycle control according to the preset control cycle includes: S31. In each control cycle, read the sweep step value and the maximum PWM value of the sweep cycle from the sweep control parameter set, update the current sweep cycle value by incrementing or decrementing according to the sweep step value, and switch the update direction when the current sweep cycle value reaches the maximum PWM value of the sweep cycle or its opposite, so as to generate sweep component control value. S32. In each control cycle, read the vibration step value and the maximum PWM value of the vibration cycle from the vibration control parameter set, update the current vibration cycle value by incrementing or decrementing according to the vibration step value, and switch the update direction when the current vibration cycle value reaches the maximum PWM value of the vibration cycle or its opposite, so as to generate vibration component control values. S33. In each control cycle, the sweeping component control value and the vibration component control value are combined to form the target driving quantity.

6. The sweeping vibration control method for a magnetic levitation motor according to claim 5, characterized in that, S40 includes: S41. In each control cycle, the sweeping component control value and the vibration component control value are superimposed to obtain the target driving amount; S42. Limit the amplitude of the target driving quantity so that it does not exceed the preset PWM output range, and use it as the target PWM value of the PWM driving signal.

7. The sweeping vibration control method for a magnetic levitation motor according to claim 6, characterized in that, The generation and processing of the target driving quantity in each control cycle are implemented using low-computing-power computation, including: The target driving quantity is sign-determined to obtain a direction flag. When the target driving quantity is less than 0, its inverse is taken to obtain the target PWM amplitude. When the target driving quantity is greater than or equal to 0, it is taken as the target PWM amplitude. The target PWM amplitude is compared with a preset PWM upper limit value to perform amplitude limiting, and the PWM duty cycle corresponding to the target PWM amplitude is output after amplitude limiting. In each control cycle, only addition, subtraction, taking the opposite number, comparison operations, and / or table lookup operations are performed to reduce the computational load of cycle control.

8. The sweeping vibration control method for a magnetic levitation motor according to claim 7, characterized in that, The PWM drive signal output in S50 corresponding to the target drive amplitude includes: S51. Determine the driving direction according to the sign of the target driving quantity. When the target driving quantity is positive, determine the first driving direction. When the target driving quantity is negative, determine the second driving direction. S52. Select the upper switch device or the lower switch device in the motor drive circuit according to the driving direction, wherein the upper switch device is turned on and the lower switch device is turned off in the first driving direction, and the lower switch device is turned on and the upper switch device is turned off in the second driving direction. S53. Generate a PWM duty cycle according to the amplitude of the target driving quantity and output it to the turned-on switching device to drive the magnetic levitation motor to run.

9. The sweeping vibration control method for a magnetic levitation motor according to claim 8, characterized in that, The selection of the upper or lower switching device in S52 includes: S54. Before switching from an on upper switch device to an on lower switch device, or from an on lower switch device to an on upper switch device, the currently on switch device shall be turned off first. S55. Insert a preset dead time after shutdown; S56. After the dead time ends, the switching device corresponding to the target direction is turned on to avoid direct connection between the upper and lower switching devices.

10. The sweeping vibration control method for a magnetic levitation motor according to claim 9, characterized in that, The pre-calculation of operating parameters also includes: Before the motor enters the running state, at least one set of PWM control sequences for multiple control cycles is pre-generated based on the sweep control parameter set and / or the vibration control parameter set, and the PWM control sequences are stored in a lookup table array; The operation cycle control reads the corresponding PWM value from the lookup table array in each control cycle by looking up the table to generate the sweep component control value and / or the vibration component control value, thereby replacing the online calculation of the sweep cycle value and / or the vibration cycle value. The operation cycle control updates the lookup table index or counter in each control cycle to locate the corresponding PWM value in the lookup table array. Furthermore, when scaling operations are involved in the pre-calculation or the table lookup index calculation, shift operations are used to implement division and / or multiplication in order to adapt to processors that do not have multipliers and / or dividers and reduce the amount of computation during operation.