CN113238588A - Swing arm synchronous control method and swing gate - Google Patents

Swing arm synchronous control method and swing gate Download PDF

Info

Publication number
CN113238588A
CN113238588A CN202110373264.1A CN202110373264A CN113238588A CN 113238588 A CN113238588 A CN 113238588A CN 202110373264 A CN202110373264 A CN 202110373264A CN 113238588 A CN113238588 A CN 113238588A
Authority
CN
China
Prior art keywords
motor
speed
current
swing arm
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110373264.1A
Other languages
Chinese (zh)
Other versions
CN113238588B (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.)
Shenzhen H&T Intelligent Control Co Ltd
Original Assignee
Shenzhen H&T Intelligent Control 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 Shenzhen H&T Intelligent Control Co Ltd filed Critical Shenzhen H&T Intelligent Control Co Ltd
Priority to CN202110373264.1A priority Critical patent/CN113238588B/en
Publication of CN113238588A publication Critical patent/CN113238588A/en
Application granted granted Critical
Publication of CN113238588B publication Critical patent/CN113238588B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D13/00Control of linear speed; Control of angular speed; Control of acceleration or deceleration, e.g. of a prime mover
    • G05D13/62Control of linear speed; Control of angular speed; Control of acceleration or deceleration, e.g. of a prime mover characterised by the use of electric means, e.g. use of a tachometric dynamo, use of a transducer converting an electric value into a displacement

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Control Of Electric Motors In General (AREA)

Abstract

The embodiment of the invention discloses a swing arm synchronous control method and a swing gate, wherein the method comprises the steps of obtaining the current position of a motor for controlling a swing arm, obtaining the target position of the motor based on a preset motor driving model, calculating the target running speed of the motor based on the current position and the target position, obtaining the current running speed of the motor, calculating the input current of the motor based on the current running speed and the target running speed, and controlling the running speed of the motor based on the input current. Through the mode, the swing arm can be accurately controlled to operate to the final position.

Description

Swing arm synchronous control method and swing gate
Technical Field
The invention relates to the technical field of motors, in particular to a swing arm synchronous control method and a swing gate.
Background
At present, a swing gate in a channel gate is a channel management device, which is used for managing people flow or vehicle flow and standardizing the entrance and exit of people flow or vehicle flow, and is mainly applied to occasions for charging and entrance guard, such as subways, stations, airports, customs, markets, scenic spots, venues, office buildings, residential quarters and the like, and the most basic most core function of the swing gate is to realize that only one person (vehicle) passes through at a time. Wherein, be provided with two swing arms in the pendulum floodgate, in order to realize above-mentioned function through controlling two swing arms.
However, in the prior art, the two swing arms in the swing gate may not be synchronized in operation due to inaccurate stop positions of the swing arms or shaking at the stop.
Disclosure of Invention
The embodiment of the invention aims to provide a swing arm synchronous control method and a swing gate, which can accurately control a swing arm to move to a final position.
In order to achieve the above object, in a first aspect, the present invention provides a swing arm synchronization control method, including:
acquiring the current position of a motor for controlling the swing arm;
acquiring a target position of the motor based on a preset motor driving model;
calculating a target operating speed of the motor based on the current position and the target position;
acquiring the current running speed of the motor;
calculating an input current of the motor based on the current operating speed and the target operating speed;
controlling an operating speed of the motor based on the input current.
In an optional manner, the obtaining the target position of the motor based on the preset motor driving model includes:
acquiring the acceleration, the total operation time and the total operation stroke of a preset motor driving model;
and acquiring the target position of the motor at any moment based on the acceleration, the total running time and the total running stroke of the preset motor driving model.
In an optional manner, the preset motor driving model is a T-shaped curve, and the T-shaped curve satisfies the following formula:
Figure BDA0003010197070000021
wherein TS1 is the total stroke of the motor operation, a1 is the acceleration value of the motor during uniform acceleration, a2 is the acceleration value of the motor during uniform deceleration, t1 is the time of the motor during uniform acceleration, t2 is the time of the motor at constant speed, t3 is the time of the motor during uniform deceleration, t1 is t3, a1 is-a 2, and v1 is the speed of the motor during constant speed operation.
In an optional manner, the preset motor driving model is an S-shaped curve, and the S-shaped curve satisfies the following formula:
Figure BDA0003010197070000022
wherein TS2 is the total stroke of the motor operation, a3 is the acceleration value of the motor during variable acceleration, a4 is the acceleration value of the motor during variable deceleration, t4 is the time of the motor during variable acceleration, t5 is the time of the motor during constant speed, t6 is the time of the motor during variable deceleration, t4 is t6, a3 is-a 4, and v2 is the speed of the motor during constant speed operation.
In an alternative form, the calculating a target operating speed of the motor based on the current position and the target position includes:
and calculating the current position and the target position through a PID algorithm to calculate the target running speed of the motor.
In an alternative mode, the calculating the input current of the motor based on the current operating speed and the target operating speed includes:
and calculating the current running speed and the target running speed through a PID algorithm to calculate the input current of the motor.
In an alternative form, the controlling the operating speed of the motor based on the input current includes:
carrying out current loop control on the motor at a preset period;
calculating the voltage of the three phases of the motor by adopting a space vector modulation method;
and driving the motor according to the three-phase voltage of the motor so as to control the running speed of the motor.
In a second aspect, the present invention provides a swing gate, comprising:
the two swing arms and the two motors are respectively used for controlling the two swing arms;
a control processing unit for controlling the motor, the control processing unit including:
at least one processor and a memory communicatively coupled to the at least one processor, the memory storing instructions executable by the at least one processor to enable the at least one processor to perform a method as described above.
In an alternative form, the swing gate further comprises a driver;
the driver is respectively connected with the control processing unit and the motor, and the driver is used for controlling the motor based on the control signal output by the control processing unit.
In a third aspect, the present invention provides a non-transitory computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a swing gate, cause the swing gate to perform a method as described above.
In a fourth aspect, the present invention provides a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method as described above.
The embodiment of the invention has the beneficial effects that: the invention provides a synchronous control method of a swing arm, which comprises the steps of obtaining the current position of a motor for controlling the swing arm, obtaining the target position of the motor based on a preset motor driving model, calculating the target running speed of the motor based on the current position and the target position, obtaining the current running speed of the motor, calculating the input current of the motor based on the current running speed and the target running speed, and controlling the running speed of the motor based on the input current, so that the target position required to be reached at any moment in the swing arm running process can be automatically obtained through the preset motor driving model, the target position needs to be reached in real time in the running process by controlling the motor, the swing arm can be stopped at the final position according to the preset motor driving model, then, the target running speed can be obtained through calculation according to the current position and the target position in the swing arm running process, namely the target running speed can realize that the swing arm can accurately run from the current position to the target position, and finally, calculating to obtain an input current through the current running speed of the motor and the target running speed, wherein the input current is used for adjusting the current running speed of the motor to be the target running speed, in other words, to stop the swing arm at the final position, firstly, controlling the running speed of the motor through the calculated input current, so that the current running speed of the motor can be adjusted to be equal to the target running speed, when the current running speed of the motor is equal to the target speed, the motor can run to the target position from the current position accurately in real time, and the swing arm is stopped at the final position, thereby achieving the purpose of accurately controlling the swing arm to run to the final position.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1 is a schematic structural diagram of a swing gate according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a swing gate according to another embodiment of the present invention;
FIG. 3 is a flowchart of a swing arm synchronization control method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a T-shaped curve provided by an embodiment of the present invention;
FIG. 5 is a schematic diagram of an S-shaped curve provided by an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a swing arm synchronization control device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a swing gate according to an embodiment of the present invention. As shown in fig. 1, the swing gate includes two swing arms, i.e., a swing arm a1 and a swing arm a2, and two motors, i.e., a motor M1 and a motor M2, wherein the motor M1 is used for controlling the swing arm a1, and the motor M2 is used for controlling the swing arm a 2.
The swing gate further comprises a control processing unit 11, and the control processing unit 11 controls the motor M1 and the motor M2. The control Processing Unit 11 may be a Micro Control Unit (MCU) or a Digital Signal Processing (DSP) controller.
The control processing unit 11 includes at least one processor 111 and a memory 112, where the memory 112 may be built in the control processing unit 11 or may be external to the control processing unit 11, and the memory 112 may also be a remotely located memory, and is connected to the control processing unit 11 through a network.
The memory 112, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory 112 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 112 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 112 may optionally include memory located remotely from the processor 111, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor 111 executes various functions of the terminal and processes data by running or executing software programs and/or modules stored in the memory 112 and calling data stored in the memory 112, thereby performing overall monitoring on the terminal, for example, implementing the swing arm synchronization control method according to any embodiment of the present invention.
The processor 111 may be one or more, and one processor 111 is illustrated in fig. 1. The processor 111 and memory 112 may be connected by a bus or other means. The processor 111 may include a Central Processing Unit (CPU), Digital Signal Processor (DSP), Application Specific Integrated Circuit (ASIC), controller, Field Programmable Gate Array (FPGA) device, and the like. The processor 11 may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
It should be understood that the hardware configuration of the pendulum gate as shown in fig. 1 is merely one example, and that the pendulum gate may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components, and that the various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits. For example, in an embodiment, the swing gate further includes a driver, the driver is respectively connected to the control processing unit and the motor, and one driver is connected to one motor, wherein the driver is configured to control the motor connected thereto according to the control signal output by the control processing unit.
The control processing unit 11 controls the motor M1 as an example. As shown in fig. 2, the driver 12 in the swing gate is connected to the control processing unit 11 and the motor M1, respectively, wherein the driver 12 receives the control signal sent by the control processing unit 11, and drives the motor M1 through the motor driving and current detecting unit 122 in the driver 12, and the motor driving and current detecting unit 122 can also detect the current magnitude of the motor M1 in real time, so as to detect whether the motor M1 fails in real time during the operation of the motor M1. The sensor 123 in the driver 12 can acquire the number of pulses output by one rotation of the motor through the encoder 13 arranged on the motor M1, and obtain the number of rotations of the motor according to the counted number of pulses, and then obtain the running speed of the motor.
Meanwhile, the motor M1 is connected with the speed reducer 14, and is connected with the output shaft 15, the coupling 16, the gear 17 and the roller 18 in turn, and the roller 18 is connected with the swing arm a1 through the connecting rod 19. Wherein, the motor M1 drives the reducer 14, the output shaft 15, the coupling 16 and the gear 17 to rotate when rotating, and the gear 17 is controlled by the clutch control unit 121 to control the operation speed of the drum 18. The roller 18 drives the swing arm a1 to operate through the link 19, that is, the operation speed and direction of the roller 18 are controlled by the motor M1, that is, the operation speed and direction of the swing arm a1 are correspondingly controlled.
In practical applications, when the control processing unit 11 needs to control the swing arm a1 to swing, first, the control processing unit 11 outputs a control signal to the driver 12, the motor driving and current detecting unit 122 in the driver 12 controls the motor M1 to rotate, meanwhile, the motor driving and current detecting unit 122 also detects the current of the motor M1 in real time, and the sensor 123 can detect the rotation speed of the motor M1 through the encoder, so that the rotation speed of the motor M1 can be adjusted in real time through the motor driving and current detecting unit 122. In the rotation process of the motor M1, the reducer 14, the output shaft 15, the coupler 16 and the gear 17 are driven to rotate, so that the driven roller 18 rotates, the roller drives the swing arm a1 to rotate through the connecting rod 19, and the control process of the swing arm a1 is realized. It is understood that the control process for swing arm A2 is similar to swing arm A1, which is within the scope of easy understanding of those skilled in the art, and will not be described herein.
Fig. 3 is a schematic flow chart of a swing arm synchronization control method according to an embodiment of the present invention, where the method may be executed by the swing gate shown in fig. 1 or fig. 2, and as shown in fig. 3, the method includes:
301: the current position of a motor for controlling the swing arm is acquired.
The current position of the motor of the swing arm can be obtained from the accumulated count value from the start of the motor drive to the current control period encoder. For example, when the motor is just started, the initial position of the motor is recorded as 0, and the accumulated count value of the encoder is directly read at any time, namely the current position value of the motor. The encoder can convert angular displacement or linear displacement into an electric signal, so that an accumulated count value of the encoder can be obtained by reading the electric signal output by the encoder, the displacement value of the motor can be obtained, and then the current position value of the motor can be known.
302: and acquiring a target position of the motor based on a preset motor driving model.
The preset motor driving model refers to a model for planning the whole operation process of the swing arm in advance so that the swing arm can operate to a preset position, wherein the preset position is the target position of the motor.
In an embodiment, first, the acceleration, the total running time, and the total running stroke of the preset motor driving model are obtained, where parameters of the preset motor driving model, such as the acceleration, the total running time, and the total running stroke, may be preset in a control processing unit that controls the operation of the motor, or may be obtained by directly reading the parameters of the motor by the control processing unit. Then, the acceleration, the total running time and the total running stroke of the preset motor driving model are substituted into the preset motor driving model, and the target position of the motor at any moment can be obtained.
In one embodiment, the preset motor driving model is a T-shaped curve, as shown in fig. 4, and the T-shaped curve satisfies the following formula:
Figure BDA0003010197070000071
wherein TS1 is the total stroke of the motor operation, TS1 is TS11+ TS12+ TS13, TS11 is the stroke of the motor during uniform acceleration, TS12 is the stroke of the motor during uniform speed, and TS13 is the stroke of the motor during uniform deceleration. a1 is an acceleration value of the motor during uniform acceleration, a2 is an acceleration value of the motor during uniform deceleration, the acceleration a1 and the acceleration a2 are known values of the acceleration of the preset motor driving model, and a1 is equal to-a 2. T1 is the time of the motor in uniform acceleration, T2 is the time of the motor in uniform speed, T3 is the time of the motor in uniform deceleration, and T1 is T3, and T1+ T2+ T3 is the total running time of the acquired preset motor drive model (denoted as T1). v1 is the speed when the motor operates at constant speed.
Therefore, by the above method, the target position TSn of the motor at any time Tn can be calculated.
The specific implementation process is as follows: when the motor is started, firstly, entering a uniform acceleration stage, wherein the relation between the running stroke of the motor and the time at the moment is as follows:
Figure BDA0003010197070000081
at this time, TSn is less than or equal to TS11, and Tn is less than or equal to t 1.
When the running speed of the motor reaches a set maximum value, controlling the motor to enter a uniform speed running stage, wherein the relation between the running stroke of the motor and the time is as follows:
TSn-TS 11+ v1 × (Tn-t1) -TS 11+ a1 × t1 × (Tn-t1), where TSn is greater than or equal to TS11 and less than or equal to TS12, and Tn is greater than or equal to t1 and less than or equal to t 2.
When the time of uniform speed operation reaches, the motor is controlled to enter a uniform deceleration stage, and at the moment, the relation between the operation stroke of the motor and the time is as follows:
Figure BDA0003010197070000082
at this time, TSn is equal to or greater than (TS11+ TS12) and equal to or less than TS1, and Tn is equal to or greater than (T1+ T2) and equal to or less than T1.
In summary, after the acceleration value (a1 or a2) of the motor, the total operation time T1 of the motor, and the total operation stroke TS1 of the motor are obtained, the target position TSn of the motor at any time Tn can be correspondingly calculated by substituting known parameters into the corresponding relational expression.
It should be noted that the T-shaped curve is a preferred preset motor driving model provided in the embodiment of the present application, but the preset motor driving model is not limited to the T-shaped curve, and the preset motor driving model may be designed correspondingly in an actual application process, and only when the motor runs to the end of the total running stroke, the speed of the motor is 0.
For example, in another embodiment, the preset motor driving model may be further configured as an S-shaped curve, as shown in fig. 5, which satisfies the following formula:
Figure BDA0003010197070000083
wherein TS2 is the total stroke of the motor operation, TS2 is TS21+ TS22+ TS23, TS21 is the stroke of the motor during uniform acceleration, TS22 is the stroke of the motor during uniform speed, and TS23 is the stroke of the motor during uniform deceleration. a3 is an acceleration value of the motor during variable acceleration, a4 is an acceleration value of the motor during variable deceleration, the acceleration a3 and the acceleration a4 correspond to the acquired acceleration of the preset motor driving model, and all the acceleration values are known values, and a3 is equal to-a 4. T4 is the time when the motor is accelerated, T5 is the time when the motor is at a constant speed, T6 is the time when the motor is decelerated, and T4 is T6, and T1+ T2+ T3 is the total running time (denoted as T2) of the acquired preset motor driving model. V2 is the speed when the motor operates at a constant speed.
Also assume that the motor is at any one time Tn, the target position TSn of the motor. Then when Tn is less than t4/2, a3 ═ Tn × K, where K is a constant, when Tn is greater than t4/2 and less than t4,
Figure BDA0003010197070000091
and the value of a4 can be obtained by corresponding a3 to a 4. Then, similar to the above embodiment, after the actual acceleration value (a3 or a4), the total running time T2 and the total stroke TS2 are substituted into the above formula, the target position TSn of the motor at any time Tn can be correspondingly calculated. The specific implementation process is similar to the above embodiment, and is within the scope easily understood by those skilled in the art, and is not described herein again.
Through setting up preset motor drive model such as T type curve or S type curve, should predetermine motor model and be used for making the swing arm move to final position from the initial position speed be 0 to enable the swing arm and stop in final position comparatively accurately. Specifically, the operation position of the swing arm in the whole operation process can be planned in advance by setting the preset motor driving model, and the target position which the swing arm needs to reach at each moment is obtained, so that the swing arm can be accurately stopped at the final position only by controlling the swing arm to operate to the target position at each moment in real time in the operation process of the swing arm.
303: and calculating the target running speed of the motor based on the current position and the target position.
Known by the above-mentioned embodiment, the current position accessible reads the accumulative total number of encoder and obtains, the target location then obtains according to predetermineeing motor drive model, so, in order to carry out comparatively accurate control to the swing arm, then need make the current position move to the target location, if the swing arm all can move to the target location at any moment, the operation process of explanation swing arm accords with predetermined motor drive model, so according to predetermineeing motor drive model known swing arm can stop in final position, when the swing arm moved to final position, the speed of swing arm can fall to 0 simultaneously. At the moment, the swing arm does not shake after reaching the final position, or stops shaking quickly after slightly shaking due to inertia, so that the swing arm is controlled accurately.
It should be understood that in the present application, the final position of the swing arm operation is the end position to be reached by the swing arm, i.e. the position where the swing arm should stop.
In one embodiment, the target operating speed of the motor may be obtained by a position loop. Specifically, the current position and the target position are calculated in real time through a PID algorithm, so that the target running speed of the motor is adjusted in real time. The PID algorithm is a control mode for correcting according to the output feedback of a control object, and is corrected according to a quota or standard when the deviation between the actual value and the planned value is measured, the PID algorithm comprises a proportional control link, an integral control link and a differential control link, wherein the proportional control link is used for reflecting the deviation signal of a control system in proportion, once the deviation is generated, the proportional control link immediately generates a control action to reduce the deviation, the integral control link is used for eliminating the static deviation to improve the zero difference of the system, and the differential control link is used for introducing an effective early correction signal into the system before the value of the deviation signal becomes too large, so that the action speed of the system is accelerated, and the adjusting time is reduced.
It can be seen that, in the running process of the PID algorithm, if the current position of the motor is smaller than the target position and there is a difference therebetween, at this time, the larger the difference is, the larger the error of the position control process of the system at this time is, the more the target running speed should be increased, so that the current position of the motor can be increased faster to continuously approach the target position, and when the current position of the motor is equal to the target position, the target running speed at this time is maintained. If the current position of the motor is larger than the target position and a difference exists between the current position and the target position, if the difference is larger, the target running speed is reduced more, so that the current position is faster and smaller to approach the target position, and the target running position is kept until the current position and the target position are equal.
Meanwhile, when the difference between the current position of the motor and the target position becomes large, the correction capability of the system should be strengthened, and correspondingly, the adjustment value of the target running speed should be increased, otherwise, when the difference between the current position of the motor and the target position becomes small, the correction capability of the system should be reduced, and correspondingly, the adjustment value of the target running speed should be decreased, so as to avoid oscillation.
It is understood that in other embodiments, the target operation speed of the motor may be obtained by other algorithms to reduce the difference between the current position and the target position of the motor, for example, a PI algorithm.
304: and acquiring the current running speed of the motor.
305: and calculating the input current of the motor based on the current running speed and the target running speed.
After the target operation speed of the motor is obtained through calculation, the current operation speed of the motor needs to approach the target operation speed to achieve accurate position control.
Alternatively, the value of the encoder may be read in the control period of each motor, and then the value of the encoder in the control period of the previous motor is subtracted from the value of the encoder in the control period of the previous motor to obtain a difference value, which is the total count of the encoder in one control period.
Thus, in one embodiment, the input current to the motor may be obtained through the speed loop. Specifically, the current running speed and the target running speed are calculated in real time through a PID algorithm, so that the input current of the motor is adjusted in real time, namely the input current of the motor is calculated in real time.
Similarly, in the operation process of the PID algorithm, if the current operation speed of the motor is less than the target operation speed and there is a difference therebetween, at this time, the larger the difference is, the larger the error of the speed control process of the system at this time is, the more the input current of the motor should be increased, so that the operation speed of the motor can be increased faster to continuously approach the target operation speed, and when the current is equal to the target operation speed, the input current at this time is maintained. If the current running speed of the motor is greater than the target running speed and a difference exists between the current running speed and the target running speed, if the difference is larger, the input current of the motor is reduced more, so that the running speed is faster and smaller to approach the target running speed, and the input current at the moment is kept until the current running speed is equal to the target running speed.
Meanwhile, when the difference between the current operating speed of the motor and the target operating speed becomes large, the correction capability of the system should be strengthened, and correspondingly, the adjustment value of the input current should be increased, whereas when the difference between the current operating speed of the motor and the target operating speed becomes small, the correction capability of the system should be reduced, and correspondingly, the adjustment value of the input current should be decreased.
It is understood that in other embodiments, the input current of the motor may be obtained by other algorithms to reduce the difference between the target operating speed and the actual operating speed of the motor, such as a PI algorithm.
306: the operating speed of the motor is controlled based on the input current.
In one embodiment, the actual operation speed of the motor is controlled by performing current loop control of the motor at a preset period, calculating the voltages of the three phases of the motor by adopting a space vector modulation method, and finally driving the motor according to the calculated voltages of the three phases of the motor. The space vector modulation method is characterized in that the ideal flux linkage circle of a stator of a three-phase symmetrical motor is used as a reference standard when three-phase symmetrical sine-wave voltage is supplied, and different switching modes of a three-phase inverter are appropriately switched, so that PWM waves are formed, and the accurate flux linkage circle of the three-phase symmetrical motor is tracked by the formed actual flux linkage vector. Therefore, the space vector modulation method can consider the inverter system and the asynchronous motor as a whole, has a simpler model and is convenient for the real-time control of the microprocessor.
In summary, after the swing arm receives an operation instruction, first, the acceleration, the total operation time and the total operation stroke of the preset motor driving model are substituted into the preset motor driving model to obtain a target position of the motor at any time. Next, the target operation speed is obtained through the position loop (i.e., the current position and the target position are calculated through the PID algorithm). Then, the input current of the motor is obtained through a speed loop (i.e. the current operation speed and the target operation speed are calculated through a PID algorithm). And finally, carrying out current loop control on the motor in a preset period, calculating the voltage of the three phases of the motor by adopting a space vector modulation method, and driving the motor according to the calculated voltage of the three phases of the motor so as to control the actual running speed of the motor. The motor is driven by using a space vector modulation method after the three PID control of the position loop, the speed loop and the current loop, so that the motor can uniformly decelerate before reaching the final position, and the motor speed is zero through theoretical calculation when the motor runs to the final position.
Further, even if the swing arm still slightly shakes due to inertia and other reasons when the motor runs to the final position, the control of the position loop, the speed loop and the current loop is still kept at the moment, and then the swing arm can be quickly adjusted to be stable at the final position.
As is well known in the prior art, the speed of the current position of the motor is calculated by the position of the swing arm, and is tabulated, so that the speed in the table is used as the target operation speed to control the operation of the motor in the control process of the motor. However, in the control process of the above scheme, on one hand, the table may need to be re-made many times according to different final positions of the swing arm in operation, and the operation process is complicated. On the other hand, because the speed in the table is directly adopted as the running speed of the motor, and the motor is not controlled in real time, the control process is rough, the final position of the swing arm stopping is inaccurate, or the swing arm shakes at the final position.
In the above embodiment of the application, the acceleration, the total operation time and the total operation stroke of the preset motor driving model are substituted into the preset motor driving model, and the target operation position of the motor is obtained in real time through the preset motor driving model, so that the target operation position of the motor can be automatically obtained no matter how the final position (i.e., the total operation stroke) of the swing arm is changed, and the operation process is simple.
Meanwhile, the current running speed of the motor can be controlled to be the target running speed through the motor input current obtained through the current loop, the target running speed is obtained through the position loop, namely the target running speed can control the swing arm to run to the target position at each moment, and therefore the swing arm can be accurately stopped at the final position when the speed is 0. Therefore, by the mode, as long as the actual input current of the motor is controlled to be the obtained motor input current, the motor can be controlled to run to the target position at any moment in real time, and the swing arm can be stopped at the final position accurately. The whole process is the real-time control process promptly, and control process is comparatively accurate, then can avoid the final position that the swing arm stopped inaccurate or the swing arm condition such as rock appear in the final position.
Furthermore, when the method is applied to two swing arms simultaneously, synchronous operation between the two swing arms can be realized, and the two swing arms can be stopped at final positions accurately at the same time.
Fig. 6 is a schematic structural diagram of a swing arm synchronization control method and apparatus according to an embodiment of the present invention. As shown in fig. 6, the swing arm synchronization control method apparatus 600 includes a first position acquisition unit 601, a second position acquisition unit 602, a first calculation unit 603, a first speed acquisition unit 604, a second calculation unit 605, and a speed control unit 606. The swing arm control apparatus includes a first position acquisition unit 601 for acquiring a current position of a motor for controlling a swing arm, a second position acquisition unit 602 for acquiring a target position of the motor based on a preset motor driving model, a first calculation unit 603 for calculating a target operation speed of the motor based on the current position and the target position, a first speed acquisition unit 604 for acquiring the current operation speed of the motor, a second calculation unit 605 for calculating an input current of the motor based on the current operation speed and the target operation speed, and a speed control unit 606 for controlling the operation speed of the motor based on the input current.
Since the apparatus embodiment and the method embodiment are based on the same concept, the contents of the apparatus embodiment may refer to the method embodiment on the premise that the contents do not conflict with each other, and are not described herein again.
Embodiments of the present invention further provide a non-volatile computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a swing gate, the swing gate is caused to perform the method in any of the above embodiments.
Embodiments of the present invention also provide a computer program product comprising a computer program stored on a computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method of any of the above embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A swing arm synchronous control method is characterized by comprising the following steps:
acquiring the current position of a motor for controlling the swing arm;
acquiring a target position of the motor based on a preset motor driving model;
calculating a target operating speed of the motor based on the current position and the target position;
acquiring the current running speed of the motor;
calculating an input current of the motor based on the current operating speed and the target operating speed;
controlling an operating speed of the motor based on the input current.
2. The swing arm synchronous control method according to claim 1, wherein the obtaining of the target position of the motor based on a preset motor drive model comprises:
acquiring the acceleration, the total operation time and the total operation stroke of a preset motor driving model;
and acquiring the target position of the motor at any moment based on the acceleration, the total running time and the total running stroke of the preset motor driving model.
3. The swing arm synchronization control method according to claim 2,
the preset motor driving model is a T-shaped curve, and the T-shaped curve meets the following formula:
Figure FDA0003010197060000011
wherein TS1 is the total stroke of the motor operation, a1 is the acceleration value of the motor during uniform acceleration, a2 is the acceleration value of the motor during uniform deceleration, t1 is the time of the motor during uniform acceleration, t2 is the time of the motor at constant speed, t3 is the time of the motor during uniform deceleration, t1 is t3, a1 is-a 2, and v1 is the speed of the motor during constant speed operation.
4. The swing arm synchronization control method according to claim 2,
the preset motor driving model is an S-shaped curve, and the S-shaped curve meets the following formula:
Figure FDA0003010197060000021
wherein TS2 is the total stroke of the motor operation, a3 is the acceleration value of the motor during variable acceleration, a4 is the acceleration value of the motor during variable deceleration, t4 is the time of the motor during variable acceleration, t5 is the time of the motor during constant speed, t6 is the time of the motor during variable deceleration, t4 is t6, a3 is-a 4, and v2 is the speed of the motor during constant speed operation.
5. The swing arm synchronous control method according to claim 1, wherein the calculating a target operating speed of the motor based on the current position and the target position comprises:
and calculating the current position and the target position through a PID algorithm to calculate the target running speed of the motor.
6. The swing arm synchronous control method according to claim 1, wherein the calculating the input current of the motor based on the current operating speed and the target operating speed comprises:
and calculating the current running speed and the target running speed through a PID algorithm to calculate the input current of the motor.
7. The swing arm synchronization control method according to claim 1, wherein the controlling the operating speed of the motor based on the input current comprises:
carrying out current loop control on the motor at a preset period;
calculating the voltage of the three phases of the motor by adopting a space vector modulation method;
and driving the motor according to the three-phase voltage of the motor so as to control the running speed of the motor.
8. A swing gate, comprising:
the two swing arms and the two motors are respectively used for controlling the two swing arms;
a control processing unit for controlling the motor, the control processing unit including:
at least one processor and a memory communicatively coupled to the at least one processor, the memory storing instructions executable by the at least one processor to enable the at least one processor to perform the method of any of claims 1-7.
9. The swing gate of claim 8,
the swing gate further comprises a driver;
the driver is respectively connected with the control processing unit and the motor, and the driver is used for controlling the motor based on the control signal output by the control processing unit.
10. A non-transitory computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a swing gate, cause the swing gate to perform the method of any of claims 1-7.
CN202110373264.1A 2021-04-07 2021-04-07 Swing arm synchronous control method and swing gate Active CN113238588B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110373264.1A CN113238588B (en) 2021-04-07 2021-04-07 Swing arm synchronous control method and swing gate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110373264.1A CN113238588B (en) 2021-04-07 2021-04-07 Swing arm synchronous control method and swing gate

Publications (2)

Publication Number Publication Date
CN113238588A true CN113238588A (en) 2021-08-10
CN113238588B CN113238588B (en) 2024-04-09

Family

ID=77131140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110373264.1A Active CN113238588B (en) 2021-04-07 2021-04-07 Swing arm synchronous control method and swing gate

Country Status (1)

Country Link
CN (1) CN113238588B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115993854A (en) * 2023-03-21 2023-04-21 上海果纳半导体技术有限公司 SMIF (SMIF) open-close device control method, SMIF open-close device control device and storage medium
CN116610872A (en) * 2023-07-19 2023-08-18 深圳须弥云图空间科技有限公司 Training method and device for news recommendation model

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB289818A (en) * 1927-05-02 1929-06-13 Marconi Wireless Telegraph Co Improvements in or relating to automatic speed control mechanisms and the like
CH222346A (en) * 1938-03-02 1942-07-15 Westinghouse Electric Corp Hydraulic adjustment device for prime movers.
GB1422572A (en) * 1972-01-08 1976-01-28 Bosch Gmbh Robert Speed sensitive control arrangements
US4333343A (en) * 1980-10-27 1982-06-08 Elliott Turbomachinery Co., Inc. Centrifugally actuated trip mechanism
US6179552B1 (en) * 1998-03-27 2001-01-30 Atlas Copco Tools Ab Speed control unit for a pneumatic rotation motor
CN107703979A (en) * 2017-09-21 2018-02-16 中国科学院长春光学精密机械与物理研究所 The peak current suppressing method and device of Rudder Servo System
CN108594875A (en) * 2018-02-28 2018-09-28 北京中天陆海精控科技有限公司 Angular rate gyroscope control method and device
CN108664048A (en) * 2018-03-30 2018-10-16 宝钢湛江钢铁有限公司 Slab deburring optimal control method based on momentum model
CN109960290A (en) * 2017-12-14 2019-07-02 深圳市优必选科技有限公司 Steering engine output control method, system and device
CN112162573A (en) * 2020-10-14 2021-01-01 四川航天烽火伺服控制技术有限公司 Electric steering engine shake control method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB289818A (en) * 1927-05-02 1929-06-13 Marconi Wireless Telegraph Co Improvements in or relating to automatic speed control mechanisms and the like
CH222346A (en) * 1938-03-02 1942-07-15 Westinghouse Electric Corp Hydraulic adjustment device for prime movers.
GB1422572A (en) * 1972-01-08 1976-01-28 Bosch Gmbh Robert Speed sensitive control arrangements
US4333343A (en) * 1980-10-27 1982-06-08 Elliott Turbomachinery Co., Inc. Centrifugally actuated trip mechanism
US6179552B1 (en) * 1998-03-27 2001-01-30 Atlas Copco Tools Ab Speed control unit for a pneumatic rotation motor
CN107703979A (en) * 2017-09-21 2018-02-16 中国科学院长春光学精密机械与物理研究所 The peak current suppressing method and device of Rudder Servo System
CN109960290A (en) * 2017-12-14 2019-07-02 深圳市优必选科技有限公司 Steering engine output control method, system and device
CN108594875A (en) * 2018-02-28 2018-09-28 北京中天陆海精控科技有限公司 Angular rate gyroscope control method and device
CN108664048A (en) * 2018-03-30 2018-10-16 宝钢湛江钢铁有限公司 Slab deburring optimal control method based on momentum model
CN112162573A (en) * 2020-10-14 2021-01-01 四川航天烽火伺服控制技术有限公司 Electric steering engine shake control method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115993854A (en) * 2023-03-21 2023-04-21 上海果纳半导体技术有限公司 SMIF (SMIF) open-close device control method, SMIF open-close device control device and storage medium
CN115993854B (en) * 2023-03-21 2024-05-10 上海果纳半导体技术有限公司 SMIF (SMIF) open-close device control method, SMIF open-close device control device and storage medium
CN116610872A (en) * 2023-07-19 2023-08-18 深圳须弥云图空间科技有限公司 Training method and device for news recommendation model
CN116610872B (en) * 2023-07-19 2024-02-20 深圳须弥云图空间科技有限公司 Training method and device for news recommendation model

Also Published As

Publication number Publication date
CN113238588B (en) 2024-04-09

Similar Documents

Publication Publication Date Title
CN113238588B (en) Swing arm synchronous control method and swing gate
EP1835613B1 (en) System and method for motor speed estimation using hybrid model reference adaptive system
Bodson et al. Nonlinear speed observer for high-performance induction motor control
RU2664782C1 (en) Control device for a rotating ac vehicle
US20190260322A1 (en) Motor control device
JP2003259679A (en) Vector control inverter apparatus and rotation driving apparatus
CN102769420B (en) Method and device for controlling motor start-up
JP2013017385A (en) Speed control device for induction motor
CN105656382B (en) A kind of motor speed constant speed control method and device
CN108322112B (en) Composite motion control method of stepping motor
KR20170030260A (en) Method for restarting induction machine
CN114326842A (en) Control method and device for driving device and control method for unmanned equipment
CN111813132A (en) Positioning control method and device, programmable logic controller and readable storage medium
JPH0232799A (en) Electric stepping motor having load angle regulator and its operation
CN109391189B (en) Stepping motor rotation angle compensation method and device
CN116318508A (en) EtherCAT slave station servo synchronization device, etherCAT slave station servo synchronization method, electronic equipment and storage medium
CN115840402A (en) Control time sequence optimization method of double-shaft low-voltage motor driver and related equipment
CN113645399B (en) Method and device for determining running position of cradle head equipment
US5436544A (en) Method of phase advancing compensation control for an AC synchronous motor
JP6265043B2 (en) Sensorless drive device for synchronous motor
CN110855191A (en) Synchronous control method for needle cylinder motor and handpiece motor of intelligent glove knitting machine based on sliding mode control
CN112087174A (en) Induction motor control method and device, electronic device and storage medium
US8957620B2 (en) Motor control apparatus, motor control method, motor system, and computer-readable medium
CN108667364A (en) A kind of the single step driving method and device of stepper motor
JPS63113602A (en) Electronic cam output device

Legal Events

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