CN112713821B - Method and system for closed-loop control of brush motor - Google Patents

Method and system for closed-loop control of brush motor Download PDF

Info

Publication number
CN112713821B
CN112713821B CN202011498703.3A CN202011498703A CN112713821B CN 112713821 B CN112713821 B CN 112713821B CN 202011498703 A CN202011498703 A CN 202011498703A CN 112713821 B CN112713821 B CN 112713821B
Authority
CN
China
Prior art keywords
signal
motor
current
rotating
actual
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
CN202011498703.3A
Other languages
Chinese (zh)
Other versions
CN112713821A (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN202011498703.3A priority Critical patent/CN112713821B/en
Publication of CN112713821A publication Critical patent/CN112713821A/en
Application granted granted Critical
Publication of CN112713821B publication Critical patent/CN112713821B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • H02P6/00Arrangements for controlling synchronous motors or other dynamo-electric motors using electronic commutation dependent on the rotor position; Electronic commutators therefor
    • H02P6/14Electronic commutators
    • H02P6/16Circuit arrangements for detecting position
    • H02P6/17Circuit arrangements for detecting position and for generating speed information
    • 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
    • H02P6/00Arrangements for controlling synchronous motors or other dynamo-electric motors using electronic commutation dependent on the rotor position; Electronic commutators therefor
    • H02P6/06Arrangements for speed regulation of a single motor wherein the motor speed is measured and compared with a given physical value so as to adjust the motor speed

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Control Of Motors That Do Not Use Commutators (AREA)

Abstract

The embodiment of the invention discloses a method and a system for brush motor closed-loop control, wherein a position sensor is arranged on a motor, the position sensor is a position coding disc arranged on a motor rotating mechanism or a Hall sensor arranged on a motor stator component, the position sensor collects a rotating position signal of a rotating shaft of the motor and sends the rotating position signal of the rotating shaft of the motor to a drive control unit of the motor, the drive control unit of the motor processes the rotating position signal of the rotating shaft of the motor to obtain an actual position signal, and position Proportional Integral (PI) adjustment is carried out according to a difference signal between the actual position signal and a set target position signal of the motor to obtain a position PI adjustment result signal; and generating a working current for the motor to run to the target position of the motor according to the position PI regulation result signal, and driving the motor to run. The embodiment of the invention ensures that the mechanism driven by the motor is accurately positioned at the target position.

Description

Method and system for closed-loop control of brush motor
Technical Field
The invention relates to a motor control technology, in particular to a method and a system for closed-loop control of a brush motor.
Background
The brush motor is a classic direct current motor, and due to the mature process and low cost, and the convenience of the brush motor that certain voltage is applied to two poles of the brush motor, namely the brush motor can rotate, the brush motor is continuously and widely applied to many industries, even actively used in the industries of unmanned aerial vehicles and robots. However, it is difficult when a brush motor is required to achieve accurate position control. This is due to the 180 degree commutation of the brushed motor itself, which lacks position signal feedback. In the industry, an in-place switch is often installed at a target position close to a mechanism driven by a brush motor, when the brush motor driving mechanism moves to the target position, the in-place switch is triggered, the in-place switch triggers the brush motor to control, so that the brush motor stops rotating, and the driving mechanism stops moving. By adopting the mode, when the brush motor is influenced by mechanical friction or/and different motor running speeds, and the triggering precision and the processing response speed of the in-place switch are influenced, the mechanism driven by the brush motor cannot be accurately positioned at the target position.
How to control the operation of the brush motor and ensure that the mechanism driven by the brush motor is accurately positioned at a target position is an urgent problem to be solved.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method for closed-loop control of a brush motor, where the method can perform precise closed-loop control on the brush motor, and ensure that a mechanism driven by the brush motor is accurately positioned at a target position.
The embodiment of the invention also provides a system for closed-loop control of the brush motor, which can accurately perform closed-loop control on the brush motor and ensure that a mechanism driven by the brush motor is accurately positioned at a target position.
The embodiment of the invention is realized as follows:
a method of closed-loop control of a brushed motor, comprising:
a driving control unit of the motor receives a motor rotating shaft rotating position signal acquired by a position sensor;
processing according to the rotating position signal of the rotating shaft to obtain an actual position signal;
performing position Proportional Integral (PI) adjustment according to a difference signal between the actual position signal and the set motor target position signal to obtain a position PI adjustment result signal;
generating a working current for the motor to run to the target position of the motor according to the position PI regulation result signal, and driving the motor to run;
wherein, the magnitude and direction of the working current are determined by the duty ratio of the PWM signal generated according to the position PI regulation result signal.
Preferably, the method further comprises:
the motor driving control unit receives a rotating speed signal of the rotating shaft acquired by the position sensor;
processing the rotating speed signal of the rotating shaft to obtain an actual speed signal, and performing speed loop PID regulation according to the actual speed signal, a set motor target speed signal and a difference signal between position PI regulation result signals to obtain a speed loop PID regulation result signal;
and generating the working current according to the PID regulation result signal of the speed loop.
Preferably, the method further comprises:
the motor drive control unit receives the actual current signal,
performing current loop PID adjustment according to the difference signal among the actual current signal, the set motor target current signal and the speed loop PID adjustment result signal, or according to the difference signal among the actual current signal, the set motor target current signal and the position loop PI adjustment result signal to obtain a current loop PID adjustment result signal; the actual current signal is obtained by filtering and amplifying UVW current output by the motor and then sampling the UVW current by an analog-to-digital conversion module ADC (analog-to-digital converter);
and the driving control unit of the motor generates the working current according to the current loop PID regulating result signal.
Preferably, the duty ratio of the PWM signal is: a result of adding the adjustment result signal value to the average coefficient of the rated power of the motor after multiplying the adjustment result signal value by the set average coefficient of the rated power of the motor;
the generating of the operating current for the motor to operate to the target position of the motor according to the position PI adjustment result signal includes,
generating two complementary PWM signals according to the position PI regulation result signal,
wherein,
the result of adding the average coefficient of the rated power of the motor after the PI regulation result signal value is multiplied by the set average coefficient of the rated power of the motor is the duty ratio of the first PWM signal,
the sum of the duty ratio of the first PWM signal and the duty ratio of the second PWM signal is normalized to be in a numerical range of 0-100%, and the sum of the amplitude of the first PWM signal and the amplitude of the second PWM signal is a rated power coefficient of the motor;
when the first PWM signal is at high level and the second PWM signal is at low level, the first PWM signal provides the first working current for the motor, when the first PWM signal is at low level and the second PWM signal is at high level, the second working current for the motor is provided,
wherein,
the first operating current and the second operating current have opposite current directions,
the magnitude of the first current is dependent on the length of time the first pulse width modulated PWM signal is high and/or the second PWM signal is low and the magnitude of the second current is dependent on the length of time the first pulse width modulated PWM signal is low and/or the second PWM signal is high.
Preferably, the position sensor is a position coding disc located on the motor rotating mechanism, the position coding disc determines a rotating position signal of the rotating shaft according to the number of rotating turns of the position coding disc and the number of pulses in a unit circle, and determines an actual speed signal according to the number of rotating turns of the position coding disc and the total number of pulses in the circle within a set time.
Preferably, the determining the rotation position signal of the rotating shaft by the position encoding disk according to the number of rotation turns of the position encoding disk and the number of pulses in a unit turn includes:
calculating the product between the rotation number of turns of the position encoding disk and the frequency doubling resolution of the position encoding disk,
calculating the sum of the product result and the number of pulses in the unit circle to obtain a QEI signal as a rotating position signal of the rotating shaft;
the drive control unit of the motor processes according to the rotating position signal of the rotating shaft, and the obtaining of the actual position signal comprises the following steps:
and the drive control unit of the motor decodes the orthogonal QEI signal from the position encoding disk to obtain an AB signal as an actual position signal.
Preferably, the position sensor is a hall sensor positioned on a stator assembly of the motor, and the hall sensor determines a rotating position signal of the rotating shaft according to a rotating hall sector value of the hall sensor; and determining the actual speed according to the set speed constant, the self rotating Hall sector value and the accumulated PWM signal entry times.
Preferably, the hall sensor determines a rotating position signal of the rotating shaft according to a rotating hall sector value of the hall sensor, including:
at the interruption point of the motor operation process, the current first Hall sector is detected,
calculating the difference between the current first hall sector and the second hall sector detected at the last adjacent break point,
calculating the product of the difference and the steering value of the Hall sensor,
accumulating the product result on the basis of the adjacent previous rotating shaft rotating position signal to obtain a current rotating shaft rotating position signal;
the driving control unit of the motor processes according to the rotating position signal of the rotating shaft, and the step of obtaining the actual position signal comprises the following steps:
and carrying out level acquisition on the rotating position signal of the rotating shaft obtained by the Hall sensor, and carrying out analog-to-digital conversion on the acquired level to obtain an actual position signal.
A system for closed-loop control of a brushed motor, comprising:
the processor is configured to receive a motor rotating shaft rotating position signal collected by the position sensor, and process the motor rotating shaft rotating position signal according to the rotating shaft rotating position signal to obtain an actual position signal; performing position Proportional Integral (PI) adjustment according to a difference signal between the actual position signal and the set motor target position signal to obtain a position PI adjustment result signal;
the driving module is used for generating working current for the motor to run to the target position of the motor according to the position PI regulating result signal and driving the motor to run;
the magnitude and direction of the working current are determined by the duty ratio of a PWM signal generated according to the position PI regulation result signal.
Preferably, the driving module comprises a driving module,
a pulse broadband modulation PWM signal generating circuit for generating two complementary pulse broadband modulation PWM signals according to the position PI regulation result signal,
wherein,
after the adjustment result signal value is multiplied by the set average coefficient of the rated power of the motor, the result of addition of the adjustment result signal value and the set average coefficient of the rated power of the motor is the duty ratio of the first PWM signal;
the sum of the duty ratio of the first PWM signal and the duty ratio of the second PWM signal is normalized to be within a numerical range of 0-100%, and the sum of the amplitude of the first PWM signal and the amplitude of the second PWM signal is the rated power coefficient of the motor;
a motor driving circuit for providing a first working current to the motor when a first Pulse Width Modulation (PWM) signal from the PWM signal generating module is at a high level and a second PWM signal from the PWM signal generating module is at a low level, and providing a second working current to the motor when the first PWM signal is at the low level and the second PWM signal is at the high level,
wherein,
the first operating current and the second operating current have opposite current directions,
the magnitude of the first current is dependent on the length of time the first pulse width modulated PWM signal is high and/or the second PWM signal is low and the magnitude of the second current is dependent on the length of time the first pulse width modulated PWM signal is low and/or the second PWM signal is high.
Preferably, the processor further comprises a memory for storing the data,
the speed ring module is used for receiving a rotating speed signal of the rotating shaft acquired by the position sensor; processing the rotating speed signal of the rotating shaft to obtain an actual speed signal, and performing speed loop PID (proportion integration differentiation) regulation according to the actual speed signal, the set target speed signal of the motor and a difference signal between position PI regulation result signals to obtain a speed loop PID regulation result signal; generating the working current according to the PID regulating result signal of the speed loop;
and/or, the processor further comprises,
the current loop module is used for receiving an actual current signal, and performing current loop PID regulation according to a difference signal among the actual current signal, a set motor target current signal and a speed loop PID regulation result signal or according to a difference signal among the actual current signal, a set motor target current signal and a position loop PI regulation result signal to obtain a current loop PID regulation result signal; generating the working current according to a current loop PID regulation result signal;
the actual motor signal is obtained by filtering and amplifying UVW current output by the motor and then sampling the UVW current by an analog-to-digital conversion module ADC.
Preferably, the position sensor is a position coding disc positioned on the motor rotating mechanism, the position coding disc determines a rotating shaft rotating position signal according to the self rotating number of turns of the position coding disc and the number of pulses in a unit circle, and determines an actual speed signal according to the self rotating number of turns of the position coding disc and the total number of pulses in the circle within a set time;
the position coding disc determines the rotating position signal of the rotating shaft according to the self rotating number of turns of the position coding disc and the number of pulses in the unit circle, and the method comprises the following steps: the position coding disc calculates the product between the number of turns of the position coding disc and the frequency doubling resolution of the position coding disc, and the sum of the product result and the number of pulses in a unit turn is calculated to obtain an orthogonal coding interface QEI signal as a rotating position signal of the rotating shaft;
the processor further comprises:
and the orthogonal QEI decoding module is used for decoding the orthogonal QEI signal from the position coding disc to obtain an AB signal serving as an actual position signal.
Preferably, the position sensor is a hall sensor located on the stator assembly of the motor, and the hall sensor determines a rotating position signal of the rotating shaft according to a rotating hall sector value of the hall sensor; determining the actual speed according to the set speed constant, the rotating Hall sector value of the Hall sector value and the accumulated entering times of the PWM signal;
the hall sensor confirms the pivot rotational position signal according to the hall sector value of self rotation, includes:
at the interruption point of the motor operation process, the current first Hall sector is detected,
calculating the difference between the current first hall sector and the second hall sector detected at the last adjacent break point,
calculating a result of multiplying the difference by a steering value of the hall sensor,
accumulating the product result on the basis of the adjacent previous rotating shaft rotating position signal to obtain a current rotating shaft rotating position signal;
and the processor is also used for carrying out level acquisition on the rotating shaft rotating position signal obtained by the Hall sensor and then carrying out analog-to-digital conversion on the acquired level to obtain an actual position signal.
As can be seen from the above, in the embodiment of the present invention, a position sensor is disposed on a motor, the position sensor is a position encoding disc disposed on a motor rotating mechanism or a hall sensor disposed on a motor stator assembly, the position sensor collects a rotating position signal of a motor rotating shaft, the rotating position signal of the motor rotating shaft is sent to a driving control unit of the motor, the driving control unit of the motor processes the rotating position signal of the motor rotating shaft to obtain an actual position signal, and a position Proportional Integral (PI) adjustment is performed according to a difference signal between the actual position signal and a set motor target position signal to obtain a position PI adjustment result signal; and generating a working current for the motor to run to the target position of the motor according to the position PI regulation result signal, and driving the motor to run. Because the embodiment of the invention accurately positions the motor running position of the driving mechanism and carries out PID closed-loop regulation on the motor based on the accurately positioned actual position signal, the accuracy is improved, and the mechanism driven by the motor is ensured to be accurately positioned at the target position.
Drawings
Fig. 1 is a flowchart of a method for closed-loop control of a brushed motor according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a system for closed-loop control of a brush motor according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating an example of a closed-loop control architecture of a brushed motor according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a second example of a brush motor closed-loop control architecture according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a structure of an H-bridge driving module in a brush motor closed-loop control system according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a second structure of an H-bridge drive module in a brush motor closed-loop control system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and examples.
As can be seen from the background art, the reason why it is not possible to ensure that the mechanism driven by the brush motor is accurately positioned at the target position is mainly that the feedback position signal for controlling the operation of the brush motor is inaccurate, and delay control occurs when the brush motor is controlled.
At present, there are several control methods for brush motors.
The invention patent with publication number CN106385209A entitled motor angle control method, system and unmanned aerial vehicle indicates that an Inertial Measurement Unit (IMU) is used for obtaining angular acceleration and angular rotation of a motor, obtaining a motor rotation angle through Kalman filtering and an attitude calculation algorithm, and calculating dimensionless data a by utilizing an angle PID and an angular velocity PID, wherein the ratio a/b of the dimensionless data a to a preset range b is used as a duty ratio signal of an H-bridge PWM signal of a brush motor. In this method, the Inertial Measurement Unit (IMU) is expensive and not versatile.
The invention has the publication number of 106452231A and is named as 'a brushed direct current motor driver and a control method thereof', a control system comprising a master singlechip and a slave singlechip is used, a Hall sensor acquires motor current, an encoder or a tachometer acquires motor position, and six control modes (position control, speed control, torque control, speed position control, torque speed control, torque position control and speed position torque control) are optionally formed by a PID closed loop. In this method, forward and reverse rotation control and polarity control of the motor are required. Meanwhile, the pulse of the encoder is adopted by using an external interrupt mode, and under the condition of an encoder with the general 1000-line precision, the rising edge and the falling edge of 4 multiplying power are sampled at least once according to the sampling rate and the signal rate of at least 2 multiplying power. Obviously, the processor speed in the control system is very high, and the pulse data is easily lost when the control system rotates at a high speed. The data interaction and tie line state logic of the master and slave singlechips also increase the complexity.
Therefore, in order to perform precise closed-loop control on the brush motor and ensure that a mechanism driven by the brush motor is accurately positioned at a target position, the embodiment of the invention arranges a position sensor on the motor, wherein the position sensor is a position coding disc arranged on a motor rotating mechanism or a Hall sensor arranged on a stator assembly of the motor, the position sensor collects a rotating position signal of a rotating shaft of the motor and sends the rotating position signal of the rotating shaft of the motor to a drive control unit of the motor, the drive control unit of the motor processes the rotating position signal of the rotating shaft of the motor to obtain an actual position signal, and position PI adjustment is performed according to a difference signal between the actual position signal and the set target position signal of the motor to obtain a position PI adjustment result signal; and generating a working current for the motor to run to the target position of the motor according to the position PI regulation result signal, and driving the motor to run.
Furthermore, PID closed-loop regulation is carried out on a speed loop of the motor, and PID closed-loop regulation is carried out on a current loop.
Because the embodiment of the invention accurately positions the motor running position of the driving mechanism and carries out PID closed-loop regulation on the motor based on the accurately positioned actual position signal, the accuracy is improved, and the mechanism driven by the motor is ensured to be accurately positioned at the target position. Furthermore, the method provided by the embodiment of the invention is very concise and efficient.
The embodiment of the invention applies the position coding disc which can be a magnetic coding disc or an optical coding disc, the coding disc is usually used on a brushless direct current motor, and particularly used as high-precision measurement of the rotation angle of the motor in the process of controlling by adopting a high-end vector algorithm. Previously popular opto-electronic encoders have been relatively expensive, and the magnetic encoder discs that have begun to be popular are already very inexpensive and can easily provide measurement accuracies of 1000 lines and more. The embodiment of the invention applies the position coding disc to the closed-loop control with a plurality of motors. In specific application, a pulse AB signal of motor operation is decoded by a Quadrature Encoder Interface (QEI) of the position encoding disk to obtain an actual position signal.
The embodiment of the invention can also apply a Hall sensor which is a position sensor frequently used in a brushless motor, the cost is low, and the absolute position of the motor in operation can be detected by three simple Hall elements. Although the precision is not high, (a brushless motor only has 6 variable signals in one rotation, which is called Hall sector signals in the industry, each sector signal corresponds to a range of 60 degrees), if a reduction box is also configured for torque output when the brushless motor is used, the detection precision (60 degrees/reduction ratio) is improved invisibly. The embodiment of the invention applies the Hall sensor to the PID closed-loop control of the brush motor. In specific application, the Hall sensor acquires and decodes three-winding (UVW) signals of the brush motor, and actual position signals are obtained after the three-winding (UVW) signals are processed.
Fig. 1 is a flowchart of a method for closed-loop control of a brushed motor according to an embodiment of the present invention, which includes the following specific steps:
step 101, receiving a motor rotating shaft rotating position signal acquired by a position sensor;
102, processing according to the rotating position signal of the rotating shaft to obtain an actual position signal;
103, performing position Proportional Integral (PI) adjustment according to a difference signal between the actual position signal and the set motor target position signal to obtain a position PI adjustment result signal;
104, generating a working current for the motor to run to the target position of the motor according to the position PI regulation result signal, and driving the motor to run; wherein the magnitude and direction of the operating current are determined by a duty ratio of a Pulse Width Modulation (PWM) signal generated according to the position PI adjustment result signal.
Here, the method is implemented by a drive control unit of the motor.
In the method, the position-coding disk is a magnetic-coding disk or an optical-coding disk.
In the method, the motor drive control unit receives a rotating speed signal of a rotating shaft collected by the position sensor; processing the rotating speed signal of the rotating shaft to obtain an actual speed signal, and performing speed loop PID regulation according to the actual speed signal, a set motor target speed signal and a difference signal between position PI regulation result signals to obtain a speed loop PID regulation result signal; and generating the working current according to the PID regulation result signal of the speed loop.
Therefore, when the embodiment of the invention is used for carrying out closed-loop PID on the brush motor, the speed closed-loop control on the brush motor is also carried out, so that the control is more accurate.
In this method, the method further comprises: the motor driving control unit receives an actual current signal; performing current loop PID regulation according to a difference signal between the actual current signal, the set motor target current signal and a speed loop PID regulation result signal, or according to a difference signal between the actual current signal, the set motor target current signal and a position loop PI regulation result signal to obtain a current loop PID regulation result signal; the actual current signal is obtained by filtering and amplifying UVW current output by the motor and then sampling the UVW current by an analog-to-digital conversion module ADC (analog-to-digital converter); and the driving control unit of the motor generates the working current according to the current loop PID regulating result signal.
Therefore, when the embodiment of the invention is used for the closed-loop PID of the brush motor, the current closed-loop control of the brush motor is also carried out, so that the control is more accurate.
In the method, the duty ratio of the PWM signal is: a result of adding the adjustment result signal value to the average coefficient of the rated power of the motor after multiplying the adjustment result signal value by the set average coefficient of the rated power of the motor; the generating of the working current for the motor to run to the target position of the motor according to the position PI regulation result signal comprises generating two complementary pulse broadband modulation (PWM) signals according to the position PI regulation result signal,
the PI regulation result signal value is multiplied by the set average coefficient of the rated power of the motor, and then the result of addition of the PI regulation result signal value and the set average coefficient of the rated power of the motor is the duty ratio of a first PWM signal, the sum of the duty ratio of the first PWM signal and the duty ratio of a second PWM signal is normalized to be within a numerical range of 0-100%, and the sum of the amplitude of the first PWM signal and the amplitude of the second PWM signal is the rated power coefficient of the motor; when the first pulse broadband modulation PWM signal is at high level and the second PWM signal is at low level, a first working current is provided for the motor, when the first pulse broadband modulation PWM signal is at low level and the second PWM signal is at high level, a second working current is provided for the motor,
the first working current and the second working current have opposite current directions, the magnitude of the first current depends on the time length of the first PWM signal being at a high level and/or the second PWM signal being at a low level, and the magnitude of the second current depends on the time length of the first PWM signal being at a low level and/or the second PWM signal being at a high level.
Therefore, the operation of the brush motor can be accurately controlled by adjusting the duty ratio of the PWM signal based on the position PI.
In the method, the position sensor is a position coding disc positioned on a motor rotating mechanism, the position coding disc determines a rotating shaft rotating position signal according to the self rotating number of turns of the position coding disc and the number of pulses in a unit circle, and determines an actual speed signal according to the self rotating number of turns of the position coding disc and the total number of pulses in the circle within set time.
Specifically, the step of determining the rotating position signal of the rotating shaft by the position coding disc according to the self rotating number of turns of the position coding disc and the number of pulses in a unit turn comprises the following steps: calculating the product between the rotation number of turns of the position coding disc and the frequency doubling resolution of the position coding disc; calculating the sum of the product result and the number of pulses in the unit circle to obtain a QEI signal of the orthogonal encoder interface as a rotating position signal of the rotating shaft; the driving control unit of the motor processes according to the rotating position signal of the rotating shaft, and the step of obtaining the actual position signal comprises the following steps: and the drive control unit of the motor decodes the orthogonal QEI signal from the position encoding disk to obtain an AB signal as an actual position signal.
Similarly, the position sensor is a Hall sensor positioned on a stator component of the motor, and the Hall sensor determines a rotating position signal of the rotating shaft according to a rotating Hall sector value of the Hall sensor; and determining the actual speed according to the set speed constant, the self rotating Hall sector value and the accumulated PWM signal entry frequency.
Specifically, the hall sensor determines a rotating shaft rotating position signal according to a rotating hall sector value of the hall sensor, and the method comprises the following steps: detecting a current first Hall sector at an interruption point of a motor in the operation process, calculating a difference value between the current first Hall sector and a second Hall sector detected at the last adjacent interruption point, calculating a product result of the difference value and a steering value of the Hall sensor, and accumulating the product result on the basis of adjacent previous rotating shaft rotating position signals to obtain a current rotating shaft rotating position signal; the drive control unit of the motor processes according to the rotating position signal of the rotating shaft, and the obtaining of the actual position signal comprises the following steps: and carrying out level acquisition on the rotating position signal of the rotating shaft obtained by the Hall sensor, and carrying out analog-to-digital conversion on the acquired level to obtain an actual position signal.
Fig. 2 is a schematic structural diagram of a system for closed-loop control of a brush motor according to an embodiment of the present invention, including: a processor and a driving module, wherein,
the processor is configured for receiving the motor rotating shaft rotating position signal collected by the position sensor, and processing the motor rotating shaft rotating position signal according to the rotating shaft rotating position signal to obtain an actual position signal; performing position Proportional Integral (PI) adjustment according to a difference signal between the actual position signal and the set motor target position signal to obtain a position PI adjustment result signal;
the driving module is used for generating working current for the motor to run to the target position of the motor according to the position PI regulation result signal and driving the motor to run;
wherein, the magnitude and direction of the working current are determined by the duty ratio of the PWM signal generated according to the position PI regulation result signal.
In the control system, the driving module includes,
a pulse broadband modulation PWM signal generating circuit for generating two complementary pulse broadband modulation PWM signals according to the position PI regulation result signal,
wherein,
after the adjustment result signal value is multiplied by the set average coefficient of the rated power of the motor, the adjustment result signal value is added with the average coefficient of the rated power of the motor to obtain the duty ratio of a first PWM signal;
the sum of the duty ratio of the first PWM signal and the duty ratio of the second PWM signal is normalized to be within a numerical range of 0-100%, and the sum of the amplitude of the first PWM signal and the amplitude of the second PWM signal is the rated power coefficient of the motor;
a motor driving circuit for providing a first working current for the motor when a first PWM signal from the PWM signal generating module is at a high level and a second PWM signal from the PWM signal generating module is at a low level, and providing a second working current for the motor when the first PWM signal is at a low level and the second PWM signal is at a high level,
wherein,
the first operating current and the second operating current have opposite current directions,
the magnitude of the first current is dependent on the length of time the first pulse width modulated PWM signal is high and/or the second PWM signal is low and the magnitude of the second current is dependent on the length of time the first pulse width modulated PWM signal is low and/or the second PWM signal is high.
Therefore, the operation of the brush motor can be accurately controlled based on the duty ratio of the pulse width modulation PWM signal generated by the position PI regulation result signal.
In the control system, the processor further comprises,
the speed ring module is used for receiving a rotating speed signal of the rotating shaft acquired by the position sensor; processing the rotating speed signal of the rotating shaft to obtain an actual speed signal, and performing speed loop PID regulation according to the actual speed signal, a set motor target speed signal and a difference signal between position PI regulation result signals to obtain a speed loop PID regulation result signal; generating the working current according to the PID regulating result signal of the speed loop;
and/or, the processor further comprises,
the current loop module is used for receiving an actual current signal, and performing current loop PID regulation according to a difference signal among the actual current signal, a set motor target current signal and a speed loop PID regulation result signal or according to a difference signal among the actual current signal, a set motor target current signal and a position loop PI regulation result signal to obtain a current loop PID regulation result signal; generating the working current according to a current loop PID regulation result signal;
the actual motor signal is obtained by filtering and amplifying UVW current output by the motor and then sampling the UVW current by an analog-to-digital conversion module ADC.
Therefore, when the embodiment of the invention is used for the closed-loop PID of the brush motor, the speed closed-loop control or/and the current closed-loop control of the brush motor are also carried out, so that the control is more accurate.
In the control system, the position sensor is a position coding disc positioned on a motor rotating mechanism, the position coding disc determines a rotating shaft rotating position signal according to the self rotating number of turns of the position coding disc and the number of pulses in a unit circle, and determines an actual speed signal according to the self rotating number of turns of the position coding disc and the total number of pulses in the circle within set time;
the position coding disc determines the rotating position signal of the rotating shaft according to the self rotating number of turns of the position coding disc and the number of pulses in the unit circle, and the method comprises the following steps: the position coding disc calculates the product between the number of turns of the position coding disc and the frequency doubling resolution of the position coding disc, and the sum of the product result and the number of pulses in a unit turn is calculated to obtain an orthogonal coding interface QEI signal as a rotating position signal of the rotating shaft;
the processor further comprises:
and the orthogonal QEI decoding module is used for decoding the orthogonal QEI signal from the position code disc to obtain an AB signal as an actual position signal.
In this way, when the position sensor is a position-coded disc, precise control of the brushed motor is achieved.
In the control system, the position sensor is a Hall sensor positioned on a stator component of the motor, and the Hall sensor determines a rotating position signal of a rotating shaft according to a rotating Hall sector value of the Hall sensor; determining the actual speed according to the set speed constant, the self rotating Hall sector value and the cumulative PWM signal entry frequency;
the hall sensor confirms the pivot rotational position signal according to the hall sector value of self rotation, includes:
at the interruption point of the motor operation process, the current first Hall sector is detected,
calculating the difference between the current first hall sector and the second hall sector detected at the last adjacent break point,
calculating the product of the difference and the steering value of the Hall sensor,
accumulating the product result on the basis of the adjacent previous rotating shaft rotating position signal to obtain a current rotating shaft rotating position signal;
and the processor is also used for carrying out level acquisition on the rotating shaft rotating position signal obtained by the Hall sensor and then carrying out analog-to-digital conversion on the acquired level to obtain an actual position signal.
Thus, when the position sensor is a hall sensor, precise control of the brush motor is achieved.
The embodiments of the present invention will be described in detail with reference to two specific examples.
Fig. 3 is a schematic diagram of an example of a closed-loop control architecture of a brushed motor according to an embodiment of the present invention, where a position sensor used in the closed-loop control system of the brushed motor is a position encoder disk. In the figure, the modules drawn by the dotted lines are optional modules, and the modules drawn by the dotted lines are necessary modules of the system. Specifically, a position loop PID module, an H-bridge driving module, a brushed motor, a QEI decoding module of a position coding disc and a position and speed calculating module are necessary, and a speed loop PID module, a current loop PID module, a pre-driving module and a current sampling and filtering module are optional. In the system, the position ring PID module, the QEI decoding module of the position coding disc and the position and speed calculating module are arranged in a drive control unit of the motor and can be directly finished by a processor, and the H-bridge drive module and the pre-drive module are included in the drive module.
In this system, the position-coding disk used may be an electro-optically or magnetically coded disk. The performance of these two types of code discs is very close, and magnetic code discs can easily provide a code precision of 1000 lines and more, which is satisfactory for most product applications. In view of cost comparison, embodiments of the present invention more preferably use magnetically encoded disks.
Whether the photoelectric coded disk or the magnetic coded disk is adopted, the output pulse signal can be decoded by a QEI decoding module of the position coded disk to obtain the number n of rotation turns and the number m of pulses in one turn. The embodiment of the invention obtains the actual position of the accumulated rotation by using a formula (1):
actual position ActPos = n × P + m (1)
Where P is the quadruple resolution of the position encoded disk. E.g., 1000 lines of position encoding disk, P is set to 4000.
The actual speed of the brush motor is obtained by using the pulse number of the pulse signal of the position encoding disk by adopting an M method, a T method or an M/T method. Wherein the M method is to accumulate the total number M of pulses of the acquired pulse signal within a set time Ts (second) 1 The rotational speed (in rpm) can be obtained by using the formula (2):
actual speed ActSpeed =60M 1 /(P*Ts)(2)
The T method is to calculate the rotation speed by measuring the interval time between 2 pulse signals of the position encoder disk. In which a high-frequency timer (frequency f) is used 0 ) Timer count M between two pulse signals 2 Then, using equation (3), the rotation speed (in rpm) can be obtained:
actual speed ActSpeed =60f 0 /(P*M 2 )(3)
When the rotating speed of the brush motor is low, the error is large by the M method.And the resolution precision of the T method is stronger at the low speed of the brush motor. One can choose to use T method during the low speed phase and switch to M method during the high speed phase. The M/T method is more preferably used. The method has higher precision in the high-speed and low-speed stages of the brush motor, collects the pulse number M1 of the pulse signals of the position coding disc through a certain time T, and simultaneously has high frequency (frequency f) 0 ) Pulse count M 2 Then using equation (4) we can get the rotation speed (in rpm):
actual speed ActSpeed =60f 0 *M 1 /(P*M 2 )(4)
After the position and the speed of the position coding disc are obtained by the method, the actual position and the actual speed can be used as feedback signals of the position loop PI module and the speed loop PID module. And the actual current of the brush motor is obtained by filtering and amplifying the winding current of the brush motor by a motor driving unit and then sampling by an analog-to-digital conversion module (ADC).
Fig. 4 is a schematic diagram of an example of a closed-loop control architecture of a brushed motor according to an embodiment of the present invention, where a hall sensor is used as a position sensor used in the closed-loop control system of the brushed motor. In the figure, the modules drawn by realizing the drawing are the modules necessary for the system, and the modules drawn by dotted lines are optional modules. Specifically, a position loop PID module, an H-bridge drive module, a brush motor, a hall sensor, and a position and speed calculation module are necessary, and a speed loop PID module, a current loop PID module, a pre-drive module, and a current sampling and filtering module are optional. The position ring PID module, the QEI decoding module of the position coding disc and the position and speed calculating module are arranged in a drive control unit of the motor and can be directly completed by a processor, and the H bridge drive module and the pre-drive module are included in the drive module.
The Hall sensors used in the system can be Hall sensors which are separated by 60 degrees in the motor industry, and can also be Hall sensors which are separated by 120 degrees. Can be composed of discrete Hall elements, and can also be a Hall signal output in a complex form of some current magnetic encoders.
When the Hall sensor outputs Hall signals, the Hall signals can be reduced into Hall signals consisting of common three-winding signals (UVW) by a circuit of a Printed Circuit Board (PCB) in a differential signal mode in order to reduce transmission interference. These three hall signals UVW normally output 6 combined level signals 001,010,011,100,101,110, which can be labeled S1, S2, S3, S4, S5 and S6 in the embodiment of the present invention. In fact, the rotation of the brushed motor is not cycled according to the sequence of S1- > S2- > S3- > S4- > S5- > S6- > S1, and the practical rotation sequence relation of the brushed motor can be obtained by measuring with an oscilloscope or a multimeter or by driving the motor in an open loop mode. For example, one common sequential relationship is that the positive rotation is S6- > S5- > S4- > S1- > S3- > S2; the reverse is followed by S6- > S2- > S3- > S1- > S4- > S5- > S6. If the Hall sensor is currently positioned in the S5 sector and the next detected sector is the S4 sector, the Hall sensor indicates that 1 sector is positively rotated; if the sector detected next time is the S1 sector, 2 sectors are positively rotated; the next detected sector is the S6 sector, indicating that 1 sector is reversed; the next detected sector is the S2 sector, indicating that 2 sectors are reversed.
The system detects the level of three Hall signals UVW in an interruption function of high-speed PWM (frequency fs =10-32 KHz), and records the UVW level state of each time of entering the PWM interruption function and the accumulated entering times m. If the level of the hall signal UVW is inconsistent with the previous level, indicating that the hall signal UVW rotates to a new sector from the previous hall sector, then obtaining the actual rotating position ActPos (the accumulated number of sectors) and the current actual rotating speed ActSpeed according to the known hall sequence relationship of the brush motor:
ActPos=ActPos+sign(x)*n (5)
ActSpeed=Kc*sign(x)*n/m (6)
where the sign () function is a sign function. The input parameter is positive, then positive, otherwise negative.
x can obtain the relation between the current Hall sector and the Hall sector sampled at the previous time is positive rotation according to the known rotating relation of the Hall sector of the brush motor, if x =1, otherwise x = -1;
n can also obtain the relation of the current Hall sector and the last sampled Hall sector according to the known rotating relation of the Hall sector of the brush motor, if the difference is 1 sector, or 2 sectors, then 1 or 2 is taken;
and m is the accumulated PWM entering times from the counting of the previous Hall sector after the Hall sector is counted and 0 is cleared firstly until the change of the new Hall sector is detected at this time.
Kc is a speed constant related to the PWM cycle frequency, the number of pole pairs of the motor, and the rated speed of the motor. For example, kc = fs/P/Vmax, fs is the PWM frequency, P is the motor pole pair number, and Vmax is the motor rated speed.
Obtaining the actual position of the accumulative rotation of the brush motor according to the method, wherein sign (x) =1 during positive rotation, and ActPos can be continuously accumulated according to a formula (5); during inversion, sign (x) = -1, and ActPos is continuously decreased by formula (5). ActPos can be updated by equation (5) if the rotation is performed in the middle of the process. Thus ActPos is an actual motor position.
The above-mentioned formula (5) and formula (6) are expressions of a logical concept. In particular implementations, some variations may occur.
The actual position and the actual speed of the motor obtained by the method can be used as feedback signals of the position loop PI module and the speed loop PID module. And the actual current of the brush motor is obtained by filtering and amplifying the winding current through the motor driving unit and then performing ADC sampling.
The basic objective of the embodiment of the present invention is to implement high-precision position control of a brushed motor, so that a position loop PI module (differential link = 0) is a necessary link, and a speed loop PID module and a current loop PID module are selectable. The optional option of adding the speed loop PID module can enable the speed of the brush motor to obtain the expected acceleration, uniform speed and deceleration process in the process of driving the brush motor to the target position, and the process can be obtained by coordinating the parameters of the speed loop PID module. If the requirement on the requirement is not high, the speed link can be cancelled. Similarly, the optional items of adding the current loop PID module can also make the current of the brush motor winding not impact too much but balance the smooth current in the process of driving the brush motor to the target position. It is also derived using the parameters of the coordinated current loop PID module. If the requirement on the requirement is not high, the current link can be cancelled.
In a brushed motor closed-loop control system, the pre-drive module is an option. The pre-drive module is mainly used for achieving the purpose of the brush motor power and the reduction ratio of the reduction gearbox. For low moment loads, such a pre-drive module may be eliminated. For a direct current brush motor, a 2-path complementary metal oxide field effect transistor (MOSFET) driving circuit is adopted as an H-bridge driving module, and the H-bridge driving module belongs to a standard circuit. The upper and lower MOSFETs of each channel are controlled by complementary PWM signals. Logically, when the PWM signal is high, it represents that the upper MOSFET is turned on, and when the PWM signal is low, it represents that the lower MOSFET is turned on. In practical circuits, there are MOSFETs that use either N-channel or P-channel, and thus there is a reversal of the polarity of the MOSFET tubes. For this purpose, the PWM polarity can be logically changed or the polarity reversal can be performed by the pre-driver module. For convenience of description, the PWM signal is high to represent the power-on. Thus, the embodiment of the invention can output the signal with the duty ratio of DutyA to the PWM of the first path in the H-bridge driving module, and output the signal with the duty ratio of DutyB to the PWM of the second path. The frequency fs of the PWM is selected based on the performance of the processor and the motor control accuracy requirement, and is usually 10-32 KHz.
The PWM output control provided by the embodiment of the invention has the following characteristics:
the duty ratios of the 2 PWM signals output to the H-bridge driving module (including the optional pre-driving module) are DutyA and DutyB respectively, and the duty ratios are normalized to be within a value range of 0-100%. The following relationship is formed between the two components:
DutyB=100%-DutyA (7)
the above relationship means that the duty ratio DutyB of the PWM signal of the second path can be determined by using the formula (7) as long as the duty ratio DutyA of the PWM signal of the first path is determined.
Wherein:
when DutyA =0.5 (i.e., 50%), then DutyB =1-0.5=0.5 (also 50%), and at this time, the PWM input to the first and second outputs in the H-bridge driving module causes no voltage to exist between the two poles of the dc brushed motor, i.e., is in a stopped state.
When DutyA is greater than 0.5, dutyB is less than 0.5, and a forward voltage exists between the two poles of the brush motor, so that the brush motor is driven to rotate in the forward direction.
When DutyA <0.5 and DutyB >0.5, a reverse voltage exists between the two poles of the brush motor, so that the brush motor is driven to rotate reversely.
Here, 0.5 is actually the average factor of the rated power of the brushed motor.
The embodiment of the invention aims to realize the precise control of the brush motor, and adopts a position loop PI module (optionally, a speed loop PID module and a current loop PID module). When the PID is used for carrying out brush motor closed-loop calculation, all input and output data are normalized, so that the output result of each PID link is ensured to be in a rational number range between-1 and 1. When only the position loop PI module is used, the output result of the position loop is Pout, and then the embodiment of the present invention performs the following processing:
DutyA=0.5+0.5*Pout (8)
thus, the value range of DutyA is also between 0-100%. And also means that the position loop PI module output resulting from the actual position being less than the target position is greater than 0 and less than 1, then 0.5-dutya < =1.0, knowing that the brushed motor will rotate forward at this duty cycle as described above. If the actual position is greater than the target position, the position loop PI will output a value less than 0 but greater than-1, and 0-DutyA-s-0.5, as described above, will know that the brush motor will be counter-rotating at this duty cycle.
Optionally, when a speed loop PID module needs to be added, and it is expected to achieve the processes of acceleration, uniform speed, and deceleration of an expected speed while achieving accurate target position control, the position loop and the speed loop are connected in series, and the final output result is Sout.
At this time, the embodiment of the present invention performs the following processes:
DutyA=0.5+0.5*Sout (9)
thus, the value range of DutyA is also between 0-100% of the direct value. Similar to the control with only the position loop PI module, if the position loop PI output is greater than 0 and less than 1 due to the actual position being less than the target position, then 0.5 pieces of cloth-dutya < =1.0 are constructed, and it is known that the brush motor will rotate in the forward direction at this duty ratio, as described above. If the actual position is greater than the target position, the position loop PI module will output a value less than 0 but greater than-1, and then 0-type a-pieces of 0.5, as described above, will know that the brush motor will reverse rotate at this duty cycle. The benefit of adding the speed loop PID module is that the processes of acceleration, uniform speed and deceleration of the expected speed are realized while the accurate target position control is achieved.
Optionally, when a current loop PID module is desired to be added, and it is desired to achieve a stable process of the current of the brushed motor while achieving accurate target position control, a structure of a position loop PI module and a current loop PID module, or a structure of a position loop PI module, a speed loop PID module, and a current loop PID module may be formed, and a final output result of the current loop PID module is Iout, at this time, the embodiment of the present invention also performs the following processing:
DutyA=0.5+0.5*Iout (10)
thus, the value range of DutyA is also between 0-100% of the direct value. Similar to the control with only the position loop PI module, and similar to the control with the position loop PI module and the speed loop PID module, if the output of the position loop PI module is greater than 0 and less than 1 due to the actual position being less than the target position, then 0.5-dutya < =1.0, as described above, it is known that the brush motor will rotate in the forward direction at this duty ratio. If the actual position is greater than the target position, the position loop PI module will output a value less than 0 but greater than-1, then 0-durya-0.5, as described above, knowing that the brushed motors will reverse at this duty cycle. The difference from the previous 2 schemes is only that a current loop PID module is added, and the parameters of the current loop PID module are coordinated, so that the current of the brush motor in the operation process tends to be more stable.
It can be seen that, in the embodiment of the present invention, the actual position and the actual speed of the rotation of the brushed motor are obtained by using the signal decoding, speed M method, speed T method or M/T method (recommended formula (1) -4)) of the position encoding disc of the brushed motor, and accordingly, the high-precision position control of the brushed motor can be realized by using the brushed motor closed-loop system formed by the position loop PI modules (selectable series speed loop PID modules or current loop PID modules) described in formulas (7) to (10).
According to the embodiment of the invention, the actual position and the actual speed of the rotation of the brushed motor can be conveniently obtained by using the level acquisition of the Hall signal of the motor and the known change sequence relation of the Hall sectors of the motor according to the formula (5) and the formula (6), and correspondingly, the high-precision position control of the brushed motor can be realized by using a brushed motor closed-loop system formed by position loop PI modules (selectable series speed loop PID modules or current loop PID modules) described by the formulas (7) to (10).
Further, the optional addition of a speed loop PID module can achieve more desirable acceleration, uniform speed and deceleration processes in motor position control than a position loop PI alone. Optionally, a current loop PID module is added, which can achieve a smoother motor current in brushed motor position control than a position loop PI module alone.
Fig. 5 is a schematic structural diagram of an H-bridge driving module in a brush motor closed-loop control system according to an embodiment of the present invention. As can be seen from the figure, 2 complementary PWM control circuits are formed by 4 driving tubes Q1-Q4 (which can be MOSFET tubes, IGBT tubes or common triodes). An upper tube PWM signal of the first path of PWM control circuit is PWMA _ H, and a lower tube PWM signal thereof is PWMA _ L; the upper tube PWM signal of the second path of PWM control circuit is PWMB _ H, and the lower tube thereof is PWMB _ L; the M terminal in the drawing is a terminal to which the brush motor is connected. The Rs resistor is a sampling resistor for the current of the brush motor. This resistor can be eliminated when the current loop PID module is not needed. The differential voltage sampled on the resistor can feed back the current of the motor. The differential voltage output by the Rs resistor is collected by the filtering and amplifying circuit and the ADC, and the current value of the brush motor winding can be obtained. Even if the current loop PID module is not needed, the collected actual current can be used as a basis for subsequently judging whether the current is abnormal or not. As can be seen from the circuit in fig. 5, the forward rotation of the brush motor is routed from the power supply Vcc through Q1 to brush motor M, and through Q4 to Rs ground. The reverse path of the brush motor is that the power voltage Vcc is conducted through Q2 to flow through the brush motor M and then conducted through Q3 to Rs and grounded.
Fig. 6 is a schematic diagram of a second structure of an H-bridge drive module in a brush motor closed-loop control system according to an embodiment of the present invention. The difference between the current sampling resistor and the current sampling resistor in fig. 5 is that the path of the positive rotation of the motor is that the power supply voltage Vcc is conducted through the motor M through Q1 and then conducted to Rs2 through Q4 and then grounded. The reverse path of the motor is that the power voltage Vcc is conducted through the motor M by the Q2 and then conducted to the Rs1 by the Q3 and grounded. Therefore, the current sampled by the Rs2 resistor is the current in the forward rotation state of the motor, and the current sampled by the Rs1 resistor is the current in the reverse rotation state of the motor. Such a circuit is compatible with brushless motor drive circuits. These sampling resistors can be eliminated when the current PID module is not needed. Even if the current loop PID module is not needed, the two collected actual currents can be used as the basis for subsequently judging whether the current is abnormal or not.
In the brush motor closed-loop control system in the embodiment of the invention, the QEI decoding module of the position encoding disk can select a processor with orthogonal QEI decoding as a chip implemented by the technical scheme of the invention, and the processor with such a function is already the basic function of most of the processors at present, and for example, can be implemented by using an ARM chip (HC 460 sequence) of Cortex-M4 made in china. When the method is realized, the actual position signal is obtained after the operating position signal is processed only by inputting the AB signal of the position coding disc and without inputting the Z signal of the position coding disc. If the interference is prevented, a differential signal can be adopted in the position-coded disk signal transmission process, and then the AB signal is restored on the QEI decoding module. And obtaining the coded pulse count m in one rotation of the brush motor and the number n of rotations of the brush motor by the QEI decoding module of the position coding disc, and obtaining the actual position ActPos of the circuit rotation according to the formula (1).
The embodiments of the present invention will be described in detail with reference to a more specific example.
The brush motor drives the pedestrian passageway gate, and a processor in a closed-loop control system of the brush motor adopts a domestic Huada Cortex-M4 HC460 processor and has an orthogonal QEI decoding module and a PWM complementary output function with dead zone control; the DC brush motor is a magnetic encoder with 1000 wires and 60W, 24V and 3000rpm of rated speed. The pre-drive module adopts IR2136, the H-bridge drive module adopts the MOSFET drive circuit shown in figure 5, and a position loop P module, a speed loop PI module and a current loop PID module are used. After a passerby expects to enter from the entrance or exit and verifies the legal identity of the passerby, the expected target position is set to be a positive door opening position or a reverse door opening position.
Compared with the invention patent with publication number CN106385209A, named as motor angle control method, system and unmanned aerial vehicle, the embodiment of the invention firstly adopts a universal position coding disc or a Hall sensor to obtain the rotation angle of the brush motor, but not a special IMU to obtain the acceleration and the angular speed of the motor. Second, the position loop of embodiments of the present invention does not require a differential term and may be a current inner loop. Finally, the formula of the PWM duty ratio output in the closed loop at the same time is completely different from the patent application that the ratio a/b of the dimensionless data a and the preset range b is used as the duty ratio signal of the H-bridge PWM signal of the brush motor, and the duty ratio (DutyA) of the PWM waveform output by the embodiment of the invention is more than 50% to indicate the forward rotation, and less than 50% to indicate the reverse rotation. The duty cycle of (50% -100%) represents the modulation amplitude of the forward duty cycle and the duty cycle of [0% -50%) represents the modulation amplitude of the reverse duty cycle. The algorithm of the embodiment of the invention is more concise and efficient.
Compared with the publication No. 106452231A, named 'a brushed direct current motor driver and a control method thereof', the embodiment of the invention only needs one processor, and does not need complex data interaction of a master processor and a slave processor and so-called master-slave connecting line state decoding logic; no encoder Z-phase signal is required. The comparison, integration and differentiation adjustments are software parameters rather than hardware potentiometer settings. According to the embodiment of the invention, the level of the Hall signal is simply acquired in the PWM interruption period to obtain the sector signal of the motor, and the actual position and the actual speed of the rotation of the brush motor can be simply obtained by accumulating the total count of the Hall signal changes for 2 times before and after accumulation by using the formula (5) and the formula (6). Meanwhile, the duty ratio (DutyA) of the a-term of the PWM waveform outputted by the embodiment of the present invention is more than 50% to indicate the forward rotation, and less than 50% to indicate the reverse rotation. Equal to 50%, the motor is in a stopped state. Therefore, extra polarity control of the brush motor and participation of positive and negative rotation control signals are not needed. The embodiment of the invention has faster dynamic response and safety.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (11)

1. A method for closed-loop control of a brushed motor, comprising:
receiving a motor rotating shaft rotating position signal acquired by a position sensor, wherein the position sensor is a position coding disc positioned on a motor rotating mechanism, or the position sensor is a Hall sensor positioned on a motor stator component;
processing according to the rotating position signal of the rotating shaft to obtain an actual position signal;
performing position Proportional Integral (PI) adjustment according to a difference signal between the actual position signal and the set motor target position signal to obtain a position PI adjustment result signal;
generating a working current for the motor to run to the target position of the motor according to the position PI regulation result signal, and driving the motor to run;
the magnitude and the direction of the working current are determined by the duty ratio of a Pulse Width Modulation (PWM) signal generated according to a position PI regulation result signal;
the duty ratio of the PWM signal is as follows: a result of adding the adjustment result signal value to the average coefficient of the rated power of the motor after multiplying the adjustment result signal value by the set average coefficient of the rated power of the motor;
the generating of the operating current for the motor to run to the motor target position according to the position PI adjustment result signal includes:
generating two complementary pulse broadband modulation PWM signals according to the position PI regulation result signal,
wherein,
the result of adding the average coefficient of the rated power of the motor after the PI regulation result signal value is multiplied by the set average coefficient of the rated power of the motor is the duty ratio of the first PWM signal,
the sum of the duty ratio of the first PWM signal and the duty ratio of the second PWM signal is normalized to be within a numerical range of 0-100%, and the sum of the amplitude of the first PWM signal and the amplitude of the second PWM signal is the rated power coefficient of the motor;
providing a first working current for the motor when the first PWM signal is at a high level and the second PWM signal is at a low level, providing a second working current for the motor when the first PWM signal is at a low level and the second PWM signal is at a high level,
wherein,
the first operating current and the second operating current have opposite current directions,
the magnitude of the first current is dependent on the length of time the first pulse width modulated PWM signal is high and/or the second PWM signal is low and the magnitude of the second current is dependent on the length of time the first pulse width modulated PWM signal is low and/or the second PWM signal is high.
2. The method of claim 1, wherein the method further comprises:
the motor driving control unit receives a rotating speed signal of the rotating shaft acquired by the position sensor;
processing the rotating speed signal of the rotating shaft to obtain an actual speed signal, and performing speed loop PID regulation according to the actual speed signal, a set motor target speed signal and a difference signal between position PI regulation result signals to obtain a speed loop PID regulation result signal;
and generating the working current according to the PID regulation result signal of the speed loop.
3. The method of claim 1 or 2, wherein the method further comprises:
the motor drive control unit receives the actual current signal,
performing current loop PID adjustment according to the difference signal among the actual current signal, the set motor target current signal and the speed loop PID adjustment result signal, or according to the difference signal among the actual current signal, the set motor target current signal and the position loop PI adjustment result signal to obtain a current loop PID adjustment result signal; the actual current signal is obtained by filtering and amplifying UVW current output by the motor and then sampling the UVW current by an analog-to-digital conversion module ADC (analog-to-digital conversion);
and the driving control unit of the motor generates the working current according to the current loop PID regulating result signal.
4. The method as claimed in claim 1, wherein when the position sensor is a position encoder disk located on the rotating mechanism of the motor, the position encoder disk determines a rotating shaft rotating position signal according to the number of rotation turns of the position encoder disk and the number of pulses per unit turn, and determines an actual speed signal according to the number of rotation turns of the position encoder disk and the total number of pulses in a turn within a set time.
5. The method of claim 4, wherein determining the shaft rotation position signal from the position encoder disk's own number of rotations and the number of pulses per unit of rotation comprises:
calculating the product between the rotation turns of the position encoding disk and the frequency doubling resolution of the position encoding disk,
calculating the sum of the product result and the number of pulses in the unit circle to obtain a QEI signal of the orthogonal encoder interface as a rotating position signal of the rotating shaft;
the drive control unit of the motor processes according to the rotating position signal of the rotating shaft, and the obtaining of the actual position signal comprises the following steps:
and the drive control unit of the motor decodes the orthogonal QEI signal from the position encoding disk to obtain an AB signal as an actual position signal.
6. The method of claim 1, wherein when the position sensor is a hall sensor located on a stator assembly of the motor, the hall sensor determines a shaft rotation position signal based on its own rotating hall sector value; and determining the actual speed according to the set speed constant, the self rotating Hall sector value and the accumulated PWM signal entry frequency.
7. The method of claim 6, wherein said hall sensor determines a shaft rotational position signal based on its own rotary hall sector value, comprising:
at the interruption point of the motor operation process, the current first Hall sector is detected,
calculating the difference between the current first hall sector and the second hall sector detected at the last adjacent break point,
calculating the product of the difference and the steering value of the Hall sensor,
accumulating the product result on the basis of the adjacent previous rotating shaft rotating position signal to obtain a current rotating shaft rotating position signal;
the driving control unit of the motor processes according to the rotating position signal of the rotating shaft, and the step of obtaining the actual position signal comprises the following steps:
and carrying out level acquisition on the rotating position signal of the rotating shaft obtained by the Hall sensor, and carrying out analog-to-digital conversion on the acquired level to obtain an actual position signal.
8. A system for closed-loop control of a brushed motor, comprising:
the processor is configured to receive a motor rotating shaft rotating position signal collected by the position sensor, and process the motor rotating shaft rotating position signal according to the rotating shaft rotating position signal to obtain an actual position signal; performing position Proportional Integral (PI) adjustment according to a difference signal between the actual position signal and the set motor target position signal to obtain a position PI adjustment result signal;
the driving module is used for generating working current for the motor to run to the target position of the motor according to the position PI regulation result signal and driving the motor to run;
the magnitude and the direction of the working current are determined by the duty ratio of a PWM signal generated according to a position PI regulation result signal;
the driving module comprises a driving module and a driving module,
a pulse broadband modulation PWM signal generating circuit for generating two complementary pulse broadband modulation PWM signals according to the position PI regulation result signal,
wherein,
after the adjustment result signal value is multiplied by the set average coefficient of the rated power of the motor, the adjustment result signal value is added with the average coefficient of the rated power of the motor to obtain the duty ratio of a first PWM signal;
the sum of the duty ratio of the first PWM signal and the duty ratio of the second PWM signal is normalized to be within a numerical range of 0-100%, and the sum of the amplitude of the first PWM signal and the amplitude of the second PWM signal is the rated power coefficient of the motor;
a motor driving circuit for providing a first working current to the motor when a first Pulse Width Modulation (PWM) signal from the PWM signal generating module is at a high level and a second PWM signal from the PWM signal generating module is at a low level, and providing a second working current to the motor when the first PWM signal is at the low level and the second PWM signal is at the high level,
wherein,
the first operating current and the second operating current have opposite current directions,
the magnitude of the first current is dependent on the length of time the first pulse width modulated PWM signal is high and/or the second PWM signal is low and the magnitude of the second current is dependent on the length of time the first pulse width modulated PWM signal is low and/or the second PWM signal is high.
9. The system of claim 8, wherein the processor further comprises,
the speed ring module is used for receiving a rotating speed signal of the rotating shaft acquired by the position sensor; processing the rotating speed signal of the rotating shaft to obtain an actual speed signal, and performing speed loop PID regulation according to the actual speed signal, a set motor target speed signal and a difference signal between position PI regulation result signals to obtain a speed loop PID regulation result signal; generating the working current according to a PID regulation result signal of a speed loop;
and/or, the processor further comprises,
the current loop module is used for receiving an actual current signal, and performing current loop PID regulation according to a difference signal among the actual current signal, a set motor target current signal and a speed loop PID regulation result signal or according to a difference signal among the actual current signal, a set motor target current signal and a position loop PI regulation result signal to obtain a current loop PID regulation result signal; generating the working current according to a current loop PID regulation result signal;
the actual current signal is obtained by filtering and amplifying UVW current output by the motor and then sampling the UVW current by an analog-to-digital conversion module ADC.
10. The system of claim 8, wherein the position sensor is a position encoder disk located on the rotating mechanism of the motor, the position encoder disk determines a rotating position signal of the rotating shaft according to the number of rotation turns of the position encoder disk and the number of pulses in a unit circle, and determines an actual speed signal according to the number of rotation turns of the position encoder disk and the total number of pulses in the circle within a set time;
the position coding disc determines the rotating position signal of the rotating shaft according to the self rotating number of turns of the position coding disc and the number of pulses in the unit circle, and the method comprises the following steps: the position coding disc calculates the product between the number of turns of the position coding disc and the frequency multiplication resolution of the position coding disc, and the sum of the product result and the number of pulses in a unit turn is calculated to obtain an orthogonal coding interface QEI signal as a rotating shaft rotating position signal;
the processor further comprises:
and the orthogonal QEI decoding module is used for decoding the orthogonal QEI signal from the position coding disc to obtain an AB signal serving as an actual position signal.
11. The system of claim 8, wherein the position sensor is a hall sensor located on the motor stator assembly, the hall sensor determining a shaft rotational position signal based on its own rotating hall sector value; determining the actual speed according to the set speed constant, the rotating Hall sector value of the Hall sector value and the accumulated entering times of the PWM signal;
the hall sensor confirms the pivot rotational position signal according to the hall sector value of self rotation, includes:
at the interruption point of the motor operation process, the current first Hall sector is detected,
calculating the difference between the current first hall sector and the second hall sector detected at the last adjacent break point,
calculating the product of the difference and the steering value of the Hall sensor,
accumulating the product result on the basis of the adjacent previous rotating shaft rotating position signal to obtain a current rotating shaft rotating position signal;
the processor is also used for carrying out level acquisition on the rotating position signal of the rotating shaft obtained by the Hall sensor and then carrying out analog-to-digital conversion on the acquired level to obtain an actual position signal.
CN202011498703.3A 2020-12-17 2020-12-17 Method and system for closed-loop control of brush motor Active CN112713821B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011498703.3A CN112713821B (en) 2020-12-17 2020-12-17 Method and system for closed-loop control of brush motor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011498703.3A CN112713821B (en) 2020-12-17 2020-12-17 Method and system for closed-loop control of brush motor

Publications (2)

Publication Number Publication Date
CN112713821A CN112713821A (en) 2021-04-27
CN112713821B true CN112713821B (en) 2023-03-14

Family

ID=75544386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011498703.3A Active CN112713821B (en) 2020-12-17 2020-12-17 Method and system for closed-loop control of brush motor

Country Status (1)

Country Link
CN (1) CN112713821B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114468730A (en) * 2022-02-07 2022-05-13 沈丽丽 One-way communication group control system and method for multiple curtain motors
CN114785212A (en) * 2022-03-07 2022-07-22 江苏东成工具科技有限公司 System and method for detecting rotating speed of direct-current brush motor
CN115798064A (en) * 2022-10-24 2023-03-14 中电科普天科技股份有限公司 Telescopic component control method, device and medium of self-service payment equipment
CN115950070A (en) * 2022-12-19 2023-04-11 中电科普天科技股份有限公司 Air valve control system and method
CN116505716B (en) * 2023-04-26 2024-04-09 深圳市西林电气技术有限公司 High-speed motor driving system and method capable of being controlled accurately

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008052388A1 (en) * 2006-10-31 2008-05-08 Byd Company Limited Control method of electromotor
CN104779875A (en) * 2015-05-04 2015-07-15 奇瑞汽车股份有限公司 Closed-loop control system for direct current servo motor
CN106452231A (en) * 2016-10-09 2017-02-22 哈尔滨工程大学 Brush DC motor driver and control method thereof
CN108494297A (en) * 2018-05-03 2018-09-04 福州中澳科技有限公司 Bus-type brush DC driving device
WO2018209637A1 (en) * 2017-05-18 2018-11-22 深圳市海浦蒙特科技有限公司 Positioning control method and system for machine tool spindle

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008052388A1 (en) * 2006-10-31 2008-05-08 Byd Company Limited Control method of electromotor
CN104779875A (en) * 2015-05-04 2015-07-15 奇瑞汽车股份有限公司 Closed-loop control system for direct current servo motor
CN106452231A (en) * 2016-10-09 2017-02-22 哈尔滨工程大学 Brush DC motor driver and control method thereof
WO2018209637A1 (en) * 2017-05-18 2018-11-22 深圳市海浦蒙特科技有限公司 Positioning control method and system for machine tool spindle
CN108494297A (en) * 2018-05-03 2018-09-04 福州中澳科技有限公司 Bus-type brush DC driving device

Also Published As

Publication number Publication date
CN112713821A (en) 2021-04-27

Similar Documents

Publication Publication Date Title
CN112713821B (en) Method and system for closed-loop control of brush motor
US6541939B2 (en) Motor controller
Morimoto et al. Sinusoidal current drive system of permanent magnet synchronous motor with low resolution position sensor
US5245256A (en) Closed loop control of a brushless DC motor at nominal speed
EP1346461B1 (en) Commutation and velocity control system for a brushless dc motor
EP3557754A1 (en) Motor driving circuit, motor driving method and motor device using the same
US7696712B2 (en) Motor controller providing position feedback correction
KR101866508B1 (en) Stepping motor control method and device
JP2568068B2 (en) Motor rotor position detector
US7667424B2 (en) Servo device
JP2018143085A (en) System and method for controlling motor
Padalkar Speed and position control of BLDC motor using internal hall sensors and hardware design
JP5441624B2 (en) Motor drive device
US6274992B1 (en) Braking method for a single-phase motor
EP2977727B1 (en) Field programmable gate array based brushless dc motor speed detector
US20190028045A1 (en) Motor drive control device and motor drive control method
JP2005328644A (en) Motor driver, motor controller and motor drive method
Kelly What is the Most Effective Way to Commutate a BLDC Motor?
JP2002223584A (en) Controller for dc motor
Stika et al. A new cost effective solution for control of electrical actuators
Li et al. Design and Implementation of Real-time Momentum Wheel Control System Based on FPGA
PAITHANE et al. IMPLEMENTING JERK FREE BLDC POSITION CONTROL USING SOC WITH FOURTH ORDER TRAJECTORY PLANNING
Ortiz et al. High resolution position estimation from hall effect sensor
Yu A high performance microchip control system design for DC motor
CN116707362A (en) Single-phase direct current motor control method, unit, system and chip

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