CN117097204B - Motor control method based on rotary encoder detection - Google Patents

Motor control method based on rotary encoder detection Download PDF

Info

Publication number
CN117097204B
CN117097204B CN202311361660.8A CN202311361660A CN117097204B CN 117097204 B CN117097204 B CN 117097204B CN 202311361660 A CN202311361660 A CN 202311361660A CN 117097204 B CN117097204 B CN 117097204B
Authority
CN
China
Prior art keywords
motor
power supply
rotary encoder
dsp processor
speed
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.)
Active
Application number
CN202311361660.8A
Other languages
Chinese (zh)
Other versions
CN117097204A (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.)
Sichuan Tong'an Space Technology Co ltd
Original Assignee
Sichuan Tong'an Space Technology 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 Sichuan Tong'an Space Technology Co ltd filed Critical Sichuan Tong'an Space Technology Co ltd
Priority to CN202311361660.8A priority Critical patent/CN117097204B/en
Publication of CN117097204A publication Critical patent/CN117097204A/en
Application granted granted Critical
Publication of CN117097204B publication Critical patent/CN117097204B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P5/00Arrangements specially adapted for regulating or controlling the speed or torque of two or more electric motors

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Control Of Electric Motors In General (AREA)

Abstract

The invention discloses a motor control method based on rotary encoder detection, S1, for each motor in a working area, the duty ratio of a PWM power supply module is regulated by a DSP processor, under different duty ratios, a rotary encoder carries out rotation speed measurement on the motor and transmits the rotation speed measurement to the DSP processor to fit the relation between the power supply duty ratio and the motor rotation speed; s2, when each motor in the working area is in a working state, actually measuring the motor rotation speed through a rotary encoder at each motor, and transmitting the actually measured motor rotation speed to a DSP processor; s3, the DSP processor controls the duty ratio of the PWM power supply module of each motor according to the motor rotating speed of each motor obtained through actual measurement, so that the motor rotating speed is controlled and regulated. The invention adopts the rotary encoder to collect the rotating speed, and the rotating speed of the motor can be obtained by directly reading the rotating speed by the DSP processor, thereby effectively reducing the workload of the DSP processor and being beneficial to improving the processing speed when the DSP processor performs consistency control.

Description

Motor control method based on rotary encoder detection
Technical Field
The invention relates to a rotary encoder, in particular to a motor control method based on detection of the rotary encoder.
Background
In the same working area, most of motors are generally purchased at the same time and often work cooperatively, so that the rotation speeds of the motors are required to be consistent in many times, for example, a plurality of transmission belts may exist on a long transmission line, and each transmission belt is driven by the own motor; if the transport speed of the transported articles on each conveyor belt is different, there may be a situation of poor management, even when the articles are to be transported across the conveyor belt, sudden acceleration or deceleration may occur due to the difference in speed, causing unstable article transport, even tumbling and falling; therefore, consistency control of the motor rotation speed is often required;
in order to realize consistency control of the motor, the motor rotating speed is often required to be collected, and the traditional speed calculation method at present is that firstly, an absolute position signal of a motor shaft is read, then the speed of the shaft is calculated through software, and the cost of a DSP processor (digital signal processor) is very high; the method wastes the resources of the DSP processor, increases the workload of the DSP processor, and influences the processing speed of the DSP processor when carrying out consistency control.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and provides a motor control method based on rotary encoder detection, which realizes consistency control of motor rotation speed, and the rotation speed is directly acquired by adopting a rotary encoder and can be directly read by a DSP processor, so that the workload of the DSP processor is effectively reduced, and the processing speed of the DSP processor during consistency control is improved.
The aim of the invention is realized by the following technical scheme: a motor control method based on rotary encoder detection comprises the following steps:
s1, setting K motors in a working area, wherein each motor is powered by a PWM power supply module, for each motor in the working area, the duty ratio of the PWM power supply module is regulated by a DSP processor, under different duty ratios, the rotation speed of the motor is measured by a rotary encoder, and the relation between the power supply duty ratio and the rotation speed of the motor is fitted by the DSP processor;
s2, when each motor in the working area is in a working state, actually measuring the motor rotation speed through a rotary encoder at each motor, and transmitting the actually measured motor rotation speed to a DSP processor;
s3, the DSP processor controls the duty ratio of the PWM power supply module of each motor according to the motor rotating speed of each motor obtained through actual measurement, so that the motor rotating speed is controlled and regulated.
The beneficial effects of the invention are as follows: (1) The invention realizes the consistency control of the motor rotation speed, directly adopts the rotary encoder to collect the rotation speed, and can obtain the motor rotation speed by directly reading the rotation speed by the DSP processor, thereby effectively reducing the workload of the DSP processor and being beneficial to improving the processing speed when the DSP processor carries out consistency control;
(2) When the method and the device for determining the target value of the rotating speed are used for determining the target value of the rotating speed, the upper limit constraint and the lower limit constraint of the rotating speed of the motor are fully considered, and the problem that the determined target value is not in the constraint range is avoided;
(3) The invention considers the possible difference of the performance and the load of the motors, fits the relation between the rotating speed and the duty ratio of each motor under the working condition to obtain a quadratic polynomial model of each motor, and obtains the duty ratio required by each motor in the corresponding model of each motor to control the PWM power supply module by the determined motor rotating speed target value, thereby realizing the consistency control of the rotating speed under the condition of considering the individual characteristics of the motors.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
Detailed Description
The technical solution of the present invention will be described in further detail with reference to the accompanying drawings, but the scope of the present invention is not limited to the following description.
As shown in fig. 1, a motor control method based on rotary encoder detection includes the steps of:
s1, setting K motors in a working area, wherein each motor is powered by a PWM power supply module, for each motor in the working area, the duty ratio of the PWM power supply module is regulated by a DSP processor, under different duty ratios, the rotation speed of the motor is measured by a rotary encoder, and the relation between the power supply duty ratio and the rotation speed of the motor is fitted by the DSP processor;
in an embodiment of the present application, the rotary encoder is mounted on a motor shaft of the motor. Each motor comprises a PWM power supply module; the power supply module comprises a power supply source and a PWM modulation module, wherein the PWM modulation module is used for carrying out pulse modulation on the output voltage of the power supply source and then utilizing the modulated pulse voltage to supply power to the motor; the voltage amplitude output by each PWM power supply module is the same and remains unchanged.
In step S1, by adjusting the power supply duty ratio of the PWM power supply module, under different duty ratios, the rotational speed of the motor is measured by the rotary encoder, and the process of fitting the relationship between the power supply duty ratio and the rotational speed of the motor is as follows:
s101, for any motor in a working area, the motor is in a normal working state and has a duty ratio ofRespectively measuring the motor rotation speed, and recording the obtained motor rotation speed as +.>The method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Represents the set nth duty cycle, +.>Represents the nth duty cycle +.>Corresponding motor speed, (-)>,/>Not less than 3, indicating the number of duty cycles selected during testing;
s102, constructing a quadratic polynomial regression model because the rotating speed of the motor and the duty ratio are positively correlated but are not strictly linear relations:
x represents the duty cycle, y represents the motor speed,abcthe method comprises the steps that parameters to be solved in a quadratic polynomial regression model are used for representing the relation between the duty ratio and the rotating speed;
s103, utilizing a set of duty cyclesAnd corresponding motor speed setsFitting the quadratic polynomial regression model to obtain parametersabcThereby obtaining a quadratic polynomial regression model of the current motor;
s104, repeatedly executing the steps S101-S103 for each motor in the working area to obtain a quadratic polynomial model of each motor, and representing the relation between the power supply duty ratio of each motor and the motor rotating speed.
And the DSP processor is connected with a storage module, and after the quadratic polynomial model of each motor is obtained in the step S104, the obtained quadratic polynomial model is stored in the storage module.
The rotary encoder selects an AD2S1205 chip, and the rotary encoder and the DSP processor adopt an SPI communication mode for signal transmission.
The storage module also stores a preset normal value range of the duty ratio and a preset normal value range of the motor rotating speed.
S2, when each motor in the working area is in a working state, actually measuring the motor rotation speed through a rotary encoder at each motor, and transmitting the actually measured motor rotation speed to a DSP processor;
s3, the DSP processor controls the duty ratio of the PWM power supply module of each motor according to the motor rotating speed of each motor obtained through actual measurement, so that the motor rotating speed is controlled and regulated.
The step S3 includes:
s301, setting motor speeds corresponding to the K motors as respectivelyWherein->Indicating the measured motor speed for the ith motor, for example>The method comprises the steps of carrying out a first treatment on the surface of the The DSP processor calculates the average value of the rotating speeds of the K motors
S302, setting a preset interval of a normal value range of the motor rotation speed asWherein->Representing a lower threshold value->Representing an upper value limit; the DSP processor is according to->And section->And determining a target value V of the motor rotation speed:
if it isIs located in the section->In, the target value of the motor speed +.>
If it isLess than->Target value of motor speed +.>
If it isIs greater than->Target of motor rotation speedValue->
S303, the DSP processor targets the rotating speed of the motorAnd (3) carrying out solution on the corresponding duty ratio in a quadratic polynomial model of any motor:
when the method is carried out, taking the target value V as y, and solving two x solutions;
setting the normal value range of duty ratio,/>Representing a lower threshold value->Representing an upper value limit; will be located +.>As a duty cycle target value for the motor;
the DSP processor controls the PWM power supply module to adjust to a duty ratio target value, so as to realize the control of the motor;
s304, repeating the center step S303 for each motor, and completing the control of all motors.
While the foregoing description illustrates and describes a preferred embodiment of the present invention, it is to be understood that the invention is not limited to the form disclosed herein, but is not to be construed as limited to other embodiments, but is capable of use in various other combinations, modifications and environments and is capable of changes or modifications within the spirit of the invention described herein, either as a result of the foregoing teachings or as a result of the knowledge or skill of the relevant art. And that modifications and variations which do not depart from the spirit and scope of the invention are intended to be within the scope of the appended claims.

Claims (6)

1. A motor control method based on rotary encoder detection is characterized in that: the method comprises the following steps:
s1, setting K motors in a working area, wherein each motor is powered by a PWM power supply module, for each motor in the working area, the duty ratio of the PWM power supply module is regulated by a DSP processor, under different duty ratios, the rotation speed of the motor is measured by a rotary encoder, and the relation between the power supply duty ratio and the rotation speed of the motor is fitted by the DSP processor;
in step S1, by adjusting the power supply duty ratio of the PWM power supply module, under different duty ratios, the rotational speed of the motor is measured by the rotary encoder, and the process of fitting the relationship between the power supply duty ratio and the rotational speed of the motor is as follows:
s101, for any motor in a working area, the motor is in a normal working state and has a duty ratio ofRespectively measuring the motor rotation speed, and recording the obtained motor rotation speed as +.>The method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Represents the set nth duty cycle, +.>Represents the nth duty cycle +.>Corresponding motor speed, (-)>,/>Not less than 3, indicating the number of duty cycles selected during testing;
s102, constructing a quadratic polynomial regression model because the rotating speed of the motor and the duty ratio are positively correlated but are not strictly linear relations:
x represents the duty cycle, y represents the motor speed,abcthe method comprises the steps that parameters to be solved in a quadratic polynomial regression model are used for representing the relation between the duty ratio and the rotating speed;
s103, utilizing a set of duty cyclesAnd the corresponding motor speed set +.>Fitting the quadratic polynomial regression model to obtain parametersabcThereby obtaining a quadratic polynomial regression model of the current motor;
s104, repeatedly executing the steps S101-S103 for each motor in the working area to obtain a quadratic polynomial model of each motor, and representing the relation between the power supply duty ratio of each motor and the motor rotating speed;
s2, when each motor in the working area is in a working state, actually measuring the motor rotation speed through a rotary encoder at each motor, and transmitting the actually measured motor rotation speed to a DSP processor;
s3, controlling the duty ratio of the PWM power supply module of each motor by the DSP according to the actually measured motor rotating speeds of each motor, so as to realize control and regulation of the motor rotating speeds;
the step S3 includes:
s301, setting motor speeds corresponding to the K motors as respectivelyWherein->Indicating the measured motor speed for the ith motor, for example>The method comprises the steps of carrying out a first treatment on the surface of the The DSP processor calculates the average value +.>
S302, setting a preset interval of a normal value range of the motor rotation speed asWherein->Representing a lower threshold value->Representing an upper value limit; the DSP processor is according to->And section->And determining a target value V of the motor rotation speed:
if it isIs located in the section->In, the target value of the motor speed +.>
If it isLess than->Target value of motor speed +.>
If it isIs greater than->Target value of motor speed +.>
S303, the DSP processor targets the rotating speed of the motorAnd (3) carrying out solution on the corresponding duty ratio in a quadratic polynomial model of any motor:
when the method is carried out, taking the target value V as y, and solving two x solutions;
setting the normal value range of duty ratio,/>Representing a lower threshold value->Representing an upper value limit; will be located atAs a duty cycle target value for the motor;
the DSP processor controls the PWM power supply module to adjust to a duty ratio target value, so as to realize the control of the motor;
s304, repeating the center step S303 for each motor, and completing the control of all motors.
2. A motor control method based on rotary encoder detection as claimed in claim 1, wherein: the rotary encoder is mounted on a motor shaft of the motor.
3. A motor control method based on rotary encoder detection as claimed in claim 1, wherein: each motor comprises a PWM power supply module; the power supply module comprises a power supply source and a PWM modulation module, wherein the PWM modulation module is used for carrying out pulse modulation on the output voltage of the power supply source and then utilizing the modulated pulse voltage to supply power to the motor; the voltage amplitude output by each PWM power supply module is the same and remains unchanged.
4. A motor control method based on rotary encoder detection as claimed in claim 1, wherein: and the DSP processor is connected with a storage module, and after the quadratic polynomial model of each motor is obtained in the step S104, the obtained quadratic polynomial model is stored in the storage module.
5. A motor control method based on rotary encoder detection as claimed in claim 1, wherein: the rotary encoder selects an AD2S1205 chip, and the rotary encoder and the DSP processor adopt an SPI communication mode for signal transmission.
6. The motor control method based on rotary encoder detection according to claim 4, wherein: the storage module also stores a preset normal value range of the duty ratio and a preset normal value range of the motor rotating speed.
CN202311361660.8A 2023-10-20 2023-10-20 Motor control method based on rotary encoder detection Active CN117097204B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311361660.8A CN117097204B (en) 2023-10-20 2023-10-20 Motor control method based on rotary encoder detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311361660.8A CN117097204B (en) 2023-10-20 2023-10-20 Motor control method based on rotary encoder detection

Publications (2)

Publication Number Publication Date
CN117097204A CN117097204A (en) 2023-11-21
CN117097204B true CN117097204B (en) 2023-12-29

Family

ID=88773927

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311361660.8A Active CN117097204B (en) 2023-10-20 2023-10-20 Motor control method based on rotary encoder detection

Country Status (1)

Country Link
CN (1) CN117097204B (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101691116A (en) * 2009-11-06 2010-04-07 唐山轨道客车有限责任公司 Acceleration traction control method for diesel motor vehicle
CN101814876A (en) * 2010-04-19 2010-08-25 新大洋机电集团有限公司 Drive control system of double motors of rear axle of electric automobile
CN102947057A (en) * 2010-06-17 2013-02-27 株式会社牧田 Electric power tool, lock status determination device, and program
CN103441724A (en) * 2013-08-14 2013-12-11 南京航空航天大学 Voltage regulation method applicable to frequency conversion alternating-current generator
CN106130419A (en) * 2016-07-01 2016-11-16 珠海格力电器股份有限公司 Direct current motor control device, direct current motor control method, direct current motor and air purifier
CN106909209A (en) * 2017-02-28 2017-06-30 郑州云海信息技术有限公司 A kind of height above sea level modification method and system for server fan regulation and control
CN107453654A (en) * 2016-06-01 2017-12-08 德昌电机(深圳)有限公司 Fan and its motor driver
CN107463098A (en) * 2017-09-29 2017-12-12 中南林业科技大学 A kind of intelligent carriage method for control speed and device based on quadratic function
CN108880346A (en) * 2018-08-15 2018-11-23 成都芯进电子有限公司 A kind of single-phase sine wave direct current brushless motor speed curve controlled circuit
CN108964538A (en) * 2018-08-21 2018-12-07 成都芯源系统有限公司 Motor control system and method for digitally controlling motor speed
CN110405250A (en) * 2018-04-28 2019-11-05 南京德朔实业有限公司 circular saw
CN110658383A (en) * 2019-10-09 2020-01-07 广东美的制冷设备有限公司 Power detection method and device, air conditioner and storage medium
CN112640294A (en) * 2018-08-28 2021-04-09 株式会社电装 Control device
CN113395024A (en) * 2021-06-21 2021-09-14 青岛海特生物医疗有限公司 Control method and device for direct current motor and motor control system
CN115575862A (en) * 2022-09-29 2023-01-06 北京航空航天大学 Electromagnetic sensitivity testing device and method for rotary transformer system of electric automobile
CN115800838A (en) * 2022-11-24 2023-03-14 重庆川仪自动化股份有限公司 Control system of wide-width high-voltage direct-current power supply actuating mechanism

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101691116A (en) * 2009-11-06 2010-04-07 唐山轨道客车有限责任公司 Acceleration traction control method for diesel motor vehicle
CN101814876A (en) * 2010-04-19 2010-08-25 新大洋机电集团有限公司 Drive control system of double motors of rear axle of electric automobile
CN102947057A (en) * 2010-06-17 2013-02-27 株式会社牧田 Electric power tool, lock status determination device, and program
CN103441724A (en) * 2013-08-14 2013-12-11 南京航空航天大学 Voltage regulation method applicable to frequency conversion alternating-current generator
CN107453654A (en) * 2016-06-01 2017-12-08 德昌电机(深圳)有限公司 Fan and its motor driver
CN106130419A (en) * 2016-07-01 2016-11-16 珠海格力电器股份有限公司 Direct current motor control device, direct current motor control method, direct current motor and air purifier
CN106909209A (en) * 2017-02-28 2017-06-30 郑州云海信息技术有限公司 A kind of height above sea level modification method and system for server fan regulation and control
CN107463098A (en) * 2017-09-29 2017-12-12 中南林业科技大学 A kind of intelligent carriage method for control speed and device based on quadratic function
CN110405250A (en) * 2018-04-28 2019-11-05 南京德朔实业有限公司 circular saw
CN108880346A (en) * 2018-08-15 2018-11-23 成都芯进电子有限公司 A kind of single-phase sine wave direct current brushless motor speed curve controlled circuit
CN108964538A (en) * 2018-08-21 2018-12-07 成都芯源系统有限公司 Motor control system and method for digitally controlling motor speed
CN112640294A (en) * 2018-08-28 2021-04-09 株式会社电装 Control device
CN110658383A (en) * 2019-10-09 2020-01-07 广东美的制冷设备有限公司 Power detection method and device, air conditioner and storage medium
CN113395024A (en) * 2021-06-21 2021-09-14 青岛海特生物医疗有限公司 Control method and device for direct current motor and motor control system
CN115575862A (en) * 2022-09-29 2023-01-06 北京航空航天大学 Electromagnetic sensitivity testing device and method for rotary transformer system of electric automobile
CN115800838A (en) * 2022-11-24 2023-03-14 重庆川仪自动化股份有限公司 Control system of wide-width high-voltage direct-current power supply actuating mechanism

Also Published As

Publication number Publication date
CN117097204A (en) 2023-11-21

Similar Documents

Publication Publication Date Title
US9321598B2 (en) Conveyor and weight sensing method using conveyor
CN104753415B (en) Start-up and shut-down control method, system and the stepper motor of stepper motor
CN117097204B (en) Motor control method based on rotary encoder detection
US6662671B1 (en) Gear driven mechanical assembly test procedure
EP3211498B1 (en) Control apparatus, control program, and recording medium
CN107834911B (en) Three-phase brushless dc motor speed stabilizing control method
TWI581557B (en) System and wary for high precision motor drive
CN112398406B (en) Motor operation control method and device, storage medium and electronic equipment
EP3404936A1 (en) Method for adjusting radio-frequency power, zigbee router, sensor and system
US11600170B2 (en) Fan system and fan driving method
CN110868127A (en) Motor speed pulse frequency conversion method, computer readable storage medium and motor
CN111537759A (en) Rotating body angular speed non-contact measurement and control system
US6526359B1 (en) Apparatus and method for measuring small increases in machine tool drive motor power
CN118259700A (en) Precise control method and device for stirrer, cloud end equipment and computer device
CN117439445A (en) Control method, device, equipment and storage medium for real-time working condition energy conservation of motor
CN116619412B (en) Intelligent magic cube solving system
CN113737451B (en) Weak magnetic control method and device for washing machine motor, washing machine and storage medium
US20230375079A1 (en) Passive Calibration Of A Mechatronic Device Mated To A Continuously Variable Planetary (CVP) Hub
CN203708164U (en) Chopper variable-value control device
CN113187658B (en) Method, system, equipment and storage medium for controlling rotating speed and torque of wind generating set
SU778939A1 (en) Method and apparatus for monitoring torque
CN209176234U (en) A kind of anti-hook device of box gluing machine
CN104378047B (en) Speed control method of linear infinitely variable speed motor
CN117607684A (en) Motor efficiency MAP graph test system and test method for torque and rotating speed closed-loop control
US20240297603A1 (en) Device for detecting the direction of rotation of a rotor, associated control and drive system, and associated method

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