Motor control method and device for electric bicycle theft prevention
By obtaining the Hall sector and central angle of the motor, determining the lock sector and increasing the voltage vector direction, the problem of motor jitter and mechanical lock requirements in electric vehicle anti-theft is solved, and efficient anti-theft function is achieved.
Patent Information
- Application Number
- CN202210911900.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2042-07-29
AI Technical Summary
The existing anti-theft solution for electric vehicles cannot provide accurate speed feedback at low speeds, resulting in motor shaking and additional mechanical locks are required, which has poor anti-theft effect.
By obtaining the current Hall sector and center angle of the motor, determine the lock sector, and increase the voltage value when the motor is detected to rotate to the next sector, set the voltage vector direction to the center angle of the lock sector, and generate a drag-back pulling force , prevent the motor from being pushed.
The anti-theft is achieved without additional mechanical locks, avoiding motor shaking and improving the effectiveness of the anti-theft.
Smart Images

Figure CN115257400B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric vehicle anti-theft, and in particular to a motor control method and device for electric bicycle anti-theft. Background Art
[0002] In order to prevent electric bicycles from being stolen, users often need to add a mechanical lock to lock the vehicle when parking the electric bicycle outdoors to prevent theft. However, this method requires the purchase of an additional mechanical lock and has a poor anti-theft effect.
[0003] At present, the common solution in the market is that when the motor rotates, a reverse force is fed back according to the rotation speed to prevent the motor from rotating. Since the speed sensor used in electric vehicles has low accuracy, it cannot provide accurate speed feedback at low speeds, which easily causes the motor to shake.
[0004] To address the above problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of this specification provide a motor control method and device for electric bicycle anti-theft, so as to solve the problem that the electric bicycle anti-theft solution in the prior art easily causes motor vibration.
[0006] The embodiment of this specification provides a motor control method for electric bicycle anti-theft, including:
[0007] Acquire the current Hall sector of the motor and the center angle of the current Hall sector, and determine the current Hall sector as a locking sector;
[0008] When it is detected that the motor rotates from the first sector to the second sector, the voltage value of the motor is increased and the voltage vector direction of the motor is set to the direction corresponding to the center angle; the first sector is the next Hall sector of the locking sector, and the second sector is the next Hall sector of the first sector.
[0009] In one embodiment, increasing the voltage value of the motor includes:
[0010] The direct-axis voltage value of the motor is gradually increased, and the quadrature-axis voltage value of the motor is kept at zero.
[0011] In one embodiment, the method further comprises:
[0012] When it is detected that the motor rotates to the first sector, the voltage value of the motor is kept at zero.
[0013] In one embodiment, when it is detected that the motor rotates from the first sector to the second sector, after increasing the voltage value of the motor, the method further includes:
[0014] Detect the bus current of the motor;
[0015] When it is detected that the bus current is greater than a preset current threshold, the voltage value of the motor is stopped from being increased.
[0016] In one embodiment, the method further comprises:
[0017] When it is detected that the motor rotates to the third sector, the first sector is determined as the locking sector; the second sector is determined as the first sector, and the third sector is determined as the second sector; the third sector is the next Hall sector of the second sector;
[0018] The voltage value of the motor is increased, and the voltage vector direction of the motor is set to the direction corresponding to the center angle of the locking sector.
[0019] In one embodiment, after generating the pulling force to pull the motor back to the locking sector, the method further comprises:
[0020] When it is detected that the motor returns to the first sector, reducing the voltage value;
[0021] Record the current sector of the motor as the locked sector.
[0022] In one embodiment, the method further comprises:
[0023] When a Hall fault is detected in the motor, the inverter MOS tube that controls the motor short-circuits the three phase lines of the motor.
[0024] The embodiment of this specification also provides a motor control device for electric bicycle anti-theft, including:
[0025] An acquisition module, used for acquiring a current Hall sector of the motor and a center angle of the current Hall sector, and determining the current Hall sector as a locking sector;
[0026] The anti-theft module is used to increase the voltage value of the motor and set the voltage vector direction of the motor to the direction corresponding to the central angle when detecting that the motor rotates from the first sector to the second sector; the first sector is the next Hall sector of the locking sector, and the second sector is the next Hall sector of the first sector.
[0027] The embodiments of the present specification also provide a computer device, including a processor and a memory for storing processor executable instructions, wherein when the processor executes the instructions, the steps of the motor control method for electric bicycle anti-theft described in any of the above embodiments are implemented.
[0028] The embodiments of the present specification also provide a computer-readable storage medium on which computer instructions are stored. When the instructions are executed, the steps of the motor control method for electric bicycle anti-theft described in any of the above embodiments are implemented.
[0029] In an embodiment of the present specification, a motor control method for electric bicycle anti-theft is provided. When the electric bicycle is in anti-theft mode, the Hall sector where the motor rotor is currently located and the center angle of the current Hall sector are obtained, and the current Hall sector is determined as a locking sector. When it is detected that the motor rotates to the next sector of the current sector, the voltage value of the motor is increased, and the direction of the motor's voltage vector is set to the direction corresponding to the center angle to generate a pulling force to drag the motor back to the locking sector to prevent the motor from being pushed. Furthermore, when the motor rotates to the next sector, it rotates about 90° relative to the center angle of the locking sector. At this time, the voltage vector with the vector direction of the center angle can maximize the braking force under the same current. In this solution, users can achieve anti-theft without installing an additional mechanical lock. Moreover, compared with the existing anti-theft solution based on speed sensors, this solution can effectively avoid motor jitter. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The drawings described herein are used to provide a further understanding of this specification, constitute a part of this specification, and do not constitute a limitation of this specification. In the drawings:
[0031] Figure 1 A flow chart of a motor control method for electric bicycle anti-theft in an embodiment of this specification is shown;
[0032] Figure 2 A flow chart of a motor control method for electric bicycle anti-theft in an embodiment of this specification is shown;
[0033] Figure 3 A schematic diagram of a motor control device for electric bicycle anti-theft in an embodiment of this specification is shown;
[0034] Figure 4 A schematic diagram of a computer device in an embodiment of this specification is shown. DETAILED DESCRIPTION
[0035] The principles and spirit of this specification will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement this specification, and are not intended to limit the scope of this specification in any way. On the contrary, these embodiments are provided to make this specification more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.
[0036] Those skilled in the art will appreciate that the embodiments of this specification may be implemented as a system, device, method, or computer program product. Therefore, this specification may be implemented in the following forms: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0037] The embodiments of this specification provide a motor control method for electric bicycle theft prevention. Figure 1 A flow chart of a motor control method for electric bicycle anti-theft in an embodiment of this specification is shown. Although this specification provides method operation steps or device structures as shown in the following embodiments or drawings, more or fewer operation steps or module units may be included in the method or device based on routine or no creative labor. In steps or structures that do not logically have necessary causal relationships, the execution order of these steps or the module structure of the device is not limited to the execution order or module structure described in the embodiments of this specification and shown in the drawings. When the method or module structure described is applied to an actual device or terminal product, it can be connected according to the method or module structure shown in the embodiments or drawings for sequential execution or parallel execution (for example, a parallel processor or multi-threaded processing environment, or even a distributed processing environment).
[0038] Specifically, Figure 1 As shown, a motor control method for electric bicycle anti-theft provided in an embodiment of this specification may include the following steps:
[0039] Step S101, obtaining a current Hall sector of the motor and a center angle of the current Hall sector, and determining the current Hall sector as a locking sector.
[0040] The motor control algorithm in this embodiment can be applied to the motor controller of an electric vehicle. After parking the electric bicycle, the user can enter the anti-theft mode through the Bluetooth key or the mobile phone APP setting to enter the anti-theft state. When the electric vehicle is detected to be in the anti-theft mode, the current Hall sector where the motor rotor is located and the center angle of the current Hall sector can be obtained.
[0041] The motors for electric bicycles and electric motorcycles generally use Hall sensors as position sensors. Generally, three switch-type Hall sensors are installed at intervals of 120 degrees. When the motor rotor rotates one cycle, one Hall sensor completes one cycle of detection and outputs a square wave signal with a 50% duty cycle. Three Hall sensors can detect six rotor positions in one cycle, that is, one cycle is divided into six Hall sectors. Ideally, one sector is 60 degrees. The three-way Hall position sensor signals can be obtained to obtain the current Hall sector and the center angle of the current Hall sector.
[0042] The current Hall sector may be determined as a locking sector, that is, a Hall sector where the electric vehicle is located when it is parked normally.
[0043] Step S102, when it is detected that the motor rotates from the first sector to the second sector, the voltage value of the motor is increased, and the voltage vector direction of the motor is set to the direction corresponding to the center angle; the first sector is the next Hall sector of the locking sector, and the second sector is the next Hall sector of the first sector.
[0044] The rotor position of the motor can be detected, and a braking operation can be performed when it is detected that the motor rotor rotates from the locking sector via the first sector to the second sector. Specifically, the voltage value of the motor can be increased, and the voltage vector direction of the motor can be set to the direction corresponding to the center angle of the locking sector, thereby generating a pulling force to drag the motor back to the locking sector. When the motor rotor rotates to the second sector, since the second sector is the next sector of the locking sector, the center angle of the locking sector differs by about 90 degrees. By determining the voltage vector direction as the center angle direction of the locking sector, the effect of maximum braking force can be achieved at the same current to drag the rotor back to the locking sector.
[0045] In the above embodiment, a motor control method for electric bicycle anti-theft is provided. When the electric bicycle is in anti-theft mode, the Hall sector where the motor rotor is currently located and the center angle of the current Hall sector are obtained, and the current Hall sector is determined as a locking sector. When it is detected that the motor rotates to the next sector of the current sector, the voltage value of the motor is increased, and the direction of the motor's voltage vector is set to the direction corresponding to the center angle to generate a pulling force to drag the motor back to the locking sector to prevent the motor from being pushed. Furthermore, when the motor rotates to the next sector, it rotates about 90° relative to the center angle of the locking sector. At this time, the voltage vector with the vector direction of the center angle can maximize the braking force under the same current. In this solution, users can achieve anti-theft without installing an additional mechanical lock. Moreover, compared with the existing anti-theft solution based on speed sensor, this solution can effectively avoid motor shaking.
[0046] In some embodiments of the present specification, in one embodiment, increasing the voltage value of the motor may include: gradually increasing the direct-axis voltage value of the motor and maintaining the quadrature-axis voltage value of the motor at zero. When it is detected that the motor reaches the second sector via the first sector from the locking sector, the direct-axis voltage value of the motor may be gradually increased, and the quadrature-axis voltage value of the motor may be maintained at zero. By gradually increasing the voltage value, it is possible to prevent the voltage from increasing too quickly and causing abnormal noises, and the larger the value is, the better without obvious abnormal noises. The braking force depends on the voltage vector. When the quadrature-axis voltage is set to 0, the voltage vector is equal to the direct-axis voltage, which can simplify the calculation. When the motor rotates to the next sector, it just rotates 90° relative to the center angle. At this time, the voltage vector with an angle of the center angle is given, and the braking force is the largest under the same current. In the above manner, it is possible to prevent the voltage from increasing too quickly and causing abnormal noises, and it is also convenient for calculation.
[0047] In some embodiments of the present specification, after detecting that the motor rotates from the first sector to the second sector, increasing the voltage value of the motor, it may also include: detecting the bus current of the motor; and stopping increasing the voltage value of the motor when detecting that the bus current is greater than a preset current threshold. When increasing the voltage value, limitations may be made based on bus current feedback to avoid overcurrent caused by excessive voltage. When the bus current is greater than the preset current threshold, the voltage value of the motor may be stopped from being increased, and the voltage value may be kept unchanged until it returns to the locked sector or the first sector. In the above manner, overcurrent caused by excessive voltage may be avoided.
[0048] In some embodiments of the present specification, the method may further include: when detecting that the motor rotates to the first sector, maintaining the voltage value of the motor at zero. When detecting that the motor rotates to the first sector, no voltage is applied, that is, the next sector has no action, so that the motor has a small range of movement space to avoid false triggering of the anti-theft device.
[0049] In some embodiments of the present specification, the method may also include: when it is detected that the motor rotates to the third sector, determining the first sector as the locking sector; determining the second sector as the first sector, and determining the third sector as the second sector; the third sector is the next Hall sector of the second sector; increasing the voltage value of the motor, and setting the voltage vector direction of the motor to the direction corresponding to the center angle of the locking sector.
[0050] Specifically, when the motor is forcibly rotated by excessive external force, the locking sector is updated, that is, the vector direction or angle of the voltage vector is updated, and the vector direction is kept 90 degrees different from the current motor position, and the braking force is maximum. Therefore, when it is detected that the motor has rotated to the third sector, the first sector can be determined as the locked sector, the second sector can be determined as the first sector, and the third sector can be determined as the second sector. Increasing the voltage value of the motor and setting the vector direction of the motor to the direction corresponding to the center angle of the locking sector can generate a pulling force to drag the motor back to the locking sector. In this way, sufficient resistance can still be maintained when the motor is forcibly rotated.
[0051] In some embodiments of the present specification, after generating a pulling force to drag the motor back to the locking sector, the method may further include: reducing the voltage value when detecting that the motor returns to the first sector; and recording the current sector of the motor as the locking sector.
[0052] When it is detected that the motor is dragged back from the second sector to the first sector, the voltage value can be gradually reduced until the resistance disappears. When the voltage value is zero, the current sector of the motor can be recorded as the locked sector. After that, it is necessary to rotate through two sectors again to generate resistance again to prevent the vehicle from shaking when parked on the slope. In the above manner, the pulling force can be gradually reduced when the motor is dragged back to the first sector.
[0053] In some embodiments of the present specification, the method may further include: when a Hall fault is detected in the motor, controlling the inverter MOS tube of the motor to short-circuit the three phase lines of the motor. 6. When a Hall fault is detected in the motor and the motor sector cannot be accurately obtained, controlling the inverter MOS tube to short-circuit the three phase lines of the motor, at which time the motor can still provide greater resistance when being pushed to a higher speed.
[0054] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. For details, please refer to the description of the above-mentioned related processing related embodiments, and no further description is given here.
[0055] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0056] The above method is described below in conjunction with a specific embodiment. However, it should be noted that the specific embodiment is only for better illustrating the present specification and does not constitute an improper limitation on the present specification.
[0057] This embodiment provides a motor control method for electric bicycle anti-theft, which can avoid motor vibration. Figure 2 , shows a flow chart of the motor control method for electric bicycle anti-theft in this specific embodiment. Figure 2 As shown, the method in this embodiment specifically includes the following steps:
[0058] Step 1: After the user enters the anti-theft mode, the current Hall sector is recorded as the locked sector V0, and the current sector center angle is recorded as θ.
[0059] Step 2, when it is detected that the motor rotates to the next sector V1 of the locked sector, no action is taken. The reason why there is no action in the next sector is to allow the motor to have a small range of movement to avoid false triggering of the anti-theft system. At the same time, voltage is applied in the next sector. At this time, the applied voltage vector just leads the direct axis by 90° electrical angle, and the braking force is maximum under the same current. When the motor rotates to the next sector V2 of the locked sector, the direct axis voltage Ud is gradually increased, the quadrature axis voltage Uq=0, and the direction of the voltage vector is θ. At this time, the motor generates a resistance to drag back to prevent external force from pushing.
[0060] Gradually increasing the direct-axis voltage will apply a force to the motor that pulls the motor toward the angle θ, preventing the motor from being pushed. The purpose of gradually increasing the voltage is to prevent the voltage from increasing too quickly and causing abnormal noise. The larger the value is, the better it is without obvious abnormal noise. At the same time, it is necessary to limit it according to the bus current feedback to avoid overcurrent caused by excessive voltage. The braking force depends on the voltage vector. When the quadrature-axis voltage is set to 0, the voltage vector is equal to the direct-axis voltage, which simplifies the calculation. When the motor rotates to the next sector, it just rotates 90° relative to the angle θ. At this time, the voltage vector with an angle of θ is given, and the braking force is the largest under the same current.
[0061] Step 3, detect the bus current. When the bus current exceeds the rated bus current, Ud will no longer increase to prevent overcurrent.
[0062] Step 4: When it is detected that the motor is forcibly pushed by a large external force and turns through the V2 sector to the V3 sector, the V1 sector is recorded as the locked sector V0, the previous V2 sector becomes the V1 sector, and the V3 sector becomes the V2 sector, to ensure that the motor can still maintain sufficient resistance when it is forcibly turned. When the motor is forcibly turned by an excessive external force, the locked sector is updated, that is, the angle θ of the voltage vector is updated, and θ is kept 90° different from the current motor position, and the braking force is maximized.
[0063] Step 5, when it is detected that the motor returns to the previous sector V1, Ud is gradually reduced until the resistance disappears, and the current sector is recorded as the locked sector V0. It is necessary to rotate two sectors continuously again to generate resistance again to prevent the vehicle from shaking when parked on the slope.
[0064] Step 6: When a motor Hall fault is detected and the motor sector cannot be accurately obtained, the inverter MOS tube is controlled to short-circuit the three phase lines of the motor. At this time, the motor can still provide greater resistance when being pushed to a higher speed.
[0065] The solution in the above embodiment can realize the electronic anti-theft function. The user does not need to install an additional mechanical lock. Compared with common electronic anti-theft, it can effectively avoid jitter. In addition, it can still provide resistance when the motor Hall sensor fails.
[0066] Based on the same inventive concept, a motor control device for electric bicycle anti-theft is also provided in the embodiments of this specification, as described in the following embodiments. Since the principle of solving the problem by the motor control device for electric bicycle anti-theft is similar to that of the motor control method for electric bicycle anti-theft, the implementation of the motor control device for electric bicycle anti-theft can refer to the implementation of the motor control method for electric bicycle anti-theft, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived. Figure 3 is a structural block diagram of a motor control device for electric bicycle anti-theft according to an embodiment of this specification, such as Figure 3 As shown, it includes: an acquisition module 301 and an anti-theft module 302, and the structure is described below.
[0067] The acquisition module 301 is used to acquire the current Hall sector of the motor and the center angle of the current Hall sector, and determine the current Hall sector as a locking sector.
[0068] The anti-theft module 302 is used to increase the voltage value of the motor and set the voltage vector direction of the motor to the direction corresponding to the center angle when it is detected that the motor rotates from the first sector to the second sector; the first sector is the next Hall sector of the locking sector, and the second sector is the next Hall sector of the first sector.
[0069] In some embodiments of the present specification, the anti-theft module may be specifically used to gradually increase the direct-axis voltage value of the motor and maintain the quadrature-axis voltage value of the motor at zero.
[0070] In some embodiments of the present specification, the anti-theft module may be further configured to: when it is detected that the motor rotates to the first sector, keep the voltage value of the motor at zero.
[0071] In some embodiments of the present specification, the anti-theft module can also be used to: when it is detected that the motor rotates from the first sector to the second sector, after increasing the voltage value of the motor, detect the bus current of the motor; when it is detected that the bus current is greater than a preset current threshold, stop increasing the voltage value of the motor.
[0072] In some embodiments of the present specification, the anti-theft module can also be used to: when it is detected that the motor rotates to the third sector, determine the first sector as the locked sector; determine the second sector as the first sector, and determine the third sector as the second sector; the third sector is the next Hall sector of the second sector; increase the voltage value of the motor, and set the voltage vector direction of the motor to the direction corresponding to the center angle of the locked sector.
[0073] In some embodiments of the present specification, the anti-theft module may also be used to: after generating a pulling force to drag the motor back to the locking sector, upon detecting that the motor returns to the first sector, reduce the voltage value; and record the current sector of the motor as the locking sector.
[0074] In some embodiments of the present specification, the anti-theft module may also be used to: when a Hall fault is detected in the motor, control the inverter MOS tube of the motor to short-circuit the three phase lines of the motor.
[0075] From the above description, it can be seen that the embodiments of this specification achieve the following technical effects: a motor control method for electric bicycle anti-theft is provided. When the electric vehicle is in anti-theft mode, the Hall sector where the motor rotor is currently located and the center angle of the current Hall sector are obtained, and the current Hall sector is determined as a locking sector. When it is detected that the motor rotates to the next sector of the current sector, the voltage value of the motor is increased, and the direction of the motor's voltage vector is set to the direction corresponding to the center angle to generate a pulling force to drag the motor back to the locking sector to prevent the motor from being pushed. Furthermore, when the motor rotates to the next sector, it rotates about 90° relative to the center angle of the locking sector. At this time, the voltage vector with the vector direction of the center angle can maximize the braking force under the same current. In this solution, users can achieve anti-theft without installing an additional mechanical lock. Moreover, compared with the existing anti-theft solution based on speed sensor, this solution can effectively avoid motor shaking.
[0076] This specification also provides a computer device, which can be found in Figure 4The computer device structure diagram of the motor control method for electric bicycle anti-theft provided in the embodiment of this specification is shown, and the computer device may specifically include an input device 41, a processor 42, and a memory 43. Among them, the memory 43 is used to store processor executable instructions. When the processor 42 executes the instructions, the steps of the motor control method for electric bicycle anti-theft described in any of the above embodiments are implemented.
[0077] In this embodiment, the input device may specifically be one of the main devices for information exchange between the user and the computer system. The input device may include a keyboard, a mouse, a camera, a scanner, a light pen, a handwriting input board, a voice input device, etc.; the input device is used to input the original data and the program for processing these numbers into the computer. The input device can also obtain and receive data transmitted from other modules, units, and devices. The processor can be implemented in any appropriate manner. For example, the processor can take the form of a computer-readable medium, a logic gate, a switch, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a programmable logic controller, and an embedded microcontroller, etc., such as a microprocessor or a processor and a computer-readable program code (such as software or firmware) that can be executed by the (micro) processor. The memory may specifically be a memory device used to store information in modern information technology. The memory may include multiple levels. In a digital system, anything that can store binary data can be a memory; in an integrated circuit, a circuit with a storage function without a physical form is also called a memory, such as a RAM, a FIFO, etc.; in a system, a storage device with a physical form is also called a memory, such as a memory stick, a TF card, etc.
[0078] In this embodiment, the functions and effects specifically realized by the computer device can be explained in comparison with other embodiments and will not be described in detail here.
[0079] The present specification also provides a computer storage medium based on the motor control method for electric bicycle anti-theft, wherein the computer storage medium stores computer program instructions, and when the computer program instructions are executed, the steps of the motor control method for electric bicycle anti-theft described in any of the above embodiments are implemented.
[0080] In this embodiment, the storage medium includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk (HDD) or a memory card. The memory may be used to store computer program instructions. The network communication unit may be an interface for network connection communication set in accordance with the standard specified by the communication protocol.
[0081] In this embodiment, the functions and effects specifically implemented by the program instructions stored in the computer storage medium can be explained in comparison with other embodiments and will not be repeated here.
[0082] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of this specification can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of this specification are not limited to any specific combination of hardware and software.
[0083] It should be understood that the above description is for illustration and not for limitation. Many embodiments and many applications beyond the examples provided will be apparent to those skilled in the art upon reading the above description. Therefore, the scope of this specification should not be determined with reference to the above description, but should be determined with reference to the preceding claims and the full scope of equivalents to which these claims belong.
[0084] The above description is only the preferred embodiment of this specification and is not intended to limit this specification. For those skilled in the art, the embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the protection scope of this specification.
Claims
1. A motor control method for electric bicycle anti-theft, characterized in that: include: In the anti-theft mode, the current Hall sector of the motor and the center angle of the current Hall sector are obtained, and the current Hall sector is determined as a locking sector; When it is detected that the motor rotates from the first sector to the second sector, the voltage value of the motor is increased, and the voltage vector direction of the motor is set to the direction corresponding to the central angle; The first sector is a next Hall sector of the locking sector, and the second sector is a next Hall sector of the first sector; Wherein, the method further comprises: When it is detected that the motor rotates to the third sector, the first sector is determined as the locking sector; the second sector is determined as the first sector, and the third sector is determined as the second sector; the third sector is the next Hall sector of the second sector; The voltage value of the motor is increased, and the voltage vector direction of the motor is set to the direction corresponding to the center angle of the locking sector.
2. The motor control method according to claim 1, characterized in that: Increase the voltage value of the motor, including: The direct-axis voltage value of the motor is gradually increased, and the quadrature-axis voltage value of the motor is kept at zero.
3. The motor control method according to claim 1, characterized in that: Also includes: When it is detected that the motor rotates to the first sector, the voltage value of the motor is kept at zero.
4. The motor control method according to claim 1, characterized in that: When it is detected that the motor rotates from the first sector to the second sector, after increasing the voltage value of the motor, the method further includes: Detect the bus current of the motor; When it is detected that the bus current is greater than a preset current threshold, the voltage value of the motor is stopped from being increased.
5. The motor control method according to claim 1, characterized in that: After generating a pulling force to pull the motor back to the locking sector, the method further comprises: When it is detected that the motor returns to the first sector, reducing the voltage value; Record the current sector of the motor as the locked sector.
6. The motor control method according to claim 1, characterized in that: Also includes: When a Hall fault is detected in the motor, the inverter MOS tube that controls the motor short-circuits the three phase lines of the motor.
7. A motor control device for electric bicycle anti-theft, characterized in that: include: An acquisition module, used for acquiring the current Hall sector of the motor and the center angle of the current Hall sector in the anti-theft mode, and determining the current Hall sector as a locking sector; The anti-theft module is used to increase the voltage value of the motor and set the voltage vector direction of the motor to the direction corresponding to the central angle when detecting that the motor rotates from the first sector to the second sector; the first sector is the next Hall sector of the locking sector, and the second sector is the next Hall sector of the first sector; Among them, the anti-theft module is also used to: when it is detected that the motor rotates to the third sector, determine the first sector as the locking sector; determine the second sector as the first sector, and determine the third sector as the second sector; the third sector is the next Hall sector of the second sector; increase the voltage value of the motor, and set the voltage vector direction of the motor to the direction corresponding to the center angle of the locking sector.
8. A computer device, characterized in that: The method comprises a processor and a memory for storing processor-executable instructions, wherein the processor implements the steps of the method according to any one of claims 1 to 6 when executing the instructions.
9. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
