Hall position determination method and device, electronic equipment and storage medium
By gradually adjusting the motor electrical angle in the open-loop operation state, obtaining the coded value and electrical angle of the Hall sensor, and determining the electrical angle value of the Hall sensor sector, the problems of low efficiency and error-prone determination of Hall position are solved, and the efficiency and accuracy of motor control are improved.
Patent Information
- Application Number
- CN202510003538.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, Hall position determination efficiency is low and error-prone, resulting in poor motor control effect.
By placing the motor in an open-loop operating state, giving the reference electrical angle and maintaining a certain period of time, gradually increasing or decreasing the electrical angle of the motor until the end of an electrical cycle, obtaining the encoded value of the Hall sensor and the electrical angle of the Hall sensor when the Hall sensor jumps, and determining the electrical angle value of the Hall sensor sector.
It improves the efficiency and accuracy of Hall sensor position determination, and solves the problem of poor motor control effect due to uncertain Hall sensor position.
Smart Images

Figure CN119853529A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of motor control, and in particular to a Hall position determination method, device, electronic equipment and storage medium. Background Art
[0002] At present, the field of two-wheeled electric vehicles uses Field Oriented Control (FOC) sine wave controlled permanent magnet synchronous motor (PMSM) motor to replace square wave controlled brushless direct current motor (BLDC) motor. This not only reduces the starting noise of the motor, but also greatly improves the riding comfort. FOC sine wave control has become the standard control method in the industry.
[0003] However, in order to maximize the advantages of FOC, it is necessary to accurately determine the position information of the rotor in order to make the motor run efficiently. In the actual motor production process, each manufacturer has its own Hall installation method, which is difficult to achieve complete unification. It is necessary to manually measure the correspondence between the back EMF and the Hall through an oscilloscope to complete the calibration of the motor. This method has high requirements for personnel, low efficiency and is prone to errors. Summary of the invention
[0004] The present invention provides a Hall position determination method, device, electronic equipment and storage medium to solve the problems of low efficiency and easy error in Hall position determination.
[0005] According to one aspect of the present invention, a Hall position determination method is provided, comprising:
[0006] Put the motor into open-loop operation, give a reference electrical angle and keep it for a certain time;
[0007] Gradually increase or decrease the electrical angle of the motor until the end of an electrical cycle, and obtain the encoding value of the Hall sensor and the electrical angle when the Hall sensor jumps;
[0008] The electrical angle value of the Hall sensor sector is determined according to the coding value of the Hall sensor and the electrical angle at the time of the jump.
[0009] Optionally, the step of gradually increasing or decreasing the electrical angle of the motor until an electrical cycle ends includes:
[0010] Setting a two-phase rotor current, wherein the two-phase rotor current and the feedback rotor current are feedback-controlled to obtain a two-phase rotor voltage;
[0011] The two-phase rotor voltage is transformed by Park inverse transformation to obtain the two-phase stator voltage;
[0012] The two-phase stator voltage is PWM modulated to output a three-phase voltage modulation wave.
[0013] Optionally, the feedback rotor current includes:
[0014] Convert three-phase stator current into two-phase stator current;
[0015] The two-phase stator current is transformed by Park to obtain the feedback rotor current.
[0016] Optionally, the PWM modulation includes SVPWM modulation.
[0017] Optionally, the reference electrical angle is set to 90°, 30°, and 0° respectively.
[0018] Optionally, determining the electrical angle value of the Hall sensor sector according to the coding value of the Hall sensor and the electrical angle at the time of the jump includes:
[0019] Determine the installation method of the Hall sensor;
[0020] Record the output of each Hall sensor and record the timestamp of each pulse;
[0021] A rotation counter is used to calculate the position of the rotor;
[0022] Calculating the electrical angle of the Hall sensor sector according to the position of the rotor;
[0023] The encoding value of the Hall sensor is mapped to the Hall sensor sector, and the electrical angle is adjusted accordingly.
[0024] Optionally, after mapping the code value of the Hall sensor to the Hall sensor sector and adjusting the electrical angle accordingly, the method further includes:
[0025] The electrical angle value of the Hall sensor sector is saved to realize FOC closed-loop operation of the motor.
[0026] According to another aspect of the present invention, there is provided a Hall position determination device, characterized in that it comprises: a control module, an angle processing module and a Hall position determination module;
[0027] The control module is used to put the motor into an open-loop operation state, give a reference electrical angle and maintain it for a certain period of time;
[0028] The angle processing module is used to gradually increase or decrease the electrical angle of the motor until an electrical cycle ends, and obtain the encoding value of the Hall sensor and the electrical angle when the Hall sensor jumps;
[0029] The Hall position determination module is used to determine the electrical angle value of the Hall sensor sector according to the coding value of the Hall sensor and the electrical angle at the time of the jump.
[0030] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0031] at least one processor; and
[0032] a memory communicatively connected to the at least one processor; wherein,
[0033] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the Hall position determination method described in any embodiment of the present invention.
[0034] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the Hall position determination method described in any embodiment of the present invention when executed.
[0035] The technical solution of the embodiment of the present invention can ensure that the stator and rotor magnetic fields are aligned and that the motor can be dragged to a specified position by placing the motor in an open-loop operation state, giving a reference electrical angle and maintaining it for a certain period of time. The electrical angle of the motor is gradually increased or decreased until the end of an electrical cycle, and the coding value of the Hall sensor and the electrical angle when the Hall sensor jumps are obtained. The electrical angle value of the Hall sensor sector is determined based on the coding value of the Hall sensor and the electrical angle when the jump occurs. The sector in which the rotor is located can be determined through the coding value of the Hall sensor. By monitoring the electrical angle at the time of the jump, the position of the rotor within the sector can be determined. The technical solution of the embodiment of the present invention can solve the problem of poor motor control effect caused by the uncertain position of the Hall sensor, and the rotor position can be determined based on the position of the Hall sensor, thereby improving efficiency and accuracy.
[0036] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 is a flow chart of a Hall position determination method provided according to an embodiment of the present invention;
[0039] Figure 2 is a schematic diagram of the structure of the open-loop operation of a motor provided according to an embodiment of the present invention;
[0040] Figure 3 is a schematic structural diagram of a rotor coordinate system provided according to an embodiment of the present invention;
[0041] Figure 4 is a schematic structural diagram of a stator coordinate system provided according to an embodiment of the present invention;
[0042] Figure 5 is a flow chart of determining the electrical angle value of a Hall sensor sector provided according to an embodiment of the present invention;
[0043] Figure 6 is a structural schematic diagram of a Hall position determination device provided according to an embodiment of the present invention;
[0044] Figure 7 It is a structural schematic diagram of an electronic device for implementing the Hall position determination method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0046] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0047] Figure 1 A flow chart of a Hall position determination method is provided for an embodiment of the present invention. Figure 21 is a schematic diagram of the structure of the open-loop operation of the motor provided by the embodiment of the present invention. This embodiment is applicable to the motor control situation. The method can be executed by a Hall position determination device. The device can be implemented in the form of hardware and / or software. The device can be configured in motor control, automobile industry, automation and control system. Figure 1 As shown, the method includes:
[0048] S101, placing the motor in an open-loop operation state, giving a reference electrical angle and maintaining it for a certain period of time.
[0049] Among them, in open-loop control, such as Figure 2 As shown, the operation of the motor does not depend on any feedback signal. The control system directly controls the output of the motor according to the preset input voltage or current, without considering the actual operating state of the motor. In open-loop control, the reference electrical angle can be the initial position of the motor or a specific target position. The motor can be maintained at a given reference electrical angle by control algorithms, such as the generation of PWM (pulse width modulation) signals. It can be the control of the inverter to generate appropriate voltage and frequency to keep the motor at the desired electrical angle position. The motor can be kept at the reference electrical angle for a certain period of time by a timer or a delay function in the program. Figure 2 Where Is is the resultant current vector, θ is the angle between the resultant current vector Is and the axis of phase A, and N and S are two magnetic poles.
[0050] S102, gradually increase or decrease the electrical angle of the motor until an electrical cycle ends, and obtain the encoding value of the Hall sensor and the electrical angle when the Hall sensor jumps.
[0051] Among them, in motor control, the electrical angle refers to the position angle of the motor rotor relative to the stator. By controlling the electrical angle of the motor, the speed and direction of the motor can be controlled. Gradually increasing or decreasing the electrical angle means that the motor controller will gradually adjust the electrical angle of the motor according to a preset control strategy (such as PID control) until a complete electrical cycle is reached. Hall sensors are commonly used in BLDC and PMSM to detect the position of the rotor. Each Hall sensor outputs a binary signal, and the combination of three Hall sensors can provide multiple encoding values, and different encoding values correspond to different positions of the rotor. By reading these states, the current position of the rotor can be determined. The jump of the Hall sensor refers to the change of the sensor output state, such as from a high level to a low level or vice versa. Each jump corresponds to the rotor rotating through a specific angle. For example, in a Hall sensor placed at an electrical angle of 120 degrees, each jump corresponds to an electrical angle of 120 degrees. By detecting the jump, the position of the rotor can be determined.
[0052] S103, determining the electrical angle value of the Hall sensor sector according to the code value of the Hall sensor and the electrical angle at the time of the jump.
[0053] Among them, Hall sensors are usually used in pairs or groups to detect changes in magnetic fields to determine the position of the motor rotor. Each Hall sensor can output two states: high level and low level, high level usually indicates the presence of a magnetic field, and low level usually indicates the absence of a magnetic field. When three Hall sensors are used, 8 different encoding values can be combined. The jump of the Hall sensor refers to the change in the output state of the sensor, which is usually directly related to the position of the rotor magnetic field. Each jump point corresponds to a specific electrical angle. For example, in a 120-degree interval Hall sensor configuration, each jump point is 120 degrees apart in electrical angle. The encoding value of the Hall sensor corresponds to a specific sector of the motor rotor. Through the encoding value of the Hall sensor, it can be determined which sector the rotor is located. By monitoring the electrical angle at the time of the jump, the position of the rotor within the sector can be determined. Exemplarily, the rotor starts from a known position, and each jump of the Hall sensor corresponds to a fixed angle, such as 120 degrees. When the Hall sensor detects a jump, the electrical angle position of the rotor can be calculated based on the time point when the jump occurs and the speed of the motor. If we know that the rotor changes from one Hall sensor state to another, we can determine the electrical angle of the rotor by counting the number of transitions between the two states and the angle corresponding to each transition.
[0054] The technical solution of the embodiment of the present invention can ensure that the stator and rotor magnetic fields are aligned and that the motor can be dragged to a specified position by placing the motor in an open-loop operation state, giving a reference electrical angle and maintaining it for a certain period of time. The electrical angle of the motor is gradually increased or decreased until the end of an electrical cycle, and the coding value of the Hall sensor and the electrical angle when the Hall sensor jumps are obtained. The electrical angle value of the Hall sensor sector is determined based on the coding value of the Hall sensor and the electrical angle when the jump occurs. The sector in which the rotor is located can be determined through the coding value of the Hall sensor. By monitoring the electrical angle at the time of the jump, the position of the rotor within the sector can be determined. The technical solution of the embodiment of the present invention can solve the problem of poor motor control effect caused by the uncertain position of the Hall sensor, and the rotor position can be determined based on the position of the Hall sensor, thereby improving efficiency and accuracy.
[0055] Figure 3 is a schematic diagram of the structure of the rotor coordinate system provided according to an embodiment of the present invention. Figure 3 As shown, in some optional embodiments of the embodiments of the present invention, gradually increasing or decreasing the electrical angle of the motor until an electrical cycle ends includes:
[0056] The two-phase rotor current is set, and the two-phase rotor current and the feedback rotor current are feedback controlled to obtain the two-phase rotor voltage.
[0057] Among them, the two-phase rotor current refers to the current I in the two-phase rotating coordinate system (dq coordinate system)d and I q , where the d-axis and q-axis are perpendicular to each other, is commonly used in vector control of PMSM, which can decouple the flux and torque components of the motor for independent control. Feedback control can be proportional-integral (PI) control. In motor control, PI control is usually used in the current loop or speed loop to achieve precise control of the motor current or speed. Specifically, set I d is any value, I q =0, two-phase rotor current I d and I q With the feedback rotor current I d * and I q * The two-phase rotor voltage V is obtained through PI control d and V q .
[0058] The two-phase rotor voltage is transformed by Park inverse transformation to obtain the two-phase stator voltage.
[0059] Among them, the Park inverse transformation can convert the quantity in the two-phase rotating coordinate system back to the quantity in the two-phase stationary coordinate system (α and β). α and V β According to the formula of Park's inverse transform Calculate, where V d and V q are the voltages on the d-axis and q-axis respectively, θ is the angle between the two-phase rotating coordinate system and the two-phase stationary coordinate system, V α and V β However, the current two-phase rotor voltage V on the α-axis and β-axis after conversion d and V q .
[0060] The two-phase stator voltage is modulated by PWM to output a three-phase voltage modulation wave.
[0061] Among them, PWM modulation is a technology that modulates the pulse width, and controls the speed and torque of the motor by changing the duty cycle of the pulse. The three-phase voltage modulation wave refers to the voltage waveform generated by the modulation technology in the three-phase power electronic conversion system. The three-phase voltage modulation wave is usually used to control the three-phase motor or inverter to achieve precise control of the motor.
[0062] Figure 4 is a schematic diagram of the structure of the stator coordinate system provided according to an embodiment of the present invention. Figure 4 As shown, in some optional embodiments of the embodiments of the present invention, the feedback rotor current includes:
[0063] Convert three-phase stator current into two-phase stator current;
[0064] Among them, the three-phase stator current refers to the current used to represent the three phases (usually A, B, and C) in the three-phase power system. The two-phase stator current refers to the current in the two-phase stationary coordinate system (α and β). The conversion of the three-phase stator current to the two-phase stator current can be achieved by Clarke transformation.
[0065] The two-phase stator current is transformed by Park to obtain the feedback rotor current.
[0066] Among them, Park transformation can convert the quantity in the two-phase stationary coordinate system to the two-phase rotating coordinate system that rotates synchronously with the rotor magnetic field. The two-phase stator current is transformed by Park to obtain the feedback rotor current I d * and I q * .
[0067] In some optional embodiments of the embodiments of the present invention, the PWM modulation includes SVPWM modulation.
[0068] Among them, SVPWM (Space Vector Pulse Width Modulation) is space vector pulse width modulation. The theoretical basis of SVPWM is the average value equivalence principle, that is, by combining the basic voltage vectors in one switching cycle, its average value is equal to the given voltage vector. It generates a pulse width modulation wave through a specific switching mode composed of six power switching elements of the three-phase power inverter, which can make the output current waveform as close to the ideal sine waveform as possible. SVPWM can effectively utilize the DC bus voltage, thereby improving system efficiency and reducing torque fluctuations. SVPWM can reduce motor torque pulsation and make the rotating magnetic field closer to a circle.
[0069] In some optional embodiments of the embodiments of the present invention, the reference electrical angle is set to 90°, 30°, and 0° respectively.
[0070] Among them, the electrical angle refers to the position of the motor rotor relative to the stator. In motor control, the electrical angle is usually used to indicate the precise position of the rotor. The electrical angles of 90°, 30°, and 0° are given in sequence as the target positions in motor control, and the controller will use these angle values as control targets in sequence to rotate the motor to the specified position. After each electrical angle is given, the controller will maintain this angle value for a period of time. This is to ensure that the motor has enough time to respond to the control signal and reach and stabilize at the specified electrical angle position. By giving the electrical angle and keeping it for a certain time, the motor controller can ensure that the motor moves from one position to another and stays at each target position until the motor reaches the desired position. Exemplarily, the controller first gives an electrical angle value, such as 90°, and the motor rotates to a position close to 90° according to the control signal. Once the motor approaches the 90° position, the controller detects the actual electrical angle and adjusts the control signal to fine-tune the motor position until the motor stabilizes at 90°. After keeping 90° for a certain period of time, the controller repeats the process, giving the next electrical angle value 30°, 0°, and ensuring that the motor moves to and remains at this position.
[0071] Figure 5 FIG. 1 is a flow chart for determining the electrical angle value of a Hall sensor sector according to an embodiment of the present invention. Figure 5 As shown, in some optional embodiments of the embodiments of the present invention, the electrical angle value of the Hall sensor sector is determined according to the coding value of the Hall sensor and the electrical angle at the time of the jump, including:
[0072] S201, determining the installation method of the Hall sensor;
[0073] Among them, there are two common ways to arrange Hall sensors in the motor: 60 degrees electrical angle apart and 120 degrees electrical angle apart. The two installation methods correspond to different control strategies and signal outputs. In the 60-degree installation method, the three Hall sensors are 60 degrees electrical angle apart from each other, and can output "000" and "111" signals. The 120-degree installation will not output these two signals. Specifically, the Hall sensors can be installed in a way that they are 120 degrees electrical angle apart from each other.
[0074] S202, recording the output of each Hall sensor and the timestamp of each pulse;
[0075] Among them, the Hall sensor is used to detect the position of the motor rotor. In a BLDC or PMSM, there are usually three Hall sensors, one for each stator winding, which can sense the position of the rotor magnetic field. Each Hall sensor outputs a binary signal that changes as the rotor magnetic field changes. A pulse refers to the change in the Hall sensor output signal, that is, switching from one state to another, which usually corresponds to a change in the position of the rotor magnetic field. A timestamp refers to the precise time information associated with a specific event, which can refer to a pulse output by a Hall sensor. Timestamps can be used to synchronize the control actions of the motor, ensuring that the motor's commutation accurately matches the rotor position, thereby improving the efficiency and performance of the motor.
[0076] S203, using a rotation counter to calculate the position of the rotor;
[0077] Among them, the rotation counter is a counting device used to track the number of rotations and position of the motor rotor. The rotation counter is usually driven by an external pulse signal, which can come from an encoder, a Hall sensor, or other position sensor. Whenever the sensor detects a specific position of the rotor, it generates a pulse signal. The specific position can be the north pole or south pole of the magnetic field. The rotation counter receives the pulse signal and calculates the position of the rotor based on the number of pulses. The rotation counter provides the absolute position information of the rotor, that is, the actual position of the rotor relative to a fixed reference point. The fixed reference point can be the initial position of the motor.
[0078] S204, calculating the electrical angle of the Hall sensor sector according to the position of the rotor;
[0079] Among them, in one electrical cycle, the output signal combination of the three Hall sensors has 6 states. The electrical angle occupied by each state is equal. Therefore, by detecting the combined value of the Hall, the sector in which the rotor is currently located can be determined. The electrical angle refers to the position of the motor rotor relative to the stator. Through the output state of the Hall sensor, the sector in which the rotor is located can be determined, and then the electrical angle of the rotor can be calculated. For example, if the Hall sensor displays state 5, it can be known that the rotor is located in a specific sector, and the electrical angle can be calculated based on this. When the motor starts, the electrical angle can be initialized according to the initial state of the Hall sensor. The initial electrical angle provides the starting point for the motor to run, and the subsequent electrical angle will be more accurately estimated based on the motor's operating information.
[0080] S205: Map the code value of the Hall sensor to the Hall sensor sector, and adjust the electrical angle accordingly.
[0081] Among them, the Hall sensor outputs different encoding values by detecting the position change of the rotor magnetic field. These encoding values are usually composed of the states of three Hall sensors, each of which can be high or low, so there are 8 possible encoding values. The encoding values correspond to different positions of the motor rotor, that is, different sectors. For example, in a Hall sensor configuration with a 120-degree electrical angle, each jump corresponds to a 120-degree electrical angle, while in a configuration with a 60-degree electrical angle, each jump corresponds to a 60-degree electrical angle. By identifying the current encoding value of the Hall sensor, the sector in which the rotor is located can be determined. Within each sector, the electrical angle can be recalibrated by the angle corresponding to the edge of the Hall sensor. For example, if the Hall sensor displays state 5, it can be known that the rotor is located in a specific sector, and the electrical angle can be calculated based on this. In one electrical cycle, the Hall outputs 6 states for each pair of magnetic poles that the motor rotates. If the motor has 2 pairs of poles, there are 12 states in one circle; if the motor has 6 pairs of poles, there are 36 states in one circle. Within a sector, the electrical angle can be estimated by interpolation. That is to say, within a sector, it is divided into N parts according to the switching frequency of SVPWM, and it moves one angle every PWM cycle.
[0082] In some optional embodiments of the embodiments of the present invention, after mapping the code value of the Hall sensor to the Hall sensor sector and adjusting the electrical angle accordingly, the method further includes:
[0083] The electrical angle value of the Hall sensor sector is saved to realize FOC closed-loop operation of the motor.
[0084] Among them, the encoding value output by the Hall sensor corresponds to the position of the motor rotor one by one. The encoding value of each Hall sensor corresponds to a specific electrical angle range, namely the Hall sector. By mapping these encoding values to the corresponding electrical angles, the precise position of the rotor can be determined. In motor control, the preservation of electrical angle values can be used to initialize the motor control algorithm to ensure that the motor starts running from a known position. FOC closed-loop operation refers to the use of feedback signals to adjust the control strategy in motor control to ensure that the motor operates according to predetermined performance parameters. In FOC, electrical angle values are used for Park transformation and inverse Park transformation, which can convert the three-phase current of the motor into a two-phase rotating coordinate system. Through these transformations, the flux and torque of the motor can be independently controlled to achieve precise control.
[0085] Figure 6 is a schematic diagram of the structure of a Hall position determination device provided according to an embodiment of the present invention. Figure 6 As shown, the device includes: a control module 301, an angle processing module 302 and a Hall position determination module 303;
[0086] The control module 301 is used to put the motor into an open-loop operation state, give a reference electrical angle and maintain it for a certain period of time;
[0087] The angle processing module 302 is used to gradually increase or decrease the electrical angle of the motor until an electrical cycle ends, and obtain the code value of the Hall sensor and the electrical angle when the Hall sensor jumps;
[0088] The Hall position determination module 303 is used to determine the electrical angle value of the Hall sensor sector according to the code value of the Hall sensor and the electrical angle at the time of the jump.
[0089] Figure 7 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0090] like Figure 7 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0091] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0092] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the Hall position determination method.
[0093] In some embodiments, the Hall position determination method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the Hall position determination method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the Hall position determination method in any other suitable manner (e.g., by means of firmware).
[0094] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0095] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0096] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0097] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0098] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0099] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0100] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0101] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A Hall position determination method, characterized in that: include: Put the motor into open-loop operation, give a reference electrical angle and keep it for a certain time; Gradually increase or decrease the electrical angle of the motor until the end of an electrical cycle, and obtain the encoding value of the Hall sensor and the electrical angle when the Hall sensor jumps; The electrical angle value of the Hall sensor sector is determined according to the coding value of the Hall sensor and the electrical angle at the time of the jump.
2. The method according to claim 1, characterized in that: The step of gradually increasing or decreasing the electrical angle of the motor until an electrical cycle ends includes: Setting a two-phase rotor current, wherein the two-phase rotor current and the feedback rotor current are feedback-controlled to obtain a two-phase rotor voltage; The two-phase rotor voltage is transformed by Park inverse transformation to obtain the two-phase stator voltage; The two-phase stator voltage is PWM modulated to output a three-phase voltage modulation wave.
3. The method according to claim 2, characterized in that The feedback rotor current includes: Convert three-phase stator current into two-phase stator current; The two-phase stator current is transformed by Park to obtain the feedback rotor current.
4. The method according to claim 2, characterized in that: The PWM modulation includes SVPWM modulation.
5. The method according to claim 1, characterized in that The reference electrical angles are set to 90°, 30°, and 0°, respectively.
6. The method according to claim 1, characterized in that The step of determining the electrical angle value of the Hall sensor sector according to the coding value of the Hall sensor and the electrical angle at the time of the jump includes: Determine the installation method of the Hall sensor; Record the output of each Hall sensor and record the timestamp of each pulse; A rotation counter is used to calculate the position of the rotor; Calculating the electrical angle of the Hall sensor sector according to the position of the rotor; The encoding value of the Hall sensor is mapped to the Hall sensor sector, and the electrical angle is adjusted accordingly.
7. The method according to claim 6, characterized in that After mapping the encoding value of the Hall sensor to the Hall sensor sector and adjusting the electrical angle accordingly, the method further includes: The electrical angle value of the Hall sensor sector is saved to realize FOC closed-loop operation of the motor.
8. A Hall position determination device, characterized in that: include: Control module, angle processing module and Hall position determination module; The control module is used to put the motor into an open-loop operation state, give a reference electrical angle and maintain it for a certain period of time; The angle processing module is used to gradually increase or decrease the electrical angle of the motor until an electrical cycle ends, and obtain the encoding value of the Hall sensor and the electrical angle when the Hall sensor jumps; The Hall position determination module is used to determine the electrical angle value of the Hall sensor sector according to the coding value of the Hall sensor and the electrical angle at the time of the jump.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the Hall position determination method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the Hall position determination method according to any one of claims 1 to 7 when executed.