CN113093814A - Method and device for controlling movement of holder - Google Patents

Method and device for controlling movement of holder Download PDF

Info

Publication number
CN113093814A
CN113093814A CN202110374287.4A CN202110374287A CN113093814A CN 113093814 A CN113093814 A CN 113093814A CN 202110374287 A CN202110374287 A CN 202110374287A CN 113093814 A CN113093814 A CN 113093814A
Authority
CN
China
Prior art keywords
speed
motor
current
holder
curve
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.)
Pending
Application number
CN202110374287.4A
Other languages
Chinese (zh)
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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202110374287.4A priority Critical patent/CN113093814A/en
Publication of CN113093814A publication Critical patent/CN113093814A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D3/00Control of position or direction
    • G05D3/12Control of position or direction using feedback

Abstract

The invention provides a method and a device for controlling the motion of a holder, comprising the following steps: receiving a service instruction sent by a camera, wherein the service instruction is used for indicating the operation mode of a holder; generating a corresponding operation curve according to the operation mode of the holder; and controlling the cradle head to move according to the operation curve through a motor. By the invention, the problem of low accuracy of pan-tilt motion control is solved.

Description

Method and device for controlling movement of holder
Technical Field
The invention relates to the field of communication, in particular to a method and a device for controlling the motion of a holder.
Background
The existing heavy-load pan-tilt camera achieves the purpose of monitoring a scene by controlling stepping motors arranged on an X axis and a Y axis to realize the motion of the camera. Because the stepping motor lacks feedback for detecting the motion state and has the characteristic of small moment at high speed, when the cradle head tracks a high-speed object, the motor is out of step, but the controller cannot judge whether the cradle head rotates to a preset position or whether rotation deviation exists or not according to requirements, so that the error of the cradle head is larger and larger when the cradle head works for a long time.
At present, the industry can use software to restart the tripod head to calibrate the angle of the tripod head, so that the working efficiency of the key control camera is seriously influenced. The existing heavy-load pan-tilt camera cannot realize high-precision motion control and quick corresponding control.
Aiming at the problem of low accuracy of the motion control of the holder in the related technology, no effective solution exists at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for controlling the motion of a pan-tilt, which at least solve the problem of low accuracy rate of pan-tilt motion control in the related art.
According to an embodiment of the present invention, there is provided a method of controlling a motion of a pan/tilt head, including: receiving a service instruction sent by a camera, wherein the service instruction is used for indicating the operation mode of a holder; generating a corresponding operation curve according to the operation mode of the holder; and controlling the cradle head to move according to the operation curve through a motor.
Optionally, before generating the corresponding operation curve according to the operation mode of the pan/tilt head, the method includes: under the condition that the operation mode of the holder is continuous motion, determining a first operation speed of the continuous motion of the holder; and under the condition that the operation mode of the holder is accurate positioning, determining that the holder moves to the target operation position according to a second operation speed.
Optionally, when the operation mode of the pan/tilt head is the continuous motion, generating an operation curve according to the target operation information includes: and generating a first operation curve according to the current operation speed of the holder and the first operation speed, wherein the first operation curve comprises a speed change curve of the holder which is adjusted from the current operation speed to the first operation speed, and a continuous motion curve according to the first operation speed.
Optionally, when the operation mode of the pan/tilt head is continuous motion, controlling the pan/tilt head to move according to the operation curve through a motor includes: repeatedly executing the following steps until the current movement speed of the motor is the first operation speed: determining a current electrical angle and a current operating speed of the motor through a motor encoder; and controlling the current running speed of the motor to be the current target running speed in the first running curve to move according to the current electrical angle and the current running speed of the motor.
Optionally, when the operation mode of the pan/tilt head is accurate positioning, the generating an operation curve according to the target operation information includes: and generating a second operation curve according to the current position of the holder, the second operation speed and the target operation position, wherein the second operation curve comprises a motion track of the holder moving from the current position to the target operation position according to the second operation speed.
Optionally, when the operation mode of the pan/tilt head is accurate positioning, controlling the pan/tilt head to move according to the operation curve through a motor includes: repeatedly executing the following steps until the motor runs to the target running position: determining a current electrical angle, a current operating speed and a current mechanical angle of the motor through a motor encoder; and controlling the motor to run to the current target running position in the second running curve according to the current electrical angle, the current running speed and the current mechanical angle of the motor.
Optionally, before the receiving of the service instruction sent by the camera movement, the method includes: determining an offset value between a count value of a motor encoder and an electrical angle of the motor; and calibrating the motor encoder through the offset value.
According to another embodiment of the present invention, there is provided an apparatus for controlling the movement of a pan/tilt head, including: the receiving module is used for receiving a service instruction sent by the camera, wherein the service instruction is used for indicating the operation mode of the holder; the generating module is used for generating a corresponding operation curve according to the operation mode of the holder; and the control module is used for controlling the cradle head to move according to the operation curve through a motor.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, the service instruction is used for indicating the operation mode of the holder by receiving the service instruction sent by the camera; generating a corresponding operation curve according to the operation mode of the holder; the motor controls the cradle head to move according to the operation curve, so that high-precision motion control is realized, the problem of low accuracy of cradle head motion control can be solved, and the effect of improving the accuracy of cradle head motion control is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a mobile terminal of a method for controlling a pan-tilt motion according to an embodiment of the present invention;
fig. 2 is a flowchart of a method of controlling the motion of a pan and tilt head according to an embodiment of the present invention;
FIG. 3 is a system module framework diagram according to an alternative embodiment of the invention;
FIG. 4 is a schematic control flow diagram in accordance with an alternative embodiment of the present invention;
FIG. 5 is a schematic illustration of a speed S-curve according to an alternative embodiment of the present invention;
FIG. 6 is a schematic of an encoder based speed control according to an alternative embodiment of the present invention;
FIG. 7 is a schematic illustration of a position S curve according to an alternative embodiment of the present invention;
FIG. 8 is a schematic of an encoder based position control according to an alternative embodiment of the present invention;
fig. 9 is a block diagram of a device for controlling the motion of a pan/tilt head according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking the operation on a mobile terminal as an example, fig. 1 is a hardware structure block diagram of the mobile terminal of the method for controlling the motion of the pan/tilt head according to the embodiment of the present invention. As shown in fig. 1, the mobile terminal 10 may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of application software, such as a computer program corresponding to the method for controlling the motion of the pan/tilt head in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, sports communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a method for controlling a motion of a pan/tilt head, which is executed in the above-mentioned mobile terminal, is provided, and fig. 2 is a flowchart of the method for controlling a motion of a pan/tilt head according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, receiving a service instruction sent by a camera, wherein the service instruction is used for indicating the operation mode of a holder;
step S204, generating a corresponding operation curve according to the operation mode of the holder;
and S206, controlling the cradle head to move according to the operation curve through a motor.
Through the steps, the service instruction is used for indicating the operation mode of the holder by receiving the service instruction sent by the camera; generating a corresponding operation curve according to the operation mode of the holder; the motor controls the cradle head to move according to the operation curve, so that high-precision motion control is realized, the problem of low accuracy of cradle head motion control can be solved, and the effect of improving the accuracy of cradle head motion control is achieved.
Optionally, the executing subject of the above steps may be a mobile terminal, such as a cradle head, but is not limited thereto.
As an optional implementation manner, as shown in fig. 3, a schematic diagram of a system module framework according to an optional embodiment of the present invention is shown, where a camera core is responsible for processing a monitoring image and interactive communication between holders, and controls a corresponding service function of a holder according to an agreed holder control protocol; the cradle head service module is responsible for processing the cradle head command sent by the machine core and reading the current position and speed information of the cradle head and feeding back the information to the machine core; the servo FOC control module is responsible for a control algorithm of the motor, performs algorithm control by reading a target speed and a target angle issued by the holder service module, and finally outputs three-phase voltage to the motor; the servo motor rotates after receiving the three-phase voltage, and the encoder sends the coded value to the motor control module in the rotating process. In this embodiment, the service instruction may be sent to the pan/tilt head by the camera core, where the service instruction carries information indicating an operation mode of the pan/tilt head, and the operation mode of the pan/tilt head includes, but is not limited to, continuous movement and accurate positioning. The continuous movement refers to continuous movement according to a target speed, and the accurate positioning refers to controlling the holder to move from a current operation position to a target operation position.
As an optional implementation manner, as shown in fig. 4, a schematic control flow diagram according to an optional embodiment of the present invention is shown, where the method includes the following steps:
and step S41, acquiring the parameters of the camera pan-tilt, completing the initialization of the camera system, and calibrating the motor encoder.
Pan-tilt parameters include, but are not limited to: maximum speed of movement VmaxThe method comprises the following steps of (1) limiting a boundary, controlling pins by an optical coupling module and the like, finishing initialization of a camera system, and preparing for subsequent low power consumption and motion control; meanwhile, a motor encoder is calibrated, and because the electric angle for coordinate conversion is converted from the encoder count value during the control of the FOC algorithm of the motor, the deviation between the real electric angle of the motor and the electric angle for calculation can be caused by the abnormal alignment of the encoder, the included angle between a magnetic field and current is not 90 degrees, and the motor is rapidly reversed or the torque is reduced. Therefore, the running effect of the motor is directly influenced by the calibration of the encoder. The control method adopts a successive approximation method for calibrating the encoder, and mainly comprises two steps.
And step S42, the cradle head acquires the service instruction sent by the camera core and analyzes the cradle head operation mode indicated by the service instruction, wherein the cradle head operation mode comprises continuous motion and accurate positioning. If the service command indicates continuous motion, the process goes to step S43, and if the service command indicates accurate positioning, the process goes to step S46.
In step S43, in case that the service instruction indicates that the operation mode of the pan/tilt head is continuous motion, a target speed is set, and the target speed may be the maximum speed of the continuous motion of the pan/tilt head.
In step S44, a velocity profile may be drawn according to the current operating velocity and the target velocity of the pan/tilt head, and a dispersion profile may be drawn according to the interrupt frequency.
And step S45, controlling the speed through the servo motor to control the continuous movement of the holder.
Step S46, under the condition that the service instruction indicates that the motion mode of the pan/tilt is accurate positioning, a target angle and a running speed may be set, the target angle is used to control the direction of the pan/tilt, and the running speed may control the speed of the pan/tilt.
In step S47, the position loop control is performed by the servo motor, and the operation speed can be used to limit the speed of the pan/tilt head.
In this embodiment, the motor may be a servo motor, the servo motor is used as a transmission component, and a vector control algorithm and a magnetic encoder correction strategy are used to ensure that the pan-tilt can be controlled with high precision and controlled with quick response.
Optionally, before generating the corresponding operation curve according to the operation mode of the pan/tilt head, the method includes: under the condition that the operation mode of the holder is continuous motion, determining a first operation speed of the continuous motion of the holder; and under the condition that the operation mode of the holder is accurate positioning, determining that the holder moves to the target operation position according to a second operation speed.
As an alternative embodiment, the continuous movement is the continuous rotation of the pan/tilt head at a set speed, which is a speed control. The set speed may be a first operating speed, and the first operating speed may be a speed at which the apparatus continuously rotates, and may be set according to actual conditions. The accurate positioning is to position the target position at a set speed, and the set speed may be a second operation speed, and the second operation speed may be set according to an actual situation. Fine positioning is a type of position control.
Optionally, when the operation mode of the pan/tilt head is the continuous motion, generating an operation curve according to the target operation information includes: and generating a first operation curve according to the current operation speed of the holder and the first operation speed, wherein the first operation curve comprises a speed change curve of the holder which is adjusted from the current operation speed to the first operation speed, and a continuous motion curve according to the first operation speed.
As an optional implementation manner, a service instruction sent by the camera movement to the pan/tilt head is received, and how the pan/tilt head needs to move at present is judged. Through logic analysis, whether the movement is continuous or the accurate positioning is finally obtained. The continuous movement can use a speed S curve mode to make the movement process smooth and soft. The speed S curve is discretized according to the motor control period and used as the target speed of the control speed ring, and the unit can be DEG/S. FIG. 5 is a schematic diagram of a velocity S-curve according to an alternative embodiment of the present invention, where Vs may be the current operating velocity of the pan/tilt head, V3May be a first operating speed, may be at speeds Vs to V3Between which several speed points, e.g. V in the figure, diverge1And V2Can be adjusted to V from the current running speed Vs by controlling the holder1And V2Then adjusted to V3So that the movement process is smooth and soft. The cradle head operates according to a first operating speed V3The first operation curve may further include a speed change curve that the pan/tilt head is adjusted from the first operation speed to a third operation speed, the third operation speed may be a speed at which the pan/tilt head stops continuously moving, and the specific value may be determined according to an actual situation, for example, V in fig. 57. The cradle head operates at a first operating speed for a period of time and then passes through at V4And V7Between the two speed points5And V6So that the holder can smoothly and softly reduce the speed and stop continuous movement. In the present embodiment, it is preferred that,the continuous motion of the cradle head is controlled through the speed curve, and the motion of the cradle head can be controlled with high precision.
Optionally, when the operation mode of the pan/tilt head is continuous motion, controlling the pan/tilt head to move according to the operation curve through a motor includes: repeatedly executing the following steps until the current movement speed of the motor is the first operation speed: determining a current electrical angle and a current operating speed of the motor through a motor encoder; and controlling the current running speed of the motor to be the current target running speed in the first running curve to move according to the current electrical angle and the current running speed of the motor.
As an alternative embodiment, the per-unit processing can be performed on all physical quantities using the q24 scaling format using the motor FOC algorithm control. FIG. 6 is a schematic diagram of an encoder-based speed control according to an alternative embodiment of the present invention, wherein the encoder measures a current electrical angle of the motor, which is input to PARK and inverse PARK transformation, and a current operating speed, which is input to a speed loop for speed control, wherein the given speed may be a speed diverging in an S-curve, such as V1、V2、V3. The current loop separates the Q axis and the D axis for independent PI operation, the given value of the Q axis is Iq output by the speed loop, and the given value of the D axis is generally 0. And performing inverse PARK conversion on the voltages Uq and Ud of the PI output Q shaft and the D shaft on the rotor, outputting two-phase alternating voltages U alpha and U beta based on the stator, and finally generating the required three-phase voltage by using an SVPWM generator. The pan-tilt can be controlled to run at a given speed by three-phase voltage, e.g. V1And continuously controlling the tripod head to operate according to the speed in the first operating curve through the three-phase voltage through cyclic control until the speed reaches a first operating speed, and continuously moving the tripod head according to the first operating speed. In this embodiment, the servo motor is used to replace the existing stepping motor, and the encoder feeds back the real-time position of the holder, so that the requirements of high-speed operation and high-precision control can be met, and the acceleration and deceleration can be faster.
Optionally, when the operation mode of the pan/tilt head is accurate positioning, the generating an operation curve according to the target operation information includes: and generating a second operation curve according to the current position of the holder, the second operation speed and the target operation position, wherein the second operation curve comprises a motion track of the holder moving from the current position to the target operation position according to the second operation speed.
As an alternative, a position S-curve may be used, and the unit of the target position as the control position loop may be ° by dispersing each discrete point of the S-curve from the current position to the target position in the motor control cycle. FIG. 7 is a schematic diagram of a location S-curve according to an alternative embodiment of the present invention, where the origin of coordinates may be the current location of the pan/tilt head, S7May be a target operating position, from origin to S7Discrete out of position points, e.g. S in the figure1、S2、S3、S4、S5、S6And the cloud deck can be accurately controlled to be accurately positioned to the target position from the current position through the scattered position points. In this embodiment, the operation speed of the pan/tilt control apparatus may also be controlled, if the operation speed of the pan/tilt control apparatus is controlled to move to the target position according to the second operation speed, the operation speed of the pan/tilt control apparatus may also be limited, and a threshold may be set. In this embodiment, the steady motion of the pan/tilt head can be controlled by the amplitude limit of the velocity.
Optionally, when the operation mode of the pan/tilt head is accurate positioning, controlling the pan/tilt head to move according to the operation curve through a motor includes: repeatedly executing the following steps until the motor runs to the target running position: determining a current electrical angle, a current operating speed and a current mechanical angle of the motor through a motor encoder; and controlling the motor to run to the current target running position in the second running curve according to the current electrical angle, the current running speed and the current mechanical angle of the motor.
As an alternative embodiment, the figuresAnd 8, the position control schematic diagram based on the encoder is used for driving the encoder to output four quantities, namely the current mechanical angle, the electrical angle, the rotating speed, the absolute position and the like of the holder. Pref input in the generator of the S-curve for the location in the figure may be the discrete locations in the second curve, e.g. S1、S2、S3、S4、S5、S6The current target operation position may be S1、S2、S3、S4、S5、S6And the cloud deck can be operated to the target position according to the second operation curve through cyclic control. In this embodiment, the operation speed of the pan/tilt head may be limited, where ω is the figuresetIs the running speed, and the running speed pair ω can be usedrefLimiting speed when omegarefGreater than omegasetWhen it is, take omegarefValue of omegaset. In addition, when the cloud platform appears out of step or the external influence rotates the condition, the encoder can really reflect cloud platform current position, can go to correct the abnormal conditions that appear through FOC control, realizes the high accuracy control of cloud platform. And when the holder is at a high speed, the encoder can still record the position of the holder in real time, so that the control method can meet the control requirements of high speed and high precision.
Optionally, before the receiving of the service instruction sent by the camera movement, the method includes: determining an offset value between a count value of a motor encoder and an electrical angle of the motor; and calibrating the motor encoder through the offset value.
As an optional embodiment, when the FOC algorithm of the motor is used for controlling, the electrical angle for coordinate conversion is converted from the encoder count value, so that the deviation between the real electrical angle of the motor and the electrical angle for calculation is caused by the abnormal alignment of the encoder, the included angle between the magnetic field and the current is not 90 °, and the motor is rapidly reversed or the torque is reduced. Therefore, the running effect of the motor is directly influenced by the calibration of the encoder. The control method adopts a successive approximation method for calibrating the encoder, and mainly comprises two steps.
Step 1: and acquiring the successive approximation optimal voltage. The motor is first rotated using the open loop input voltage ud, which is given a minimum value, case q (0.1), and the encoder values are read at that time. If the encoder value is not changed within a certain time, the delta ud is increased until the encoder value has a change in value for several consecutive periods. The current ud is maintained and the encoder count Cnt1 given the electrical angle Θ 1 at this time is recorded. And when the electrical angle theta 1 is given next time, calculating whether the difference value between the current encoder count value Cnt2 and the current encoder count value Cnt1 is the encoder line number/motor pole pair number, and if the difference value is not increased by delta ud again, continuing the operation until the encoder difference value meets the requirement. Then ud at this time is the optimum voltage udcalai at which the motor can be rotated when the encoder is calibrated. Step 2: and obtaining an offset value. And saving the voltage UdCali, setting a Z signal of the encoder to be triggered by external interruption, and resetting AB signal counting hardware when the Z signal is triggered, so that the motor stops. Then, the alignment operation is performed by applying a voltage UdCali and an electrical angle of 0 deg.. After alignment, the AB signal value is read and recorded as the offset value EncodeOffset. And when the encoder is calibrated, an encoder count value and an electrical angle of the motor have an EncoderOffset offset as long as the current motor of the same model is used all the time. When the tripod head is restarted again, the encoder calibration is not needed, and the encoder value obtained by subtracting the offset value from the subsequently read encoder value is the encoder value corresponding to the electrical 0 degree. The encoder value and electrical angle calibration is complete.
The servo motor is used for replacing the existing stepping motor, the real-time position of the tripod head is fed back by the encoder, the high-speed operation and the high-precision control requirement can be considered, and the acceleration and deceleration can be faster. The successive approximation method is used for calibrating the encoder, and compared with a conventional violent alignment mode, the method is smooth in operation of the motor in the calibration process and does not affect the structure.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a device for controlling the motion of the pan/tilt head is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, which have already been described and are not described again. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 9 is a block diagram of a structure of an apparatus for controlling a motion of a pan/tilt head according to an embodiment of the present invention, as shown in fig. 9, the apparatus includes: a receiving module 92, configured to receive a service instruction sent by a camera, where the service instruction is used to indicate an operation mode of a pan/tilt head; a generating module 94, configured to generate a corresponding operation curve according to the operation mode of the pan/tilt head; and the control module 96 is used for controlling the cradle head to move according to the operation curve through a motor.
Optionally, the apparatus is further configured to determine, before the generating of the corresponding operation curve according to the operation mode of the pan/tilt head, a first operation speed at which the pan/tilt head continuously moves when the operation mode of the pan/tilt head is a continuous motion; and under the condition that the operation mode of the holder is accurate positioning, determining that the holder moves to the target operation position according to a second operation speed.
Optionally, the above apparatus is configured to generate a first operation curve according to the current operation speed of the pan/tilt head and the first operation speed, where the first operation curve includes a speed change curve of the pan/tilt head from the current operation speed to the first operation speed, and a continuous motion curve according to the first operation speed.
Optionally, the above apparatus repeatedly performs the following steps until the current moving speed of the motor is the first operating speed: determining a current electrical angle and a current operating speed of the motor through a motor encoder; and controlling the current running speed of the motor to be the current target running speed in the first running curve to move according to the current electrical angle and the current running speed of the motor.
Optionally, the apparatus is configured to generate a second operation curve according to the current position of the pan/tilt head, the second operation speed, and the target operation position, where the second operation curve includes a motion trajectory of the pan/tilt head moving from the current position to the target operation position according to the second operation speed.
Optionally, the above apparatus is configured to repeatedly perform the following steps until the motor is operated to the target operation position: determining a current electrical angle, a current operating speed and a current mechanical angle of the motor through a motor encoder; and controlling the motor to run to the current target running position in the second running curve according to the current electrical angle, the current running speed and the current mechanical angle of the motor.
Optionally, the device is configured to determine an offset value between a count value of a motor encoder and an electrical angle of the motor before the receiving of the service instruction sent by the camera movement; and calibrating the motor encoder through the offset value.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, receiving a service instruction sent by the camera, wherein the service instruction is used for indicating the operation mode of the pan-tilt;
s2, generating a corresponding operation curve according to the operation mode of the holder;
and S3, controlling the cradle head to move according to the operation curve through a motor.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a hard disk, a magnetic disk, or an optical disk, which can store computer programs.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, receiving a service instruction sent by the camera, wherein the service instruction is used for indicating the operation mode of the pan-tilt;
s2, generating a corresponding operation curve according to the operation mode of the holder;
and S3, controlling the cradle head to move according to the operation curve through a motor.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of controlling motion of a pan/tilt head, comprising:
receiving a service instruction sent by a camera, wherein the service instruction is used for indicating the operation mode of a holder;
generating a corresponding operation curve according to the operation mode of the holder;
and controlling the cradle head to move according to the operation curve through a motor.
2. Method according to claim 1, characterized in that it comprises, before said generation of the respective operating curve according to the operating mode of said head:
under the condition that the operation mode of the holder is continuous motion, determining a first operation speed of the continuous motion of the holder;
and under the condition that the operation mode of the holder is accurate positioning, determining that the holder moves to the target operation position according to a second operation speed.
3. The method according to claim 2, wherein in a case that the operation mode of the pan/tilt head is the continuous motion, the generating an operation curve according to the target operation information includes:
and generating a first operation curve according to the current operation speed of the holder and the first operation speed, wherein the first operation curve comprises a speed change curve of the holder which is adjusted from the current operation speed to the first operation speed, and a continuous motion curve according to the first operation speed.
4. The method according to claim 3, wherein in the case that the operation mode of the pan/tilt head is continuous motion, controlling the pan/tilt head to move according to the operation curve through a motor comprises:
repeatedly executing the following steps until the current movement speed of the motor is the first operation speed:
determining a current electrical angle and a current operating speed of the motor through a motor encoder;
and controlling the current running speed of the motor to be the current target running speed in the first running curve to move according to the current electrical angle and the current running speed of the motor.
5. The method according to claim 2, wherein in a case that the operation mode of the pan/tilt head is accurate positioning, the generating an operation curve according to the target operation information includes:
and generating a second operation curve according to the current position of the holder, the second operation speed and the target operation position, wherein the second operation curve comprises a motion track of the holder moving from the current position to the target operation position according to the second operation speed.
6. The method according to claim 5, wherein in the case that the operation mode of the pan/tilt head is accurate positioning, controlling the pan/tilt head to move according to the operation curve through a motor comprises:
repeatedly executing the following steps until the motor runs to the target running position:
determining a current electrical angle, a current operating speed and a current mechanical angle of the motor through a motor encoder;
and controlling the motor to run to the current target running position in the second running curve according to the current electrical angle, the current running speed and the current mechanical angle of the motor.
7. The method of claim 1, wherein prior to said receiving a service instruction sent by a camera movement, the method comprises:
determining an offset value between a count value of a motor encoder and an electrical angle of the motor;
and calibrating the motor encoder through the offset value.
8. A device for controlling the movement of a head, comprising:
the receiving module is used for receiving a service instruction sent by the camera, wherein the service instruction is used for indicating the operation mode of the holder;
the generating module is used for generating a corresponding operation curve according to the operation mode of the holder;
and the control module is used for controlling the cradle head to move according to the operation curve through a motor.
9. Storage medium, in which a computer program is stored, wherein the program is executable by a terminal device or a computer to perform the method of one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 7.
CN202110374287.4A 2021-04-07 2021-04-07 Method and device for controlling movement of holder Pending CN113093814A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110374287.4A CN113093814A (en) 2021-04-07 2021-04-07 Method and device for controlling movement of holder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110374287.4A CN113093814A (en) 2021-04-07 2021-04-07 Method and device for controlling movement of holder

Publications (1)

Publication Number Publication Date
CN113093814A true CN113093814A (en) 2021-07-09

Family

ID=76674778

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110374287.4A Pending CN113093814A (en) 2021-04-07 2021-04-07 Method and device for controlling movement of holder

Country Status (1)

Country Link
CN (1) CN113093814A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017020856A1 (en) * 2015-08-05 2017-02-09 普宙飞行器科技(深圳)有限公司 Photographing device and method using drone to automatically track and photograph moving object
CN108780328A (en) * 2017-12-18 2018-11-09 深圳市大疆灵眸科技有限公司 A kind of cloud platform control method, unmanned plane, holder and storage medium
WO2019062173A1 (en) * 2017-09-29 2019-04-04 深圳市大疆创新科技有限公司 Video processing method and device, unmanned aerial vehicle and system
CN111198561A (en) * 2019-12-05 2020-05-26 浙江大华技术股份有限公司 Motion control method and device for target tracking, computer equipment and storage medium
CN111240370A (en) * 2020-02-10 2020-06-05 浙江大华技术股份有限公司 Method, device and system for correcting position of holder and storage medium
CN111787274A (en) * 2020-05-21 2020-10-16 视联动力信息技术股份有限公司 Equipment control method and device, terminal equipment and storage medium
WO2021026804A1 (en) * 2019-08-14 2021-02-18 深圳市大疆创新科技有限公司 Cradle head-based target following method and apparatus, cradle head and computer storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017020856A1 (en) * 2015-08-05 2017-02-09 普宙飞行器科技(深圳)有限公司 Photographing device and method using drone to automatically track and photograph moving object
WO2019062173A1 (en) * 2017-09-29 2019-04-04 深圳市大疆创新科技有限公司 Video processing method and device, unmanned aerial vehicle and system
CN108780328A (en) * 2017-12-18 2018-11-09 深圳市大疆灵眸科技有限公司 A kind of cloud platform control method, unmanned plane, holder and storage medium
WO2021026804A1 (en) * 2019-08-14 2021-02-18 深圳市大疆创新科技有限公司 Cradle head-based target following method and apparatus, cradle head and computer storage medium
CN111198561A (en) * 2019-12-05 2020-05-26 浙江大华技术股份有限公司 Motion control method and device for target tracking, computer equipment and storage medium
CN111240370A (en) * 2020-02-10 2020-06-05 浙江大华技术股份有限公司 Method, device and system for correcting position of holder and storage medium
CN111787274A (en) * 2020-05-21 2020-10-16 视联动力信息技术股份有限公司 Equipment control method and device, terminal equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
周柳奇;: "基于脉冲分配器和步进电机的摄像机云台控制", 山西电子技术, no. 05, 15 October 2013 (2013-10-15) *

Similar Documents

Publication Publication Date Title
US9268316B2 (en) Method for automatically estimating a friction coefficient in a mechanical system
CN101369796B (en) Method and system for detecting rotor magnetic pole initial position of permanent magnet synchronous machine
DE102012005970A1 (en) Detecting device for detecting a magnetic pole position of a synchronous motor and a control device equipped therewith
CN109687772A (en) A kind of multi-axis synchronized control method and system
CN109449598B (en) Inclination angle adjusting method and corresponding device of electrically-tuned antenna
CN211429147U (en) Rotary-transformation zero-adjusting system for permanent magnet synchronous motor
CN109217758A (en) Rotation becomes zero point on-line identification method, electric machine controller and storage medium
CN113093814A (en) Method and device for controlling movement of holder
CN113645399B (en) Method and device for determining running position of cradle head equipment
CN109639200A (en) A kind of rotary inertia on-line identification method based on electric motor load torque detection
CN115840402A (en) Control time sequence optimization method of double-shaft low-voltage motor driver and related equipment
CN111162712B (en) Control method of direct-drive permanent magnet synchronous motor, traction controller and storage medium
CN108809192B (en) Parameter self-tuning permanent magnet synchronous motor control system
CN114826046B (en) Control method and device based on stepping motor and electronic equipment
CN116318508A (en) EtherCAT slave station servo synchronization device, etherCAT slave station servo synchronization method, electronic equipment and storage medium
CN109600092A (en) A kind of monitoring of permanent-magnet synchronous motor rotor position and modification method, system and motor
CN102904506A (en) Permanent magnet synchronous motor rotor positioning method and device
CN110855191A (en) Synchronous control method for needle cylinder motor and handpiece motor of intelligent glove knitting machine based on sliding mode control
CN111531953A (en) Control method and motion control device for feeding mechanism of press
CN112462765B (en) Robot, control method and device thereof, and computer-readable storage medium
CN111682827B (en) Motor control method, device, terminal and storage medium
CN112067218B (en) Method, device and equipment for realizing optical anti-shake vibration generator
WO2023138536A1 (en) Motor control system, motor control method, and motor driving and forwarding device
CN220855443U (en) Workbench displacement system
CN116979850B (en) Motor rotation control method and device

Legal Events

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