A control method, device and equipment for recording the magnet adjustment process of a motor and a medium

CN122908664APending Publication Date: 2026-10-13SICHUAN JIULI INTELLIGENT DRIVE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611330342.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0003]然而,记忆电机在d轴脉冲调磁过程中,永磁体磁链突变引发反电动势冲击,导致转速出现剧烈波动,现有滑模速度控制器采用固定参数的趋近律增益和滑模面系数,无法根据磁链的实时变化动态调整控制参数,使得控制器在调磁冲击发生时仍以常规运行参数工作,难以在冲击初始阶段提供足够的抑制力矩

Benefits of technology

[0044]通过使磁链变化量的获取、滑模控制器参数的更新以及脉冲扰动观测通道的激活三者均以调磁触发信号为基准在同一中断服务程序内完成,使控制器在调磁冲击发生的初始阶段即完成参数重构。磁链变化量在调磁脉冲注入的同一控制周期内通过磁链观测器积分运算获得,该磁链变化量直接用于趋近律增益的调制,其中第二增益分量随磁链变化率动态增大,使控制器在磁链快速变化阶段输出更强的抑制力矩;滑模面系数在调磁触发瞬间从基值跃升至预设瞬态值,使滑模面中转速误差的权重在冲击初始时刻达到最大,随后随调磁进程按指数规律平滑衰减至基值,避免稳态抖振;脉冲扰动观测通道在调磁触发的同时被激活,其增益高于持续运行的负载扰动观测通道,使脉冲扰动观测值在冲击发生后数个控制周期内快速建立;磁链变化量同时用于计算电压前馈补偿量并叠加至电流环输出端。上述手段在冲击初始阶段形成滑模面系数跃升以增强转速误差敏感度、趋近律增益随磁链变化率动态提升以增强抑制力矩、脉冲观测通道快速建立以提供补偿、电压前馈同步注入以抵消反电动势突变的四重协同作用,使控制器在冲击初始阶段即具备与磁链变化状态匹配的抑制能力,实现调磁过程中转速的平稳过渡。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122908664A_ABST
    Figure CN122908664A_ABST
Patent Text Reader

Abstract

The present application relates to the field of motor control, and particularly relates to a control method, device, equipment and medium for memory motor magnet adjusting process. When the controller obtains a magnet adjusting trigger signal, an interrupt service program is entered, a magnet adjusting current pulse is injected into a direct axis current loop of the memory motor, and a flux linkage observer based on a stator voltage model is started in the interrupt service program, and a flux linkage change amount is obtained through integral operation. A reaching law gain of a sliding mode speed controller is updated according to the flux linkage change amount, and a sliding mode surface coefficient of the sliding mode speed controller is updated according to a timing and a timing cumulative value as an independent variable according to a monotonically decreasing law. A torque current instruction is calculated according to the reaching law gain and the sliding mode surface coefficient. A total current instruction is obtained according to the torque current instruction, a load disturbance compensation amount and a pulse disturbance compensation amount, and the total current instruction is input into a current loop of the memory motor to realize dynamic control of the memory motor magnet adjusting process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of motor control, and specifically to a control method, device, equipment, and medium for the magnetic adjustment process of a memory motor. Background Technology

[0002] A memory motor is a variable flux motor whose rotor uses low-coercivity permanent magnets. By applying brief direct-axis current pulses to the stator windings, the magnetization state of the permanent magnets can be changed, achieving bidirectional adjustment of the air gap magnetic field strength. After the pulse is removed, the permanent magnets stably maintain the new magnetization state. Compared to traditional permanent magnet synchronous motors, memory motors can actively reduce the permanent magnet flux linkage during high-speed operation to suppress the rise in back electromotive force, thereby avoiding a significant drop in efficiency.

[0003] However, during the d-axis pulse magnetization process of the memory motor, the sudden change in the permanent magnet flux linkage triggers a back electromotive force impact, resulting in drastic fluctuations in speed. Existing sliding mode speed controllers use fixed parameters for the reaching law gain and sliding surface coefficient, which cannot dynamically adjust the control parameters according to the real-time changes in flux linkage. This causes the controller to continue operating with normal parameters when the magnetization impact occurs, making it difficult to provide sufficient suppression torque in the initial stage of the impact. Summary of the Invention

[0004] The purpose of this invention is to provide a control method, device, equipment and medium for the magnetization process of a memory motor, which solves the problems in the prior art.

[0005] This invention is achieved through the following technical solution:

[0006] In a first aspect, embodiments of the present invention provide a control method for the magnetization process of a memory motor, comprising:

[0007] When the controller receives the magnetization trigger signal, it enters the interrupt service routine, injects the magnetization current pulse into the direct-axis current loop of the memory motor, and at the same time starts the flux linkage observer based on the stator voltage model in the interrupt service routine, and obtains the flux linkage change through integration calculation.

[0008] Based on the change in flux linkage, update the reaching law gain of the sliding mode speed controller. At the same time, start timing based on the magnetic adjustment trigger signal, and update the sliding surface coefficient of the sliding mode speed controller with the accumulated timing value as the independent variable according to the monotonically decreasing law.

[0009] The torque current command is calculated based on the approach law gain and the sliding surface coefficient.

[0010] The total current command is obtained based on the torque current command, the load disturbance compensation output from the load disturbance observation channel, and the pulse disturbance compensation output from the pulse disturbance observation channel. The pulse disturbance observation channel is enabled by the magnetization trigger signal, and the load disturbance observation channel runs continuously during the operation of the memory motor.

[0011] The total current command is input to the current loop of the memory motor to control the magnetization process of the memory motor.

[0012] Preferably, within the interrupt service routine, a flux linkage observer based on the stator voltage model is initiated, and the flux linkage change is obtained through integration, including:

[0013] The flux linkage observer obtains the flux linkage change through integration calculation based on the real-time collected stator voltage, stator current, and current change rate.

[0014] The flux change rate is obtained from the ratio of the flux change to the control cycle.

[0015] The reaching law gain is updated based on the change in flux linkage and the rate of change in flux linkage.

[0016] Preferably, the reaching law gain includes a first gain component and a second gain component; the first gain component is according to... Update, the second gain component according to renew;

[0017] in, , For the preset base value, , For the pre-set coefficients, This represents the change in magnetic flux. The flux linkage rate;

[0018] The reaching law used in the sliding mode speed controller is: ,in, For sliding surface, It is an inverse hyperbolic sine function.

[0019] Preferably, the sliding surface coefficients of the sliding speed controller are updated using the accumulated timing value as the independent variable according to a monotonically decreasing law, including:

[0020] The timing is accumulated starting from zero by taking the arrival time of the magnetic trigger signal as the starting point for timing;

[0021] Based on the accumulated timing value, the sliding surface coefficient is updated according to the law of exponential decay from the preset transient value at the moment of magnetic triggering to the preset base value. for:

[0022] ,

[0023] in As a preset base value, For the pre-set increment coefficient, This is the cumulative value of the time. A pre-set time constant;

[0024] When the accumulated time value reaches a preset multiple of the time constant, it is determined that the sliding surface coefficient has decreased to the preset base value, the sliding surface coefficient is stopped from being updated, and the sliding surface coefficient is maintained at the preset base value.

[0025] Preferably, the torque current command is calculated based on the reaching law gain and the sliding mode coefficient, including:

[0026] Obtain speed commands and memorize the actual motor speed;

[0027] The speed error is obtained by the difference between the speed command and the actual speed;

[0028] The rate of change of speed error is obtained by dividing the difference in speed error between two adjacent control cycles by the control cycle.

[0029] The sliding surface is obtained by adding the product of the sliding surface coefficient and the rotational speed error to the rate of change of the rotational speed error;

[0030] Based on the approaching law gain, sliding surface, and motor parameters of the memory motor, the torque current command is calculated according to the approaching law of the sliding speed controller.

[0031] Preferably, the gain of the pulse perturbation observation channel Gain of the load disturbance observation channel Between .

[0032] Preferably, the method further includes:

[0033] The voltage feedforward compensation is calculated based on the change in magnetic flux and the rotational speed of the memory motor at the current moment. The direct-axis component of the voltage feedforward compensation is calculated according to... The quadrature component in the voltage feedforward compensation is obtained according to... Received, among which For rotational speed, This represents the change in magnetic flux linkage;

[0034] The voltage feedforward compensation is superimposed on the output of the current loop.

[0035] Secondly, embodiments of the present invention provide a control device for the magnetizing process of a memory motor, comprising:

[0036] The injection module is used to inject a magnetizing current pulse into the direct-axis current loop of the memory motor when the controller receives the magnetizing trigger signal and enters the interrupt service routine. At the same time, the magnetizing flux observer based on the stator voltage model is started in the interrupt service routine, and the change in magnetizing flux is obtained through integration.

[0037] The update module is used to update the reaching law gain of the sliding mode speed controller according to the change in magnetic flux, and at the same time, it starts timing according to the magnetic adjustment trigger signal, and updates the sliding surface coefficient of the sliding mode speed controller with the accumulated timing value as the independent variable according to the monotonically decreasing law.

[0038] The calculation module is used to calculate the torque current command based on the reaching law gain and the sliding surface coefficient;

[0039] The compensation module is used to obtain the total current command based on the torque current command, the load disturbance compensation amount output by the load disturbance observation channel, and the pulse disturbance compensation amount output by the pulse disturbance observation channel. The pulse disturbance observation channel is enabled by the magnetization trigger signal, and the load disturbance observation channel runs continuously during the operation of the memory motor.

[0040] The input module is used to input the total current command to the current loop of the memory motor to control the magnetization process of the memory motor.

[0041] Thirdly, embodiments of the present invention provide an electronic device, including: at least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method of the first aspect described above.

[0042] Fourthly, embodiments of the present invention provide a storage medium storing computer program instructions, which, when executed by a processor, implement the method of the first aspect described above.

[0043] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0044] By ensuring that the acquisition of flux linkage change, the updating of sliding mode controller parameters, and the activation of the pulse disturbance observation channel are all completed within the same interrupt service routine based on the magnetization trigger signal, the controller can reconstruct its parameters at the initial stage of the magnetization impact. The flux linkage change is obtained through integration by the flux linkage observer within the same control cycle of the magnetization pulse injection. This flux linkage change is directly used for modulation of the reaching law gain, where the second gain component dynamically increases with the flux linkage change rate, enabling the controller to output a stronger suppression torque during the rapid flux linkage change phase. The sliding mode surface coefficient jumps from its base value to a preset transient value at the moment of magnetization trigger, maximizing the weight of the speed error in the sliding mode surface at the initial moment of the impact, and then smoothly decays to its base value exponentially as the magnetization process progresses, avoiding steady-state chattering. The pulse disturbance observation channel is activated simultaneously with the magnetization trigger, and its gain is higher than that of the continuously running load disturbance observation channel, allowing the pulse disturbance observation value to be quickly established within several control cycles after the impact. The flux linkage change is also used to calculate the voltage feedforward compensation and superimposed on the current loop output. The above-mentioned methods form a four-fold synergistic effect in the initial stage of impact: a leap in the sliding surface coefficient to enhance the sensitivity to speed error; a dynamic increase in the approaching law gain with the flux change rate to enhance the suppression torque; rapid establishment of the pulse observation channel to provide compensation; and synchronous injection of voltage feedforward to counteract the sudden change in back EMF. This enables the controller to have the suppression capability that matches the flux change state in the initial stage of impact, and achieves a smooth transition of speed during the magnetic adjustment process. Attached Figure Description

[0045] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:

[0046] Figure 1 A flowchart illustrating the control method for the magnetization process of a memory motor provided by the present invention;

[0047] Figure 2 A schematic diagram of the control device for the magnetization process of the memory motor provided by the present invention;

[0048] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.

[0050] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0051] It should be noted that all actions involving the acquisition of signals, information, or data in this invention are carried out in compliance with the relevant data protection laws and regulations of the locality and with authorization from the owner of the relevant device.

[0052] Example 1

[0053] Please see Figure 1 This invention provides a control method for the magnetization process of a memory motor, comprising:

[0054] S1. When the controller receives the magnetization trigger signal, it enters the interrupt service routine, injects the magnetization current pulse into the direct-axis current loop of the memory motor, and at the same time starts the flux linkage observer based on the stator voltage model in the interrupt service routine, and obtains the flux linkage change through integration calculation.

[0055] In the memory motor control system, the controller receives external magnetization commands through a hardware interrupt pin or a communication bus, and initiates the corresponding control process after detecting the valid edge of the magnetization trigger signal.

[0056] The magnetization trigger signal is generated by the host computer or internal logic, and its form is a digital level transition edge or a flag bit in the bus communication message. When the controller detects a valid edge of this signal, it uses it as a timing reference to synchronize the execution time of all subsequent control actions.

[0057] An interrupt service routine is a specific program segment that the controller executes in response to an interrupt request. Upon detecting a magnetization trigger signal, the controller suspends the currently executing regular control loop task, saves the program context, and jumps to the entry address of the interrupt service routine bound to the magnetization trigger signal to begin execution. During the execution of the interrupt service routine, the controller no longer responds to other low-priority interrupt requests.

[0058] The direct-axis current loop is a closed-loop control circuit in the vector control architecture responsible for adjusting the direct-axis component of the stator current. Its output determines the direct-axis voltage component applied by the inverter to the motor stator windings. The controller applies a magnetizing current pulse to the stator windings through the direct-axis current loop. The amplitude of this current pulse is positive or negative, which is used to change the strength of the external magnetic field around the permanent magnet.

[0059] The magnetizing current pulse is a specific current waveform used to change the flux linkage state of the permanent magnet. Its amplitude and duration are predetermined by the target flux linkage value and the material properties of the permanent magnet. At the beginning of the interrupt service routine, the controller sends the amplitude command of this current pulse to the given terminal of the direct-axis current loop, and the current loop adjusts the stator current to the target amplitude according to the preset rise rate.

[0060] The flux linkage observer based on the stator voltage model uses the stator voltage equation to inversely deduce the permanent magnet flux linkage from electrical quantities. Its input quantities are the stator reference voltage, stator current, and current change rate. The controller synchronously enables the observer within the interrupt service routine, allowing it to begin operation within the same interrupt cycle after the establishment of the magnetizing current pulse.

[0061] Integration is the mathematical method by which flux linkage observers quantify the change in flux linkage. The controller accumulates the difference between the stator reference voltage and the voltage drops of the resistor and inductor over time, and the accumulated result is the change in the permanent magnet flux linkage within the integration interval.

[0062] The flux linkage change is defined as the difference between the permanent magnet flux linkage value at the end of the integration interval and the permanent magnet flux linkage value at the beginning. Its positive and negative values ​​correspond to magnetization and demagnetization operations, respectively, and its absolute value determines the gain reconstruction amplitude and feedforward compensation amplitude of the subsequent controller.

[0063] Specifically, after entering the interrupt service routine, the controller sends a magnetizing current pulse amplitude command to the direct-axis current loop to establish a direct-axis current in the stator windings, thereby applying a magnetic field in the demagnetizing or magnetizing direction at the location of the permanent magnet. Simultaneously, within the interrupt service routine, a flux linkage observer based on the stator voltage model is initiated. This observer performs integration calculations using stator voltage and stator current data collected during the current control cycle. After the magnetizing current pulse is established, the stator current changes, and the voltage drop across the resistor and the induced electromotive force in the inductor change accordingly. The observer integrates the difference between the stator reference voltage and the voltage drops across the resistor and inductor within the time window corresponding to the interrupt service routine to obtain the change in the permanent magnet flux linkage within that time window. The calculation of this flux linkage change and the establishment of the magnetizing current pulse occur within the same interrupt service routine, and the time offset between them is compressed to the order of the inherent instruction cycle of the interrupt response and program execution. The controller is thus able to obtain a value reflecting the degree of change in flux linkage in real time during the process of changing the flux linkage state of the permanent magnet by the magnetic current pulse. This value serves as the input for subsequent control parameter adjustments, so that parameter adjustments and changes in flux linkage state are completed under the same timing reference.

[0064] In some implementations, a flux linkage observer based on the stator voltage model is initiated within the interrupt service routine, and the flux linkage change is obtained through integration, including:

[0065] The flux linkage observer obtains the flux linkage change through integration calculation based on the real-time collected stator voltage, stator current, and current change rate.

[0066] The flux change rate is obtained from the ratio of the flux change to the control cycle.

[0067] The reaching law gain is updated based on the change in flux linkage and the rate of change in flux linkage.

[0068] Within the interrupt service routine, after the controller enables the flux linkage observer, the observer begins quantifying the flux linkage change. Real-time acquisition refers to obtaining the instantaneous values ​​of the current voltage and current of the stator windings via an analog-to-digital converter within the control cycle. This process is hardware-triggered and synchronized to ensure that the sampling time is aligned with the start of the control cycle. The stator voltage is the instantaneous voltage applied by the inverter to the ends of the motor stator windings, and the stator current is the instantaneous current flowing through the stator windings, with the current change rate being the change in stator current per unit time. These three electrical quantities together constitute all the input terms of the stator voltage equation, reflecting complete information about the voltage balance relationship in the stator windings.

[0069] The control cycle is the time interval between the controller performing one complete vector control operation, which is determined by the pulse width modulation carrier frequency.

[0070] The flux linkage change rate is the derivative of the flux linkage change with respect to time, representing the rate of change of flux linkage per unit time. During magnetization, the absolute value of the flux linkage change rate reflects the speed at which the permanent magnet domains turn. The controller obtains the flux linkage change rate by dividing the difference between the flux linkage change obtained in the current control cycle and the flux linkage change obtained in the previous control cycle by the control cycle duration.

[0071] Specifically, the flux linkage observer performs integral calculations using the stator voltage and stator current data collected during the current control cycle. It accumulates the difference between the stator reference voltage and the voltage drop across the resistor and the inductor-induced electromotive force within the time window corresponding to the interrupt service routine, obtaining the change in permanent magnet flux linkage within that time window. After obtaining the flux linkage change, the controller divides it by the duration of the control cycle to obtain the flux linkage rate of change. The application of the tuning current pulse causes a change in the permanent magnet flux linkage. The larger the flux linkage change or the faster the rate of change, the more severe the deviation of the permanent magnet's magnetic circuit state from its original operating point, or the more drastic the change. Correspondingly, the controller needs to output a larger compensation voltage amplitude. The controller simultaneously inputs the calculated flux linkage change and the flux linkage rate of change into the update function of the reaching law gain. The absolute value of the flux linkage change is used to adjust the first component of the gain, and the absolute value of the flux linkage rate of change is used to adjust the second component of the gain. As the absolute value of the flux linkage change or the rate of flux linkage change increases, the gain value increases accordingly, and the equivalent damping and stiffness of the sliding mode control increase synchronously, enabling the control system to have a matching suppression force against back EMF disturbances caused by sudden flux linkage changes. The acquisition of the flux linkage change, the calculation of the flux linkage rate of change, and the update of the reaching law gain are all completed within the same interrupt service routine. The time offset between the three is compressed to the order of the inherent cycle of instruction execution, enabling the controller to simultaneously complete all stages from state perception to control parameter adjustment during the process of changing the permanent magnet flux linkage with the magnetizing current pulse.

[0072] S2. Based on the change in flux linkage, update the reaching law gain of the sliding mode speed controller. At the same time, start timing based on the magnetic adjustment trigger signal, and update the sliding surface coefficient of the sliding mode speed controller according to the monotonically decreasing law with the accumulated timing value as the independent variable.

[0073] Among them, the approach law gain is a control parameter in the sliding mode speed controller used to control the approach speed of the sliding surface. This parameter determines the rate at which the system state variable approaches the sliding surface.

[0074] The greater the change in flux linkage, the more drastic the change in the magnetic field of the permanent magnet, and the stronger the impact on the rotational speed. This requires the controller to output a larger control torque to suppress the speed fluctuation. Therefore, the reaching law gain needs to be dynamically adjusted according to the change in flux linkage.

[0075] The cumulative timing value refers to the total number of control cycles that have elapsed since the effective moment of the magnetization trigger signal. This value is obtained by incrementing the software counter by one in each control cycle.

[0076] The sliding surface coefficient is the proportional term coefficient in the definition of the sliding surface. This coefficient determines the weight distribution of the speed error and its rate of change in the sliding surface. When the sliding surface coefficient is large, the system responds faster to the speed error, but chattering may occur in steady state.

[0077] Specifically, the reaching law gain is adjusted according to the change in flux linkage; the greater the change in flux linkage, the greater the gain, enabling the controller to have a stronger suppression effect when the magnetization impact is strongest. The accumulated timing value starts accumulating from the effective moment of the magnetization trigger signal. This value increases monotonically over time, reflecting the stage of the magnetization process from the initial impact to the gradual transition to a new steady state. The sliding surface coefficient, with the accumulated timing value as the independent variable, changes monotonically from a preset transient high value to a preset steady-state base value. It maintains a high value in the initial stage of magnetization to strengthen the weight of the speed error in the sliding surface, enabling the controller to have rapid convergence capability at the initial moment of impact. It gradually decreases to the steady-state value in the later stage of magnetization transition, avoiding oscillations caused by high gain.

[0078] In some embodiments, the reaching law gain includes a first gain component and a second gain component; the first gain component is according to... Update, the second gain component according to renew;

[0079] in, , For the preset base value, , For the pre-set coefficients, This represents the change in magnetic flux. The flux linkage rate;

[0080] The reaching law used in the sliding mode speed controller is: ,in, For sliding surface, It is an inverse hyperbolic sine function.

[0081] Specifically, the first gain component With the second gain component Both are adjusted in real time based on changes in magnetic flux linkage, but their adjustment criteria differ. When the change in magnetic flux linkage... When the absolute value increases, As it increases, due to When the sliding surface is large, it is approximately equal to ,at this time The device provides a braking force that increases logarithmically with the absolute value of the sliding surface, and this braking force is proportional to the change in flux linkage, adapting to the condition where the flux linkage abrupt change is largest in the initial stage of magnetization impact. When the flux linkage change rate... When the absolute value increases, As it increases, due to The term is proportional to the sliding surface. This exponential reaching term provides adaptive damping with the flux change rate as the sliding surface approaches zero, preventing oscillations that exceed the sliding surface due to parameter abrupt changes during the reaching process. Both gain components increase simultaneously in the initial stage of the tuning pulse injection and then recede to their base values ​​as the flux approaches a new steady state, resulting in different convergence characteristics of the reaching law at different tuning stages. This reaching law uses a continuous approximation in the form of an inverse hyperbolic sine function instead of the switching control in the form of a sign function, eliminating high-frequency switching near the sliding surface.

[0082] In some implementations, the sliding surface coefficients of the sliding speed controller are updated using the accumulated timing value as the independent variable according to a monotonically decreasing law, including:

[0083] The timing is accumulated starting from zero by taking the arrival time of the magnetic trigger signal as the starting point for timing;

[0084] Based on the accumulated timing value, the sliding surface coefficient is updated according to the law of exponential decay from the preset transient value at the moment of magnetic triggering to the preset base value. for:

[0085] ,

[0086] in As a preset base value, For the pre-set increment coefficient, This is the cumulative value of the time. A pre-set time constant;

[0087] When the accumulated time value reaches a preset multiple of the time constant, it is determined that the sliding surface coefficient has decreased to the preset base value, the sliding surface coefficient is stopped from being updated, and the sliding surface coefficient is maintained at the preset base value.

[0088] Among them, the cumulative value of time This refers to the cumulative sum of the number of control cycles elapsed since the activation of the magnetization trigger signal. When the controller detects the magnetization trigger signal, it clears the timing register and executes it in each subsequent control cycle. The cumulative operation, in which To control the cycle.

[0089] Sliding surface coefficient according to It decays exponentially from a preset transient value to a preset base value. This is a preset base value, representing the value that the sliding surface coefficient should maintain after magnetization is completed; The increment coefficient represents the magnitude of the increase in the sliding surface coefficient relative to the base value at the instant of magnetization triggering; As a time constant, it controls the rate of exponential decay. When At this time, the sliding surface coefficient reaches its maximum value. At this point, the weight of the rotational speed error in the sliding surface is the largest, and the controller is most sensitive to the rotational speed deviation; as Increase Gradually decrease, sliding surface coefficient towards base value As the speed decreases monotonically, the controller's sensitivity to speed deviations gradually returns to normal levels.

[0090] When the accumulated time value Reaching the time constant When the preset multiple is, for example, three times, the exponent term... It has decayed to The following are the sliding surface coefficients and preset base values. The deviation is now less than five percent of the increment coefficient. At this point, the controller stops updating the sliding surface coefficient and maintains it at the preset base value. This freeze operation avoids the computational resource consumption caused by continuously performing exponential operations after magnetization is completed.

[0091] Specifically, the controller uses the arrival time of the magnetization trigger signal as the starting point for timing, and performs an accumulation operation of the accumulated timing value once in each control cycle to obtain the current time. Value. The value is substituted as the independent variable into the sliding surface coefficient update formula. Calculate the sliding surface coefficient for the current control cycle. In the first control cycle after magnetization triggering, (Duration of one control cycle), the sliding surface coefficient has changed from the initial transient value It started to decline, but due to much smaller The decrease was small, and the controller maintained a high sensitivity state close to the transient maximum. With Gradually increase to the level of With comparable magnitudes, the exponential term decreases significantly, and the sliding surface coefficient accelerates its approach to the base value. When achieve At this point, the exponential term has decayed to less than five percent above the base value. The controller considers the magnetization transition process to be substantially complete, and the sliding surface coefficient no longer needs to change with the timing. It then stops updating and locks it at the base value. This exponential decay process starts from the moment the magnetization is triggered and continues throughout the entire magnetization transition phase. During this period, the sliding surface coefficient changes continuously without any step switching.

[0092] S3. Calculate the torque current command based on the approach law gain and sliding mode coefficient;

[0093] Among them, the torque current command refers to the quadrature axis current setpoint calculated by the sliding mode speed controller based on the current speed error and the state of the sliding mode surface. This command serves as one of the inputs to the current loop and is used to control the electromagnetic torque output by the motor.

[0094] The sliding mode speed controller calculates the rate of change of the sliding surface according to the predetermined rate of change of the sliding surface based on the updated reaching law gain and sliding surface coefficient. Then, combined with the current value and rate of change of the speed error, it back-calculates the torque current value required to maintain speed tracking through the motor motion equation.

[0095] Specifically, the sliding surface is composed of the product of the sliding surface coefficient and the speed error, plus the speed error change rate. This sliding surface reflects the degree and trend of the current speed deviation from the command value. The updated reaching law gain and the sliding surface coefficient together determine the convergence rate and convergence trajectory shape of the sliding surface. The controller substitutes the speed error and its change rate into the updated sliding surface definition to obtain the current sliding surface value, then calculates the sliding surface change rate according to the reaching law, and finally derives the torque current command to be applied from the motor motion equation. This torque current command is the output of the speed outer loop, and its value is directly related to the speed error, the error change rate, and the current gain parameter. When the magnetic shock causes the speed to deviate, this command automatically increases to generate a reverse regulating torque.

[0096] In some implementations, the torque current command is calculated based on the reaching law gain and the sliding surface coefficient, including:

[0097] Obtain speed commands and memorize the actual motor speed;

[0098] The speed error is obtained by the difference between the speed command and the actual speed;

[0099] The rate of change of speed error is obtained by dividing the difference in speed error between two adjacent control cycles by the control cycle.

[0100] The sliding surface is obtained by adding the product of the sliding surface coefficient and the rotational speed error to the rate of change of the rotational speed error;

[0101] Based on the approaching law gain, sliding surface, and motor parameters of the memory motor, the torque current command is calculated according to the approaching law of the sliding speed controller.

[0102] Among them, speed command This is the target speed value issued by the host computer or speed planning module, representing the operating speed that the controller expects the motor to reach. Actual speed The current speed feedback value is obtained in real time through a position sensor or speed observer. The controller reads the speed command value and the actual speed value in each control cycle as the starting input for the outer loop speed control calculation.

[0103] Speed ​​error It is a speed command Compared with actual speed The difference, i.e. This difference reflects the degree to which the current speed deviates from the target value. When the actual speed is lower than the commanded value, the error is positive, and the controller needs to increase the torque current to increase the speed; when the actual speed is higher than the commanded value, the error is negative, and the controller needs to decrease the torque current to decrease the speed. Speed ​​error is a fundamental variable in the construction of the sliding surface.

[0104] Speed ​​error change rate It is the value obtained by dividing the difference in speed error between two adjacent control cycles by the control cycle, i.e. ,in This represents the speed error in the current control cycle. This represents the speed error from the previous control cycle. This is used to control the cycle. This quantity reflects the trend of speed error changing with time; the rate of change is positive when the error increases, negative when the error decreases, and zero when the error is constant. The rate of change of speed error and the speed error together constitute two orthogonal components of the sliding surface.

[0105] Sliding surface It is a combination of state variables defined in sliding mode control, and its expression is: ,in For the updated sliding surface coefficient, For speed error, Let be the rate of change of rotational speed error. This sliding surface combines the rotational speed error and its rate of change into a scalar by weighting it using sliding surface coefficients. When the system state lies on the sliding surface, the rotational speed error and its rate of change satisfy [condition missing]. The relationship is such that the system state will converge exponentially to the equilibrium point along the sliding surface. Sliding surface coefficients The size of the coefficient determines the slope of the sliding surface; the larger the coefficient, the faster the convergence.

[0106] Specifically, torque current command According to the reaching law of the sliding mode speed controller, its expression is: ,in For rotational inertia, For extreme logarithms, It is a permanent magnet flux linkage. The rate of change of the speed command. and This is the updated convergence law gain. For sliding surface, It is an inverse hyperbolic sine function. Rate of change of speed command. The speed error is obtained by dividing the difference in speed commands between two adjacent control cycles by the control cycle. and the rate of change of rotational speed error Substitute into the sliding surface expression to obtain the current sliding surface value. Then change the sliding surface value Substituting into the approximation law expression, the rate of change of the sliding surface is obtained. The obtained sliding surface variation rate Substituting the values ​​into the motor's motion equations, we can deduce the torque and current values ​​required to maintain the convergence of the sliding surface. This torque and current command incorporates the combined effects of speed tracking requirements, sliding surface convergence requirements, and system inertial parameters.

[0107] S4. Based on the torque current command, the load disturbance compensation amount output by the load disturbance observation channel, and the pulse disturbance compensation amount output by the pulse disturbance observation channel, the total current command is obtained. The pulse disturbance observation channel is enabled by the magnetization trigger signal, and the load disturbance observation channel runs continuously during the operation of the memory motor.

[0108] Among them, the load disturbance observation channel is an observer built based on the super-twisted sliding mode algorithm. This channel works continuously during motor operation and outputs the observed value of load torque in real time as the load disturbance compensation amount.

[0109] The pulse disturbance observation channel is an independent observer with the same structure as the load disturbance observation channel but a different gain coefficient. Under normal operating conditions, this channel is in the off state, and its output is zero. When the controller detects a valid magnetization trigger signal, it switches the enable flag of the pulse disturbance observation channel from invalid to valid. From the switching moment, this channel begins performing observation calculations and outputs the compensation amount for the magnetization impulse disturbance.

[0110] The total current command is the result of superimposing the torque current command and the compensation output from the two observation channels. This command takes into account the motor's own speed regulation requirements, external load changes, and electromagnetic disturbances caused by magnetic field shock.

[0111] Specifically, the load disturbance observation channel continuously monitors changes in load torque in real time, and its output load disturbance compensation reflects the current state of the external mechanical load on the motor. The pulse disturbance observation channel is activated when the field adjustment trigger signal is valid. This channel operates with a higher gain coefficient than the load disturbance observation channel, enabling the observer to quickly track the amplitude changes of the field adjustment shock disturbance and converge to the valid observation value within several control cycles. The load disturbance observation channel remains unaffected by field adjustment events and maintains stable observation of the slowly changing load. The compensation values ​​output by the two channels are added together and superimposed on the torque current command, allowing the current loop to simultaneously obtain comprehensive compensation for both mechanical load and electromagnetic shock. The total current command includes three parts: the speed error-driven adjustment component, the load disturbance compensation component, and the field adjustment shock compensation component. These components work together to control the subsequent current loop.

[0112] In some implementations, the gain of the pulse perturbation observation channel... Gain of the load disturbance observation channel Between .

[0113] The load disturbance observation channel and the pulse disturbance observation channel share a single speed observer, which is based on the speed observation error. Build, in To observe the rotational speed, This represents the actual rotational speed. The dynamic equation for the rotational speed observer is:

[0114] ;

[0115] in This is an estimated value for electromagnetic torque. For the output of the load disturbance observation channel, This is the output of the pulse disturbance observation channel. For speed observation gain, For the gain of the load disturbance observation channel, This is the gain of the pulse disturbance observation channel. and They appear in the output expressions of the two channels respectively:

[0116] ;

[0117] ;

[0118] The two observation channels observe the error from the same rotational speed. The driving signals are acquired, but each signal is multiplied by a different gain coefficient and then integrated separately. Gain Control the integral accumulation rate of load disturbance observations, gain Controls the integration and accumulation rate of impulse disturbance observations. Output from both channels. and All of these are fed back into the dynamic equation of the speed observer, and together they participate in the correction of the speed observation value.

[0119] Gain of the pulse perturbation observation channel Gain of the load disturbance observation channel Between When the speed observation error When it appears, Greater than The integral accumulation rate of the pulse disturbance observation channel is higher than that of the load disturbance observation channel, making The amplitude rapidly rises to a value comparable to the pulse disturbance amplitude within a short period of time. Due to its lower gain, the load disturbance observation channel's output... Accumulating at a slower rate, unaffected by instantaneous changes in pulse disturbances, it maintains stable tracking of slowly varying loads. When the magnetic shock causes the speed to deviate from its trend, The error is rapidly increased and fed back to the speed observer. The compensation is injected into the current loop through the observer's correction function. When the magnetization transition is completed and the speed observation error returns to zero, the outputs of both channels stop accumulating and maintain the current value until the next observation error occurs.

[0120] S5. Input the total current command to the current loop of the memory motor to control the magnetization process of the memory motor.

[0121] Specifically, the current loop is the inner loop in the motor control system. This loop takes the current command as input and the phase current feedback as the controlled variable, outputting the voltage command required to drive the inverter through the regulator. After receiving the total current command, the current loop compares it with the currently fed-in quadrature-axis current value, calculates the quadrature-axis voltage command through the regulator, and controls the switching on and off of the inverter's switching transistors after coordinate transformation and pulse width modulation, so that the actual motor current tracks the total current command. During the magnetizing pulse duration, the direct-axis current loop simultaneously maintains the setpoint of the magnetizing current pulse, while the quadrature-axis current loop tracks the total current command. Both act together on the motor stator windings, maintaining the balance between electromagnetic torque and load while completing the permanent magnet magnetization state switching, thus achieving stable speed operation.

[0122] In some implementations, the method further includes:

[0123] The voltage feedforward compensation is calculated based on the change in magnetic flux and the rotational speed of the memory motor at the current moment. The direct-axis component of the voltage feedforward compensation is calculated according to... The quadrature component in the voltage feedforward compensation is obtained according to... Received, among which For rotational speed, This represents the change in magnetic flux linkage;

[0124] The voltage feedforward compensation is superimposed on the output of the current loop.

[0125] Specifically, when the magnetic flux adjustment trigger signal is valid, the controller obtains the flux change based on a table lookup during the current control cycle. and current speed The voltage feedforward compensation is calculated within the same control cycle. This calculation does not depend on the output value of the current loop PI regulator, nor on the convergence of the speed error. After the calculation is completed, the compensation is immediately applied to the output of the current loop, so that the inverter outputs a voltage containing the compensation within the current control cycle. The response speed of this feedforward path depends on the execution time of the lookup table operation and the multiplication-addition operation. In the first control cycle after the magnetizing pulse injection, the voltage command already contains a compensation proportional to the flux change, which precedes the occurrence of the speed deviation. When the magnetizing transition is completed and the flux change approaches zero, the voltage feedforward compensation automatically decays to zero, without affecting the voltage command output during steady-state operation.

[0126] The following is a detailed explanation of this embodiment through specific examples.

[0127] Motor parameters: Number of pole pairs Moment of inertia Rated magnetic flux Target magnetic flux Rotation speed (1000rpm), adjust the magnetic pulse amplitude Control cycle .

[0128] Controller parameters: , , ; , , , ; , , ; , .

[0129] Change in flux linkage and rate of change:

[0130] ;

[0131] Sliding surface coefficient:

[0132] ;

[0133] Approach law gain:

[0134] ;

[0135] Voltage feedforward compensation amount:

[0136] ;

[0137] Specific process:

[0138] Triggering moment ( ): The magnetic flux has not changed. The sliding surface coefficient jumps from 10 to 40 ( The reaching law gain maintains the base value. , The voltage feedforward is zero. The pre-jump of the sliding surface coefficient allows the controller to complete structural reconfiguration before the flux linkage begins to change.

[0139] Mid-pulse rise ( ): Magnet flux observations , rate of change Sliding surface coefficient Approaching law gain , Voltage feedforward .

[0140] Near the pulse peak ( ): , rate of change . , , .

[0141] The pulse reaches its amplitude ( ): , rate of change . , , .

[0142] After pulse cancellation ( ): , rate of change . , , .

[0143] Freeze and exit ( ): , rate of change . Freezing Criteria The deviation is less than the increment coefficient. Five percent, stop index updates and fix at Exit conditions and Simultaneously, the pulse observation channel is closed and the magnetization flag is cleared.

[0144] All parameters of the controller are automatically adjusted according to the change in magnetic flux and restored to the base value after the magnetic flux stabilizes, without the need for manual intervention throughout the process.

[0145] Example 2

[0146] Please see Figure 2 This invention provides a control device for the magnetization process of a memory motor, comprising:

[0147] The injection module 201 is used to enter the interrupt service routine when the controller receives the magnetization trigger signal, inject the magnetization current pulse into the direct-axis current loop of the memory motor, and at the same time start the flux linkage observer based on the stator voltage model in the interrupt service routine to obtain the flux linkage change through integration calculation.

[0148] The update module 202 is used to update the reaching law gain of the sliding mode speed controller according to the change in magnetic flux, and at the same time start the timing according to the magnetic adjustment trigger signal, and update the sliding surface coefficient of the sliding mode speed controller according to the monotonically decreasing law with the accumulated timing value as the independent variable.

[0149] Calculation module 203 is used to calculate torque current command based on the reaching law gain and sliding surface coefficient;

[0150] The compensation module 204 is used to obtain the total current command based on the torque current command, the load disturbance compensation amount output by the load disturbance observation channel, and the pulse disturbance compensation amount output by the pulse disturbance observation channel. The pulse disturbance observation channel is enabled by the magnetization trigger signal, and the load disturbance observation channel runs continuously during the operation of the memory motor.

[0151] The input module 205 is used to input the total current command to the current loop of the memory motor to control the magnetization process of the memory motor.

[0152] It should be noted that each module and unit in the control device for the magnetization process of the memory motor in this embodiment corresponds one-to-one with each step in the control method for the magnetization process of the memory motor in the aforementioned embodiment. Therefore, the specific implementation of this embodiment can refer to the implementation of the control method for the magnetization process of the memory motor in the aforementioned embodiment, and will not be repeated here.

[0153] Example 3

[0154] Please see Figure 3This embodiment provides an electronic device, including at least one processor 301 and a memory 302. Optionally, the device further includes a communication component 303. The processor 301, memory 302, and communication component 303 are connected via a bus 304.

[0155] In a specific implementation, at least one processor 301 executes computer execution instructions stored in memory 302, causing at least one processor 301 to perform the above-described method.

[0156] The specific implementation process of processor 301 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0157] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0158] The memory may include high-speed memory (Random Access Memory, RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0159] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0160] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0161] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0162] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0163] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in application-specific integrated circuits (ASICs). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0164] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0165] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0166] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0167] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0168] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0169] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A control method for the magnetization process of a memory motor, characterized in that, include: When the controller receives the magnetization trigger signal, it enters the interrupt service routine and injects a magnetization current pulse into the direct-axis current loop of the memory motor. At the same time, the magnetization flux observer based on the stator voltage model is started in the interrupt service routine, and the change in magnetization flux is obtained through integration. Based on the change in flux linkage, the reaching law gain of the sliding mode speed controller is updated. At the same time, timing is started based on the magnetic adjustment trigger signal, and the sliding surface coefficient of the sliding mode speed controller is updated with the accumulated timing value as the independent variable according to a monotonically decreasing law. The torque current command is calculated based on the approach law gain and the sliding surface coefficient. The total current command is obtained based on the torque current command, the load disturbance compensation amount output by the load disturbance observation channel, and the pulse disturbance compensation amount output by the pulse disturbance observation channel. The pulse disturbance observation channel is enabled by the magnetization trigger signal, and the load disturbance observation channel operates continuously during the operation of the memory motor. The total current command is input to the current loop of the memory motor to control the magnetization process of the memory motor.

2. The control method for the magnetization process of a memory motor according to claim 1, characterized in that, The step of starting a flux linkage observer based on the stator voltage model within the interrupt service routine and obtaining the flux linkage change through integration includes: The flux linkage observer obtains the flux linkage change through integration calculation based on the real-time collected stator voltage, stator current, and current change rate. The flux change rate is obtained by the ratio of the flux change to the control cycle. The reaching law gain is updated based on the flux change and flux change rate.

3. The control method for the magnetization process of a memory motor according to claim 2, characterized in that, The reaching law gain includes a first gain component and a second gain component; the first gain component is according to... Update, the second gain component according to renew; in, , For the preset base value, , For the pre-set coefficients, The change in magnetic flux is... The flux linkage change rate; The sliding mode speed controller uses the following approach law: ,in, For sliding surface, It is an inverse hyperbolic sine function.

4. The control method for the magnetization process of a memory motor according to claim 1, characterized in that, The step of updating the sliding surface coefficients of the sliding speed controller with the accumulated time value as the independent variable according to a monotonically decreasing law includes: Taking the arrival time of the magnetic trigger signal as the starting point of the timing, the cumulative number of control cycles is accumulated from zero to obtain the cumulative timing value; Based on the accumulated timing value, the sliding surface coefficient is updated according to a preset transient value that decays exponentially from the moment of magnetic triggering to a preset base value. for: , in As a preset base value, For the pre-set increment coefficient, The accumulated time value, A pre-set time constant; When the accumulated time value reaches a preset multiple of the time constant, it is determined that the sliding surface coefficient has decreased to a preset base value, the updating of the sliding surface coefficient is stopped, and the sliding surface coefficient is maintained at the preset base value.

5. The control method for the magnetization process of a memory motor according to claim 1, characterized in that, The step of calculating the torque current command based on the reaching law gain and the sliding surface coefficient includes: Obtain the speed command and the actual speed of the memory motor; The speed error is obtained based on the difference between the speed command and the actual speed. The rate of change of speed error is obtained by dividing the difference in speed error between two adjacent control cycles by the control cycle. The sliding surface is obtained by adding the product of the sliding surface coefficient and the rotational speed error to the rotational speed error rate. Based on the reaching law gain, the sliding surface, and the motor parameters of the memory motor, the torque current command is calculated according to the reaching law of the sliding speed controller.

6. The control method for the magnetization process of a memory motor according to claim 1, characterized in that, The gain of the pulse disturbance observation channel With the gain of the load disturbance observation channel Between .

7. The control method for the magnetization process of a memory motor according to claim 1, characterized in that, The method further includes: The voltage feedforward compensation is calculated based on the change in magnetic flux and the rotational speed of the memory motor at the current moment, wherein the direct-axis component of the voltage feedforward compensation is calculated according to... The quadrature component in the voltage feedforward compensation is obtained according to... Received, among which The rotational speed is... The change in magnetic flux; The voltage feedforward compensation is superimposed on the output of the current loop.

8. A control device for the magnetization process of a memory motor, characterized in that, include: The injection module is used to enter the interrupt service routine when the controller receives the magnetic adjustment trigger signal, inject the magnetic adjustment current pulse into the direct-axis current loop of the memory motor, and at the same time start the flux linkage observer based on the stator voltage model in the interrupt service routine to obtain the flux linkage change through integration calculation. The update module is used to update the reaching law gain of the sliding mode speed controller according to the change in magnetic flux, and at the same time start the timing according to the magnetic adjustment trigger signal, and update the sliding surface coefficient of the sliding mode speed controller according to the monotonically decreasing law with the accumulated timing value as the independent variable. The calculation module is used to calculate the torque current command based on the approach law gain and the sliding surface coefficient; The compensation module is used to obtain the total current command based on the torque current command, the load disturbance compensation amount output by the load disturbance observation channel, and the pulse disturbance compensation amount output by the pulse disturbance observation channel, wherein the pulse disturbance observation channel is enabled by the magnetizing trigger signal, and the load disturbance observation channel operates continuously during the operation of the memory motor. The input module is used to input the total current command to the current loop of the memory motor to control the magnetization process of the memory motor.

9. An electronic device, characterized in that, include: At least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, The method as described in any one of claims 1-7 is implemented when the computer program instructions are executed by the processor.