Method and device for driving brush motor and computer readable storage medium

文档序号:52297 发布日期:2021-09-28 浏览:23次 中文

阅读说明:本技术 一种有刷电机驱动方法、装置及计算机可读存储介质 (Method and device for driving brush motor and computer readable storage medium ) 是由 俞浩 于 2018-12-29 设计创作,主要内容包括:本发明实施例涉及机械控制领域,公开了一种有刷电机驱动方法、装置及计算机可读存储介质。本发明中,一种有刷电机驱动方法,包括:在第一预设频率范围内随机产生初始驱动频率;控制所述有刷电机在所述初始驱动频率下运行;每间隔预设时长,在第二预设频率范围内产生新的驱动频率,并控制所述有刷电机在所述新的驱动频率下运行。本发明实施方式所提供的有刷电机驱动方法、装置及计算机可读存储介质具有减少有刷电机在运行的过程中产生的电磁辐射峰值和噪音干扰的优点。(The embodiment of the invention relates to the field of mechanical control, and discloses a method and a device for driving a brush motor and a computer readable storage medium. The invention discloses a brush motor driving method, which comprises the following steps: randomly generating an initial driving frequency within a first preset frequency range; controlling the brush motor to operate at the initial driving frequency; and generating a new driving frequency in a second preset frequency range at preset intervals, and controlling the brush motor to operate at the new driving frequency. The brush motor driving method, the brush motor driving device and the computer readable storage medium have the advantage of reducing electromagnetic radiation peak values and noise interference generated in the running process of the brush motor.)

1. A method for driving a brush motor, comprising the steps of:

randomly generating an initial driving frequency within a first preset frequency range;

controlling the brush motor to operate at the initial driving frequency;

calculating according to the initial driving frequency to obtain a second preset frequency range, wherein a preset lower limit proportion is preset; acquiring the product of the initial driving frequency and a preset lower limit proportion as a theoretical lower limit value of the second preset frequency range;

and generating a new driving frequency within the second preset frequency range at preset intervals, and controlling the brush motor to operate at the new driving frequency.

2. The brush motor driving method according to claim 1,

the second preset frequency range further comprises a preset upper limit proportion, the product of the initial driving frequency and the preset upper limit proportion is taken as a theoretical upper limit value of the second preset frequency range, and the upper limit value of the second preset frequency range is set as the theoretical upper limit value.

3. The brush motor driving method according to claim 1,

judging whether the theoretical lower limit value is greater than or equal to 20000 Hz;

if so, setting the lower limit value of the second preset frequency range as the theoretical lower limit value, and if not, setting the lower limit value of the second preset frequency range as 20000 hertz.

4. The brush motor driving method according to claim 1, wherein the preset upper limit ratio is not less than 110% and not more than 120%, and the preset lower limit ratio is not less than 80% and not more than 90%.

5. The brush motor driving method according to claim 1, wherein the preset upper limit ratio and the preset lower limit ratio are generated by a random function.

6. The method of claim 1, wherein prior to controlling the brushed motor to operate at the new drive frequency, further comprising:

judging whether the new driving frequency is the same as the current driving frequency of the brush motor or not;

if so, regenerating the new driving frequency, and controlling the brush motor to operate at the new driving frequency;

and if not, directly controlling the brushed motor to operate at the new driving frequency.

7. The brush motor driving method according to claim 1, wherein the first preset frequency range is greater than or equal to 20000 hz.

8. The brush motor driving method according to claim 1, wherein the initial driving frequency is generated by a random function, and the new driving frequency is generated by the random function.

9. A brushed motor drive device, comprising:

at least one processor; and the number of the first and second groups,

a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,

the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the brushed motor driving method as defined in any one of claims 1 to 8.

10. A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the brush motor driving method according to any one of claims 1 to 8.

Technical Field

The embodiment of the invention relates to the field of mechanical control, in particular to a method and a device for driving a brush motor and a computer readable storage medium.

Background

The motor is a machine for converting electric energy into mechanical energy, has good speed regulation performance and is widely applied to electric dragging. The motor can be divided into a brush motor and a brushless motor according to the structure, wherein the brush motor leads the positive pole and the negative pole of a power supply to a phase changer of a rotor through a brush, the phase changer is communicated with a coil on the rotor, and the polarity of the coil is continuously and alternately changed to form acting force with a fixed magnetic field to rotate. Because the brush motor is simple to manufacture, low in technical threshold and low in cost, the brush motor is more and more widely applied to the life of people. The motor of the automobile and the sweeper for families can be driven by the brush motor.

However, the inventors of the present invention found that: in the running process of a brush motor in the prior art, a large amount of electromagnetic radiation and noise interference can be generated in the surrounding space, the daily life of people is influenced, and the physical health of surrounding people can be damaged.

Disclosure of Invention

The embodiment of the invention aims to provide a method and a device for driving a brush motor and a computer readable storage medium, which can reduce electromagnetic radiation peak and noise interference generated in the running process of the brush motor.

In order to solve the above technical problem, an embodiment of the present invention provides a method for driving a brush motor, including: randomly generating an initial driving frequency within a first preset frequency range; controlling the brush motor to operate at the initial driving frequency; and generating a new driving frequency in a second preset frequency range at preset intervals, and controlling the brush motor to operate at the new driving frequency.

An embodiment of the present invention also provides a brush motor driving device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the aforementioned brushed motor driving method.

Embodiments of the present invention also provide a computer-readable storage medium storing a computer program which, when executed by a processor, implements the foregoing brushed motor driving method.

Compared with the prior art, the method and the device have the advantages that after the initial driving frequency is generated and the brush motor is controlled to operate at the initial driving frequency, new driving frequency is generated at intervals of preset duration, and then the brush motor is controlled to operate at the new driving frequency. The driving frequency of the brush motor is changed every preset time interval, so that the energy of the electromagnetic radiation generated when the brush motor operates can be dispersed at different frequencies, the brush motor is prevented from operating at the same driving frequency for a long time, the energy of the generated electromagnetic radiation is prevented from being superposed at the frequency, the peak energy of the electromagnetic radiation is avoided being overlarge, and the electromagnetic radiation peak value generated when the brush motor operates is effectively reduced. In addition, the driving frequency of the brush motor is changed when preset time is set at intervals, resonance of the operating frequency of the brush motor and structures such as a shell of the brush motor can be prevented, and the occurrence of large noise is avoided, so that noise interference generated in the operating process of the brush motor is effectively reduced.

In addition, before generating a new driving frequency in a second preset frequency range every the preset time interval, the method further includes: acquiring the product of the initial driving frequency and a preset upper limit proportion as a theoretical upper limit value of the second preset frequency range; setting an upper limit value of the second preset frequency range as the theoretical upper limit value; acquiring the product of the initial driving frequency and a preset lower limit proportion as a theoretical lower limit value of the second preset frequency range; judging whether the theoretical lower limit value is greater than or equal to 20000 Hz; if so, setting the lower limit value of the second preset frequency range as the theoretical lower limit value, and if not, setting the lower limit value of the second preset frequency range as 20000 hertz. Through initial drive frequency, preset default upper limit proportion and preset default lower limit proportion that set up in advance, calculate respectively and obtain the theoretical upper limit value and the theoretical lower limit value of the second default frequency range, when theoretical lower limit value is less than 20000 hertz, the lower limit value that sets up the second default frequency range is 20000 hertz, because the vibration that is less than 20000 hertz can produce the sound that the human ear can hear, consequently, the lower limit value that sets up the second default frequency range is not less than 20000 hertz, can effectually prevent that there is the brush motor to produce strong noise interference to the human ear.

In addition, the preset upper limit proportion is not less than 110% and not more than 120%, and the preset lower limit proportion is not less than 80% and not more than 90%.

In addition, the preset upper limit proportion and the preset lower limit proportion are generated by a random function.

In addition, before the controlling the brushed motor to operate at the new driving frequency, the method further includes: judging whether the new driving frequency is the same as the current driving frequency of the brush motor or not; if so, regenerating the new driving frequency, and controlling the brush motor to operate at the new driving frequency; and if not, directly controlling the brushed motor to operate at the new driving frequency. Before the brushed motor is controlled to run under the new driving frequency, the step of judging whether the new driving frequency is the same as the current driving frequency of the brushed motor is added, and the new driving frequency is generated again when the new driving frequency is judged to be the same, so that the situation that the driving frequency of the brushed motor continuously takes the same value twice or for many times without change is prevented, and the electromagnetic radiation peak value and the noise interference generated in the running process of the brushed motor are effectively reduced.

In addition, the first predetermined frequency range is greater than or equal to 20000 hz. The first preset frequency range is set to be more than or equal to 20000 Hz, and noise interference caused by the fact that the brush motor runs due to the fact that the initial driving frequency is less than 20000 Hz is prevented.

In addition, the initial driving frequency is generated by a random function, and the new driving frequency is generated by the random function.

Drawings

Fig. 1 is a flowchart of a method for driving a brush motor according to a first embodiment of the present invention;

fig. 2 is a flowchart of a method for driving a brush motor according to a second embodiment of the present invention;

FIG. 3 is a flow chart of a method for driving a brush motor according to a third embodiment of the present invention

Fig. 4 is a schematic structural diagram of a brush motor driving device according to a fourth embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present invention in its various embodiments. However, the technical solution claimed in the present invention can be implemented without these technical details and various changes and modifications based on the following embodiments.

A first embodiment of the present invention relates to a brush motor driving method. The specific process is shown in fig. 1, and comprises the following steps:

step S101: the initial driving frequency is randomly generated within a first preset frequency range.

Specifically, in this step, the first preset frequency range is a preset value range of the initial driving frequency, and the first preset frequency range can be flexibly set according to the actual situation of the brushed motor, such as according to model parameters, use scenes, and the like of the brushed motor.

Further, in this step, the initial driving frequency is generated by a random function within a first predetermined frequency range. It is to be understood that the method for randomly generating the initial driving frequency within the first predetermined frequency range is not limited to the random function generation, and may also be generated by other methods, such as a random number table method, and may be specifically selected according to actual needs.

In addition, in this step, the first predetermined frequency range is greater than or equal to 20000 hz. Because 20000 hertz is the highest frequency of the sound that the human ear can hear, sets up first preset frequency range and is more than or equal to 20000 hertz, prevents to have the brush motor to produce the sound that the human ear can hear, the effectual noise that produces when having the brush motor operation that has reduced. It should be noted that the first preset frequency range is only one preferred embodiment, and the first preset frequency range is not limited to this value range, and may be flexibly set according to actual needs, for example, if the brush motor is installed in a region far from the crowd, the driving frequency may be less than 20000 hz.

Step S102: and controlling the brush motor to run at the initial driving frequency.

Specifically, in this step, after the initial driving frequency is generated in step S101, the initial driving frequency is input to the micro control unit of the brush motor; the micro control unit controls the brush motor to operate at the initial driving frequency through a field effect transistor driving circuit controlling the brush motor.

Step S103: and generating a new driving frequency within a second preset frequency range at intervals of a preset time length.

Specifically, in this embodiment, the preset duration is a duration of a device in advance, and the duration may be flexibly set according to actual needs. The interval preset duration is to generate a new driving frequency within a second preset frequency range, that is, after the brushed motor runs for the preset duration under the initial driving frequency, the new driving frequency is generated within the second preset frequency range.

Further, in the present embodiment, the method for generating the new driving frequency in the second predetermined frequency range is the same as the method for generating the initial driving frequency in the first predetermined frequency range, that is, the new driving frequency is randomly generated in the second predetermined frequency range by the random function. It will be appreciated that the method of generating the new drive frequency in the second predetermined frequency range may be different from the method of generating the initial drive frequency in the first predetermined frequency range, and other methods may be used to randomly generate the new drive frequency. The method can be flexibly selected according to actual needs.

In addition, it should be noted that the second preset value range may be the same as or different from the first preset value range, and may be specifically selected according to an actual situation. In this embodiment, the second preset value range is a value range selected in advance according to actual needs.

Step S104: the brush motor is controlled to operate at the new driving frequency, and the process returns to step S103.

Specifically, in this step, after the new driving frequency is generated in step S103, the brush motor is controlled to operate at the new driving frequency. It is understood that the method for controlling the operation of the brushed motor at the new driving frequency is substantially the same as that in step S102, and will not be described herein again. It should be noted that, after the brushed motor is controlled to operate at the new driving frequency for the preset time period in this step, the process returns to step S103, where the converted driving frequency is generated.

Compared with the prior art, the method for driving the brush motor provided by the first embodiment of the invention controls the brush motor to operate at a new driving frequency by presetting time intervals, so that electromagnetic radiation energy generated in the operation process of the brush motor is dispersed into different frequencies, and the electromagnetic radiation peak value caused by accumulation of the electromagnetic radiation energy at the same frequency is prevented from generating adverse effects on the surrounding environment. In addition, every preset interval is long, the brush motor is controlled to run at a new driving frequency, other parts of the brush motor, such as a shell and the like, are prevented from resonating with the rotor, and noise of the brush motor in the running process is effectively reduced.

A second embodiment of the present invention relates to a brush motor driving method. As shown in fig. 2, the method comprises the following steps:

step S201: the initial driving frequency is randomly generated within a first preset frequency range.

Step S202: and controlling the brush motor to run at the initial driving frequency.

Step S203: and calculating according to the initial driving frequency to obtain a second preset value range.

Specifically, in this step, a preset upper limit ratio and a preset lower limit ratio are preset, and after the initial driving frequency is obtained in step S201. Firstly, calculating to obtain a theoretical upper limit value of a second preset value range according to the initial driving frequency and a preset upper limit ratio, and setting the upper limit value of the second preset frequency range as the calculated theoretical upper limit value; and then, calculating to obtain a theoretical lower limit value of a second preset value range according to the initial driving frequency and the preset lower limit proportion. The lower limit value of the second preset frequency range is set as the calculated theoretical lower limit value if the calculated theoretical lower limit value is greater than or equal to 20000 hertz; if the calculated theoretical lower limit value is less than 20000 hz, the lower limit value of the second preset frequency range is set to 20000 hz.

Preferably, in this step, the preset upper limit proportion is not less than 110% and not more than 120%, and the preset lower limit proportion is not less than 80% and not more than 90%.

In addition, in this step, both the preset upper limit ratio and the preset lower limit ratio are obtained by a random function. It is understood that, an example of a method for randomly generating the preset upper limit ratio and the preset lower limit ratio provided for the present embodiment is obtained by a random function, and in an actual application process, other methods may also be used, and are not listed here.

Step S204: and generating a new driving frequency within a second preset frequency range at intervals of a preset time length.

Step S205: and controlling the brush motor to run at the new driving frequency, and returning to the step S204.

Since steps S201, S202, S204, and S205 in this embodiment are substantially the same as steps S101 to S104 in the first embodiment, detailed description thereof is omitted.

Compared with the prior art, the method for driving the brush motor provided by the second embodiment of the invention controls the brush motor to operate at a new driving frequency at intervals of a preset duration, so that the electromagnetic radiation energy generated in the operation process of the brush motor is dispersed into different frequencies, and the electromagnetic radiation peak value caused by the accumulation of the electromagnetic radiation energy at the same frequency is prevented from generating adverse effects on the surrounding environment. In addition, every preset interval is long, the brush motor is controlled to run at a new driving frequency, other parts of the brush motor, such as a shell and the like, are prevented from resonating with the rotor, and noise of the brush motor in the running process is effectively reduced. In addition, a second preset frequency range is obtained through calculation of the initial driving frequency, the preset upper limit proportion and the preset lower limit proportion, and the situation that the brush motor is damaged in the process of rapidly converting the driving frequency due to the fact that the difference value between the driving frequencies obtained at random twice continuously is too large is avoided.

A third embodiment of the present invention relates to a brush motor driving method. As shown in fig. 3, the method comprises the following steps:

step S301: the initial driving frequency is randomly generated within a first preset frequency range.

Step S302: and controlling the brush motor to run at the initial driving frequency.

Step S303: and generating a new driving frequency within a second preset frequency range at intervals of a preset time length.

Step S304: judging whether the new driving frequency is the same as the current driving frequency of the brush motor, if so, executing step S305; if not, go to step S306.

Specifically, in this step, after a new driving frequency is generated within a second preset frequency range, it is first determined whether the new driving frequency is the same as the current driving frequency of the brush motor, if so, step S305 is executed, and if not, step S306 is executed.

Step S305: and regenerating a new driving frequency in the second preset frequency range, and returning to execute the step S304.

Specifically, in this step, since it is determined in step S304 that the new driving frequency is the same as the current driving frequency of the brush motor, in order to change the driving frequency of the brush motor, in this step, the new driving frequency is newly generated within the second preset frequency range, and the process returns to step S304 to perform the determination again.

Step S306: the brush motor is controlled to operate at the new driving frequency, and the process returns to step S303.

Since steps S301, S302, S303, and S306 in this embodiment are substantially the same as steps S101 to S104 in the first embodiment, detailed description thereof is omitted.

Compared with the prior art, the method for driving the brush motor provided by the second embodiment of the invention controls the brush motor to operate at a new driving frequency at intervals of a preset duration, so that the electromagnetic radiation energy generated in the operation process of the brush motor is dispersed into different frequencies, and the electromagnetic radiation peak value caused by the accumulation of the electromagnetic radiation energy at the same frequency is prevented from generating adverse effects on the surrounding environment. In addition, every preset interval is long, the brush motor is controlled to run at a new driving frequency, other parts of the brush motor, such as a shell and the like, are prevented from resonating with the rotor, and noise of the brush motor in the running process is effectively reduced. In addition, before the brushed motor is controlled to operate at a new driving frequency, step S304 is added to judge whether the new driving frequency is the same as the current driving frequency of the brushed motor, step S305 is executed when the new driving frequency is judged to be the same as the current driving frequency of the brushed motor to regenerate the new driving frequency, the step S306 is executed until the new driving frequency is different from the current driving frequency of the brushed motor, the brushed motor is controlled to operate at the new driving frequency, the driving frequency of the brushed motor is prevented from being changed due to the fact that the same value is continuously obtained twice or for multiple times, and therefore electromagnetic radiation peak values and noise interference generated in the operation process of the brushed motor are effectively reduced.

A fourth embodiment of the present invention relates to a brush motor drive device, as shown in fig. 4, including: at least one processor 401; and a memory 402 communicatively coupled to the at least one processor 401; the memory 402 stores instructions executable by the at least one processor 401, and the instructions are executed by the at least one processor 401 to enable the at least one processor 401 to perform the brush motor driving method as described above.

Where the memory 402 and the processor 401 are coupled by a bus, which may include any number of interconnected buses and bridges that couple one or more of the various circuits of the processor 401 and the memory 402 together. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor 401 may be transmitted over a wireless medium via an antenna, which may receive the data and transmit the data to the processor 401.

The processor 401 is responsible for managing the bus and general processing and may provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And memory 402 may be used to store data used by processor 401 in performing operations.

A fifth embodiment of the present invention relates to a computer-readable storage medium storing a computer program. The computer program realizes the above-described method embodiments when executed by a processor.

That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种电机控制方法,及相应的投影结构,车灯和车辆

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!