CN114337404A - DC motor control method, air conditioner and computer readable storage medium - Google Patents

DC motor control method, air conditioner and computer readable storage medium Download PDF

Info

Publication number
CN114337404A
CN114337404A CN202111657852.4A CN202111657852A CN114337404A CN 114337404 A CN114337404 A CN 114337404A CN 202111657852 A CN202111657852 A CN 202111657852A CN 114337404 A CN114337404 A CN 114337404A
Authority
CN
China
Prior art keywords
motor
rotating speed
time period
speed
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111657852.4A
Other languages
Chinese (zh)
Other versions
CN114337404B (en
Inventor
王新民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Guangdong Air Conditioning Co Ltd
Original Assignee
Hisense Guangdong Air Conditioning Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Guangdong Air Conditioning Co Ltd filed Critical Hisense Guangdong Air Conditioning Co Ltd
Priority to CN202111657852.4A priority Critical patent/CN114337404B/en
Publication of CN114337404A publication Critical patent/CN114337404A/en
Application granted granted Critical
Publication of CN114337404B publication Critical patent/CN114337404B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Control Of Motors That Do Not Use Commutators (AREA)
  • Control Of Electric Motors In General (AREA)

Abstract

The invention discloses a direct current motor control method, an air conditioner and a computer readable storage medium, wherein the direct current motor control method comprises the following steps: s1, receiving a final target rotating speed value of the motor; s2, obtaining the current target rotating speed value according to the speed curve; s3, obtaining the time period of calculating the motor speed according to the final target speed value and the current target speed value; s4, obtaining a motor feedback pulse count value, and obtaining an average rotating speed value of the motor in a time period of calculating the rotating speed of the motor according to the motor feedback pulse count value; s5, obtaining a speed regulation duty ratio corresponding to the current target rotating speed value according to the current target rotating speed value and the average rotating speed value so as to drive the motor; and S6, determining that the rotating speed of the motor reaches the current target rotating speed value, assigning the current target rotating speed value to the current rotating speed, and returning to the step S2 until the rotating speed of the motor reaches the final target rotating speed value. The method can improve the dynamic response capability of the motor and improve the accuracy and stability of the motor in the speed regulation process.

Description

DC motor control method, air conditioner and computer readable storage medium
Technical Field
The invention relates to the technical field of direct current motors, in particular to a direct current motor control method, an air conditioner and a computer readable storage medium.
Background
In the related art, for speed regulation control of a direct current motor, the current rotating speed of the motor is calculated by adopting a fixed time period, the current rotating speed is directly compared with a final target rotating speed value, and the size of an output speed regulation duty ratio is adjusted according to a comparison result. However, since the rotating speed is calculated and adjusted by using a fixed time period, and the calculated rotating speed is actually an average speed in the fixed time period, the accuracy of the output rotating speed is affected when the dynamic demand for acceleration or deceleration is high.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, one objective of the present invention is to provide a method for controlling a dc motor, which can improve the dynamic response capability of the motor and improve the accuracy and stability of the motor during the speed regulation process.
The second objective of the present invention is to provide an air conditioner.
It is a further object of the present invention to provide a computer-readable storage medium.
In order to solve the above problem, an embodiment of a first aspect of the present invention provides a method for controlling a dc motor, including: s1, receiving a final target rotating speed value of the motor; s2, obtaining the current target rotating speed value according to the speed curve; s3, obtaining a time period for calculating the motor speed according to the final target speed value and the current target speed value; s4, obtaining a motor feedback pulse count value, and obtaining an average rotating speed value of the motor in the time period of calculating the rotating speed of the motor according to the motor feedback pulse count value; s5, obtaining a speed regulation duty ratio corresponding to the current target rotating speed value according to the current target rotating speed value and the average rotating speed value so as to drive the motor; s6, determining that the motor speed reaches the current target speed value, assigning the current target speed value to the current speed, and returning to the step S2 until the motor speed reaches the final target speed value.
According to the direct current motor control method provided by the embodiment of the invention, when the motor is regulated, the time period for calculating the rotating speed of the motor is obtained by using the final target rotating speed value and the current target rotating speed value, namely, the determination of the time period for calculating the rotating speed of the motor is related to the final target rotating speed value and the current target rotating speed value, the time period for calculating the rotating speed of the motor is not only fixed, and further the average rotating speed value of the motor is calculated by using the motor feedback pulse count value in the time period for calculating the rotating speed of the motor.
In some embodiments, obtaining a time period for calculating a motor speed from the final target speed value and the current target speed value comprises: calculating a speed difference value between the final target rotating speed of the motor and the current target rotating speed value; and obtaining the time period for calculating the rotating speed of the motor according to the speed difference.
In some embodiments, obtaining the time period for calculating the motor speed from the speed difference comprises: determining that the speed difference value is smaller than or equal to a preset speed threshold value, wherein the time period for calculating the rotating speed of the motor is a first time period; and if the speed difference is determined to be larger than a preset speed threshold, the time period for calculating the rotating speed of the motor is a second time period, wherein the second time period is smaller than the first time period.
In some embodiments, obtaining a speed regulation duty cycle corresponding to the current target rotation speed value according to the current target rotation speed value and the average rotation speed value includes: obtaining the target adjusting parameter according to the time period of calculating the rotating speed of the motor; and obtaining a speed regulation duty ratio corresponding to the current target rotating speed value according to the current target rotating speed value, the average rotating speed value and the target regulation parameter.
In some embodiments, obtaining the target regulation parameter from the time period of calculating the motor speed includes: and determining the time period for calculating the rotating speed of the motor as the first time period, wherein the target adjusting parameter is a first adjusting parameter.
In some embodiments, obtaining the target adjustment parameter based on the time period for calculating the motor speed further comprises: and determining that the time period for calculating the rotating speed of the motor is the second time period, and then the target adjusting parameter is a second adjusting parameter, wherein the second adjusting parameter is different from the first adjusting parameter.
In some embodiments, the obtaining the speed-regulating duty ratio corresponding to the current target rotation speed value according to the current target rotation speed value, the average rotation speed value and the target regulation parameter includes: and carrying out proportional integral calculation according to the current target rotating speed value, the average rotating speed value, the target proportional parameter and the target integral parameter so as to obtain the speed regulation duty ratio.
In some embodiments, the first time period is 0.5s to 1 s.
An embodiment of a second aspect of the present invention provides an air conditioner, including: at least one processor; a memory communicatively coupled to the at least one processor; wherein, the memory stores a computer program executable by the at least one processor, and the at least one processor implements the dc motor control method according to the above embodiment when executing the computer program.
According to the air conditioner provided by the embodiment of the invention, the processor executes the direct current motor control method provided by the embodiment, so that the dynamic response capability of the motor can be improved, and the accuracy and the stability of the motor in the speed regulation process can be improved.
A third embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the dc motor control method according to the above embodiments.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow diagram of a method of controlling a DC motor according to one embodiment of the invention;
FIG. 2 is a flow chart of a method of controlling a DC motor according to another embodiment of the present invention;
fig. 3 is a block diagram of an air conditioner according to an embodiment of the present invention.
Reference numerals:
an air conditioner 10;
a processor 1; a memory 2.
Detailed Description
Embodiments of the present invention will be described in detail below, the embodiments described with reference to the drawings being illustrative, and the embodiments of the present invention will be described in detail below.
In the related art, in a method of calculating the feedback rotation speed of the motor with a fixed speed period, the speed calculation accuracy is 60/(a × N), where a is the fixed speed period and N is the number of feedback pulses per motor revolution. However, since the model of the motor is fixed and the number of feedback pulses per revolution N is fixed, the speed calculation accuracy is only related to the fixed speed period a, and the larger a is, the higher the speed calculation accuracy is, but the longer the time for calculating the average rotation speed in the fixed speed period is, the longer the calculation time is, the more easily the calculated average speed deviates from the current actual rotation speed of the motor, and therefore, the accuracy of the output rotation speed is affected in the case of starting the motor speed or requiring a rapid change. For example, when the motor needs to be accelerated and decelerated frequently, the speeds are averaged at the intersection time of the acceleration and deceleration, which always results in that the output duty ratio cannot drive the motor to operate according to the set speed curve well, if the rotation speed of the motor is required to be increased from 500rpm to 1000rpm and then is reduced to 500rpm immediately, the motor always starts to be decelerated when the rotation speed is increased to over 1000rpm, and the motor also starts to be accelerated when the rotation speed is less than 500rpm during the process of the deceleration to acceleration conversion.
In order to solve the above problems, an embodiment of the first aspect of the present invention provides a method for controlling a dc motor, which can improve the dynamic response capability of the motor and improve the accuracy and stability of the motor during the speed regulation process.
The dc motor control method according to the embodiment of the present invention is described below with reference to fig. 1, and as shown in fig. 1, the dc motor control method includes at least steps S1 to S6.
And step S1, receiving the final target rotating speed value of the motor.
And the final target rotating speed value of the motor is a rotating speed value to which the actual rotating speed of the motor is finally adjusted when the rotating speed of the motor is adjusted.
Specifically, taking the air conditioner as an example, after the air conditioner is powered on and started, the controller of the air conditioner calculates a final target rotation speed value of the motor according to the set temperature, and sends a motor start instruction and the final target rotation speed value of the motor to the motor controller.
And step S2, obtaining the current target rotating speed value according to the speed curve.
Specifically, in response to a motor start instruction, the motor controller may generate a speed curve according to the received final target rotation speed value of the motor and the set speed regulation time, and divide the speed curve into a plurality of operation stages according to a certain rule, where an upper limit value of each operation stage is used as a current target rotation speed value of the operation stage. The speed curve may be a diagonal curve or an S-curve, which is not limited in this respect.
The set speed regulation time can be set according to actual conditions, and it can be understood that the shorter the speed regulation time is, the faster the change rate of the motor rotating speed is, and otherwise, the slower the change rate of the motor rotating speed is.
For example, taking the final target rotation speed value of the motor as 100rpm, the speed regulation time as 1s, and the initial rotation speed when the motor is started as 0rpm, if the speed curve is divided into ten operation stages, and the speed curve can be raised by 10rpm every 0.1s, the current target rotation speed value corresponding to each operation stage is respectively: 10rpm, 20rpm, 30rpm, 40rpm, 50rpm, 60rpm, 70rpm, 80rpm, 90rpm, 100 rpm.
And step S3, obtaining the time period for calculating the motor speed according to the final target speed value and the current target speed value.
The time period for calculating the rotation speed of the motor refers to a calculation period of the rotation speed of the motor.
In the embodiment of the invention, when the motor rotating speed is calculated by adopting a fixed time period, the calculated motor rotating speed is actually the average rotating speed in the fixed time period, but for the condition that the dynamic requirements of the motor such as acceleration or deceleration are high, the calculated average rotating speed deviates from the current actual rotating speed of the motor due to long calculation time, and the accuracy of the output rotating speed is influenced, therefore, in the embodiment of the invention, when the motor is regulated, the fixed feedback speed is not directly adopted to calculate the time period, but the time period for calculating the motor rotating speed by the feedback speed is obtained by using the final target rotating speed value and the current target rotating speed value, namely, the determination of the time period for calculating the motor rotating speed is related to the final target rotating speed value and the current target rotating speed value, the time period for calculating the motor rotating speed is not only fixed, and further, the average rotating speed value of the motor is calculated by using the motor feedback pulse count value in the time period for calculating the motor rotating speed, compared with a mode of calculating the average rotating speed value of the motor in a fixed time period, the method can improve the dynamic response capability of the motor according to the dynamic requirement of the motor and improve the accuracy and stability of the motor in the speed regulation process.
Specifically, the operation state of the motor is determined according to the final target rotation speed value and the current target rotation speed value to obtain a time period of calculating the rotation speed of the motor that better conforms to the operation state of the motor, for example, when it is determined that the motor is in a state with high dynamic requirements such as acceleration or deceleration according to the final target rotation speed value and the current target rotation speed value, the time period of calculating the rotation speed of the motor can be appropriately reduced, so that when the average rotation speed value in the time period of calculating the rotation speed of the motor is calculated later, compared with a mode of calculating the rotation speed of the motor in a fixed time period, the time of calculating the average rotation speed can be obviously shortened, the calculated average rotation speed value is closer to the real rotation speed of the motor at the current moment, the period of adjusting the rotation speed is also shorter, the frequency of calculating PWM (Pulse width modulation) later is increased, and the dynamic response capability of the motor is improved, the accuracy of the motor in the speed regulation process is improved, and the speed regulation performance is improved; or, when the motor is determined to be in a stable operation state according to the final target rotation speed value and the current target rotation speed value, because the rotation speed of the motor only fluctuates in a small range under the condition, the time period of the rotation speed of the motor can be properly increased, and therefore, when the average rotation speed value in the time period of calculating the rotation speed of the motor is calculated subsequently, the calculation precision of the rotation speed of the motor can be improved, the rotation speed of the motor is better stabilized at a certain rotation speed, the speed fluctuation is reduced, the speed deviation is reduced, and chip resources in the stable operation of the motor are saved.
And step S4, obtaining a motor feedback pulse count value, and obtaining an average rotating speed value of the motor in the time period of calculating the rotating speed of the motor according to the motor feedback pulse count value.
The motor feedback pulse count value can be obtained by calculating an external interrupt within a time period of calculating the motor rotation speed, and the external interrupt can be specifically configured to be triggered by a rising edge and a falling edge.
Specifically, the average rotation speed value may be calculated by the following formula.
Figure BDA0003446192630000051
Wherein v is the average rotating speed value, B is the motor feedback pulse count value, A is the time period for calculating the rotating speed of the motor, and N is the feedback pulse number of each motor rotation. The feedback pulse number of each motor revolution is related to the motor model, and after the motor model is fixed, the feedback pulse number of each motor revolution is correspondingly fixed.
And step S5, obtaining a speed regulation duty ratio corresponding to the current target rotating speed value according to the current target rotating speed value and the average rotating speed value so as to drive the motor.
Specifically, in the prior art, the final target rotating speed value is directly compared with the calculated average rotating speed value to adjust the output duty ratio, but in this way, when the motor is started, speed overshoot is easily caused by too fast acceleration, or the rotating speed of the motor cannot reach the final target rotating speed value in a delayed manner due to too slow acceleration, and due to the existence of rotating speed calculation errors, the output duty ratio inevitably fluctuates at a certain value, so that the optimal performance cannot be realized.
And step S6, determining that the rotating speed of the motor reaches the current target rotating speed value, assigning the current target rotating speed value to the current rotating speed, and returning to the step S2 until the rotating speed of the motor reaches the final target rotating speed value.
According to the direct current motor control method provided by the embodiment of the invention, when the motor is regulated, the time period for calculating the rotating speed of the motor is obtained by using the final target rotating speed value and the current target rotating speed value, namely, the determination of the time period for calculating the rotating speed of the motor is related to the final target rotating speed value and the current target rotating speed value, the time period for calculating the rotating speed of the motor is not only fixed, and further the average rotating speed value of the motor is calculated by using the motor feedback pulse count value in the time period for calculating the rotating speed of the motor.
In some embodiments, a speed difference between the final target rotation speed and the current target rotation speed of the motor is calculated, so as to determine whether the motor is in a speed regulation state or a stable operation state according to the magnitude of the speed difference, for example, if the speed difference is large, it indicates that the motor is in a speed regulation state of acceleration or deceleration, otherwise, if the speed difference is small, it indicates that the motor is in a stable operation state; and then the time period for calculating the rotating speed of the motor is obtained according to the speed difference, so that when the motor is in a speed regulating state, the time period for calculating the rotating speed of the motor can be properly reduced, when the average rotating speed value in the time period for calculating the rotating speed of the motor is calculated, the time for calculating the average rotating speed can be shortened, the calculated average rotating speed value is closer to the real rotating speed of the motor at the current moment, meanwhile, the period for regulating the rotating speed is also shorter, the frequency of the subsequent calculation duty ratio is improved, the dynamic response capability of the motor is improved, the accuracy in the speed regulating process of the motor is improved, the speed regulating performance is improved, when the motor is in a stable running state, the time period for rotating the motor can be properly increased, when the average rotating speed value in the time period for calculating the rotating speed of the motor is calculated, the calculation precision of the rotating speed of the motor can be improved, and the rotating speed of the motor is better stabilized at a certain rotating speed, the speed fluctuation is reduced, the speed deviation is reduced, and the chip resources during the stable operation of the motor are saved.
In some embodiments, if it is determined that the speed difference is less than or equal to the preset speed threshold, calculating a time period of the motor rotation speed as a first time period; and if the speed difference is determined to be larger than the preset speed threshold, calculating the time period of the rotating speed of the motor to be a second time period, wherein the second time period is smaller than the first time period. That is to say, in the process that the motor is accelerating or decelerating, the calculation cycle of the average rotating speed value of the motor is reduced to the first time cycle, so that the time interval of the average rotating speed value is shortened, the calculated average rotating speed value is closer to the current actual rotating speed of the motor, the calculation accuracy of the rotating speed of the motor is improved, meanwhile, the regulation cycle of the rotating speed of the motor is also shortened, the frequency of PWM calculation is improved, the dynamic response capability of the motor is improved, the problem of speed overshoot during acceleration or deceleration of the motor is reduced, and the speed regulation experience of the whole motor is improved.
In some embodiments, the target adjustment parameter is obtained according to a time period for calculating the motor rotation speed, that is, different target adjustment parameters are corresponding to different time periods for calculating the motor rotation speed; and obtaining a speed regulation duty ratio corresponding to the current target rotating speed value according to the current target rotating speed value, the average rotating speed value and the target regulation parameter. Therefore, the accuracy, the rapidity and the stability of the adjusting link can be improved by replacing the final target rotating speed value with the current target rotating speed value in different operation stages and adopting different target adjusting parameters in different operation stages.
In some embodiments, the time period for calculating the motor speed is determined to be a first time period and the target tuning parameter is a first tuning parameter. And determining that the time period for calculating the rotating speed of the motor is a second time period, and then the target adjusting parameter is a second adjusting parameter, wherein the second adjusting parameter is different from the first adjusting parameter. Therefore, when the duty ratio is adjusted, the problem of speed overshoot during acceleration or deceleration of the motor can be reduced by adopting different adjusting parameters, and the accuracy, the rapidity and the stability of an adjusting link are improved.
In some embodiments, the target adjustment parameter includes a target proportional parameter and a target integral parameter, and proportional integral calculation is performed according to the current target rotation speed value and the average rotation speed value as well as the target proportional parameter and the target integral parameter to obtain the speed regulation duty ratio. That is to say, when the duty ratio is adjusted, the PI parameter, namely the target proportional parameter and the target integral parameter, is adopted for calculation, so that the accuracy, the rapidity and the stability of an adjusting link are improved.
In some embodiments, the first time period is between 0.5s and 1 s.
The following describes an example of a dc motor control method according to an embodiment of the present invention with reference to fig. 2, and the specific steps are as follows.
In step S7, the air conditioner is powered on.
In step S8, the timer is configured to set the time period for calculating the motor speed to the first time period a1 seconds, and the external interrupt is configured as a rising and falling edge trigger.
In step S9, a motor start command and a motor final target rotational speed value spd _ aim are received.
In step S10, the current target rotation speed spd _ ref is generated from the speed curve.
In step S11, it is determined whether the difference between the final target speed spd _ aim and the current target speed spd _ ref is greater than a preset speed threshold N. If not, go to step S12; if yes, go to step S19.
In step S12, the time period for calculating the motor rotation speed is restored to a1 seconds.
And step S13, obtaining a motor feedback pulse count value, and calculating an average rotating speed value within A1 seconds.
In step S14, it is determined whether the timing cycle has reached a1 seconds. If not, go to step S15; if yes, go to step S16.
In step S15, the other logic program is executed, and the timing cycle is waited for a1 seconds.
In step S16, a motor feedback pulse count value is obtained, and an average rotation speed value spd _ fbk1 in a1 seconds is calculated.
And step S17, according to spd _ ref and spd _ fbk1, PI calculation is carried out by adopting a second adjusting parameter, and a speed-regulating duty ratio is obtained.
And step S18, outputting high and low levels according to the speed regulation duty ratio, and driving the motor to rotate.
In step S19, the time period for calculating the motor rotation speed is shortened to a second time period a2 seconds.
In step S20, it is determined whether the timing cycle has reached a2 seconds. If not, go to step S21; if yes, go to step S22.
In step S21, the other logic program is executed, and the timing cycle is waited for a1 seconds.
In step S22, a motor feedback pulse count value is obtained, and an average rotation speed value spd _ fbk2 in a2 seconds is calculated.
And step S23, according to spd _ ref and spd _ fbk2, PI calculation is carried out by adopting the first adjusting parameter, and a speed-adjusting duty ratio is obtained.
And step S24, outputting high and low levels according to the speed regulation duty ratio, and driving the motor to rotate.
In summary, according to the method for controlling the direct current motor control value of the embodiment of the present invention, when the motor speed is started or the requirement is rapidly changed, the time period for calculating the motor speed is appropriately reduced, that is, the second time period is adopted, so that the smaller the time for calculating the average speed value is, the closer the calculated average speed value is to the actual speed of the motor at the current moment, the effect of improving the speed calculation accuracy is achieved, the shorter the speed regulation period is, the dynamic response capability of the motor is improved, and the speed regulation performance of the motor is also improved under the conditions of higher speed accuracy and smaller regulation period; in addition, after the rotating speed of the motor is stable, the time period for calculating the rotating speed of the motor is recovered from the second time period to the first time period, so that the time for calculating the average rotating speed value is prolonged, and the rotating speed calculation precision is improved. Therefore, by the mode, the tracking performance of the current target rotating speed value and the final target rotating speed value when the rotating speed of the motor changes is effectively improved, the speed accuracy of the motor in a stable state can be considered, and the speed regulation experience of the whole motor is improved.
In a second embodiment of the present invention, an air conditioner is provided, as shown in fig. 3, where the air conditioner 10 includes at least one processor 1 and a memory 2 communicatively connected to the at least one processor 1.
The memory 2 stores a computer program executable by the at least one processor 1, and the at least one processor 1 implements the dc power control method provided by the foregoing embodiments when executing the computer program.
It should be noted that the specific implementation manner of the air conditioner 10 according to the embodiment of the present invention is similar to the specific implementation manner of the dc motor control method according to any of the above embodiments of the present invention, and for details, please refer to the description of the method portion, and details are not described here again in order to reduce redundancy.
According to the air conditioner 10 provided by the embodiment of the invention, the processor 1 executes the direct current motor control method provided by the embodiment, so that the dynamic response capability of the motor can be improved, and the accuracy and the stability of the motor in the speed regulation process can be improved.
A third embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the dc motor control method provided by the above embodiments.
In the description of this specification, any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of custom logic functions or processes, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples" or the like mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims (10)

1. A method of controlling a dc motor, comprising:
s1, receiving a final target rotating speed value of the motor;
s2, obtaining the current target rotating speed value according to the speed curve;
s3, obtaining a time period for calculating the motor speed according to the final target speed value and the current target speed value;
s4, obtaining a motor feedback pulse count value, and obtaining an average rotating speed value of the motor in the time period of calculating the rotating speed of the motor according to the motor feedback pulse count value;
s5, obtaining a speed regulation duty ratio corresponding to the current target rotating speed value according to the current target rotating speed value and the average rotating speed value so as to drive the motor;
s6, determining that the rotating speed of the motor reaches the current target rotating speed value, assigning the current target rotating speed value to the current rotating speed, and returning to the step S2 until the rotating speed of the motor reaches the final target rotating speed value.
2. The method of controlling a direct current motor according to claim 1, wherein obtaining a time period for calculating a motor speed from the final target speed value and the current target speed value comprises:
calculating a speed difference value between the final target rotating speed of the motor and the current target rotating speed value;
and obtaining the time period for calculating the rotating speed of the motor according to the speed difference.
3. The method of controlling a direct current motor according to claim 2, wherein obtaining the time period for calculating the motor speed from the speed difference comprises:
determining that the speed difference value is smaller than or equal to a preset speed threshold value, wherein the time period for calculating the rotating speed of the motor is a first time period;
and if the speed difference is determined to be larger than a preset speed threshold, the time period for calculating the rotating speed of the motor is a second time period, wherein the second time period is smaller than the first time period.
4. The direct current motor control method according to claim 3, wherein obtaining a speed-regulating duty cycle corresponding to the current target rotation speed value according to the current target rotation speed value and the average rotation speed value comprises:
obtaining the target adjusting parameter according to the time period of calculating the rotating speed of the motor;
and obtaining a speed regulation duty ratio corresponding to the current target rotating speed value according to the current target rotating speed value, the average rotating speed value and the target regulation parameter.
5. The method of controlling a direct current motor according to claim 4, wherein obtaining the target regulation parameter based on the time period for calculating the motor speed comprises:
and determining the time period for calculating the rotating speed of the motor as the first time period, wherein the target adjusting parameter is a first adjusting parameter.
6. The method of controlling a direct current motor according to claim 5, wherein obtaining the target regulation parameter based on the time period for calculating the motor speed further comprises:
and determining that the time period for calculating the rotating speed of the motor is the second time period, and then the target adjusting parameter is a second adjusting parameter, wherein the second adjusting parameter is different from the first adjusting parameter.
7. The direct current motor control method according to claim 4, wherein the target adjustment parameter includes a target proportional parameter and a target integral parameter, and the obtaining of the speed-regulation duty ratio corresponding to the current target rotation speed value according to the current target rotation speed value, the average rotation speed value and the target adjustment parameter includes:
and carrying out proportional integral calculation according to the current target rotating speed value, the average rotating speed value, the target proportional parameter and the target integral parameter so as to obtain the speed regulation duty ratio.
8. The method according to any one of claims 3 to 6, wherein the first time period takes a value of 0.5s to 1 s.
9. An air conditioner, comprising:
at least one processor;
a memory communicatively coupled to the at least one processor;
wherein the memory has stored therein a computer program executable by the at least one processor, the computer program when executed by the at least one processor implementing the method of controlling a dc motor according to any one of claims 1 to 8.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method for controlling a dc motor according to any one of claims 1 to 8.
CN202111657852.4A 2021-12-30 2021-12-30 DC motor control method, air conditioner and computer readable storage medium Active CN114337404B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111657852.4A CN114337404B (en) 2021-12-30 2021-12-30 DC motor control method, air conditioner and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111657852.4A CN114337404B (en) 2021-12-30 2021-12-30 DC motor control method, air conditioner and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN114337404A true CN114337404A (en) 2022-04-12
CN114337404B CN114337404B (en) 2024-06-18

Family

ID=81019771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111657852.4A Active CN114337404B (en) 2021-12-30 2021-12-30 DC motor control method, air conditioner and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114337404B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH027887A (en) * 1988-06-27 1990-01-11 Fuji Electric Co Ltd Instantaneous rotating speed detection of motor
CN1282015A (en) * 1999-07-26 2001-01-31 精工爱普生株式会社 Control device and method for printer motor and recording medium
JP2009095154A (en) * 2007-10-10 2009-04-30 Yaskawa Electric Corp Motor controller and its speed detection method
CN101478285A (en) * 2009-01-20 2009-07-08 东元总合科技(杭州)有限公司 Motor speed detection method
CN101784900A (en) * 2007-09-11 2010-07-21 株式会社安川电机 Velocity detection method and motor control device using the method
CN103308707A (en) * 2013-05-21 2013-09-18 中国科学院自动化研究所 Self-adaptation rotating speed measurement method
CN103995144A (en) * 2014-06-05 2014-08-20 北京航空航天大学 Brushless direct-current motor high-performance speed measuring method
CN104569472A (en) * 2015-01-23 2015-04-29 上海大学 Speed acquisition method based on photoelectric pulse encoder
JP6452210B1 (en) * 2017-09-12 2019-01-16 Ckd日機電装株式会社 Speed detection device
CN110843552A (en) * 2019-11-29 2020-02-28 安徽江淮汽车集团股份有限公司 Electric vehicle torque control method, device, equipment and storage medium
CN113804914A (en) * 2021-08-02 2021-12-17 上海联影医疗科技股份有限公司 Motor speed measuring method and device, computer equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH027887A (en) * 1988-06-27 1990-01-11 Fuji Electric Co Ltd Instantaneous rotating speed detection of motor
CN1282015A (en) * 1999-07-26 2001-01-31 精工爱普生株式会社 Control device and method for printer motor and recording medium
CN101784900A (en) * 2007-09-11 2010-07-21 株式会社安川电机 Velocity detection method and motor control device using the method
JP2009095154A (en) * 2007-10-10 2009-04-30 Yaskawa Electric Corp Motor controller and its speed detection method
CN101478285A (en) * 2009-01-20 2009-07-08 东元总合科技(杭州)有限公司 Motor speed detection method
CN103308707A (en) * 2013-05-21 2013-09-18 中国科学院自动化研究所 Self-adaptation rotating speed measurement method
CN103995144A (en) * 2014-06-05 2014-08-20 北京航空航天大学 Brushless direct-current motor high-performance speed measuring method
CN104569472A (en) * 2015-01-23 2015-04-29 上海大学 Speed acquisition method based on photoelectric pulse encoder
JP6452210B1 (en) * 2017-09-12 2019-01-16 Ckd日機電装株式会社 Speed detection device
CN110843552A (en) * 2019-11-29 2020-02-28 安徽江淮汽车集团股份有限公司 Electric vehicle torque control method, device, equipment and storage medium
CN113804914A (en) * 2021-08-02 2021-12-17 上海联影医疗科技股份有限公司 Motor speed measuring method and device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李晓海 等: "基于高速脉冲计数器的电机转速测量***设计", 《微电机》, vol. 45, no. 2, 29 February 2012 (2012-02-29), pages 72 - 74 *

Also Published As

Publication number Publication date
CN114337404B (en) 2024-06-18

Similar Documents

Publication Publication Date Title
EP3171234B1 (en) Control device, control method, information processing program, and recording medium
CN110086382B (en) Control method of brushless direct current motor, computer device and readable storage medium
CN113503269B (en) Fan speed regulating method, device, computer equipment and computer readable storage medium
US20180331640A1 (en) Control device, optical device, control method, and storage medium
JP2014068522A (en) Motor controlling device and motor controlling method
CN100385369C (en) Apparatus and method for controlling rotation speed of multistage speed and intelligent fan
CN107800338B (en) Stepping motor speed increasing and decreasing control method based on FPGA
CN114337404A (en) DC motor control method, air conditioner and computer readable storage medium
CN112268405A (en) Control method and device of refrigeration fan, refrigeration equipment and storage medium
US10396697B2 (en) Motor operating systems and methods thereof
CN116015141A (en) Closed-loop control system and method for position of stepping motor
CN112611095B (en) Control method and control device for indoor direct current fan in variable frequency air conditioner
CN111092575B (en) T-type acceleration and deceleration control method based on singlechip-controlled stepping motor
US20210221235A1 (en) Vehicle
CN111162703B (en) Stepping motor control method, stepping motor control device and storage medium
CN110350846B (en) Motor rotating speed control method and device
CN114604139A (en) Battery current control method and terminal
JPH11252994A (en) Device and method for control of stepping motor
CN108462428B (en) Motor speed adjusting method and device, computer readable storage medium and terminal
JP2024070048A (en) Motor Control Device
US11732663B2 (en) Starter-generator speed control
CN116054677B (en) Linear motor drive control method and control device
CN113864976B (en) Indoor unit control method and device, air conditioning system and storage medium
JP3969638B2 (en) Brushless DC motor driving method and apparatus
CN110601626A (en) Permanent magnet synchronous motor control method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant