Motor control method and device, equipment and medium
By using the internal resistance and drain-source voltage difference of the MOS tube in the motor control system for current detection, the problem of increasing cost and volume in the current detection in the prior art is solved, and high accuracy and miniaturized motor control is achieved.
Patent Information
- Application Number
- CN202510022905.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-04-18
AI Technical Summary
High-power motors require current detection when running closed loop, and the prior art is achieved by setting up current sensors, but this increases the cost and junction box volume, affecting miniaturization.
By ohmic calculations using the internal resistance and drain-source voltage difference of the MOS tube in the power driving circuit, the current flowing through the MOS tube is quickly determined, thereby adjusting the motor output current.
The motor output current detection is realized without additional current sensor, reducing the volume of the motor control board and improving detection accuracy.
Smart Images

Figure CN119853545A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of source-carrying devices, and in particular to a motor control method, device, equipment and medium. Background Art
[0002] When high-power motors are running in a closed loop, current detection is required. In the related technology, this is mainly achieved by setting up a current sensor and using the current sensor to directly detect the current. However, this detection method requires additional current sensors, which will increase the cost. In addition, adding a current sensor to the motor junction box also requires reserving a larger space, which will cause the junction box to be larger in size, which is not conducive to the miniaturization of the junction box. Summary of the invention
[0003] The present application aims to provide a motor control method, device, equipment and medium, which can effectively reduce the volume of the motor junction box.
[0004] According to the motor output current detection method of the first aspect of the present application, the controller is applied to the motor, the controller is connected to the acquisition circuit and the power drive circuit; the power drive circuit includes a plurality of MOS tubes, the gates of the plurality of MOS tubes are all connected to the controller, the drains of the plurality of MOS tubes are all connected to the input end of the acquisition circuit, and the sources of the plurality of MOS tubes are all connected to the ground line; the output end of the acquisition circuit is connected to the controller; The motor control method comprises: Transmitting a PWM control signal to the gate of each of the MOS tubes so that each of the MOS tubes is turned on; Acquiring the drain-source voltage difference of the drain of the MOS tube by the acquisition circuit; Performing an ohmic operation using the drain-source voltage difference and the internal resistance of the plurality of MOS tubes to determine a first feedback current value; The duty cycle of the PWM control signal is adjusted according to the first feedback current value and a preset output setting current value to adjust the output current of the power driving circuit.
[0005] According to the motor control device of the second aspect of the present application, the controller is applied to the motor, the controller is connected to the acquisition circuit and the power drive circuit; the power drive circuit includes a plurality of MOS tubes, the gates of the plurality of MOS tubes are all connected to the controller, the drains of the plurality of MOS tubes are all connected to the input end of the acquisition circuit, and the sources of the plurality of MOS tubes are all connected to the ground line; the output end of the acquisition circuit is connected to the controller; The motor control device comprises: An output control module, used for transmitting a PWM control signal to the gate of each of the MOS tubes, so that each of the MOS tubes is turned on; A voltage difference acquisition module, used for acquiring the drain-source voltage difference of the drain of the MOS tube through the acquisition circuit; A feedback current determination module, configured to determine a first feedback current value by performing an ohmic operation using the drain-source voltage difference and the internal resistance of the plurality of MOS tubes; An output adjustment module is used to adjust the duty cycle of the PWM control signal according to the first feedback current value and a preset output setting current value, so as to adjust the output current of the power driving circuit.
[0006] According to the third aspect of the present application, the electronic device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the motor control method of the first aspect embodiment described above is implemented.
[0007] According to the computer-readable storage medium of the fourth aspect embodiment of the present application, computer-executable instructions are stored, and the computer-executable instructions are used to execute the motor control method as described in the first aspect embodiment above.
[0008] The motor control method, device, equipment and medium of the embodiment of the present application, by cleverly using the internal resistance of the MOS tube in the power drive circuit and the drain-source voltage difference between the drain and source of the MOS tube to quickly determine the current flowing through the MOS tube, and then determine the first feedback current value, so that the first feedback current value can be used to quickly complete the adjustment of the motor output. The embodiment of the present application no longer needs to design an open magnetic ring to detect the motor output current, which can effectively reduce the volume of the motor control board, and then reduce the volume of the motor control box, and because the internal resistance of the MOS tube itself usually changes very little, the collected first feedback current value also has a very high accuracy.
[0009] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent from the description, or may be understood by practicing the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which: Figure 1 A flow chart of a motor control method provided in an embodiment of the present application; Figure 2 A circuit diagram of a power drive circuit provided in an embodiment of the present application; Figure 3 A circuit diagram of a collection circuit provided in an embodiment of the present application.
[0011] Figure 4 A system diagram of a motor output current detection system provided in an embodiment of the present application; Figure 5 A schematic diagram of a motor output current detection system provided in an embodiment of the present application when pole installation is completed during installation; Figure 6 A schematic diagram of a Hall sensor after installation during the installation of a motor output current detection system provided in an embodiment of the present application; Figure 7 This is a schematic diagram of the installation process of the motor output current detection system provided in an embodiment of the present application when the shell is installed.
[0012] Reference numerals: Motor drive board 110 , output pole 111 , power drive circuit 112 , positive pole 113 , negative pole 114 , motor control board 120 , Hall sensor 121 , signal conditioning circuit 122 , controller 123 , acquisition circuit 124 , aluminum heat dissipation mounting substrate 200 , and housing 300 . DETAILED DESCRIPTION
[0013] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0014] In the description of this application, if there is a description of first, second, etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0015] In the description of the present application, it should be understood that the descriptions involving orientation, such as the orientation or positional relationship indicated as up, down, etc., are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0016] In the description of this application, it should be noted that, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meaning of the above terms in this application based on the specific content of the technical solution.
[0017] The technical solution of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described below are only part of the embodiments of the present application, not all of the embodiments.
[0018] See also Figure 1 An embodiment of the present application provides a motor control method, which is applied to a motor controller 123 and includes: Transmitting the PWM control signal to the gate of each MOS tube so that each MOS tube is turned on; The drain-source voltage difference of the drain of the MOS tube is obtained by the acquisition circuit 124; An ohmic operation is performed using a drain-source voltage difference and internal resistances of a plurality of MOS tubes to determine a first feedback current value; The duty cycle of the PWM control signal is adjusted according to the first feedback current value and the preset output setting current value to adjust the output current of the power driving circuit 112 .
[0019] In the embodiment of the present application, the current flowing through the MOS tube is quickly determined by cleverly utilizing the internal resistance of the MOS tube in the power drive circuit 112 and the drain-source voltage difference between the drain and source of the MOS tube, and then the first feedback current value is determined, so that the motor output can be quickly adjusted using the first feedback current value. The embodiment of the present application no longer needs to design an open magnetic ring to detect the motor output current, which can effectively reduce the volume of the motor control board 120, thereby reducing the volume of the motor control box, and because the internal resistance of the MOS tube itself usually changes very little, the collected first feedback current value also has extremely high accuracy.
[0020] The controller 123 of the above-mentioned motor is connected to the acquisition circuit 124 and the power driving circuit 112; the power driving circuit 112 includes multiple MOS tubes, the gates of the multiple MOS tubes are all connected to the controller 123, the drains of the multiple MOS tubes are all connected to the input end of the acquisition circuit 124, and the sources of the multiple MOS tubes are all connected to the ground line; the output end of the acquisition circuit 124 is connected to the controller 123.
[0021] The above-mentioned multiple MOS tubes are connected in parallel, which can better meet the operation requirements of high-power motors.
[0022] The acquisition circuit 124 is used to perform operational amplification processing on the signal so that the acquired electrical signal can be effectively read by the controller 123 .
[0023] The above-mentioned output setting current value can be obtained by inputting by the user through the human-computer interaction interface, or can be pushed by other terminal devices such as a mobile terminal and a host computer.
[0024] After the duty cycle of the PWM control signal is adjusted, the conduction time of the MOS tube in the power driving circuit 112 can be changed, thereby changing the output current, thereby achieving adjustment of the motor output power.
[0025] After the above-mentioned MOS tube is turned on, the current will gradually increase as the conduction time increases, and because the change in the internal resistance of the MOS tube is small or basically does not change, the current flowing through the MOS tube can be directly determined quickly by using the predetermined MOS tube internal resistance value and the drain-source voltage difference of the MOS tube, and these currents will eventually serve as the output current of the driving motor, so the current flowing through the internal resistance of the MOS tube can be used to equivalently determine the first feedback current value of the motor.
[0026] The above-mentioned adjustment of the duty cycle of the PWM control signal according to the first feedback current value and the preset output setting current value to adjust the output current of the power driving circuit 112 can be achieved based on the PID control algorithm, by taking the output setting current value as the reference value and the first feedback current value as the feedback value, thereby using the difference between the feedback value and the reference value to perform proportional integral differential operation to obtain the duty cycle adjustment amount of the PWM control signal, and then using the duty cycle adjustment amount to complete the duty cycle adjustment of the PWM control signal, and finally achieve the adjustment of the power driving circuit 112. Specifically, when the first feedback current value is greater than the output setting current value, the duty cycle of the PWM control signal needs to be reduced, and when the first feedback current value is less than or equal to the output setting current value, the duty cycle of the PWM control signal needs to be increased, and the greater the difference, the greater the adjustment amount. It should be noted that the proportional parameter, integral parameter, and differential parameter in the PID control algorithm can be determined in advance through testing experiments, or can be directly determined based on empirical values. It should also be noted that there are more than one PID control algorithm for making adjustments based on the difference. The specific algorithm to be used can be selected according to actual needs. In extreme cases, the duty cycle adjustment amount can even be determined directly by using the ratio of the difference to the output set current value.
[0027] refer to Figure 2 , the number of MOS tubes in the power driving circuit 112 can be 13.
[0028] The MOS tube in the power driving circuit 112 can be a MOS tube with a stable resistance of 0.0065Ω.
[0029] In some embodiments, reference Figure 3 , the acquisition circuit 124 includes: The operational amplifier unit U3 has a positive input terminal connected to one end of the first resistor R20 and one end of the second resistor R27 respectively, a negative input terminal connected to the drain of the MOS tube through an input resistor string, an output terminal connected to the negative input terminal through a third resistor R18, an output terminal connected to the controller 123, the other end of the first resistor R20 is connected to the ground line, and the other end of the second resistor R27 is used to access the reference voltage.
[0030] In this embodiment, a differential sampling circuit is constructed using the operational amplifier unit U3 and multiple resistors, so that the effective collection of the MOS tube drain voltage can be completed, and the differential collection circuit 124 can be used to quickly determine whether the drain voltage exceeds the safety threshold, and output the corresponding control level signal when the safety threshold is exceeded, so that the controller 123 can perform a safe operation when the corresponding control level signal is detected.
[0031] In some embodiments, reference Figure 3 , the input resistor string includes: A first input resistor R22, one end of which is connected to the drain of the MOS tube; A second input resistor R17, one end of which is connected to the negative input terminal of the operational amplifier unit U3; The third input resistor R10 and the fourth input resistor R11 connected in parallel are connected between the other end of the first input resistor R22 and the other end of the second input resistor R17.
[0032] In this embodiment, a plurality of input resistors are provided, and the plurality of input resistors can be used to facilitate fine adjustment of the safety threshold of the differential sampling circuit, thereby better adapting to the differences between different motors.
[0033] In some implementations, the first feedback current value is determined by performing an ohmic operation using a drain-source voltage difference and internal resistances of a plurality of MOS transistors, including: Obtain the maximum drain-source voltage difference within a sampling period, where the sampling period is consistent with the change period of the PWM control signal; The first feedback current value is determined by performing an ohmic operation using the maximum drain-source voltage difference and the internal resistance of a plurality of MOS tubes.
[0034] In this embodiment, by collecting the drain-source voltage difference within a sampling period, the maximum drain-source voltage difference in the current period can be effectively determined, so that the first feedback current value can be determined by performing ohmic operation using the drain-source voltage difference and the internal resistance of multiple MOS tubes.
[0035] The controller 123 is provided with a PWM generator and a trigger. The trigger and the PWM generator have a synchronous time base, so that the drain-source voltage difference in a sampling cycle can be collected more accurately.
[0036] In some embodiments, the controller 123 is further connected to a current acquisition unit for detecting the output current of the motor, and adjusts the duty cycle of the PWM control signal according to the first feedback current value and the preset output setting current value to adjust the output current of the power drive circuit 112, including: When the current acquisition unit works normally, the second feedback current value is acquired through the current acquisition unit, and the duty cycle of the PWM control signal is adjusted according to the second feedback current value and the preset output setting current value to adjust the output current of the power driving circuit 112; When the current acquisition unit does not work properly, the duty cycle of the PWM control signal is adjusted according to the first feedback current value and the preset output setting current value to adjust the output current of the power driving circuit 112 .
[0037] In this embodiment, taking into account the actual situation, in order to further improve the accuracy of current sampling, a current acquisition unit is added to perform current sampling. The sampling method of the current sampling unit can form a current redundant acquisition scheme with the above-mentioned sampling method using MOS tubes, thereby avoiding the problem of the motor being unable to operate accurately after a single sampling method fails.
[0038] The above-mentioned adjustment of the PWM control signal according to the second feedback current value and the preset output setting current value, and the adjustment of the PWM control signal according to the first feedback current value and the preset output setting current value can be implemented based on the PID control algorithm. The specific implementation process has been described above and will not be repeated here. It should be noted that when the second feedback current value is used for adjustment, the first feedback current value in the process of implementing the PID control algorithm based on the first feedback current value can be directly replaced with the second feedback current value.
[0039] The comparison of the feedback current values collected in the above two ways can be performed by a subtraction operation, and by comparing the calculated current difference with a preset sensor fault current threshold, it is determined whether an abnormality exists.
[0040] In some implementations, adjusting the duty cycle of the PWM control signal according to the first feedback current value and the preset output setting current value to adjust the output current of the power driving circuit 112 includes: Continuously acquiring a first feedback current value of a plurality of sampling periods; The duty cycle of the PWM control signal is adjusted according to the output setting current and the preset output setting current value to adjust the output current of the power driving circuit 112 .
[0041] In this implementation, considering the possibility of error in the first feedback current value calculated in a single sampling period, the first feedback current values of multiple sampling periods are further selected to avoid the error, thereby reducing the error caused by a single structure.
[0042] The first feedback current values of the above-mentioned multiple sampling periods can be averaged to obtain the final required first feedback current value, and then the PID control algorithm can be executed using the recalculated first current feedback value and the output setting current.
[0043] It should be noted that it is possible to continuously obtain multiple sampling cycles corresponding to the same output setting current so that when the output setting current changes, the first feedback current value corresponding to the previous output setting current is still used to participate in the average calculation of the first feedback current value corresponding to the new output setting current.
[0044] It should also be noted that when adjusting the duty cycle of the PWM control signal according to the second feedback current value and the preset output setting current value, the second feedback current values of multiple sampling periods can also be averaged to obtain the final required second feedback current value, and then the recalculated second current feedback value and the output setting current can be used to execute the PID control algorithm.
[0045] In some embodiments, reference Figures 4 to 7 , current acquisition unit, including: The Hall sensor 121 has a connection pin bent and the bending direction is toward the output pole 111; the output pole 111 is arranged on the motor drive board 110 and connected to the output end of the power drive circuit 112 on the motor drive board 110, the output pole 111 is penetrated through the pole through hole corresponding to the output pole 111 in the motor control board 120, and a mounting groove is provided on the side of the output pole 111 facing the Hall sensor 121, the mounting groove extends from the pole top to the bottom of the output pole 111, and the sensing structure of the Hall sensor 121 can be arranged in the mounting groove; The signal conditioning circuit 122 is arranged on the motor control board 120, and the motor control board 120 is arranged above the motor driving board 110; the wiring pins of the Hall sensor 121 are connected to the motor control board 120 and connected to the input end of the signal conditioning circuit 122; the output end of the signal conditioning circuit 122 is connected to the controller 123.
[0046] In this embodiment, by providing an installation groove extending from the top of the pole to the bottom of the output pole 111 in the axial direction on the output electrode of the motor, the Hall sensor 121 that is pre-welded on the motor control board 120 after being bent and set can be set in the installation groove and can slide along the installation groove to complete the installation of the motor control board 120. In this embodiment, the installation groove and the Hall sensor 121 are installed in a close-fitting manner, and the output is directly sensed by the structure of the output electrode itself, eliminating the design of the open magnetic ring, and will not increase the space occupied by adding the current detection function, which is conducive to reducing the overall volume of the control board and reducing the overall cost of the control board.
[0047] The motor driving board 110 is mainly used to set a power driving circuit 112, which is composed of a plurality of MOS tubes. The controller 123 controls the on and off of the plurality of MOS tubes by outputting a PWM control signal, thereby realizing output control of the motor.
[0048] The motor control board 120 may be provided with a controller 123 and a signal conditioning circuit 122 , as well as a connection terminal for welding a Hall sensor 121 , and the connection terminal of the Hall sensor 121 is connected to the input end of the signal conditioning circuit 122 .
[0049] The signal conditioning circuit 122 can be used to condition the electrical signal sensed and output by the Hall sensor 121 , and is mainly used to complete filtering, operational amplification and other processing of the electrical signal so that the electrical signal can be read by the controller 123 .
[0050] The Hall sensor 121 has a sensing structure part, which can sense the change of the magnetic field, thereby completing the detection of the current flowing through the output electrode.
[0051] The connection pins of the Hall sensor 121 are bent so that the sensing part of the Hall sensor 121 can extend into the motor control board 120 .
[0052] The output pole 111 is provided with an installation groove extending from the pole top to the bottom of the output pole 111 in the axial direction. The width of the installation groove needs to be slightly larger than the width of the Hall sensor 121 so that the sensing structure of the Hall sensor 121 can penetrate into the installation groove. And the installation groove needs to be opened as parallel as possible with the axis of the output pole 111 so that the Hall sensor 121 can slide better along the installation groove, so that when the motor control board 120 is installed, the Hall sensor 121 will not be unable to be installed because it cannot dock with the installation groove of the output pole 111. In addition, the installation groove needs to be opened as parallel as possible with the axis of the output pole 111, which can also make the current data detected by the Hall sensor 121 more accurate.
[0053] The width of the mounting groove may be greater than the width of the Hall sensor 121 by 0.5 to 1 mm.
[0054] In some implementations, the connection pins of the Hall sensor 121 are bent into a right angle.
[0055] In this embodiment, the connection pins of the Hall sensor 121 are bent into a right angle, so that the detection part of the Hall sensor 121 can better penetrate into the installation groove, and can also better reduce the problem of inaccurate detection caused by the different postures of the Hall sensor 121.
[0056] See also Figures 5 to 7 , an installation method of a motor control method provided by an embodiment of the present application, the installation method comprising: The motor drive board 110 is disposed on the aluminum heat dissipation mounting substrate 200; The output pole 111, the positive pole 113, and the negative pole 114 of the motor are arranged on the motor driving board 110, and the power driving circuit 112 is arranged on the motor driving board 110, the output end of the power driving circuit 112 is connected to the output pole 111, the positive input end of the power driving circuit 112 is connected to the positive pole 113, and the negative input end of the power driving circuit 112 is connected to the negative pole 114; wherein, after the output pole 111 is installed, a mounting groove is axially opened on one side facing the Hall sensor 121, and the mounting groove extends from the top of the pole to the bottom of the output pole 111; The Hall sensor 121 is welded to the motor control board 120 so that the Hall sensor 121 is connected to the input end of the signal conditioning circuit 122 on the motor control board 120, and the wiring pins of the Hall sensor 121 are bent, and the bending direction is toward the pole through hole corresponding to the output pole 111; wherein, the motor control board 120 is provided with three pole through holes corresponding to the output pole 111, the positive pole 113, and the negative pole 114 respectively; the motor control board 120 is provided with a controller 123 and a signal conditioning circuit 122, and the output end of the signal conditioning circuit 122 is connected to the controller 123; The motor control board 120 is disposed above the motor drive board 110 so that the sensing structure of the Hall sensor 121 is disposed in the mounting groove, wherein the output pole 111 , the positive pole 113 and the negative pole 114 are penetrated from corresponding through holes.
[0057] In the embodiment of the present application, by providing an installation groove extending from the top of the pole to the bottom of the output pole 111 along the axial direction on the output electrode of the motor, the Hall sensor 121 that is pre-welded on the motor control board 120 after being bent and set can be set in the installation groove, and can slide along the installation groove to complete the installation of the motor control board 120. In the embodiment of the present application, the installation groove and the Hall sensor 121 are closely matched and installed, and the output is directly sensed by the structure of the output electrode itself, the design of the open magnetic ring is cancelled, and the space occupation will not be increased due to the addition of the current detection function, which is conducive to reducing the overall volume of the control board and reducing the overall cost of the control board.
[0058] The above-mentioned mounting groove can be opened during the production stage of the output pole 111.
[0059] The Hall sensor 121 may be pre-bent into a fixed angle and then welded to the motor control board 120 to avoid manual bending by construction workers on site, which may result in large differences in bending angles and introduce detection errors.
[0060] The motor control board 120 is provided with three pole through holes, which correspond to the output pole 111, the positive pole 113, and the negative pole 114 provided on the motor control board 120, respectively, so that when the motor control board 120 is arranged above the motor drive board 110, the output pole 111, the positive pole 113, and the negative pole can be passed through. It should be noted that the structure in which the motor drive board 110 and the motor control board 120 are arranged separately can, on the one hand, effectively reduce the volume of a single circuit board, and on the other hand, can also separate the power part from the control part, thereby improving the stability and safety of the entire control process.
[0061] In some embodiments, the method for installing the motor output current detection system further includes: The housing 300 is fixed on the aluminum heat dissipation mounting substrate 200 to cover the motor control board 120 and the motor driving board 110 .
[0062] In this embodiment, the housing 300 is added to prevent the device from being damaged by external impact or a safety accident caused by power leakage.
[0063] The motor control method provided in the embodiment of the present application can be executed by a motor control device. In the embodiment of the present application, the motor control device provided in the embodiment of the present application is described by taking the motor control method executed by the motor control device as an example.
[0064] The present application also provides a motor control device, the motor control device comprising: An output control module, used for transmitting a PWM control signal to the gate of each MOS tube so that each MOS tube is turned on; A voltage difference acquisition module, used for acquiring the drain-source voltage difference of the drain of the MOS tube through an acquisition circuit 124; A feedback current determination module, used to perform ohmic operation using a drain-source voltage difference and internal resistances of a plurality of MOS tubes to determine a first feedback current value; The output adjustment module is used to adjust the duty cycle of the PWM control signal according to the first feedback current value and the preset output setting current value, so as to adjust the output current of the power driving circuit 112.
[0065] The motor control device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than the terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a car-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (Ultra-mobile perSonalCompUter, UMPC), a netbook or a personal digital assistant (perSonal digital aSSiStant, PDA), etc., and can also be a server, a network attached storage (NetWork AttaChed Storage, NAS), a personal computer (perSonalCompUter, PC), a television (teleViSion, tV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0066] The embodiment of the present application also provides an electronic device, including: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the motor control method as described above is implemented. The source meter provided in the embodiment of the present application can implement each process implemented in the embodiment of the motor control method described above, and achieve the same beneficial effects, so to avoid repetition, it will not be described here.
[0067] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. The computer-executable instructions are executed by a processor or a control module, so that the processor can execute the motor control method in the above embodiment, for example, execute the method described above.
[0068] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0069] The functional blocks shown in the above structural block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0070] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0071] Aspects of the present disclosure are described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the functions / actions specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0072] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A motor control method, characterized in that: A controller applied to a motor, the controller is connected to a collection circuit and a power drive circuit; the power drive circuit comprises a plurality of MOS tubes, the gates of the plurality of MOS tubes are all connected to the controller, the drains of the plurality of MOS tubes are all connected to the input end of the collection circuit, and the sources of the plurality of MOS tubes are all connected to a ground line; The output end of the acquisition circuit is connected to the controller; The motor control method comprises: Transmitting a PWM control signal to the gate of each of the MOS tubes so that each of the MOS tubes is turned on; Acquiring the drain-source voltage difference of the drain of the MOS tube by the acquisition circuit; Performing an ohmic operation using the drain-source voltage difference and the internal resistance of the plurality of MOS tubes to determine a first feedback current value; The duty cycle of the PWM control signal is adjusted according to the first feedback current value and a preset output setting current value to adjust the output current of the power driving circuit.
2. The motor control method according to claim 1, characterized in that: The acquisition circuit comprises: An operational amplifier unit, wherein the positive input end is respectively connected to one end of the first resistor and one end of the second resistor, the negative input end is connected to the drain of the MOS tube through an input resistor string, the output end is connected to the negative input end through a third resistor, the output end is connected to the controller, the other end of the first resistor is connected to the ground wire, and the other end of the second resistor is used to access the reference voltage.
3. The motor control method according to claim 2, characterized in that: The input resistor string comprises: A first input resistor, one end of which is connected to the drain of the MOS tube; A second input resistor, one end of which is connected to the negative input terminal of the operational amplifier unit; The third input resistor and the fourth input resistor connected in parallel are connected between the other end of the first input resistor and the other end of the second input resistor.
4. The motor control method according to claim 1, characterized in that: The method of performing an ohmic operation using the drain-source voltage difference and the internal resistance of the plurality of MOS tubes to determine the first feedback current value includes: Obtaining the maximum drain-source voltage difference within a sampling period, wherein the sampling period is consistent with a variation period of the PWM control signal; The first feedback current value is determined by performing an ohmic operation using the largest drain-source voltage difference and the internal resistance of the plurality of MOS tubes.
5. The motor control method according to claim 1, characterized in that: The controller is also connected to a current acquisition unit for detecting the output current of the motor, and the duty cycle of the PWM control signal is adjusted according to the first feedback current value and a preset output setting current value to adjust the output current of the power drive circuit, including: When the current acquisition unit works normally, a second feedback current value is acquired through the current acquisition unit, and the duty cycle of the PWM control signal is adjusted according to the second feedback current value and a preset output setting current value, so as to adjust the output current of the power driving circuit; When the current acquisition unit does not work properly, the duty cycle of the PWM control signal is adjusted according to the first feedback current value and a preset output setting current value to adjust the output current of the power driving circuit.
6. The motor control method according to claim 5, characterized in that: The step of adjusting the duty cycle of the PWM control signal according to the first feedback current value and the preset output setting current value to adjust the output current of the power driving circuit includes: Continuously acquiring a first feedback current value of a plurality of sampling periods; The duty cycle of the PWM control signal is adjusted according to the output setting current and a preset output setting current value to adjust the output current of the power driving circuit.
7. The motor control method according to claim 5, characterized in that: The current collection unit comprises: A Hall sensor, wherein the connection pins are bent and the bending direction is toward the output pole; the output pole is arranged on the motor drive board and connected to the output end of the power drive circuit on the motor drive board, the output pole is penetrated through the pole through hole corresponding to the output pole in the motor control board, the output pole is provided with a mounting groove on one side facing the Hall sensor, the mounting groove extends from the pole top to the output pole bottom, and the sensing structure of the Hall sensor can be arranged in the mounting groove; A signal conditioning circuit is arranged on the motor control board, and the motor control board is arranged above the motor drive board; the wiring pins of the Hall sensor are connected to the motor control board and connected to the input end of the signal conditioning circuit; the output end of the signal conditioning circuit is connected to the controller.
8. A motor control device, characterized in that: A controller applied to a motor, the controller is connected to a collection circuit and a power drive circuit; the power drive circuit comprises a plurality of MOS tubes, the gates of the plurality of MOS tubes are all connected to the controller, the drains of the plurality of MOS tubes are all connected to the input end of the collection circuit, and the sources of the plurality of MOS tubes are all connected to a ground line; the output end of the collection circuit is connected to the controller; The motor control device comprises: An output control module, used for transmitting a PWM control signal to the gate of each of the MOS tubes, so that each of the MOS tubes is turned on; A voltage difference acquisition module, used for acquiring the drain-source voltage difference of the drain of the MOS tube through the acquisition circuit; A feedback current determination module, used to perform an ohmic operation using the drain-source voltage difference and the internal resistance of the plurality of MOS tubes to determine a first feedback current value; An output adjustment module is used to adjust the duty cycle of the PWM control signal according to the first feedback current value and a preset output setting current value, so as to adjust the output current of the power driving circuit.
9. An electronic device, characterized in that: The electronic device comprises a processor and a memory storing computer program instructions; When the processor executes the computer program, the motor control method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the motor control method according to any one of claims 1 to 7.