WO2022105885A1 - 一种由电机驱动的机构确定开关时间的方法及系统 - Google Patents

一种由电机驱动的机构确定开关时间的方法及系统 Download PDF

Info

Publication number
WO2022105885A1
WO2022105885A1 PCT/CN2021/131833 CN2021131833W WO2022105885A1 WO 2022105885 A1 WO2022105885 A1 WO 2022105885A1 CN 2021131833 W CN2021131833 W CN 2021131833W WO 2022105885 A1 WO2022105885 A1 WO 2022105885A1
Authority
WO
WIPO (PCT)
Prior art keywords
control amount
switching time
motor
time
switching
Prior art date
Application number
PCT/CN2021/131833
Other languages
English (en)
French (fr)
Inventor
王聪
王升国
李长水
李余毅
库庆
彭群
Original Assignee
杭州海康威视数字技术股份有限公司
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 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Publication of WO2022105885A1 publication Critical patent/WO2022105885A1/zh

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
    • H02P23/00Arrangements or methods for the control of AC motors characterised by a control method other than vector control
    • H02P23/14Estimation or adaptation of motor parameters, e.g. rotor time constant, flux, speed, current or voltage

Definitions

  • the present application relates to the technical field of motor control, and in particular, to a method and system for determining switching time of a mechanism driven by a motor.
  • the motor can drive many types of mechanisms to operate, such as the automatic opening and closing of the door leaf of an automatic door driven by the motor, or the automatic opening and closing of the door wing of the access gate (hereinafter referred to as the gate) to allow users to pass.
  • Automatic door is a general term for door systems that meet the following conditions: after the control device in the door system recognizes the switch signal, the motor in the door system drives the switch of the door leaf of the door system for people to pass.
  • Automatic doors include smooth automatic doors, revolving automatic doors, swing automatic doors or folding automatic doors, etc.
  • the gate is installed at the entrance and exit of the personnel passage to form a passage of personnel between the fuselage and the fuselage or between the fuselage and other building facilities. The gate is used to make the personnel follow the designated It is an executive device of an entrance and exit control system with orderly passage, and its door wings are driven and switched by a motor.
  • the closed-loop control technology of the FOC system of PMSM can realize the precise control of the opening and closing time of the gate wing or the automatic door leaf, but in order to realize the three-loop control of the FOC system, it is necessary to have a photoelectric encoder or a magnetoelectric encoder equipped with The position sensor with higher accuracy can only be realized by collecting the motor running state signal, which is expensive and not easy to realize.
  • low-precision position sensors such as in-position contact switches or photoelectric switches can be configured. Controller) or the control unit of the low-end single-chip microcomputer, the control unit adjusts the voltage or current of the brush motor or stepper motor drive mechanism switch, so as to control the switching time of the mechanism such as the gate wing of the gate or the automatic door leaf.
  • the above process uses open-loop control to control brushed motors or stepper motors.
  • the position signal collected by a low-precision position sensor is used as the input of the motor control, the switching time of the motor drive mechanism will not be as expected. There is a deviation in the switching time of the mechanism, resulting in inaccurate switching time of the mechanism.
  • an embodiment of the present application provides a method for determining switching time of a mechanism driven by a motor, which enables accurate switching time of the motor-driven driving mechanism when open-loop control is adopted for the motor of the driving mechanism.
  • the embodiment of the present application also provides a system for determining the switching time of a mechanism driven by a motor, and when the system adopts open-loop control for the motor of the driving mechanism, the switching time of the motor-driven driving mechanism is accurate.
  • An embodiment of the present application provides a method for determining switching time of a mechanism driven by a motor, the method comprising:
  • the mechanism switching time is determined according to the position signal of the mechanism movement collected by the position sensor, and the determined mechanism switching time is compared with the set expected switching time to obtain the switching time error value;
  • the final control amount is obtained after the compensation control amount is added to the set control amount, and when the motor drive mechanism is switched on and off next time, the motor drive mechanism switch is controlled according to the final control amount.
  • the determining the switch time of the mechanism according to the position signal of the mechanism movement collected by the position sensor includes:
  • the starting time of the motor and the closing time when the position sensor recognizes that the motor drive mechanism moves to the closing position are obtained, and the difference between the obtained starting time of the motor and the obtained closing time is used as the determined switching time of the mechanism.
  • the comparing the determined switching time of the mechanism with the set expected switching time to obtain the switching time error value includes:
  • the determined switching time of the mechanism is compared with the set expected switching time at the corresponding switching speed gear, and the difference between the two is used as the obtained switching time error value at the corresponding switching speed gear.
  • the calculating and obtaining the compensation control amount according to the switching time error value includes: calculating and obtaining the compensation control amount according to the switching time error value based on the proportional-integral PI control mode of the motor;
  • the final control amount obtained by adding the compensation control amount to the set control amount includes:
  • the sum of the set control amount and the compensation control amount is taken as the obtained final control amount.
  • the method before controlling the switch of the motor drive mechanism according to the final control amount, the method further includes:
  • controlling the switch of the motor drive mechanism according to the final control amount includes:
  • the corresponding pulse width modulation PWM signal is output to control the switch of the motor drive mechanism.
  • An embodiment of the present application provides a system for determining switching time by a mechanism driven by a motor, including: a position sensor, a switching time calculation unit, a time control unit, and a modulation unit, wherein,
  • Position sensor used to collect the position signal of the movement of the mechanism
  • a switching time calculation unit configured to determine the switching time of the mechanism according to the position signal of the movement of the mechanism collected by the position sensor, and compare the determined switching time of the mechanism with the set expected switching time to obtain a switching time error value
  • the time control unit is used to calculate and obtain the compensation control amount according to the switching time error value, and obtain the final control amount after increasing the compensation control amount on the basis of the set control amount;
  • the modulation unit is used to control the switch of the motor drive mechanism according to the final control amount when the motor drive mechanism is switched on and off next time.
  • the on-off time calculation unit is specifically used to obtain the start-up time of the motor and the turn-off time when the position sensor recognizes that the motor drive mechanism moves to the off position, and compares the obtained start-up time of the motor with the start-up time of the motor. The difference between the obtained closing times is used as the determined switching time of the mechanism.
  • the switch time calculation unit is specifically configured to compare the determined switch time of the mechanism with the set expected switch time at the corresponding switch speed gear, and use the difference between the two as the obtained corresponding switch Switching time error value in speed gear.
  • the time control unit is specifically used for a proportional-integral PI control method based on the motor, and the compensation control amount is calculated according to the switching time error value;
  • the time control unit is specifically configured to take the sum of the set control amount and the compensation control amount as the obtained final control amount.
  • An embodiment of the present application provides a device for determining switching time by a mechanism driven by a motor, the device comprising:
  • the error determination module is used for determining the switching time of the mechanism according to the position signal of the movement of the mechanism collected by the position sensor during the switching process of the motor drive mechanism, and comparing the determined switching time of the mechanism with the set expected switching time to obtain the switching time error value;
  • the calculation module is used to calculate the compensation control amount according to the switching time error value
  • the control module is configured to increase the compensation control amount on the set control amount to obtain the final control amount, and control the motor drive mechanism switch according to the final control amount when the motor drive mechanism is switched on and off next time.
  • An embodiment of the present application provides a non-transitory computer-readable storage medium storing computer instructions, the computer instructions being used to cause the computer to execute the method for determining switching time of a mechanism driven by a motor according to any one of the foregoing.
  • the embodiment of the present application provides an electronic device, including:
  • the processor is configured to implement any one of the aforementioned method steps for determining the switching time of the mechanism driven by the motor when executing the program stored in the memory.
  • the switching time of the mechanism is determined according to the position signal collected by the position sensor, and is compared with the set expected switching time to obtain the switching time error value; according to the switching time error value calculation
  • the compensation control amount is obtained; the final control amount is obtained by increasing the compensation control amount on the basis of the set control amount, and when the motor drive mechanism is switched on and off next time, the motor drive mechanism is controlled to switch on and off according to the final control amount. Therefore, when the open-loop control of the motor of the driving mechanism is adopted in the embodiment of the present application, the situation that the switching time of the mechanism is determined to be inaccurate due to the inaccurate position signal collected by the low-precision sensor is considered. In an accurate situation, when the motor drive mechanism is switched on and off next time, the control amount of the control motor is compensated, so that the switching time of the motor drive mechanism gradually tends to be accurate.
  • FIG. 1 is a flowchart of a method for determining switching time by a mechanism driven by a motor provided by an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of a system for determining switching time by a motor-driven mechanism according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of an example of a method for determining a switching time by a mechanism driven by a motor provided by an embodiment of the present application;
  • FIG. 4 is a schematic diagram of a motor open-loop control system provided by an embodiment of the present application.
  • FIG. 5 is a flowchart of a method for calculating the switching time of a mechanism by a switching time calculating unit provided by an embodiment of the present application;
  • FIG. 6 is a graph showing the time change of the door opening and closing of the left and right channels under the method provided by the embodiment of the present application;
  • Fig. 7 is the time change curve diagram of the door opening and closing time of the left and right two channels under the traditional method
  • FIG. 8 is a graph showing the change of the switching time error of the left and right channels under the method of the present application and the conventional method.
  • the mechanism is the door leaf of the automatic door or the door wing of the access gate
  • the automatic door includes two left and right door leaves or the gate includes
  • two brushed motors or stepper motors are required to drive the left and right door leaves or door wings to open and close, respectively.
  • the opening and closing times of the wings are different, and the opening and closing times of the left and right door leaves or door wings cannot be synchronized, which greatly affects the user experience.
  • the switching time of the mechanism is determined according to the position signal of the movement of the mechanism collected by the position sensor, and the switching time error value is obtained by comparing it with the set expected switching time; The time error value is calculated to obtain the compensation control amount; the final control amount is obtained by increasing the compensation control amount on the basis of the determined next motor control amount, and when the motor drive mechanism is switched on and off next time, the motor drive mechanism is controlled according to the final control amount.
  • the mechanism is the door leaf of the automatic door or the door wing of the access gate
  • the brushed motor or stepper motor drives the left and right door leaves or door wings respectively, and the switching time is accurate, which tends to be the expected switching time, so the switching time of the left and right door leaves or door wings is synchronized, which improves the user experience.
  • FIG. 1 is a flowchart of a method for determining switching time by a motor-driven mechanism provided by an embodiment of the present application.
  • the method for determining switching time by a motor-driven mechanism provided by an embodiment of the present application can be applied to any switch with a control motor-driven mechanism.
  • Capable electronic equipment for example, can be applied to the controller in automatic doors or gates.
  • the specific steps include:
  • Step 101 During the current switching process of the motor drive mechanism, the mechanism switching time is determined according to the position signal of the mechanism movement collected by the position sensor, and the determined mechanism switching time is compared with the set expected switching time to obtain the switching time error value;
  • Step 102 calculating the compensation control amount according to the switching time error value
  • Step 103 After the compensation control amount is added to the set control amount, a final control amount is obtained, and when the motor driving mechanism is switched on and off next time, the motor driving mechanism is controlled to switch on and off according to the final control amount.
  • the mechanism switch in this application may refer to the mechanism opening or the mechanism closing. Since the mechanism opening and the mechanism closing have the same principles, the following description is convenient, and only the mechanism closing is taken as an example for description, and the same is true for the mechanism opening. available, and will not be repeated here.
  • the position sensor may be any device capable of outputting different position signals according to different positions of the mechanism, such as the aforementioned contact switch, photoelectric switch, and the like. It can be understood that the position of the mechanism is different when it is turned on and when it is turned off, so the position signal output by the position sensor is different, that is, the execution body of the method for determining the switching time of the motor-driven mechanism provided by the present application can be based on the output of the position sensor. The position signal judges whether the mechanism has been closed, and then determines the switching time of the mechanism.
  • the expected switching time may refer to the time elapsed from when the mechanism is expected to be closed until the mechanism is closed.
  • the expected switching time may be the time set by the user according to actual experience or needs, or it may be calculated according to preset rules.
  • the average value of the mechanism switching time when the mechanism is switched on and off multiple times in the history of the mechanism is used as the expected mechanism switching time.
  • determining the switching time of the mechanism according to the position signal of the mechanism movement collected by the position sensor may include:
  • comparing the determined switching time of the mechanism with the set expected switching time to obtain the switching time error value may include:
  • the error value of the switching time at the corresponding switching speed gear is obtained. In the specific comparison, it is the difference between the determined switching time of the mechanism and the expected switching time under the set corresponding switching speed gear.
  • the set expected switching time may actually be the switching time for different switching speed gears according to user requirements.
  • the control compensation of the motor drive mechanism by the method is established under different switching speed gears of the mechanism, so that the compensation can be made more accurate.
  • the different switching speed gears of the mechanism reflect the different switching speed modes of the mechanism during normal use. Under different switching speed modes, the mechanism will switch at different speeds.
  • the switching speed gears can be set to multiple gears, and the gears
  • the number of bits can vary according to different application scenarios, such as 1 to 10 files, 1 to 20 files, and so on.
  • step 102 the larger the switching time error is, the less the control of the mechanism in the current switching process of the motor drive mechanism can be considered to meet expectations, that is, the greater the difference between the actual control amount set for the motor and the control amount that can meet the expectations, Therefore, the compensation control amount should be larger at this time.
  • the way of calculating the compensation control amount according to the switching time error value may vary according to different application scenarios, but it should be satisfied that the switching time error value is positively correlated with the calculated compensation control amount.
  • the switching time error value can be input into any increasing function, and the output of the increasing function can be used as the compensation control amount.
  • calculating and obtaining the compensation control amount according to the switching time error value may include: calculating and obtaining the compensation control amount according to the switching time error value based on the proportional integral (PI) control mode of the motor.
  • PI proportional integral
  • the operation process of the motor drive mechanism can be divided into a start-up phase, a normal operation phase, a stop phase and a fault phase, and the applicable phase of the method is the normal operation phase of the motor drive mechanism.
  • the set control variable may refer to a parameter set for the motor and used to control the motor driving mechanism, and the control variable is used to control the switching speed of the mechanism during the switching process of the motor driving mechanism. Change the mechanism switching time when the motor drive mechanism is switched on and off.
  • the control variable may include one or more of the following parameters: current, voltage, pulse frequency, pulse width, and duty cycle when the motor power is supplied.
  • the final control amount obtained by increasing the compensation control amount on the basis of the set control amount refers to changing the set control amount, and making the final control amount obtained after the change equal to the set control amount in value and the sum of the compensation control amount. Therefore, although the final control amount is obtained by adding the compensation control amount on the basis of the set control amount, since the compensation control amount may be a negative value, the final control amount is not necessarily greater than the set control amount. If the compensation control amount is a positive value, the final control amount obtained after increasing the compensation control amount is greater than the set control amount; if the compensation control amount is a negative value, the final control amount obtained after increasing the compensation control amount is smaller than the set control amount amount of control. In an implementation manner, adding the compensation control amount on the basis of the set control amount to obtain the final control amount may include: obtaining the final control amount as the sum of the set control amount and the compensation control amount.
  • the switch of the motor drive mechanism before controlling the switch of the motor drive mechanism according to the final control amount, it may further include:
  • the maximum control amount may refer to the expected maximum value of the control amount that can make the motor work normally, that is, theoretically, when the control amount set for the motor is greater than the maximum control amount, the motor may not operate normally.
  • the maximum control amount can be set by the user according to experience or actual needs, or calculated according to preset rules. Exemplarily, it can be the minimum value of the control amount set when the motor is abnormal in the statistical history, and the minimum value is set. as the maximum amount of control.
  • control amount of the switch of the motor drive mechanism can be prevented from exceeding the bearing range of the motor, and the safety of the motor can be ensured.
  • controlling the switch of the motor drive mechanism according to the final control amount may include:
  • the corresponding pulse width modulation (PWM, Pluse Width Modulation) signal is output to control the switch of the motor drive mechanism.
  • FIG. 2 is a schematic structural diagram of a system for determining switching time by a mechanism driven by a motor provided in an embodiment of the present application, including: a position sensor, a switching time calculation unit, a time control unit, and a modulation unit, wherein,
  • Position sensor used to collect the position signal of the movement of the mechanism
  • the switching time calculation unit is used to determine the switching time of the mechanism according to the position signal of the movement of the mechanism collected by the position sensor, and compare the determined switching time of the mechanism with the set expected switching time to obtain the switching time error value;
  • the time control unit is used to calculate and obtain the compensation control amount according to the switching time error value, and obtain the final control amount after increasing the compensation control amount on the basis of the set control amount;
  • the modulation unit is used to control the switch of the motor drive mechanism according to the final control amount when the motor drive mechanism is switched on and off next time.
  • the action of the mechanism is realized by the motor driven by the motor drive core.
  • the position sensor can collect the position of the drive core, that is, the position signal of the mechanism movement.
  • the switching time calculation unit is also used to obtain the starting time of the motor and the closing time when the position sensor recognizes that the motor drive mechanism moves to the closing position, and compares the obtained starting time of the motor with the obtained closing time. The difference is used as the determined switching time of the mechanism.
  • the switching time calculation unit is further configured to compare the determined switching time of the mechanism with the set expected switching time at the corresponding switching speed gear to obtain the switching time error value at the corresponding switching speed gear. In the specific comparison, it is the difference between the determined switching time of the mechanism and the expected switching time under the set corresponding switching speed gear.
  • the time control unit is also used for calculating the compensation control amount based on the switch time error value based on the proportional integral control mode of the motor.
  • the modulation unit is also used for taking the sum of the set control amount and the compensation control amount as the obtained final control amount.
  • FIG. 3 is a schematic diagram of an example of a method for determining a switching time by a mechanism driven by a motor provided by an embodiment of the present application, including:
  • Step 301 According to the position signal of the movement of the mechanism collected by the position sensor, the switching time calculation unit calculates the door opening and closing time t n (k) with the k-th switching speed gear position n;
  • n is any one of all switching speed gears, and k is a positive integer;
  • Step 302 Set the expected door opening and closing time t* n (k) with the kth opening and closing speed gear as n, and set the expected door opening and closing time t*n ( k) and the door opening and closing time tn (k) in the time comparator. Under the action, the switching time error value ⁇ t n (k) is obtained;
  • Step 303 According to the switching time error value ⁇ t n (k), under the action of the time control unit, calculate the control compensation amount s c (k+1) with the next switching speed gear n, and calculate the time in the middle of the normal operation stage of the motor. The summation of the control amount s(t) of t and the motor control compensation amount s c (k) obtains the final control amount s l (t) of the motor;
  • Step 304 According to the final control amount s l (t) of the motor, the modulation unit outputs the PWM signal required by the mechanism to control the motor.
  • the opening and closing time calculation unit of step 301 calculates the kth door opening and closing time of the mechanism according to the starting time of the motor and the stopping time of the motor.
  • the different switching speed gears in step 301 reflect the different switching speed modes of the mechanism during normal use.
  • the speed gears are 1 to 10 gears.
  • the setting of the speed gears It can also be different, for example, the speed gear can be 1-20 gears, and it can also be 0.1-1.5 gears.
  • the expected door opening and closing time t* n (k) in step 302 refers to the opening and closing time set value for different opening and closing speed gears according to user requirements.
  • the time control unit in step 302 is designed according to the PI control method, but the design of the time control unit is not limited to the PI control algorithm, and any control algorithm that can eliminate errors is applicable.
  • the embodiment of the present application solves the problem that when there are multiple mechanisms, such as two left and right door wings of a gate or two left and right door leaves of an automatic door, when different motors drive different mechanisms, the switch of different mechanisms cannot be made. Time synchronization problem.
  • the embodiments of the present application are applied in the case where the position sensor used is not high in accuracy when the motor adopts an open-loop control mode.
  • the schematic diagram of the motor open-loop control system provided by the embodiment of the present application is shown in FIG. 4 , including: a modulation unit, an H-bridge drive circuit, a time control unit, a switching time calculation unit, a position sensor, a DC brush motor, and a motor core.
  • FIG. 4 the specific implementation process of the entire embodiment of the present application is described, and the embodiment of the present application is described in detail by taking the door wing of the gate as an example as the mechanism.
  • Step 1 According to the position signal of the movement of the mechanism collected by the position sensor, the switching time calculation unit calculates the switching time t n (k) when the k-th switching speed gear is n, and the specific implementation process of the switching time calculation unit is shown in the figure. 5 shown.
  • the opening/closing command of the gate is first received and the motor state is updated, and then it is judged whether the motor starts to start. If the motor starts, the timer starts to count, and the position signal of the position sensor is obtained. The signal updates the motor status in real time, and then judges whether the motor has stopped. If the motor has stopped, it means that the kth door opening/closing action has been completed. Stop the timer and assign the value to t n (k), which is the reading of the timer. Assign the value to t n (k), the timer is cleared, and the calculation of the door opening and closing time is completed.
  • Step 2 Set the expected switching time t* n (k) of the k-th switching speed gear as n.
  • the expected switching time value is set according to the user's needs.
  • Step 3 According to the time error ⁇ t n (k), under the action of the time control unit, calculate the control compensation amount s c (k+1) of the motor with the next switching speed gear n, where the time control unit is based on PI
  • the control gain can be set according to the user's experience or actual needs.
  • the working process of the motor is roughly divided into: start-up stage, normal operation stage, stop stage, and fault stage.
  • the brushed DC motor is selected, and the control value of the motor is the voltage value, that is, the voltage value output by the motor power supply, so the amplitude of the final control value s l (t) of the motor at the current moment is lower than
  • Step 4 According to the change of the final control amount s l (t) of the motor, the final control amount of the motor is modulated by the modulation unit to generate a driving signal, that is, the PWM signal controls the operation of the motor, and the motor drives the gate wing of the gate to open and close.
  • FIG. 5 is a flow chart of the method for obtaining the switching time of the mechanism by the switching time calculation unit provided by the embodiment of the present application.
  • the mechanism adopts a gate as an example.
  • the switching time calculation unit is a main part of the controller that controls the motor.
  • the specific implementation is:
  • Step 501 receive the door opening/closing command of the gate and update the motor state
  • Step 502 determine whether the motor starts to start, if so, execute step 503; if not, return to step 501 to continue execution;
  • Step 503 the set timer starts timing, obtains the position signal of the position sensor, and updates the motor state in real time according to the position signal;
  • Step 504 determine whether the motor has stopped, if so, go to step 505; if not, return to step 503 to continue to execute;
  • Step 505 Determine that the k-th door opening/closing action of the gate wing of the gate has been completed, stop the timer, assign the value to t n (k), clear the timer, and complete the calculation of the switching time of the mechanism.
  • a comparison test is carried out by using the method provided by the embodiment of the present application and the traditional switching method of the gate wing of the gate driven by the motor.
  • the test environment adopts the double-channel gate wing for door opening and closing test.
  • the two channels are divided into left channel and right channel.
  • the motor is selected as a DC brush motor
  • the transmission mechanism is selected as a sheave transmission mechanism
  • the position sensor is selected as a photoelectric switch to control the control of the motor.
  • the main control chip of the controller selects a controller chip with a main frequency of 48MHz, and the door opening and closing time is set to 1.4s according to user requirements, and the time error of the left and right channels is plus or minus 0.1s.
  • the test results are shown in Figure 6, Figure 7 and Figure 8. 6 is a graph showing the time change of the door opening and closing time of the left and right two channels using the method provided by the embodiment of the present application; The change curve of the switching time error of the left and right channels under the application method and the traditional method.
  • the time error of the left and right channels has been reduced to within 0.1s, and the left and right channels are not synchronized.
  • the phenomenon has been significantly improved to meet the needs of users.
  • the time error of the left and right channels fluctuates continuously, and the problem of different door opening and closing times of the left and right channels is not effectively solved.
  • the time error curve in Figure 8 it can be seen more intuitively.
  • the time error gradually approaches zero from the maximum error of 0.8 seconds, which can effectively adjust the time error of the left and right channels. It fluctuates between 0.5s and the time error of the left and right channels cannot be effectively adjusted.
  • the motor control method for controlling the opening and closing time of the gate in the embodiment of the present application is effective.
  • the embodiment of the present application also provides a device for determining switching time by a mechanism driven by a motor, the device comprising:
  • the error determination module is used for determining the switching time of the mechanism according to the position signal of the movement of the mechanism collected by the position sensor during the switching process of the motor drive mechanism, and comparing the determined switching time of the mechanism with the set expected switching time to obtain the switching time error value;
  • the calculation module is used to calculate the compensation control amount according to the switching time error value
  • the control module is configured to increase the compensation control amount on the set control amount to obtain the final control amount, and control the motor drive mechanism switch according to the final control amount when the motor drive mechanism is switched on and off next time.
  • Embodiments of the present application further provide a non-transitory computer-readable storage medium storing computer instructions, the computer instructions being used to cause the computer to perform any one of the aforementioned determinations by the motor-driven mechanism method of switching time.
  • the embodiment of the present application also provides an electronic device, including:
  • the mechanism switching time is determined according to the position signal of the mechanism movement collected by the position sensor, and the determined mechanism switching time is compared with the set expected switching time to obtain the switching time error value;
  • the final control amount is obtained after the compensation control amount is added to the set control amount, and when the motor drive mechanism is switched on and off next time, the motor drive mechanism switch is controlled according to the final control amount.
  • the memory mentioned in the above electronic device may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory.
  • RAM Random Access Memory
  • NVM non-Volatile Memory
  • the memory may also be at least one storage device located away from the aforementioned processor.
  • the above-mentioned processor can be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processor, DSP), dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • CPU Central Processing Unit
  • NP Network Processor
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • FPGA Field-Programmable Gate Array
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • software it can be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server, or data center is by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes an integration of one or more available media.
  • the usable media may be magnetic media (e.g., floppy disk, hard disk, magnetic tape), optical media (e.g., DVD), or semiconductor media (e.g., Solid State Disk (SSD)), and the like.

Landscapes

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

Abstract

一种由电机驱动的机构确定开关时间的方法及系统,在本次电机驱动机构开关过程中,根据位置传感器采集的位置信号确定机构开关时间,与设置的期望开关时间比较,得到开关时间误差值(101);根据开关时间误差值计算得到补偿控制量(102);在所设置的控制量的基础上增加该补偿控制量后得到最终控制量(103),在下次电机驱动机构开关时,根据最终控制量控制电机驱动机构进行开关。因此,在对驱动机构的电机采用开环控制时,考虑到了低精度传感器采集的位置信号不准确而导致确定的本次机构开关时间不准确的情况,对本次机构开关时间不准确的情况,在下次电机驱动机构开关时,进行了控制电机的控制量补偿,从而使得电机驱动机构的开关时间逐步趋于准确。

Description

一种由电机驱动的机构确定开关时间的方法及系统
本申请要求于2020年11月19日提交中国专利局、申请号为202011300386.X发明名称为“一种由电机驱动的机构确定开关时间的方法及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电机控制技术领域,特别涉及一种由电机驱动的机构确定开关时间的方法及系统。
背景技术
电机可以驱动很多种类型的机构运行,例如电机驱动自动门的门扇的自动开闭,或驱动通道闸机(下文简称闸机)的门翼的自动开闭,使用户通行。自动门是满足以下条件的门系统的总称:在门系统中的控制设备识别到开关信号后,由门系统中的电机驱动门系统的门扇的开关,供人通行。自动门包括平滑自动门、旋转自动门、平开自动门或折叠自动门等。闸机安装在人员通道的出入口,在机身与机身或机身与其他建筑物设施之间形成人员通行通道,闸机为通过电控阻挡装置以及指示装置和/或引导人员使人员按照指定方向有序通行的一种出入口控制系统的执行设备,其门翼是由电机驱动开关的。
针对电机的不同类型通常使用不同的控制技术,以控制不同类型的电机驱动机构进行动作。对于无刷直流电机(BLDC,Brushless Direct Current)通常采用三相六步换相的比例、积分及微分(PID,Proportion Integration Diffrentiation)调节的闭环控制技术,成本比较高。对于永磁同步电机(PMSM,Permanent Magnet Synchronous Motor),通常采用先进的磁场定向控制(FOC,Field-Oriented Control)技术,控制PMSM驱动机构运行,实现精确的位置控制(例如闸机门翼或自动门门扇的位置控制),这种情况下要求PMSM的FOC系统采用位置环、速度环和电流环的三环控制。采用PMSM的FOC系统的闭环控制技术可以实现闸机门翼或自动门门扇的开关时间的精确控制,但是为了实现FOC系统的三环控制,则需要诸如光电编码器或磁电编码器等配有精度较高的位置传感器采集电机运行状态信号,才能实现,成本较高且不容易实现。
对于有刷电机或步进电机的控制,可以配置到位接触开关或光电开关等 低精度的位置传感器,位置传感器在采集机构运动的位置信号后,传输给诸如可编程逻辑控制器(PLC,Programmable Logic Controller)或低端单片机的控制单元,控制单元对有刷电机或步进电机驱动机构开关的电压或电流进行调整,以此对诸如闸机门翼或自动门门扇的机构的开关时间进行控制。
但是,上述过程采用开环控制方式,对有刷电机或步进电机进行控制,当采用低精度的位置传感器采集的位置信号作为电机控制的输入时,就会导致电机驱动机构的开关时间与预期的开关时间有偏差,造成机构的开关时间不准确。
发明内容
有鉴于此,本申请实施例提供一种由电机驱动的机构确定开关时间的方法,该方法在对驱动机构的电机采用开环控制时,使得电机驱动驱动机构的开关时间准确。
本申请实施例还提供了一种由电机驱动的机构确定开关时间的系统,该系统在对驱动机构的电机采用开环控制时,使得电机驱动驱动机构的开关时间准确。
本申请实施例提供了一种由电机驱动的机构确定开关时间的方法,所述方法包括:
本次电机驱动机构开关过程中,根据位置传感器采集的机构运动的位置信号确定机构开关时间,将所述确定的机构开关时间与设置的期望开关时间比较,得到开关时间误差值;
根据开关时间误差值计算得到补偿控制量;
在所设置的控制量上增加所述补偿控制量后得到最终控制量,在下次电机驱动机构开关时,根据最终控制量控制电机驱动机构开关。
在一种实现方式中,所述根据位置传感器采集的机构运动的位置信号确定机构开关时间包括:
获取电机的启动时间,及获取位置传感器识别到电机驱动机构运动至关闭位置时的关闭时间,将所获取电机的启动时间与获取的关闭时间之差作为所确定的机构开关时间。
在一种实现方式中,所述将所述确定的机构开关时间与设置的期望开关时间比较,得到开关时间误差值包括:
将所述确定的机构开关时间与设置的对应开关速度档位下的期望开关时间比较,将两者之差作为得到的对应开关速度档位下的开关时间误差值。
在一种实现方式中,所述根据开关时间误差值计算得到补偿控制量包括:基于电机的比例积分PI控制方式,根据开关时间误差值计算得到补偿控制量;
所述在所设置的控制量上增加该补偿控制量后得到最终控制量包括:
将所设置的控制量,与所述补偿控制量之和作为得到的最终控制量。
在一种实现方式中,在根据最终控制量控制电机驱动机构开关之前,还包括:
判断得到的最终控制量是否大于设置的最大控制量,如果否,则执行所述根据最终控制量控制电机驱动机的步骤;如果是,则根据设置的最大控制量控制电机驱动机构开关。
在一种实现方式中,所述根据最终控制量控制电机驱动机构开关包括:
根据最终控制量,输出对应的脉冲宽度调制PWM信号,控制电机驱动机构开关。
本申请实施例提供了一种由电机驱动的机构确定开关时间的系统,包括:位置传感器、开关时间计算单元、时间控制单元及调制单元,其中,
位置传感器,用于采集机构运动的位置信号;
开关时间计算单元,用于根据位置传感器采集的机构运动的位置信号确定机构开关时间,将所述确定的机构开关时间与设置的期望开关时间比较,得到开关时间误差值;
时间控制单元,用于根据开关时间误差值计算得到补偿控制量,在所设置的控制量的基础上增加该补偿控制量后得到最终控制量;
调制单元,用于在下次电机驱动机构开关时,根据最终控制量控制电机驱动机构开关。
在一种实现方式中,所述开关时间计算单元,具体用于获取电机的启动时间,及获取位置传感器识别到电机驱动机构运动至关闭位置时的关闭时间,将所获取的电机的启动时间与获取的关闭时间之差作为所确定的机构开关时间。
在一种实现方式中,所述开关时间计算单元,具体用于将所述确定的机构开关时间与设置的对应开关速度档位下的期望开关时间比较,将两者之差作为得到的对应开关速度档位下的开关时间误差值。
在一种实现方式中,所述时间控制单元,具体用于基于电机的比例积分PI控制方式,根据开关时间误差值计算得到补偿控制量;
所述时间控制单元,具体用于将所设置的控制量与所述补偿控制量之和作为得到的最终控制量。
本申请实施例提供了一种由电机驱动的机构确定开关时间的装置,所述装置包括:
误差确定模块,用于本次电机驱动机构开关过程中,根据位置传感器采集的机构运动的位置信号确定机构开关时间,将所述确定的机构开关时间与设置的期望开关时间比较,得到开关时间误差值;
计算模块,用于根据开关时间误差值计算得到补偿控制量;
控制模块,用于在所设置的控制量上增加所述补偿控制量后得到最终控制量,在下次电机驱动机构开关时,根据最终控制量控制电机驱动机构开关。
本申请实施例提供了一种存储有计算机指令的非瞬时计算机可读存储介质,所述计算机指令用于使所述计算机执行根据前述任一所述的由电机驱动的机构确定开关时间的方法。
本申请实施例提供了一种电子设备,包括:
存储器,用于存放计算机程序;
处理器,用于执行存储器上所存放的程序时,实现前述任一所述的由电机驱动的机构确定开关时间的方法步骤。
如上所见,本申请实施例在本次电机驱动机构开关过程中,根据位置传感器采集的位置信号确定机构开关时间,与设置的期望开关时间比较,得到开关时间误差值;根据开关时间误差值计算得到补偿控制量;在所设置的控制量的基础上增加该补偿控制量后得到最终控制量,在下次电机驱动机构开关时,根据最终控制量控制电机驱动机构进行开关。因此,本申请实施例在对驱动机构的电机采用开环控制时,考虑到了低精度传感器采集的位置信号不准确而导致确定的本次机构开关时间不准确的情况,对本次机构开关时间不准确的情况,在下次电机驱动机构开关时,进行了控制电机的控制量补偿,从而使得电机驱动机构的开关时间逐步趋于准确。
附图说明
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,本领域普通技术人员来讲还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种由电机驱动的机构确定开关时间的方法流程图;
图2为本申请实施例提供的一种由电机驱动的机构确定开关时间的系统结构示意图;
图3为本申请实施例提供的由电机驱动的机构确定开关时间的方法例子示意图;
图4为本申请实施例提供的电机开环控制系统示意图;
图5为本申请实施例提供的开关时间计算单元计算得到机构的开关时间的方法流程图;
图6为采用使用本申请实施例提供方法下的左右两个通道开关门时间变化曲线图;
图7为使用传统方法下的左右两个通道开关门时间变化曲线图;
图8为在使用本申请方法和传统方法下的左右通道开关时间误差变化曲线图。
具体实施方式
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。本领域普通技术人员基于本申请中的实施例所获得的所有其他实施例,都属于本申请保护的范围。
从背景技术可以看出,当采用开环控制方式,对有刷电机或步进电机进行控制,使得电机驱动机构进行开关时,在采用低精度的位置传感器采集的位置信息作为电机控制的输入时,就会导致电机驱动机构的开关时间与预期的开关时间有偏差,造成了机构的开关时间不准确。
特别地,当机构为自动门的门扇或通道闸机的门翼时,如果自动门的门扇或通道闸机的门翼为至少两个时,比如是自动门包括左右两个门扇或闸机 包括左右两个门翼时,就需要两台有刷电机或步进电机分别驱动左右两个门扇或门翼进行开关,则会因为不同的有刷电机或步进电机分别驱动左右两个门扇或门翼的开关时间不同,而出现左右两个门扇或门翼的开关时间无法同步问题,极大影响用户体验。
为了克服这个问题,本申请实施例在本次电机驱动机构开关过程中,根据位置传感器采集的机构运动的位置信号确定机构开关时间,与设置的期望开关时间比较,得到开关时间误差值;根据开关时间误差值计算得到补偿控制量;在确定的下次电机的控制量的基础上增加该补偿控制量后得到最终控制量,在下次电机驱动机构开关时,根据最终控制量控制电机驱动机构开关。
因此,本申请实施例在对驱动机构的电机采用开环控制时,考虑到了低精度传感器采集的位置信号不准确而导致确定的本次机构开关时间不准确的情况,对本次机构开关时间不准确的情况,在下次电机驱动机构开关时,进行了控制电机的控制量补偿,从而使得电机驱动机构的开关时间逐步趋于准确。
特别地,当机构为自动门的门扇或通道闸机的门翼时,如果自动门的门扇或通道闸机的门翼为至少两个时,比如是左右个门扇或门翼时,由于不同的有刷电机或步进电机分别驱动左右两个门扇或门翼的开关时间准确,都趋于期望开关时间,所以使得左右两个门扇或门翼的开关时间同步,提高了用户体验度。
图1为本申请实施例提供的一种由电机驱动的机构确定开关时间的方法流程图,本申请实施例提供的由电机驱动的机构确定开关时间的方法可以应用于任意具备控制电机驱动机构开关能力的电子设备上,例如,可以应用于自动门或闸机中的控制器。其具体步骤包括:
步骤101、本次电机驱动机构开关过程中,根据位置传感器采集的机构运动的位置信号确定机构开关时间,将确定的机构开关时间与设置的期望开关时间比较,得到开关时间误差值;
步骤102、根据开关时间误差值计算得到补偿控制量;
步骤103、在所设置的控制量上增加该补偿控制量后得到最终控制量,在下次电机驱动机构开关时,根据最终控制量控制电机驱动机构开关。
本申请中机构开关可以是指机构开启也可以是指机构关闭,由于机构开启与机构关闭的原理相同,因此下文中为描述方便,仅以机构关闭为例进行 说明,对于机构开启的情况同理可得,在此不再赘述。
其中,步骤101中,位置传感器可以是任意能够根据机构所处位置的不同输出不同位置信号的设备,如前述接触开关、光电开关等。可以理解的是,机构开启时和关闭时所处的位置不同,因此位置传感器输出的位置信号不同,即本申请提供的由电机驱动的机构确定开关时间的方法的执行主体可以根据位置传感器输出的位置信号判断机构是否已经关闭,进而确定出机构开关时间。
机构开关时间可以是指从机构开始关闭直至机构关闭所经过的时间。示例性的,假设在t=a时刻机构开始关闭,在t=b时刻机构关闭,则机构开关时间为b-a。由于机构可以为自动门的门扇或闸机的门翼等,因此开关时间也可以称为开关门时间。
期望开关时间可以是指预期中机构开始关闭直至机构关闭所经过的时间,期望开关时间可以是用户根据实际经验或需求设置的时间,也可以是按照预设规则计算得到的,例如,可以是将机构历史上多次开关时的机构开关时间的均值作为预期机构开关时间。
在一种实现方式中,根据位置传感器采集的机构运动的位置信号确定机构开关时间可以包括:
获取电机的启动时间,及获取位置传感器识别到电机驱动机构运动至关闭位置时的关闭时间,将所获取的电机的启动时间与获取的关闭时间之差作为所确定的机构开关时间。
在一种实现方式中,将确定的机构开关时间与设置的期望开关时间比较,得到开关时间误差值可以包括:
将确定的机构开关时间与设置的对应开关速度档位下的期望开关时间比较,得到对应开关速度档位下的开关时间误差值。在具体比较时,是确定的机构开关时间与设置的对应开关速度档位下的期望开关时间之间的差值。
其中,设置的期望开关时间实际上可以是根据用户需求针对不同开关速度档位的开关时间。
也就是说,该方法对电机驱动机构的控制补偿是建立在机构的不同开关速度档位下的,这样,能够使得补偿更精确。其中,机构的不同开关速度档位反映了机构在正常使用过程中的不同开关速度模式,在不同开关速度模式下,机构将按照不同速度进行开关,开关速度档位可以设置为多档,并且档 位的数量可以根据应用场景的不同而不同,比如1~10档、1~20档等。
在步骤102中,开关时间误差越大则可以认为本次电机驱动机构开关过程中对机构的控制越不符合预期,即实际中为电机设置的控制量与能够满足预期的控制量相差越大,因此此时补偿控制量应当越大。
根据开关时间误差值计算得到补偿控制量的方式可以根据应用场景的不同而不同,但是应当满足开关时间误差值与计算得到的补偿控制量正相关。示例性的,可以是将开关时间误差值输入至任意递增函数,将该递增函数的输出作为补偿控制量。
在一种实现方式中,根据开关时间误差值计算得到补偿控制量可以包括:基于电机的比例积分(PI)控制方式,根据开关时间误差值计算得到补偿控制量。
选用该实现方式,就可以得到更为精确的补偿控制量。
电机驱动机构的运行过程可以分为启动阶段、正常运行阶段、停车阶段和故障阶段,该方法所适用的阶段是电机驱动机构的正常运行阶段。
在步骤103中,所设置的控制量可以是指为电机设置的且用于控制电机驱动机构的参量,该控制量为用于控制电机驱动机构开关过程中机构开关速率,通过更改该控制量可以更改电机驱动机构开关时的机构开关时间。示例性的,控制量可以包括以下参量中的一个或多个:电机电源供电时的电流、电压、脉冲频率、脉冲宽度、占空比。
本文中在所设置的控制量的基础上增加补偿控制量后得到最终控制量是指:对所设置的控制量进行变化,并使得变化后得到的最终控制量在数值上等于所设置的控制量与补偿控制量之和。因此,虽然最终控制量是在所设置的控制量的基础上增加补偿控制量得到的,但是由于补偿控制量可能为负值,最终控制量并不一定大于所设置的控制量。若补偿控制量为正值,则在增加补偿控制量后得到的最终控制量大于所设置的控制量,若补偿控制量为负值,则在增加补偿控制量后得到的最终控制量小于所设置的控制量。在一种实现方式中,在所设置的控制量的基础上增加该补偿控制量后得到最终控制量可以包括:将所设置的控制量与补偿控制量之和,作为得到最终控制量。
在一种实现方式中,在根据最终控制量控制电机驱动机构开关之前,还可以包括:
判断得到的最终控制量是否大于设置的最大控制量,如果否,则根据最 终控制量控制电机驱动机;如果是,则根据设置的最大控制量控制电机驱动机构开关。
其中,最大控制量可以是指预期中能够使得电机正常工作的控制量的最大值,即理论上当为电机设置的控制量大于最大控制量时,电机可能无法正常运行。
最大控制量可以是用户根据经验或者实际需求设置的,也可以是根据预设规则计算得到的,示例性的,可以是统计历史上电机出现异常时所设置的控制量的最小值,将最小值作为最大控制量。
选用该实现方式,就可以防止电机驱动机构开关的控制量不超出电机的承受范围,保证电机的安全。
在一种实现方式中,根据最终控制量控制电机驱动机构开关可以包括:
根据最终控制量,输出对应的脉冲宽度调制(PWM,Pluse Width Modulation)信号,控制电机驱动机构开关。
图2为本申请实施例提供的一种由电机驱动的机构确定开关时间的系统结构示意图,包括:位置传感器、开关时间计算单元、时间控制单元及调制单元,其中,
位置传感器,用于采集机构运动的位置信号;
开关时间计算单元,用于根据位置传感器采集的机构运动的位置信号确定机构开关时间,将确定的机构开关时间与设置的期望开关时间比较,得到开关时间误差值;
时间控制单元,用于根据开关时间误差值计算得到补偿控制量,在所设置的控制量的基础上增加该补偿控制量后得到最终控制量;
调制单元,用于在下次电机驱动机构开关时,根据最终控制量控制电机驱动机构开关。
在该系统中,机构的动作是由电机通过电机传动机芯驱动实现的,在图中,位置传感就可以采集传动机芯的位置,即机构运动的位置信号。
在该系统中,开关时间计算单元,还用于获取电机的启动时间,及获取位置传感器识别到电机驱动机构运动至关闭位置时的关闭时间,将所获取的电机的启动时间与获取的关闭时间之差作为所确定的机构开关时间。
在一种实现方式中,开关时间计算单元,还用于将确定的机构开关时间与设置的对应开关速度档位下的期望开关时间比较,得到对应开关速度档位 下的开关时间误差值。在具体比较时,是确定的机构开关时间与设置的对应开关速度档位下的期望开关时间之间的差值。
在该系统中,时间控制单元,还用于基于电机的比例积分控制方式,根据开关时间误差值计算得到补偿控制量。
在该系统中,调制单元,还用于将所设置的控制量与补偿控制量之和,作为得到的最终控制量。
图3为本申请实施例提供的由电机驱动的机构确定开关时间的方法例子示意图,包括:
步骤301、根据位置传感器采集机构运动的位置信号,开关时间计算单元计算得出第k次开关速度档位为n的开关门时间t n(k);
其中,n为所有开关速度档位中的任一档位,k为正整数;
步骤302、设置第k次开关速度档位为n的期望开关门时间t* n(k),将期望开关门时间t* n(k)与开关门时间t n(k)在时间比较器的作用下得到开关时间误差值Δt n(k);
步骤303:根据开关时间误差值Δt n(k)在时间控制单元的作用下,计算得到下一次开关速度档位为n的控制补偿量s c(k+1),将电机正常运行阶段中时刻t的控制量s(t)与电机控制补偿量s c(k)求和得到电机的最终控制量s l(t);
步骤304:按照电机的最终控制量s l(t),调制单元输出机构所需的控制电机的PWM信号。
在图3的过程中,步骤301的开关时间计算单元根据电机的启动时间与电机的停车时间计算机构的第k次的开关门时间的。
在图3的过程中,步骤301的不同开关速度档位反映了机构在正常使用过程中的不同开关速度模式,一般速度档位1~10档,在其他的应用场景中,速度档位的设置也可以不同,例如速度档位可以为1~20档,还可以为0.1~1.5档。
在图3的过程中,步骤302的期望开关门时间t* n(k)是指根据用户需求针对不同开关速度档位的开关时间设定值。
在图3的过程中,步骤302的开关时间误差值Δt n(k)为:Δt n(k)=t* n(k)-t n(k)。
在图3的过程中,步骤302的时间控制单元是按照PI控制方式设计的,但此时间控制单元的设计不局限于PI控制算法,任何可以消除误差的控制算 法都适用。
电机在驱动机构时,按照机构运行过程大致分为启动阶段、正常运行阶段、停车阶段和故障阶段,图3涉及的仅仅是补偿的阶段为电机驱动机构的正常运行阶段。
在图3的过程中,最终控制量s l(t)为:s l(t)=s(t)+s c(k)。
在一种实现方式中,当电机的最终控制量s l(t)的幅值|s l(t)|满足:|s l(t)|>s max时,s l(t)=s max,即将最终控制量sl(t)的值调整为s max,s max为时间控制单元所能输出的最大输出值时。
可以看出,本申请实施例解决了当机构为多个时,比如闸机的左右两个门翼或自动门的左右两个门扇时,不同电机在驱动不同机构时,无法使得不同机构的开关时间同步的问题。本申请实施例应用在电机采用开环控制方式时,所采用的位置传感器精度不高的情况。本申请实施例提供的电机开环控制系统示意图如图4所示,包括:调制单元、H桥驱动电路、时间控制单元、开关时间计算单元、位置传感器器、直流有刷电机以及电机机芯。以图4为例,说明整个本申请实施例具体的实现过程,以机构是闸机的门翼为例,对本申请实施例进行详细说明。
步骤一:根据位置传感器采集到的机构运动的位置信号,开关时间计算单元计算得出第k次开关速度档位为n的开关时间t n(k),其中开关时间计算单元具体实现过程如图5所示。
在本步骤中,根据图5可知首先接收闸机的开/关门命令并更新电机状态,然后判断电机是否开始起动,如果电机开始起动,定时器开始计时,并获取位置传感器的位置信号,根据位置信号实时更新电机状态,接下来判断电机是否已经停车,如果电机已经停车,代表第k次开/关门动作已经完成,停止定时器计时,将数值赋值给t n(k),即将定时器的读数赋值给t n(k),定时器清零,完成此次开关门时间计算。
步骤二:设置第k次开关速度档位为n的期望开关时间t* n(k),期望开关时间值是根据用户需求进行设定,将期望开关时间t* n(k)与步骤一计算得到的开关门时间tn(k)在时间比较器的作用下得到时间误差Δt n(k),时间误差的计算公式为:Δt n(k)=t* n(k)-t n(k)。
步骤三:根据时间误差Δt n(k)在时间控制单元的作用下,计算得到下一次开关速度档位为n的电机的控制补偿量s c(k+1),其中时间控制单元是按照PI 控制方式设置的,所以电机的控制补偿量s c(k+1)的计算公式为:s c(k+1)=s c(k)+k pΔt n(k),其中k p为时间控制增益,可以根据用户的经验或实际需要设置。
在本步骤中,电机的工作过程大致分为:起动阶段、正常运行阶段、停车阶段、故障阶段,电机的控制补偿阶段处于电机的正常运行阶段,因此将正常运行阶段中时刻t的控制量s(t)与电机控制补偿量s c(k)求和得到电机最终控制量s l(t),电机的最终控制量的计算公式为s l(t)=s(t)+s c(k)。
在本示例中,所选择的是有刷直流电机,电机的控制量为电压值,即电机电源输出的电压值,所以当前时刻的电机的最终控制量s l(t)的幅值要低于最大输出值,即|s l(t)|<s max,s max为时间控制单元所能输出的最大值,一般取最大电压值的95%。
步骤四:按照电机的最终控制量s l(t)变化,通过调制单元对电机的最终控制量进行调制,产生驱动信号,即PWM信号控制电机运行,由电机驱动闸机门翼进行开关。
图5为本申请实施例提供的开关时间计算单元计算得到机构的开关时间的方法流程图,该例子以机构采用闸机为例,该开关时间计算单元为控制电机的控制器的主要一部分,其具体实现为:
步骤501、接收闸机的开/关门命令并更新电机状态;
步骤502、判断电机是否开始起动,如果是,则执行步骤503;如果否,则返回步骤501继续执行;
步骤503、所设置的定时器开始计时,获取位置传感器的位置信号,根据位置信号实时更新电机状态;
步骤504、根据所更新的电机状态判断电机是否已经停车,如果是,则执行步骤505;如果否,则返回步骤503继续执行;
步骤505、确定闸机的门翼的第k次开/关门动作已经完成,停止定时器计时,将数值赋值给t n(k),定时器清零,完成此次机构的开关时间计算。
采用本申请实施例提供的方法与传统的由电机驱动闸机门翼的开关方法进行比较测试。测试环境采用双通道闸机门翼进行开关门测试,双通道分为左通道和右通道,电机选择直流有刷电机,传动机构选择为槽轮传动机构,位置传感器选择光电开关,控制电机的控制器的主控芯片选择主频48MHz的控制器芯片,根据用户需求开关门时间设置为1.4s,左右通道时间误差正负 0.1s。测试结果如图6、图7及图8所示。其中图6为采用使用本申请实施例提供方法下的左右两个通道开关门时间变化曲线图,图7为使用传统方法下的左右两个通道开关门时间变化曲线图,图8为在使用本申请方法和传统方法下的左右通道开关时间误差变化曲线图。
根据对图6及图7的分析可知,左右通道在前几次开关门过程中,都存在较大时间误差,主要原因是直流有刷电机本身一致性较差,机芯结构比较复杂,机芯一致性难以保证,难免出现左右通道存在负载不一致的情况,由于使用低精度位置传感器,电机控制采用开环控制方式,速度调节能力差,当负载不一致时,难以保证左右通道开关门速度一致,从而出现了较大的时间误差。进一步比较图6及图7的曲线变化,图6中左右通道的时间误差在不断减小,在开关门次数20次左右的时候,左右通道时间误差已经减小到0.1s以内,左右通道不同步现象显著改善,满足用户需求。仅采用传统同步的方法,左右通道时间误差在不断循环波动,没有有效解决左右通道开关门时间不同的问题。根据图8时间误差曲线图可以更加直观可见,采用本申请方法,时间误差从最大误差0.8秒逐渐趋近于零,能够有效调节左右通道时间误差,而采用传统方法,时间误差一直在0.2s至0.5s间波动,无法有效调节左右通道时间误差,根据上述分析可知,本申请实施例的控制闸机开关门时间的电机控制方法是有效的。
本申请实施例还提供了一种由电机驱动的机构确定开关时间的装置,所述装置包括:
误差确定模块,用于本次电机驱动机构开关过程中,根据位置传感器采集的机构运动的位置信号确定机构开关时间,将所述确定的机构开关时间与设置的期望开关时间比较,得到开关时间误差值;
计算模块,用于根据开关时间误差值计算得到补偿控制量;
控制模块,用于在所设置的控制量上增加所述补偿控制量后得到最终控制量,在下次电机驱动机构开关时,根据最终控制量控制电机驱动机构开关。
本申请实施例还提供了一种存储有计算机指令的非瞬时计算机可读存储介质,所述计算机指令用于使所述计算机执行前述任一所述的中任一项的由电机驱动的机构确定开关时间的方法。
本申请实施例还提供了一种电子设备,包括:
存储器,用于存放计算机程序;
处理器,用于执行存储器上所存放的程序时,实现如下步骤:
本次电机驱动机构开关过程中,根据位置传感器采集的机构运动的位置信号确定机构开关时间,将所述确定的机构开关时间与设置的期望开关时间比较,得到开关时间误差值;
根据开关时间误差值计算得到补偿控制量;
在所设置的控制量上增加所述补偿控制量后得到最终控制量,在下次电机驱动机构开关时,根据最终控制量控制电机驱动机构开关。
上述电子设备提到的存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁 性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、电子设备、计算机可读存储介质实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。

Claims (13)

  1. 一种由电机驱动的机构确定开关时间的方法,其特征在于,所述方法包括:
    本次电机驱动机构开关过程中,根据位置传感器采集的机构运动的位置信号确定机构开关时间,将所述确定的机构开关时间与设置的期望开关时间比较,得到开关时间误差值;
    根据开关时间误差值计算得到补偿控制量;
    在所设置的控制量上增加所述补偿控制量后得到最终控制量,在下次电机驱动机构开关时,根据最终控制量控制电机驱动机构开关。
  2. 如权利要求1所述的方法,其特征在于,所述根据位置传感器采集的机构运动的位置信号确定机构开关时间包括:
    获取电机的启动时间,及获取位置传感器识别到电机驱动机构运动至关闭位置时的关闭时间,将所获取的电机的所述启动时间与获取的所述关闭时间之差作为所确定的机构开关时间。
  3. 如权利要求1所述的方法,其特征在于,所述将所述确定的机构开关时间与设置的期望开关时间比较,得到开关时间误差值包括:
    将所述确定的机构开关时间与设置的对应开关速度档位下的期望开关时间比较,将两者之差作为得到的对应开关速度档位下的开关时间误差值。
  4. 如权利要求1所述的方法,其特征在于,所述根据开关时间误差值计算得到补偿控制量包括:基于电机的比例积分PI控制方式,根据开关时间误差值计算得到补偿控制量;
    所述在所设置的控制量上增加该补偿控制量后得到最终控制量包括:
    将所设置的控制量,与所述补偿控制量之和作为得到的最终控制量。
  5. 如权利要求1所述的方法,其特征在于,在根据最终控制量控制电机驱动机构开关之前,还包括:
    判断得到的最终控制量是否大于设置的最大控制量,如果否,则执行所述根据最终控制量控制电机驱动机构开关的步骤;如果是,则根据设置的最大控制量控制电机驱动机构开关。
  6. 如权利要求1所述的方法,其特征在于,所述根据最终控制量控制电机驱动机构开关包括:
    根据最终控制量,输出对应的脉冲宽度调制PWM信号,控制电机驱动机 构开关。
  7. 一种由电机驱动的机构确定开关时间的系统,其特征在于,包括:位置传感器、开关时间计算单元、时间控制单元及调制单元,其中,
    位置传感器,用于采集机构运动的位置信号;
    开关时间计算单元,用于根据位置传感器采集的机构运动的位置信号确定机构开关时间,将所述确定的机构开关时间与设置的期望开关时间比较,得到开关时间误差值;
    时间控制单元,用于根据开关时间误差值计算得到补偿控制量,在所设置的控制量的基础上增加该补偿控制量后得到最终控制量;
    调制单元,用于在下次电机驱动机构开关时,根据最终控制量控制电机驱动机构开关。
  8. 如权利要求7所述的系统,其特征在于,所述开关时间计算单元,具体用于获取电机的启动时间,及获取位置传感器识别到电机驱动机构运动至关闭位置时的关闭时间,将所获取的电机的启动时间与获取的关闭时间之差作为所确定的机构开关时间。
  9. 如权利要求7所述的系统,其特征在于,所述开关时间计算单元,具体用于将所述确定的机构开关时间与设置的对应开关速度档位下的期望开关时间比较,将两者之差作为得到的对应开关速度档位下的开关时间误差值。
  10. 如权利要求7所述的系统,其特征在于,所述时间控制单元,具体用于基于电机的比例积分PI控制方式,根据开关时间误差值计算得到补偿控制量;
    所述时间控制单元,具体用于用于将所设置的控制量与所述补偿控制量之和作为得到的最终控制量。
  11. 一种由电机驱动的机构确定开关时间的装置,其特征在于,所述装置包括:
    误差确定模块,用于本次电机驱动机构开关过程中,根据位置传感器采集的机构运动的位置信号确定机构开关时间,将所述确定的机构开关时间与设置的期望开关时间比较,得到开关时间误差值;
    计算模块,用于根据开关时间误差值计算得到补偿控制量;
    控制模块,用于在所设置的控制量上增加所述补偿控制量后得到最终控 制量,在下次电机驱动机构开关时,根据最终控制量控制电机驱动机构开关。
  12. 一种存储有计算机指令的非瞬时计算机可读存储介质,其中,所述计算机指令用于使所述计算机执行根据权利要求1-6中任一项所述的方法。
  13. 一种电子设备,其特征在于,包括:
    存储器,用于存放计算机程序;
    处理器,用于执行存储器上所存放的程序时,实现权利要求1-6任一所述的方法步骤。
PCT/CN2021/131833 2020-11-19 2021-11-19 一种由电机驱动的机构确定开关时间的方法及系统 WO2022105885A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011300386.X 2020-11-19
CN202011300386.XA CN112491320A (zh) 2020-11-19 2020-11-19 一种由电机驱动的机构确定开关时间的方法及系统

Publications (1)

Publication Number Publication Date
WO2022105885A1 true WO2022105885A1 (zh) 2022-05-27

Family

ID=74931870

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/131833 WO2022105885A1 (zh) 2020-11-19 2021-11-19 一种由电机驱动的机构确定开关时间的方法及系统

Country Status (2)

Country Link
CN (1) CN112491320A (zh)
WO (1) WO2022105885A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112491320A (zh) * 2020-11-19 2021-03-12 杭州海康威视数字技术股份有限公司 一种由电机驱动的机构确定开关时间的方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012229584A (ja) * 2011-04-27 2012-11-22 Tsubaki Emerson Co 自動扉制御装置、自動扉システム、自動扉制御方法及び自動扉調整方法
CN108988693A (zh) * 2018-08-01 2018-12-11 中控智慧科技股份有限公司 一种有刷电机参数控制方法、装置及设备
CN110336517A (zh) * 2019-07-03 2019-10-15 东方久乐汽车电子(上海)股份有限公司 一种基于到位运行时间的隐藏门把手控制方法
CN112491320A (zh) * 2020-11-19 2021-03-12 杭州海康威视数字技术股份有限公司 一种由电机驱动的机构确定开关时间的方法及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101985934B1 (ko) * 2012-11-23 2019-06-05 엘지디스플레이 주식회사 Pwm 방식의 dc-dc 변환기
CN107346951B (zh) * 2017-07-03 2020-06-30 广东威灵电机制造有限公司 永磁同步电机系统的弱磁控制方法及装置
CN110391773B (zh) * 2019-07-03 2021-08-24 东方久乐汽车电子(上海)股份有限公司 一种带有自学习功能的隐藏门把手闭环控制方法
CN111740667A (zh) * 2020-07-21 2020-10-02 重庆凡越自动化科技有限公司 基于永磁同步直线电机的自动门控制方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012229584A (ja) * 2011-04-27 2012-11-22 Tsubaki Emerson Co 自動扉制御装置、自動扉システム、自動扉制御方法及び自動扉調整方法
CN108988693A (zh) * 2018-08-01 2018-12-11 中控智慧科技股份有限公司 一种有刷电机参数控制方法、装置及设备
CN110336517A (zh) * 2019-07-03 2019-10-15 东方久乐汽车电子(上海)股份有限公司 一种基于到位运行时间的隐藏门把手控制方法
CN112491320A (zh) * 2020-11-19 2021-03-12 杭州海康威视数字技术股份有限公司 一种由电机驱动的机构确定开关时间的方法及系统

Also Published As

Publication number Publication date
CN112491320A (zh) 2021-03-12

Similar Documents

Publication Publication Date Title
US7193387B1 (en) System and method for motor speed estimation using hybrid model reference adaptive system
US6586898B2 (en) Systems and methods of electric motor control
US7208897B2 (en) Motion control system for barrier drive
WO2022242708A1 (zh) 电机启动方法及可读存储介质
CN108233788A (zh) 基于幂指数趋近率的无刷直流电机滑模变结构控制方法
WO2022105885A1 (zh) 一种由电机驱动的机构确定开关时间的方法及系统
CN109462352B (zh) 电机控制方法、装置和计算机可读存储介质
WO2006012990A1 (de) Chirurgische maschine und verfahren zum steuern und/oder regeln einer chirurgischen maschine
CN102769420B (zh) 电机启动的控制方法和装置
US11606050B2 (en) Method and system for controlling electric motor, and controller
CN108809199B (zh) 变频器追踪电机转速的方法、装置及变频器
WO2023109615A1 (zh) 一种闸机同步控制系统及方法
CN110460271A (zh) 一种汽车电动尾门的电机转速平稳启动控制方法
CN108964537A (zh) 一种轨道客车电动门的控制方法及控制系统
WO2023159908A1 (zh) 电机启动控制方法
CN105162375B (zh) 屏蔽门控制系统参数自整定方法
CN112713818B (zh) 由直流有刷电机驱动运行的机构实现自锁的方法及系统
CN110649855A (zh) Pmsm伺服系统电流环系统
CN112865640B (zh) 电机的控制方法、装置及计算机可读存储介质
Harashima et al. A design method for digital speed control system of motor drives
CN114826036A (zh) 一种可减小换相转矩脉动的无刷直流电机控制方法
CN113359420A (zh) 闸机控制方法、装置和系统及闸机
CN102324890B (zh) 电梯门机开关门到位转矩控制方法及电梯门机装置
CN111365823A (zh) 空调系统及空调系统的控制方法
CN113169686B (zh) 控制无刷永磁电机的方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21894032

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21894032

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 21894032

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16.11.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21894032

Country of ref document: EP

Kind code of ref document: A1