Motor control method and device, motor controller and motor system
Through high-frequency injection of signals and position sensor sampling values, the problem of lack of initial position guidance when starting the BLDC motor is solved, and the precise control and safe start of the motor are achieved.
Patent Information
- Application Number
- CN202410983465.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-05
AI Technical Summary
The BLDC motor using switch Hall position sensor lacks initial position guidance when starting, resulting in safety hazards and inaccurate control problems.
By starting the motor based on the high-frequency injection signal, the position sampling value of the position sensor is obtained, and the motor operation process is controlled based on the first and second operation information, ensuring that the motor has accurate operation information in different situations.
The precise control of the motor is achieved, which avoids safety hazards and inaccurate control problems during startup, and improves the starting safety and operation efficiency of the motor.
Smart Images

Figure CN118900059A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of motor control technology, and in particular to a motor control method, device, motor controller and motor system. Background Art
[0002] With the development of motor control technology, three-phase brushless direct current motor (BLDC) has a very wide range of applications in the field of industrial control. The switch Hall position sensor is a sensor used to detect the position of the motor rotor. Due to its advantages such as high reliability, simple structure, and fast response speed, the BLDC using position sensors usually uses switch Hall position sensors as position sensors to obtain the position of the motor rotor.
[0003] However, the position accuracy of the switch Hall position sensor is based on 60° intervals, so the position of the motor rotor needs to be divided into 6 intervals. Based on this, the switch Hall position sensor can only provide discrete position information of the motor rotor, but cannot accurately feedback the continuous position information of the motor rotor. Obviously, if the sensored BLDC using the switch Hall position sensor lacks the initial position guidance of the motor rotor, it will cause a greater safety hazard risk when the sensored BLDC is started. Summary of the invention
[0004] Based on this, it is necessary to provide a motor control method, device, motor controller, motor system, computer-readable storage medium and computer program product that can accurately control the motor in order to solve the above technical problems.
[0005] In a first aspect, the present application provides a motor control method, comprising:
[0006] Starting the motor based on the high-frequency injection signal, and determining first operation information of the motor after starting according to the high-frequency injection signal;
[0007] Get the position sampling value of the position sensor; the motor and the position sensor correspond;
[0008] Determine second operation information of the motor according to the position sampling value and the first operation information;
[0009] Based on the first operation information and the second operation information, the operation process of the motor is controlled.
[0010] In a second aspect, the present application further provides a motor control device, comprising:
[0011] An injection module, used to start the motor based on the high-frequency injection signal, and determine the first operation information of the motor after starting according to the high-frequency injection signal;
[0012] The acquisition module is used to obtain the position sampling value of the position sensor; the motor corresponds to the position sensor;
[0013] A determination module, used for determining second operation information of the motor according to the position sampling value and the first operation information;
[0014] The control module is used to control the operation process of the motor based on the first operation information and the second operation information.
[0015] In a third aspect, the present application further provides a motor controller, comprising a memory and a processor, wherein the memory stores a motor control program, and when the processor executes the motor control program, the following steps are implemented:
[0016] Starting the motor based on the high-frequency injection signal, and determining first operation information of the motor after starting according to the high-frequency injection signal;
[0017] Get the position sampling value of the position sensor; the motor and the position sensor correspond;
[0018] Determine second operation information of the motor according to the position sampling value and the first operation information;
[0019] Based on the first operation information and the second operation information, the operation process of the motor is controlled.
[0020] In a fourth aspect, the present application further provides a motor system, comprising:
[0021] A motor, and a motor control device as described in the second aspect of the embodiment of the present application.
[0022] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0023] Starting the motor based on the high-frequency injection signal, and determining first operation information of the motor after starting according to the high-frequency injection signal;
[0024] Get the position sampling value of the position sensor; the motor and the position sensor correspond;
[0025] Determine second operation information of the motor according to the position sampling value and the first operation information;
[0026] Based on the first operation information and the second operation information, the operation process of the motor is controlled.
[0027] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0028] Starting the motor based on the high-frequency injection signal, and determining first operation information of the motor after starting according to the high-frequency injection signal;
[0029] Get the position sampling value of the position sensor; the motor and the position sensor correspond;
[0030] Determine second operation information of the motor according to the position sampling value and the first operation information;
[0031] Based on the first operation information and the second operation information, the operation process of the motor is controlled.
[0032] The motor control method, device, motor controller, motor system, computer-readable storage medium and computer program product described above start the motor based on a high-frequency injection signal, and determine the first operating information of the motor after starting based on the high-frequency injection signal; obtain the position sampling value of the position sensor; correspond the motor to the position sensor; determine the second operating information of the motor based on the position sampling value and the first operating information; and control the operation process of the motor based on the first operating information and the second operating information. The motor control method provided in the present application can determine the first operating information of the motor based on the high-frequency injection signal, and determine the second operating information of the motor based on the high-frequency injection signal and the first operating information, thereby controlling the operation process of the motor based on the first operating information and the second operating information, and controlling the motor based on the different operating information of the motor under different conditions, so that the motor can correspond to accurate operating information under different conditions, thereby achieving accurate control of the motor. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 A diagram showing an application environment of a motor control method in an embodiment;
[0035] Figure 2 is a flow chart of a motor control method in one embodiment;
[0036] Figure 3 is a schematic diagram showing an example of a corresponding relationship between a switch Hall position sensor and a motor rotor position in one embodiment;
[0037] Figure 4 is a structural block diagram of a motor control system in another embodiment;
[0038] Figure 5is a structural block diagram of a motor control device in one embodiment;
[0039] Figure 6 is an internal structure diagram of a computer device in one embodiment;
[0040] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in another embodiment. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0042] At present, if the sensored BLDC using a switch Hall position sensor lacks the initial position guidance of the motor rotor, then when starting the motor, it is usually started by forced dragging. In this case, the rotor position may be exactly opposite to the forced drag position, causing the motor to get stuck, reverse, deadlock, and other undesirable conditions. At the same time, under heavy load conditions, a large torque is required to complete the BLDC startup. Obviously, in order to enable the motor to start safely and to more accurately control the operation process of the motor, the motor should be able to obtain the initial position guidance of the motor rotor when starting.
[0043] Based on this, the present application embodiment provides a motor control method, which can be applied to Figure 1 In the application environment shown. Among them, the application environment includes a motor controller 102 and a motor 104, and the motor controller 102 exchanges information with the motor 104 through a connecting cable, and the connecting cable can be a control cable and / or a power cable. The motor controller 102 is used to execute the motor control method provided in the embodiment of the present application, including: the motor controller 102 starts the motor 104 based on the high-frequency injection signal, and determines the first operating information of the motor 104 after starting according to the high-frequency injection signal; the motor controller 102 obtains the position sampling value of the position sensor; the motor 104 corresponds to the position sensor; the motor controller 102 determines the second operating information of the motor 104 according to the position sampling value and the first operating information; the motor controller 102 controls the operation process of the motor 104 based on the first operating information and the second operating information.
[0044] In an exemplary embodiment, Figure 2 As shown, a motor control method is provided, which is applied to Figure 1 The motor controller in is taken as an example to illustrate, including the following steps 202 to 208.
[0045] in:
[0046] Step 202: starting the motor based on the high-frequency injection signal, and determining first operation information of the motor after starting according to the high-frequency injection signal.
[0047] The high-frequency injection signal may be a high-frequency injection voltage. The purpose of starting the motor based on the high-frequency injection signal is to determine the first operation information of the motor after starting, so as to further determine the speed information and angle information of the motor rotor according to the first operation information.
[0048] Optionally, the motor may be a three-phase brushless direct current motor (BLDC); optionally, the first operating information may include a first rotation speed and a first angle of the motor.
[0049] Specifically, when the motor is in a stationary state, the motor controller starts the motor based on a high-frequency injection signal injected into the stator. After starting, the motor enters a low-speed operation state under the action of the high-frequency injection signal. At this time, the first operation information of the motor in the low-speed operation state can be determined according to the high-frequency injection signal.
[0050] Specifically, the first operation information is used as a reference for the motor controller to adjust the power supply to the motor, so as to achieve precise control of the motor.
[0051] Step 204, obtaining a position sampling value of the position sensor; the motor corresponds to the position sensor.
[0052] The position sensor may be a switch Hall position sensor, which uses the Hall effect to detect changes in the magnetic field to determine the position of the motor rotor; the switch Hall position sensor divides the position of the motor rotor into six position intervals with a position accuracy of 60°.
[0053] When the position sensor is a switch Hall position sensor, the position sampling values of the position sensor include sampling values of the motor rotor in 6 position intervals.
[0054] Optionally, when a sampling switch Hall position sensor is used as the position sensor of the motor, in order to determine the sequential distribution relationship between the position change process of the motor rotor and the six position intervals, so as to determine the exact position of the motor rotor according to the sequential distribution relationship of the six position intervals, three switch Hall position sensors may be installed on the motor, and the three switch Hall position sensors are arranged on the stator of the motor at an interval of 120° from each other.
[0055] For example, Figure 3 As shown, the motor is provided with three switch Hall position sensors, namely Hall 1, Hall 2 and Hall 3. Figure 3As shown in (a), Hall 1-3 divides the position of the motor rotor into 6 position intervals with a position accuracy of 60°, which are intervals 001, interval 101, interval 100, interval 110, interval 010 and interval 011 arranged counterclockwise. Hall 1 is located on the central axis of interval 100, Hall 2 is located on the central axis of interval 010, and Hall 3 is located on the central axis of 001. Thus, as Figure 3 As shown in (b), when the motor rotor rotates to intervals 101, 100, and 110, the output signal of Hall 1 is a high-level signal; when the motor rotor rotates to intervals 110, 010, and 011, the output signal of Hall 2 is a high-level signal; when the motor rotor rotates to intervals 011, 001, and 101, the output signal of Hall 3 is a high-level signal. It should be noted that Figure 3 The correspondence between the switch Hall position sensor and the position of the motor rotor is shown as an exemplary description only. In a specific implementation, other correspondences may be set, which is not limited here.
[0056] Step 206: Determine second operation information of the motor according to the position sampling value and the first operation information.
[0057] Among them, since the first operating information is obtained after starting the motor based on a high-frequency injection signal, the speed information and angle information of the motor rotor can be determined based on the first operating information. Furthermore, based on the position change process of the motor rotor obtained based on the position sampling value and the sequential distribution relationship between the 6 position intervals, the second operating information with higher accuracy than the first operating information can be obtained.
[0058] In one embodiment, determining the second operation information of the motor according to the position sampling value and the first operation information includes: the motor controller determines the second operation information of the motor based on the Hall sensor angle estimation algorithm, the position sampling value and the first operation information.
[0059] Among them, assuming that the second operating information of the motor is determined based on the Hall sensor angle estimation algorithm, since the first operating information is determined based on the high-frequency injection signal, and the high-frequency injection method is not suitable for the motor to be in medium and high-speed operation due to its large heat loss, and the Hall sensor angle estimation algorithm is not suitable for the motor to be in low-speed operation with slow rotor movement due to its position accuracy of 60°, that is, the position resolution is low. Therefore, the first operating information is applicable to the operating state where the motor speed is less than or equal to the preset speed, and the second operating information is applicable to the operating state where the motor speed is greater than the preset speed.
[0060] Step 208: Control the operation process of the motor based on the first operation information and the second operation information.
[0061] In one embodiment, based on the first operating information and the second operating information, the operation process of the motor is controlled, including: the motor controller performs closed-loop control of the current and speed of the motor based on the field-oriented control (FOC) algorithm, the first operating information and the second operating information to control the operation process of the motor.
[0062] In the above motor control method, the motor is started based on the high-frequency injection signal, and the first operating information of the motor after starting is determined based on the high-frequency injection signal; the position sampling value of the position sensor is obtained; the motor and the position sensor correspond; the second operating information of the motor is determined based on the position sampling value and the first operating information; based on the first operating information and the second operating information, the operation process of the motor is controlled. The motor control method provided in the present application can determine the first operating information of the motor based on the high-frequency injection signal, and determine the second operating information of the motor based on the high-frequency injection signal and the first operating information, thereby controlling the operation process of the motor based on the first operating information and the second operating information, and by controlling the motor based on different operating information of the motor under different circumstances, the motor can correspond to accurate operating information under different circumstances, thereby achieving accurate control of the motor.
[0063] In one embodiment, the process of controlling the operation of the motor based on the first operation information and the second operation information includes:
[0064] Determine the operating state of the motor based on the first operating information and the second operating information; the operating state is the first operating state or the second operating state;
[0065] When the running state of the motor is a first running state, the running process of the motor is controlled based on the first running information; when the running state of the motor is a second running state, the running process of the motor is controlled based on the second running information.
[0066] The first operating state may be an operating state in which the motor has not entered the initialization completion state, and the second operating state may be an operating state in which the motor has entered the initialization completion state. Initialization completion may refer to the motor speed reaching a certain speed, or the motor having rotated a certain number of times, or the motor having run for a certain period of time. In other words, it can be considered that when the motor's operating state is the second operating state, it means that the motor has entered a safe operating state after startup.
[0067] Exemplarily, the first operating state may be an operating state in which the rotation speed of the motor is less than or equal to a preset rotation speed, and correspondingly, the second operating state may be an operating state in which the rotation speed of the motor is greater than the preset rotation speed; the first operating state may be an operating state in which the number of rotations of the motor is less than or equal to a preset number of rotations, and correspondingly, the second operating state may be an operating state in which the number of rotations of the motor is greater than the preset number of rotations; the first operating state may be an operating state in which the running time of the motor is less than or equal to a preset time, and correspondingly, the second operating state may be an operating state in which the running time of the motor is greater than the preset time.
[0068] Specifically, since the state definitions of low-speed operation, medium-speed operation, and high-speed operation of the motor are usually determined based on specific application scenarios, motor design, and performance requirements, and these definitions may vary depending on the industry, application, and motor type. Therefore, in one embodiment, the preset speed is determined based on at least one of the motor type, performance curve, motor specification, and actual operating conditions of the motor. In another embodiment, the preset speed can also be determined based on the rated speed of the motor. For example, the preset speed can be a preset percentage of the rated speed of the motor.
[0069] Specifically, assuming that the second operating information of the motor is determined based on the Hall sensor angle estimation algorithm, after determining the second operating information of the motor according to the position sampling value and the first operating information, if the operating state of the motor switches back to the first operating state from the second operating state, the motor controller will still determine the second operating information of the motor based on the Hall sensor angle estimation algorithm, but at this time it will control the operating process of the motor based on the first operating information determined by the high-frequency injection signal, rather than controlling the operating process of the motor based on the second operating information.
[0070] Specifically, the high-frequency injection method is not suitable for situations where the motor is running at medium or high speeds due to its large heat loss. Therefore, in one embodiment, when the running state of the motor is the second running state, the running process of the motor is controlled based on the second running information, including: when the running state of the motor is the second running state, the high-frequency injection signal is removed, and the running process of the motor is controlled based on the second running information. Thus, the undesirable situation that the motor has a relatively serious heat loss in the second running state can be avoided.
[0071] In this embodiment, the operating state of the motor is determined based on the first operating information and the second operating information. Thus, when the operating state of the motor is the first operating state, the operating process of the motor is controlled based on the first operating information, and when the operating state of the motor is the second operating state, the operating process of the motor is controlled based on the second operating information. Furthermore, the motor has corresponding different operating information in different operating states, and the operating process of the motor in different operating states is controlled based on different operating information. This enables the motor to have corresponding accurate operating information in different situations, thereby achieving precise control of the motor.
[0072] In one embodiment, determining the operating state of the motor based on the first operating information and the second operating information includes:
[0073] When the first operation information and the second operation information do not meet the preset operation condition, determining that the operation state of the motor is the first operation state;
[0074] When the first operating information and the second operating information meet the preset operating condition, it is determined that the operating state of the motor is the second operating state.
[0075] Among them, the preset operating condition may refer to the completion of motor initialization, thus, not meeting the preset operating condition means that the motor has not yet completed initialization, and meeting the preset operating condition means that the motor has completed initialization. In other words, it can be considered that the preset operating condition means that the motor has the operating condition for safe operation after startup, thus, not meeting the preset operating condition means that the motor has not yet had the operating condition for safe operation after startup, and meeting the preset operating condition means that the motor has the operating condition for safe operation after startup.
[0076] Exemplarily, the preset operating condition may be an operating state in which the motor speed is greater than a preset speed, an operating state in which the motor rotation number is greater than a preset number, or an operating state in which the motor operation time is greater than a preset time.
[0077] Specifically, when the first operating information and the second operating information do not meet the preset operating conditions, the operating state of the motor is determined to be the first operating state, and the operating process of the motor is controlled based on the first operating information; when the first operating information and the second operating information meet the preset operating conditions, the operating state of the motor is determined to be the second operating state, and the operating process of the motor is controlled based on the second operating information.
[0078] In this embodiment, when both the first operating information and the second operating information do not meet the preset operating conditions, the operating state of the motor is determined to be the first operating state, and when both the first operating information and the second operating information meet the preset operating conditions, the operating state of the motor is determined to be the second operating state, thereby ensuring that the operating state of the motor is determined with accuracy, and further ensuring the control reliability of the motor operation process.
[0079] In one embodiment, the motor corresponds to a speed control module and a current control module; the first operation information includes a first speed and a first position; the second operation information includes a second speed and a second position;
[0080] The above-mentioned process of controlling the operation of the motor based on the first operation information includes:
[0081] Inputting the first speed into a speed control module and the first position into a current control module, so that the speed control module and the current control module control the operation process of the motor;
[0082] The above-mentioned process of controlling the operation of the motor based on the second operation information includes:
[0083] The second speed is input into the speed control module, and the second position is input into the current control module, so that the speed control module and the current control module control the operation process of the motor.
[0084] The speed control module may be a speed loop control module, a torque control module, or other control modules capable of controlling the speed of the motor rotor. The current control module may be a current loop control module, or other control modules capable of controlling the current of the motor.
[0085] In this embodiment, the operation process of the motor is controlled based on the first operation information, that is, the first speed is input into the speed control module, and the first position is input into the current control module, so that the speed control module and the current control module control the operation process of the motor. At the same time, the operation process of the motor is controlled based on the second operation information, that is, the second speed is input into the speed control module, and the second position is input into the current control module, so that the speed control module and the current control module control the operation process of the motor. Thus, through the joint action of the speed control module and the current control module, precise control of the motor can be achieved.
[0086] In one embodiment, the second operation information of the motor is determined according to the position sampling value and the first operation information, including:
[0087] Tracking the position of the rotor of the motor based on the first operation information to obtain a position tracking result;
[0088] Determine the position calibration information of the position sensor according to the position sampling value and the position tracking result;
[0089] Second operating information of the motor is determined according to the position calibration information and the first operating information.
[0090] Among them, since the first operation information is obtained after the motor is started based on the high-frequency injection signal, and the injection of the high-frequency injection signal in the motor will generate an additional electromagnetic field in the stator winding of the motor, when the rotor changes position, the permanent magnet or electromagnet on the rotor will interact with the stator winding, so that voltage changes will be induced in the stator winding, and these voltage changes can be detected by the motor controller to track the position of the motor rotor and obtain the position tracking result. Optionally, the motor controller can analyze and detect the voltage change based on the signal processing algorithm, so as to calculate the rotor position tracking result.
[0091] The position calibration information of the position sensor is used to determine the relationship between the output signal of the position sensor and the corresponding angle or position of the motor rotor, which can be presented as a mapping calibration table. The position calibration information is critical to ensure that the position sensor accurately reports the position of the motor rotor.
[0092] Specifically, since the second operating information of the motor is based on the position calibration information and the first operating information, and the position calibration information can accurately characterize the correspondence between the motor rotor and the output signal of the position sensor, and the first operating information is obtained based on the high-frequency injection signal, the second operating information obtained by combining the two has higher accuracy in determining the position of the motor rotor than the first operating information.
[0093] Specifically, since the motor controller can track the position of the motor's rotor based on the first operating information to obtain a position tracking result, and determine the position calibration information of the position sensor according to the position sampling value and the position tracking result, it can be seen that the motor controller can complete the position calibration of the position sensor after the motor is started without the need to perform offline processing on the motor, which greatly improves the operating efficiency and production efficiency of the motor.
[0094] In this embodiment, the position of the motor's rotor is first tracked based on the first operating information to obtain a position tracking result, and then the position calibration information of the position sensor is determined according to the position sampling value and the position tracking result. Next, the second operating information of the motor is determined according to the position calibration information and the first operating information. Thus, the second operating information has higher accuracy than the first operating information in determining the position of the motor rotor. Furthermore, while being able to avoid offline processing of the motor to calibrate the position sensor, the operation process of the motor can also be controlled based on the second operating information, which can improve the control accuracy and reliability of the operation process.
[0095] In one embodiment, before starting the motor based on the high frequency injection signal, the method further includes:
[0096] Determine a calibration flag position for the position sensor;
[0097] When the calibration flag position meets the preset flag position condition, a position calibration instruction is generated;
[0098] The above-mentioned acquisition of the position sampling value of the position sensor includes:
[0099] In response to the position calibration instruction, a position sampling value of the position sensor is acquired.
[0100] The calibration flag of the position sensor may be located in the storage medium of the motor controller. The calibration flag is a first value or a second value. When the calibration flag is a first value, it indicates that the motor has not been calibrated for the position sensor, that is, the position calibration information of the position sensor has not been determined; when the calibration flag is a second value, it indicates that the motor has been calibrated for the position sensor, that is, the position calibration information of the position sensor has been determined. The first value may be 0 or a null value, and the second value may be 1.
[0101] Optionally, the calibration flag satisfies a preset flag condition, and the calibration flag may indicate that the motor has not been position calibrated for the position sensor; further, the calibration flag may be a first value.
[0102] In this embodiment, before starting the motor based on the high-frequency injection signal, the calibration flag for the position sensor is determined, and a position calibration instruction is generated when the calibration flag meets the preset flag condition, thereby obtaining the position sampling value of the position sensor in response to the position calibration instruction. By confirming the calibration flag of the position sensor in advance, the motor controller does not need to waste extra system resources to repeatedly calibrate the position sensor.
[0103] In one embodiment, the method of starting a motor based on a high frequency injection signal includes:
[0104] determining current offset;
[0105] When the current offset meets the preset offset condition, the motor is started based on the high-frequency injection signal.
[0106] The current offset refers to the non-zero current value measured by the motor controller when there is no load or under specific conditions. This current offset is also called standby current or quiescent current.
[0107] Optionally, the preset offset condition may be that the current offset is within a preset current range, or that the current offset is within the microampere (μA) level, or that the current offset is within the milliampere (mA) level, or that the current offset is less than or equal to the maximum current offset determined by the motor manufacturer.
[0108] Specifically, when the current offset does not meet the preset offset condition, in order to avoid damage to the motor caused by excessive current offset and to avoid large electromagnetic interference caused by the high-frequency injection signal, the motor controller issues a current fault warning instead of starting the motor based on the high-frequency injection signal.
[0109] In this embodiment, before starting the motor based on the high-frequency injection signal, the motor controller will determine the current offset, and only when the current offset meets the preset offset condition will the motor be started based on the high-frequency injection signal, thereby avoiding adverse situations such as damage to the motor or generating large electromagnetic interference, thereby ensuring the safety of the motor operation.
[0110] The application process of the above motor control method is described below in conjunction with a detailed embodiment, which is as follows:
[0111] (1) Generation of position calibration instructions
[0112] When the motor is in a stationary state, the motor controller determines a calibration flag for the position sensor in a storage medium; when the calibration flag is 1, the motor controller determines a current offset; when the calibration flag is 0 or a null value, a position calibration instruction is generated.
[0113] (2) Determination of the first operation information
[0114] When the calibration flag is 1 or the motor controller generates a position calibration instruction, the motor controller determines the current offset; when the current offset exceeds the preset current range, the motor controller issues a current fault warning; when the current offset is within the preset current range, the motor controller starts the motor based on the high-frequency injection signal, and determines the first operating information of the motor after starting according to the high-frequency injection signal.
[0115] (3) Obtaining position sampling values
[0116] The motor controller responds to the position calibration instruction and obtains the position sampling value of the position sensor; the motor corresponds to the position sensor.
[0117] (4) Determination of the Second Operation Information
[0118] The motor controller tracks the position of the motor's rotor based on the first operating information to obtain a position tracking result; determines the position calibration information of the position sensor based on the position sampling value and the position tracking result; and determines the second operating information of the motor based on the position calibration information and the first operating information. It should be noted that for motors whose calibration flag is 1, that is, for motors that do not need to recalibrate the position sensor, the motor controller can directly determine its second operating information based on the position calibration information and the first operating information pre-stored in the storage medium.
[0119] (5) Control of the operation process
[0120] The motor corresponds to a speed control module and a current control module; the first operation information includes a first speed and a first position; and the second operation information includes a second speed and a second position.
[0121] The motor controller determines whether the first operating information and the second operating information meet the preset operating conditions. When the first operating information and the second operating information do not meet the preset operating conditions, the motor controller determines that the operating state of the motor is the first operating state; when the first operating information and the second operating information meet the preset operating conditions, the motor controller determines that the operating state of the motor is the second operating state; the operating state is the first operating state or the second operating state.
[0122] When the operating state of the motor is a first operating state, the motor controller inputs a first speed into a speed control module, and inputs a first position into a current control module, so that the speed control module controls the operating process of the motor based on the first speed and the current control module controls the operating process of the motor based on the first position; when the operating state of the motor is a second operating state, the motor controller inputs a second speed into the speed control module, and inputs a second position into the current control module, so that the speed control module controls the operating process of the motor based on the second speed and the current control module controls the operating process of the motor based on the second position.
[0123] In one embodiment, Figure 4 As shown, the motor control method provided in the embodiment of the present application is applied to a motor control system, in which a motor, a Hall position estimation module, a high-frequency injection control module, a speed loop control module, a current loop control module, a PWM control module and a switching module are provided, and the motor is a BLDC;
[0124] The first end of the BLDC is connected to the first end of the Hall position estimation module and the second end is connected to the first end of the PWM control module, the second end of the Hall position estimation module is connected to the first end of the current loop control module through a single-pole double-throw switch and the third end is connected to the first end of the speed loop control module through a single-pole double-throw switch, the second end of the speed loop control module is connected to the second end of the current loop control module, the third end of the current loop control module is connected to the second end of the PWM control module, the first end of the switching module is connected to the third end of the Hall position estimation module and the second end is connected to the third end of the high-frequency injection control module;
[0125] The high-frequency injection control module is used to start the BLDC based on the high-frequency injection signal, and determine the first operation information of the BLDC after starting according to the high-frequency injection signal; and input the first speed in the first operation information into the speed loop control module, and input the first position in the first operation information into the current loop control module, so that the speed loop control module and the current loop control module control the operation process of the BLDC;
[0126] The Hall position estimation module is used to determine the second operation information of the BLDC according to the position sampling value and the first operation information; and input the second speed in the second operation information into the speed loop control module, and input the second position in the second operation information into the current loop control module, so that the speed loop control module and the current loop control module control the operation process of the BLDC;
[0127] The switching module is used to judge the first operation information obtained by the high-frequency injection control module and the second operation information obtained by the Hall position estimation module, and when it is judged that the first operation information and the second operation information do not meet the preset operation conditions, determine that the operation state of the BLDC is the first operation state, so that the high-frequency injection control module is connected to the speed loop control module and the current loop control module, so that the operation process of the BLDC is controlled by the first operation information; when it is judged that the first operation information and the second operation information meet the preset operation conditions, determine that the operation state of the BLDC is the second operation state, so that the Hall position estimation module is connected to the speed loop control module and the current loop control module, so that the operation process of the BLDC is controlled by the second operation information;
[0128] The PWM control module is used to adjust the duty cycle of the PWM signal (i.e. the ratio of the high level time of the pulse to the entire cycle time) to control the speed of the BLDC output by the speed loop control module; at the same time, it is also used to adjust the duty cycle of the PWM signal to accurately control the current in the BLDC winding output by the current loop control module.
[0129] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0130] Based on the same inventive concept, the embodiment of the present application also provides a motor control device for implementing the motor control method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more motor control device embodiments provided below can refer to the limitations of the motor control method above, and will not be repeated here.
[0131] In an exemplary embodiment, Figure 5 As shown, a motor control device is provided, including: an injection module 502, an acquisition module 504, a determination module 506 and a control module 508, wherein:
[0132] An injection module 502, configured to start the motor based on the high-frequency injection signal, and determine first operation information of the motor after starting according to the high-frequency injection signal;
[0133] The acquisition module 504 is used to acquire the position sampling value of the position sensor; the motor corresponds to the position sensor;
[0134] A determination module 506, configured to determine second operation information of the motor according to the position sampling value and the first operation information;
[0135] The control module 508 is used to control the operation process of the motor based on the first operation information and the second operation information.
[0136] In one embodiment, the control module 508 is also used to determine the operating state of the motor based on the first operating information and the second operating information; the operating state is the first operating state or the second operating state; when the operating state of the motor is the first operating state, the operating process of the motor is controlled based on the first operating information; when the operating state of the motor is the second operating state, the operating process of the motor is controlled based on the second operating information.
[0137] In one embodiment, the above-mentioned control module 508 is also used to determine that the operating state of the motor is the first operating state when the first operating information and the second operating information do not meet the preset operating conditions; when the first operating information and the second operating information meet the preset operating conditions, determine that the operating state of the motor is the second operating state.
[0138] In one embodiment, the motor corresponds to a speed control module and a current control module; the first operating information includes a first speed and a first position; the second operating information includes a second speed and a second position; the above-mentioned control module 508 is also used to input the first speed into the speed control module, and input the first position into the current control module, so that the speed control module and the current control module control the operation process of the motor; the above-mentioned control module 508 is also used to input the second speed into the speed control module, and input the second position into the current control module, so that the speed control module and the current control module control the operation process of the motor.
[0139] In one embodiment, the above-mentioned determination module 506 is also used to track the position of the rotor of the motor based on the first operating information to obtain a position tracking result; determine the position calibration information of the position sensor according to the position sampling value and the position tracking result; and determine the second operating information of the motor according to the position calibration information and the first operating information.
[0140] In one embodiment, the injection module 502 is further used to determine a calibration flag for the position sensor; when the calibration flag satisfies a preset flag condition, a position calibration instruction is generated;
[0141] The acquisition module 504 is further configured to acquire a position sampling value of the position sensor in response to a position calibration instruction.
[0142] In one embodiment, the injection module 502 is further used to determine a current offset; when the current offset satisfies a preset offset condition, the motor is started based on the high-frequency injection signal.
[0143] Each module in the above motor control device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0144] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 6As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the operation information data of the motor. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a motor control method is implemented.
[0145] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a motor control method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0146] Those skilled in the art will understand that Figure 7The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0147] In one embodiment, a motor controller is further provided, including a memory and a processor, wherein the memory stores a motor control program, and the processor implements the steps in the above-mentioned method embodiments when executing the motor control program.
[0148] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0149] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0150] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0151] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0152] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 application.
[0153] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A motor control method, characterized in that: The method comprises: Starting the motor based on the high-frequency injection signal, and determining first operation information of the motor after starting according to the high-frequency injection signal; Obtaining a position sampling value of a position sensor; the motor corresponds to the position sensor; Determining second operation information of the motor according to the position sampling value and the first operation information; Based on the first operating information and the second operating information, an operating process of the motor is controlled.
2. The method according to claim 1, characterized in that The process of controlling the operation of the motor based on the first operation information and the second operation information includes: Determine an operating state of the motor based on the first operating information and the second operating information; the operating state is a first operating state or a second operating state; When the operating state of the motor is the first operating state, the operating process of the motor is controlled based on the first operating information; when the operating state of the motor is the second operating state, the operating process of the motor is controlled based on the second operating information.
3. The method according to claim 2, characterized in that The determining the operating state of the motor based on the first operating information and the second operating information includes: When the first operating information and the second operating information do not meet the preset operating condition, determining that the operating state of the motor is the first operating state; When the first operating information and the second operating information meet the preset operating condition, it is determined that the operating state of the motor is the second operating state.
4. The method according to claim 2, characterized in that: The motor corresponds to a speed control module and a current control module; the first operation information includes a first speed and a first position; The second operation information includes a second rotation speed and a second position; The process of controlling the operation of the motor based on the first operation information includes: Inputting the first speed into the speed control module, and inputting the first position into the current control module, so that the speed control module and the current control module control the operation process of the motor; The process of controlling the operation of the motor based on the second operation information includes: The second speed is input into the speed control module, and the second position is input into the current control module, so that the speed control module and the current control module control the operation process of the motor.
5. The method according to claim 1, characterized in that The step of determining the second operation information of the motor according to the position sampling value and the first operation information includes: Tracking the position of the rotor of the motor based on the first operation information to obtain a position tracking result; Determining position calibration information of the position sensor according to the position sampling value and the position tracking result; Second operating information of the motor is determined according to the position calibration information and the first operating information.
6. The method according to claim 1, characterized in that Before starting the motor based on the high-frequency injection signal, the method further includes: Determining a calibration flag position for the position sensor; When the calibration flag position meets the preset flag position condition, generating a position calibration instruction; The step of obtaining a position sampling value of a position sensor comprises: In response to the position calibration instruction, a position sampling value of the position sensor is acquired.
7. The method according to any one of claims 1 to 6, characterized in that: The method of starting the motor based on the high-frequency injection signal comprises: determining current offset; When the current offset meets the preset offset condition, the motor is started based on the high-frequency injection signal.
8. A motor control device, characterized in that: The device comprises: An injection module, used to start the motor based on the high-frequency injection signal, and determine the first operation information of the motor after starting according to the high-frequency injection signal; An acquisition module, used for acquiring a position sampling value of a position sensor; the motor corresponds to the position sensor; A determination module, configured to determine second operation information of the motor according to the position sampling value and the first operation information; A control module is used to control the operation process of the motor based on the first operation information and the second operation information.
9. A motor controller, comprising a memory and a processor, wherein the memory stores a motor control program, characterized in that: When the processor executes the motor control program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A motor system, characterized in that: The system comprises: A motor, and a device as claimed in claim 8.
