WO2021026779A1 - Cradle head control method and device, cradle head and storage medium - Google Patents

Cradle head control method and device, cradle head and storage medium Download PDF

Info

Publication number
WO2021026779A1
WO2021026779A1 PCT/CN2019/100433 CN2019100433W WO2021026779A1 WO 2021026779 A1 WO2021026779 A1 WO 2021026779A1 CN 2019100433 W CN2019100433 W CN 2019100433W WO 2021026779 A1 WO2021026779 A1 WO 2021026779A1
Authority
WO
WIPO (PCT)
Prior art keywords
motor
pan
tilt
support
angular velocity
Prior art date
Application number
PCT/CN2019/100433
Other languages
French (fr)
Chinese (zh)
Inventor
卢国政
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to CN201980034068.2A priority Critical patent/CN112272806A/en
Priority to PCT/CN2019/100433 priority patent/WO2021026779A1/en
Publication of WO2021026779A1 publication Critical patent/WO2021026779A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/08Control of attitude, i.e. control of roll, pitch, or yaw
    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F16ENGINEERING ELEMENTS AND UNITS; GENERAL MEASURES FOR PRODUCING AND MAINTAINING EFFECTIVE FUNCTIONING OF MACHINES OR INSTALLATIONS; THERMAL INSULATION IN GENERAL
    • F16MFRAMES, CASINGS OR BEDS OF ENGINES, MACHINES OR APPARATUS, NOT SPECIFIC TO ENGINES, MACHINES OR APPARATUS PROVIDED FOR ELSEWHERE; STANDS; SUPPORTS
    • F16M11/00Stands or trestles as supports for apparatus or articles placed thereon Stands for scientific apparatus such as gravitational force meters
    • F16M11/02Heads
    • F16M11/16Details concerning attachment of head-supporting legs, with or without actuation of locking members thereof
    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F16ENGINEERING ELEMENTS AND UNITS; GENERAL MEASURES FOR PRODUCING AND MAINTAINING EFFECTIVE FUNCTIONING OF MACHINES OR INSTALLATIONS; THERMAL INSULATION IN GENERAL
    • F16MFRAMES, CASINGS OR BEDS OF ENGINES, MACHINES OR APPARATUS, NOT SPECIFIC TO ENGINES, MACHINES OR APPARATUS PROVIDED FOR ELSEWHERE; STANDS; SUPPORTS
    • F16M13/00Other supports for positioning apparatus or articles; Means for steadying hand-held apparatus or articles
    • F16M13/04Other supports for positioning apparatus or articles; Means for steadying hand-held apparatus or articles for supporting on, or holding steady relative to, a person, e.g. by chains, e.g. rifle butt or pistol grip supports, supports attached to the chest or head
    • 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

Definitions

  • the invention relates to the field of control, and in particular to a pan-tilt control method, device, pan-tilt and storage medium.
  • a point that exists but does not exist is called a singularity (or singularity).
  • a singular point can mean that the end of the robotic arm loses a certain degree of freedom in a certain direction when the robot arm is in a certain combination of joint positions.
  • the invention provides a pan/tilt control method, device, pan/tilt and storage medium, which are used to solve the problems in the prior art that the stability of the pan/tilt control is affected by the neighborhood of singular points, and it is difficult to achieve accurate posture control.
  • the first aspect of the present invention is to provide a pan-tilt control method, the pan-tilt at least includes a first support, a second support and a third support for connecting a load connected in sequence; the method includes:
  • the single-axis control component and the dual-axis control component are calculated according to the target end attitude and the measured end attitude; wherein the single-axis control component is related to the first support, and the dual-axis control component is related to the second support and The third bracket is related;
  • the first bracket is controlled according to the single-axis control component
  • the second bracket and the third bracket are controlled according to the dual-axis control component.
  • the second aspect of the present invention is to provide a control device for a pan/tilt head, the pan/tilt head at least includes a first bracket, a second bracket and a third bracket for connecting a load, which are connected in sequence; the control device includes:
  • Memory used to store computer programs
  • the processor is configured to run a computer program stored in the memory to realize: detecting whether the pan/tilt is located in the neighborhood of a preset singularity; when the pan/tilt is located in the neighborhood of the singularity, acquiring the information of the pan/tilt
  • the target end posture and the measurement end posture; the single-axis control component and the dual-axis control component are calculated according to the target end posture and the measured end posture; wherein, the single-axis control component is related to the first bracket, and the dual-axis control
  • the component is related to the second support and the third support; the first support is controlled according to the single-axis control component, and the second support and the third support are controlled according to the dual-axis control component.
  • the third aspect of the present invention is to provide a pan-tilt control device, the pan-tilt at least includes a first support, a second support and a third support for connecting a load connected in sequence; the control device includes:
  • the detection module is used to detect whether the pan/tilt is located in the neighborhood of a preset singularity
  • An acquiring module configured to acquire the target end attitude and measurement end attitude of the pan/tilt when the pan/tilt is located in the neighborhood of the singularity
  • the calculation module is used to calculate a single-axis control component and a dual-axis control component according to the target end posture and the measured end posture; wherein the single-axis control component is related to the first bracket, and the dual-axis control component is related to the The second bracket is related to the third bracket;
  • the control module is configured to control the first bracket according to the single-axis control component, and control the second bracket and the third bracket according to the dual-axis control component.
  • the fourth aspect of the present invention is to provide a pan/tilt head, which is characterized in that it includes at least:
  • control device is used to control the first bracket, the second bracket, and the third bracket.
  • the fifth aspect of the present invention is to provide a computer-readable storage medium, the storage medium is a computer-readable storage medium, the computer-readable storage medium stores program instructions, and the program instructions are used in the first aspect.
  • the described PTZ control method is to provide a computer-readable storage medium, the storage medium is a computer-readable storage medium, the computer-readable storage medium stores program instructions, and the program instructions are used in the first aspect.
  • the pan/tilt control method, device, pan/tilt and storage medium provided by the present invention, when the pan/tilt is located in the vicinity of a singular point, the target end attitude of the pan/tilt is acquired and the measured end attitude is determined according to the target end attitude Calculate the single-axis control component and the dual-axis control component with the measurement end attitude, and realize the decoupling of the three brackets into a first bracket and a dual-axis bracket.
  • the dual-axis bracket includes a second bracket and a third bracket. , And use the single-axis control component and the dual-axis control component to decouple the movement of the first bracket, the second bracket, and the third bracket.
  • Fig. 1 is a schematic diagram of controlling the PTZ provided in the prior art
  • FIG. 2 is a schematic flowchart of a method for controlling a pan-tilt according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a pan-tilt not in the neighborhood of a singular point according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a pan-tilt located in the neighborhood of a singular point according to an embodiment of the present invention
  • FIG. 5 is a schematic flow chart of calculating a single-axis control component according to the target end pose and the measured end pose provided by an embodiment of the present invention
  • FIG. 6 is a schematic diagram of an algorithm for calculating a single-axis control component based on the target end attitude and the measured end attitude provided by an embodiment of the present invention
  • FIG. 7 is a schematic diagram of controlling the target joint angle to the first bracket according to an embodiment of the present invention.
  • FIG. 8 is a schematic flow chart of calculating a dual-axis control component according to the target end pose and the measured end pose provided by an embodiment of the present invention
  • FIG. 9 is a schematic flowchart of determining the dual-axis control component based on the target end attitude, the measured end attitude, and the end angular velocity according to an embodiment of the present invention
  • FIG. 10 is a schematic flowchart of determining the dual-axis control component according to the attitude control error and the terminal angular velocity according to an embodiment of the present invention
  • Figure 11 is an embodiment of the present invention for the attitude control error and the end angular velocity, removing the components related to the first support from the attitude control error and the end angular velocity, and generating the second support and the third support Schematic diagram of the flow of related local attitude control error and local end angular velocity;
  • FIG. 12 is a schematic diagram of controlling the second bracket and the third bracket according to the dual-axis control component according to an embodiment of the present invention
  • FIG. 13 is a schematic diagram of a process of detecting whether the PTZ is located in the neighborhood of a singularity according to an embodiment of the present invention
  • FIG. 14 is a schematic flowchart of another method for controlling a pan/tilt head according to an embodiment of the present invention.
  • 15 is a schematic flowchart of another method for controlling a pan/tilt head according to an embodiment of the present invention.
  • 16 is a schematic flowchart of determining at least one smooth transition signal according to the first driving signal and the second driving signal according to an embodiment of the present invention
  • FIG. 17 is a schematic flowchart of obtaining a weighting coefficient corresponding to the first driving signal according to an embodiment of the present invention.
  • FIG. 18 is a schematic flowchart of a method for controlling a pan/tilt head provided by an application embodiment of the present invention.
  • FIG. 19 is a schematic structural diagram of a pan-tilt control device provided by an embodiment of the present invention.
  • FIG. 20 is a schematic structural diagram of a pan-tilt control device provided by an embodiment of the present invention.
  • FIG. 21 is a schematic structural diagram 1 of a pan-tilt according to an embodiment of the present invention.
  • FIG. 22 is a second structural diagram of a pan-tilt according to an embodiment of the present invention.
  • FIG. 23 is a schematic structural diagram of a movable platform provided by an embodiment of the present invention.
  • the three-axis attitude closed-loop controller of the pan/tilt is generally a position loop-speed loop dual-loop controller.
  • R tar is the end (camera) target attitude
  • R eb is the end (camera) measurement (fusion) attitude
  • ⁇ R is the attitude control error
  • C p is the position loop controller
  • C v is the speed loop controller
  • J -1 is the Jacobian inverse matrix
  • P is the controlled object (motor )
  • ⁇ b is the terminal angular velocity
  • Fusion is an inertial measurement unit (IMU) for data fusion; through the above-mentioned end target posture R tar and end angular velocity, dual-loop closed-loop control of the pan/tilt can be realized.
  • IMU inertial measurement unit
  • the Jacobian matrix corresponding to the gimbal describes the nonlinear mapping relationship between the angular velocity of each joint and the velocity in the end body coordinate system of the gimbal.
  • the Jacobian inverse matrix is usually used to map the position loop error and angular velocity to the joint angle space, that is, satisfy the formula
  • the control quantity under the body coordinate system is changed to the control quantity of each motor.
  • each motor will obtain the output torque required to realize the attitude control.
  • J is the Jacobian matrix.
  • the prior art proposes the following solutions: (a) Design structural limits in the neighborhood of singular points. (b) Design software limit in the neighborhood of singularity, or design to avoid trajectory to avoid singularity. (c) Redundant connecting rod design, the singularity is designed in the very useful area.
  • FIG. 2 is a schematic flow chart of a method for controlling a pan/tilt head provided by an embodiment of the present invention; in order to solve the problem that the stability of the pan/tilt control is affected by the neighborhood of singular points in the prior art, it is difficult to achieve accurate attitude control.
  • this embodiment provides a pan/tilt control method, wherein the pan/tilt may at least include a first support, a second support, and a third support for connecting a load, the load may be a camera , Video camera or any other device with shooting function.
  • the main body of the control method is the pan/tilt control device.
  • control device can be implemented as software or a combination of software and hardware; when the control device executes the control method, it can be implemented in the pan/tilt relative to When the neighborhood of the singular point is in different states, different control strategies are adopted to control the first bracket, the second bracket and the third bracket in the pan-tilt. Specifically, the method includes:
  • the pan/tilt head also includes a first motor 107, a second motor 108, and a third motor 109. One end of the first motor 107 is connected to the first bracket 101 through a rotating member 104.
  • the rotating member 104 is used to enable the first bracket 101 to rotate relative to the first motor 107, so that the pan/tilt can be switched between the storage state and the use state; and the other end of the first motor 107 is connected to the carrier 10,
  • the second motor 108 is arranged on the first support 101 for driving the second support 102 to rotate relative to the first support 101;
  • the third motor 109 is disposed on the second support 102 and is used to drive the third support 103 to rotate relative to the second support 102.
  • the pan/tilt is located in the neighborhood of the singular point: when the pan/tilt is at the singular point, the axis of the first motor 107, the axis of the second motor 108 and the axis of the third motor 109 are on the same plane , That is, the yaw axis, roll axis, and pitch axis of the pan/tilt are located on the same plane, and the second motor 108 is located at the preset joint angle; when the pan/tilt is in the neighborhood of the singular point, the first The axis of the motor 107, the axis of the second motor 108, and the axis of the third motor 109 are located or close to being on the same plane, that is, the yaw axis, roll axis and pitch axis of the pan/tilt are located or approximately on the same plane, so The second motor 108 is located within the preset joint angle range.
  • pan/tilt is an orthogonal pan/tilt or a non-orthogonal pan/tilt, as long as the axis of the first motor 107, the axis of the second motor 108, and the axis of the third motor 109 are on the same plane, it can be regarded as the pan/tilt. At a singularity.
  • the singular point neighborhood refers to an angular area located near the singular point.
  • the above-mentioned singular point can be calculated for the PTZ, and the specific range of the neighborhood can be set according to the needs of the user.
  • this embodiment does not limit the specific implementation of detecting whether the pan/tilt is located in the neighborhood of the singularity. Those skilled in the art can set it according to specific application requirements and design requirements. For example, the Jacques corresponding to the pan/tilt may be obtained.
  • the detecting whether the PTZ is located in the neighborhood of the singularity in this embodiment may include:
  • the joint angle of the second motor can be obtained through the angle sensor. After the joint angle of the second motor is obtained, the joint angle of the second motor can be compared with the angle range corresponding to the singular point neighborhood.
  • the joint angle of the second motor is within the angle range corresponding to the singular point neighborhood, where the angle range corresponding to the singular point neighborhood includes: at least two angular boundary values and The intermediate value of any angle between the two angle boundary values; the joint angle of the second motor is within the angle range corresponding to the singular point neighborhood.
  • the joint angle of the second motor is equal to any of the singular point neighborhoods
  • An intermediate value of the angle the joint angle of the second motor is equal to the boundary value of the angle corresponding to the neighborhood of the singular point.
  • the pan-tilt when the pan-tilt includes multiple supports, it can be detected whether the pan-tilt is located in the neighborhood of the singularity through the joint angles corresponding to the supports located in the middle part.
  • the pan/tilt includes a first support, a second support, a third support, and a fourth support for connecting the load, and a first motor for driving the first support to rotate relative to the carrier.
  • the second joint angle of the second motor and/or the third joint angle of the third motor can be obtained, and the second joint angle and/or the third joint angle can be used to detect whether the pan/tilt is located in the neighborhood of the singular point;
  • the second joint angle and/or the third joint angle are within the angle range corresponding to the singular point neighborhood, it is determined that the pan/tilt is located in the singular point neighborhood.
  • the second joint angle and/or the third joint angle are outside the angle range corresponding to the singular point neighborhood, it can be determined that the pan/tilt is outside the singular point neighborhood.
  • the target end posture and the measurement end posture of the gimbal can be obtained, where the target end posture can refer to the final posture that the load (camera) needs to reach on the gimbal, and the measurement end posture It can be a pointer to the current attitude measured by the load (camera) on the PTZ.
  • the end posture of the target can be specified by the user or input by the user, or the end posture of the target can be obtained by calculating the related parameters of the pan/tilt; while the end posture of the measurement can be obtained by detecting the load by the detection device, or, also It can be obtained by data fusion according to the inertial measurement unit (IMU) at the end.
  • IMU inertial measurement unit
  • an IMU can contain a three-axis accelerometer and a three-axis gyroscope, fusing the data of the three-axis accelerometer and the three-axis gyroscope, The end posture can be calculated.
  • an IMU may include a three-axis accelerometer, a three-axis gyroscope, and a three-axis magnetometer. By fusing the three-axis accelerometer, the three-axis gyroscope, and the three-axis magnetometer, the end posture can be calculated.
  • S3 Calculate the single-axis control component and the dual-axis control component according to the target end posture and the measured end posture; wherein the single-axis control component is related to the first support, and the dual-axis control component is related to the second support and the third support.
  • the target end attitude and the measurement end attitude can be analyzed and processed, so that the single-axis control component related to the first bracket and the dual-axis control component related to the second bracket and the third bracket can be obtained.
  • Axis control component it should be noted that for the first bracket, the second bracket and the third bracket, the single-axis control component is only related to the first bracket, and it is not related to the second and third brackets; the dual-axis control component is only related to the first bracket.
  • the second bracket is related to the third bracket, which is not related to the first bracket.
  • S4 Control the first bracket according to the single-axis control component, and control the second bracket and the third bracket according to the dual-axis control component.
  • the first support can be controlled according to the single-axis control component.
  • the second support and the third support can be controlled according to the dual-axis control component.
  • the existing three-axis attitude closed-loop controller is equivalently decoupled into two controllers. One controller is used to control the first support, and the other is used to control the second support and the third support.
  • the second bracket and the third bracket can be equivalent to a dual-axis gimbal, and the corresponding Jacobian matrix dimension is reduced to two-dimensional, which solves the problem of the singularity of the three-dimensional Jacobian matrix and avoids the singularity of the gimbal.
  • the neighborhood affects the stability of the control of the PTZ, which effectively ensures the precise control of the PTZ attitude.
  • the pan/tilt control method provided in this embodiment detects whether the pan/tilt is located in the neighborhood of the singular point.
  • the target end attitude and the measurement end attitude of the pan/tilt are acquired, and the target end attitude and the measurement end
  • the single-axis control component and the dual-axis control component of the attitude calculation realize the decoupling of the three brackets into a first bracket and a dual-axis bracket.
  • the dual-axis bracket includes the second bracket and the third bracket, and they are respectively
  • the single-axis control component and the dual-axis control component are used to decouple the movement of the first bracket, the second bracket, and the third bracket, which not only effectively realizes that when the pan/tilt is located in the neighborhood of the singular point, it can ensure the attitude of the pan/tilt. It is stable, and also expands the range of attitude control of the PTZ, further improves the practicability of the method, and is beneficial to market promotion and application.
  • Fig. 5 is a schematic diagram of a flow chart for calculating a single-axis control component based on the target end posture and a measured end posture provided by an embodiment of the present invention
  • Fig. 6 is an algorithm for calculating a single-axis control component based on the target end posture and the measured end posture provided by an embodiment of the present invention Schematic diagram; on the basis of the above embodiment, continue to refer to Figures 5 to 6, this embodiment does not limit the specific implementation of calculating the single-axis control component based on the target end posture and the measured end posture.
  • the single-axis control component can be obtained through the motor on the pan/tilt.
  • the motor on the pan/tilt may include the first motor 107.
  • a second motor 108 and a third motor 109 One end of the first motor 107 is connected to the first support 101, and the other end is connected to the carrier 10 for driving the first support 101 to rotate relative to the carrier 10;
  • the second motor 108 is arranged on the first bracket 101, and is used to drive the second bracket 102 to rotate relative to the first bracket 101;
  • the third motor 109 is arranged on the second bracket 102, It is used to drive the third bracket 103 to rotate relative to the second bracket 102.
  • calculating the single-axis control component based on the target end attitude and the measured end attitude may include:
  • the angle detection device can be used to detect the angle of the joint where the first motor is located, so that the first measured joint angle corresponding to the first motor can be obtained.
  • the angle detection device is used to separately detect the joint and the joint where the second motor is located. The angle detection is performed on the joint where the third motor is located, so that the second joint angle corresponding to the second motor and the third joint angle corresponding to the third motor can be obtained.
  • the Newton iterative algorithm is a method of numerical calculation in the inverse kinematics solution technology, and the inverse kinematics solution is used to calculate the joint angle corresponding to the end pose.
  • inverse kinematics has analytical solutions, but for complex non-orthogonal configurations or considering the non-orthogonal errors introduced by orthogonal configurations during assembly, general There is no unified inverse kinematics analytical solution for connecting rod configuration.
  • the solution can usually be calculated by numerical methods, such as Newton's iterative algorithm.
  • the initial value of the iterative joint angle can be set to the three joint angle measurement values at the moment of entering the singular control neighborhood.
  • the three joint angle measurements can refer to the first measured joint angle corresponding to the joint where the first motor is located.
  • the Newton iterative algorithm uses the Jacobian matrix. Since the Jacobian matrix is invertible except for the neighborhood of singular points, the newton iterative algorithm can be used to determine the target joint angle corresponding to the first motor.
  • the iteration step size ⁇ when entering the singular point neighborhood makes the Jacobian matrix always converge in other regions except the singular point neighborhood; among them, when the iteration step size ⁇ is adjusted, the closer the singular point is, The smaller the iteration step size is to adjust the iteration step size.
  • the first axis and the first axis of the first motor, the second motor and the third motor at the preset initial positions can be obtained.
  • the second axis and the third axis, where the preset initial position may refer to the position where the motor joint angle of the first motor, the second motor and the third motor is 0°.
  • the first axis and the second axis Both the and the third axis can be vectors representing information. Then, the forward kinematics formula and the parameters obtained above are used to calculate the measured joint posture corresponding to the measured joint angle ⁇ .
  • R j is the measured joint posture corresponding to the first motor, the second motor and the third motor.
  • the measured joint posture is the difference between the end posture and the handle posture.
  • the measured joint posture can be the difference between the end posture and the handle posture. Difference.
  • ⁇ 1 is the axis of the first motor at the preset initial position (in the body coordinate system)
  • ⁇ 2 is the axis of the second motor at the preset initial position (in the body coordinate system)
  • ⁇ 3 is the third motor Preset the axis of the initial position (under the body coordinate system), Is the axial antisymmetric matrix of the first motor at the preset initial position (under the body coordinate system), Is the axial antisymmetric matrix of the second motor at the preset initial position (under the body coordinate system), Is the axial antisymmetric matrix of the third motor at the preset initial position (under the body coordinate system);
  • ⁇ 1 , ⁇ 2 and ⁇ 3 are the first motor corresponding to the first motor, the second motor and the third motor.
  • the joint angle can refer to the three joint angle measurement values at the moment of entering the neighborhood of the singular point (respectively with the first One motor, the second motor and the third motor correspond).
  • the joint angle can be measured by sensors such as Hall sensors and magnetic encoders.
  • the measured joint posture R j After the measured joint posture R j is obtained, the measured joint posture R j and the measured end posture (measurement camera posture) R eb can be used to calculate the handle measurement posture R h .
  • R h is the measured posture of the handle
  • Reb is the measured end posture
  • R j -1 is the inverse matrix of the measured joint posture.
  • the measured posture of the handle may be calculated by fusion of a vision sensor or an IMU and a compass.
  • R h is the measured attitude of the handle
  • the iterative target end pose can be calculated Iterative attitude error ⁇ R (k) from the target end attitude R tar .
  • ⁇ R (k) is the iterative attitude error
  • R tar is the target end attitude
  • ⁇ (k) is the iterative joint angle error corresponding to the target joint angle
  • ⁇ (k) is the axis angle representation of the iterative attitude error.
  • the iterative target joint angle may include the first target joint angle corresponding to the first motor The second target joint angle corresponding to the second motor And the third target joint angle corresponding to the third motor
  • is the iteration step coefficient
  • ⁇ (k) is the iteration joint angle error
  • the iterative convergence speed is fast. Normally, only one iteration is performed in each control cycle to obtain the target joint angle corresponding to the first motor.
  • the target joint angle can be determined as a single-axis control component, so that the first bracket can be closed-loop controlled according to the target joint angle, as shown in Figure 7, after the target joint angle ⁇ tar1 is obtained ,
  • the target joint angle ⁇ tar1 can be input to the position loop controller C p , so that the position information d corresponding to the target joint angle ⁇ tar1 can be obtained, and then the controlled object P (first motor) can be performed using the position information d
  • the measured joint angle ⁇ 1 corresponding to the first motor can be obtained, and then the measured joint angle ⁇ 1 and the target joint angle ⁇ tar1 are used to control the first motor again, so as to realize the use of the target joint angle through the first motor.
  • the first bracket performs closed-loop control.
  • Obtaining the single-axis control component in the above manner effectively guarantees the accuracy and reliability of the acquisition of the single-axis control component, thereby improving the stability and reliability of the control of the first bracket based on the single-axis control component.
  • Figure 8 is a schematic diagram of a flow chart for calculating a dual-axis control component based on the target end pose and the measured end pose provided by an embodiment of the present invention; on the basis of the foregoing embodiment, with continued reference to Figure 8, the present embodiment is
  • the specific implementation of the calculation of the dual-axis control component and the measurement of the terminal posture are not limited, and those skilled in the art can set it according to specific application requirements and design requirements.
  • Calculation of dual-axis control components can include:
  • the angle detection of the end (camera) of the pan-tilt can be performed by an angular velocity sensor, so that the end angular velocity of the pan-tilt can be obtained.
  • S35 Determine the dual-axis control component according to the target end attitude, the measured end attitude and the end angular velocity.
  • the target terminal attitude, the measured terminal attitude and the terminal angular velocity can be used to determine the dual-axis control component.
  • the dual-axis control component can be determined according to the target terminal attitude, the measured terminal attitude and the terminal angular velocity.
  • Control components can include:
  • S351 Determine the attitude control error of the PTZ according to the target end attitude and the measured end attitude.
  • the target end posture and the measurement end posture can be compared, so that the attitude control error of the pan/tilt can be determined.
  • the attitude control error can be the difference between the target end attitude and the measured end attitude; or the attitude control error can also be the ratio of the measured end attitude to the target end attitude; or the attitude control error can also be (target end attitude -Measuring the ratio of the end posture of the target) to the end posture of the target; specifically, those skilled in the art can use different methods to determine the attitude control error of the PTZ according to different design requirements, which will not be repeated here.
  • S352 Determine the dual-axis control component according to the attitude control error and the terminal angular velocity.
  • determining the dual-axis control component according to the attitude control error and the terminal angular velocity in this embodiment may include:
  • the local end angular velocity can include:
  • S35211 Map the attitude control error and the end angular velocity to the joint angle space, and obtain the joint angle control error and the joint angular velocity corresponding to the first motor, the second motor, and the third motor.
  • S35213 Map the local joint angle control error and the local joint angular velocity back to the body coordinate system to obtain the local attitude control error and the local end angular velocity related to the second bracket and the third bracket.
  • the movement of the first bracket needs to be decoupled from the movement of the second bracket and the third bracket.
  • the movement of the first bracket, the movement of the second bracket and the movement of the third bracket are regarded as three-dimensional movement, the movement of the second bracket and the movement of the third bracket need to be decoupled from the three-dimensional movement.
  • the attitude control error ⁇ R and the end angular velocity ⁇ b are respectively mapped to the joint angle space to obtain the joint angle control error ⁇ e and the joint angular velocity
  • the joint angle control error ⁇ e and the joint angular velocity need to be Joint angle control error in the direction of the motor shaft of the first motor And joint angular velocity Set to zero to obtain the local joint angle control error in the axial direction of the second motor and the axial direction of the third motor And local joint angular velocity which is:
  • the structure can be regarded as a two-link structure, and the three-dimensional attitude control also becomes a two-dimensional attitude control.
  • Jacobian matrix Also reduced to two-dimensional, there is no singularity:
  • the position loop input is the attitude control error after decoupling
  • the velocity loop feedback is the body angular velocity after decoupling
  • the mapping relationship from the body coordinate system to the joint angle space is changed to a two-dimensional Jacobian inverse matrix
  • the local attitude control error and the local end angular velocity are obtained through the above method, which effectively realizes the decoupling of the movement of the first bracket, the movement of the second bracket, and the movement of the third bracket, so as to obtain the connection between the second bracket and the third bracket.
  • the local attitude control error and the local terminal angular velocity related to the support further improve the stability and reliability of the attitude control of the movement of the second support and the third support.
  • S3522 Determine the dual-axis control component according to the local attitude control error and the local end angular velocity.
  • the biaxial control component can be determined according to the local attitude control error and the local terminal angular velocity. Specifically, one possible way is to determine the local attitude control error and the local terminal angular velocity. It is a dual-axis control component; alternatively, the local attitude control error and local end angular velocity can be analyzed and processed, and the dual-axis control component can be determined according to the analysis and processing results.
  • the second support and the third support can be controlled according to the local attitude control error and the local end angular velocity.
  • the control of the second bracket and the third bracket according to the dual-axis control component at this time may include the following processes: (1) After acquiring the target end (camera) attitude R tar and measuring (fusion) end after (camera) pose R eb, can be obtained according to the target posture terminal R tar and R eb posture measuring tip attitude control error ⁇ R, then for attitude control error ⁇ R, obtain the local attitude control error Local attitude control error Input to the position loop controller C p to obtain the target end angular velocity, and map the target end angular velocity to the joint angular space through the Jacobian inverse matrix to obtain the target joint angular velocity;
  • steps S34-S35 and steps S31-S33 in this embodiment is not limited to the order shown by the serial number, that is, steps S34-S35 can also be executed before steps S31-S33. Alternatively, steps S34-S35 can also be executed simultaneously with steps S31-S33.
  • the two-axis control component (that is, the local attitude control error And local end angular velocity ), which effectively guarantees the accuracy and reliability of the acquisition of the dual-axis control component, thereby improving the stability and reliability of the control of the movement posture of the second bracket and the third bracket based on the dual-axis control component.
  • Figure 14 is a schematic flow chart of another method for controlling a pan/tilt head provided by an embodiment of the present invention; on the basis of the above-mentioned embodiment, referring to FIG. 14, after determining that the pan/tilt head is located outside the neighborhood of a singular point, in this embodiment
  • the method can also include:
  • S201 Calculate the three-axis control component according to the target end posture of the load and the measured end posture, where the three-axis control component is related to the first support, the second support, and the third support.
  • S202 Control the first support, the second support and the third support according to the three-axis control components.
  • the first bracket, the second bracket, and the third bracket can be controlled by the aforementioned three-axis attitude closed-loop controller.
  • the first bracket and the second bracket are controlled according to the three-axis control components. Controlling with the third bracket can include the following processes:
  • terminal (camera) pose R eb in access to the target terminal (the camera) pose R tar and measuring (fusion) can be obtained pose the target terminal posture R tar and measuring tip attitude R eb control error [delta] R, and will pose
  • the control error ⁇ R is input to the position loop controller C p to obtain the target end angular velocity, and the target end angular velocity is mapped to the joint angular space through the Jacobian inverse matrix to obtain the target joint angular velocity;
  • Fig. 15 is a schematic flow chart of yet another method for controlling a pan/tilt head provided by an embodiment of the present invention; on the basis of any of the above embodiments, referring to Fig. 15, the method in this embodiment may further include:
  • the state where the pan/tilt is located in the neighborhood of the singular point is called the pan/tilt in the singular point control mode
  • the state where the pan/tilt is located outside the neighborhood of the singular point is called the pan/tilt in the three-axis control mode
  • the pan/tilt can be in different control modes, and the different control modes of the pan/tilt can be switched, for example: the pan/tilt is located in the neighborhood of the singularity at the current moment, and outside the neighborhood of the singularity at the previous moment , That is, the pan/tilt is switched from the three-axis control mode at the last moment to the singular point control mode at the current moment; or, the pan/tilt is located outside the singular point neighborhood at the current moment, and is located in the singular point neighborhood at the previous moment, that is, cloud
  • the station is switched from the singular point neighborhood mode at the previous moment to the three-axis control mode at the current moment.
  • the first driving signal of the pan-tilt at the previous moment and the second driving signal at the current moment can be obtained.
  • the driving signal where the first driving signal and the second driving signal can be in any of the following forms: control torque, rotational speed signal, voltage signal, current signal, and so on.
  • S302 Determine at least one smooth transition signal according to the first driving signal and the second driving signal.
  • the determination of at least one smooth transition signal by a driving signal and a second driving signal may include:
  • obtaining the weighting coefficient corresponding to the first driving signal may include:
  • S30211 Acquire the preset switching time and the switching time for performing the switching operation.
  • the switching time is the total time required for the pan/tilt to perform the control mode switching operation, and the switching time may be specified by the user or pre-configured by the user.
  • the switching time refers to the time that the pan/tilt head performs the control mode switching operation. For example: the switching time is 5min and the switching start time is 12:00, then the switching end time 12:05 corresponding to the switching start time 12:00 can be determined according to the switching time 5min, and the switching time is the switching start time 12: Either time between 00 and the switching end time 12:05.
  • is the weighting coefficient
  • t 0 is the switching time
  • t is the switching time
  • the weighting coefficient and the switching time meet a linear relationship, and as the switching time changes continuously, the weighting coefficient will also change.
  • the relationship between the weighting coefficient and the switching time and the switching time in this embodiment is not limited to the above-exemplified formulas, and those skilled in the art can also according to different application scenarios, different control parameters and operating conditions,
  • the correspondence between the weighting coefficient and the switching time is determined to be other linear or non-linear mapping relations, which will not be repeated here.
  • S3022 Determine at least one smooth transition signal by using the weighting coefficient, the first driving signal and the second driving signal.
  • the following formula may be used to determine at least one smooth transition signal:
  • T is the smooth transition signal
  • is the weighting coefficient
  • T former is the first driving signal
  • T latter is the second driving signal.
  • the pan/tilt can be driven to move based on the smooth transition signal. Specifically, the pan/tilt can be adjusted from the first drive signal and the smooth transition signal to the second drive signal. It should be noted that when driving the cloud During the movement of the platform, the first drive signal and the second drive signal change in real time, and the drive signal during the switching transition period is determined by the first drive signal and the second drive signal together; During the mode switching, the movement of the pan/tilt can be smoothly transitioned, thereby ensuring the stability and reliability of the pan/tilt.
  • the smooth processing of the gimbal switching back and forth between the three-axis control mode and the singular point control mode is effectively realized, so that the gimbal has no jitter during the switching process, thus ensuring the stability and reliability of the load work. It also ensures the stability and reliability of the pan-tilt work, and further improves the practicability of the method.
  • this application embodiment provides a pan/tilt control method.
  • the pan/tilt control method can be used to control the first bracket and the second bracket when the pan/tilt is located in the neighborhood of the singular point.
  • the first motor, the second motor and the third motor controlled by the support and the third support are decoupled into a first motor and a biaxial stabilizer (including: a second motor for controlling the second support and a
  • the three-axis attitude closed-loop controller for controlling the first motor, the second motor and the third motor can also be decoupled into two controllers.
  • the first controller is a joint angle closed loop controller for controlling the first motor.
  • the joint angle closed-loop controller when using the joint angle closed-loop controller to control the first motor, it is necessary to first solve it through inverse kinematics to calculate the target joint angle corresponding to the target end posture, and then use the target joint angle of the first motor and the measurement of the angle sensor
  • the joint angle performs closed-loop control of the joint angle of the first motor.
  • the other controller is a dual-axis attitude closed-loop controller for controlling the second motor and the third motor.
  • a dual-axis attitude closed-loop controller to control the second motor and the third motor, firstly, it is necessary to separate the attitude control error and the angular velocity component in the direction of the first motor, and keep the attitude control error and angular velocity in the second motor and The component in the third motor direction.
  • the structure of the second motor and the third motor can be equivalent to a two-axis stabilizer, thereby reducing the dimension of the Jacobian matrix to two dimensions, solving the problem of the singularity of the Jacobian matrix.
  • the position loop-speed loop posture closed-loop controller of the dimension is used to control the second motor and the third motor.
  • the PTZ control method includes the following steps:
  • Step1 Perform singularity judgment for the gimbal, obtain the joint angle of the second motor on the gimbal, and judge the control mode of the gimbal according to the joint angle of the second motor.
  • step2 When the joint angle of the second motor is within the angle range corresponding to the singular point neighborhood, determine that the gimbal is in singular point control mode; if the joint angle of the second motor is not within the angle range corresponding to the singular point neighborhood , It is determined that the pan/tilt is in three-axis control mode.
  • step31 When the pan/tilt is in the three-axis control mode, the three-axis control value used to control the first, second and third supports can be obtained. According to the three-axis control value, the first motor and the second The second motor and the third motor control the first support, the second support and the third support.
  • step32 When the gimbal is in the singular point control mode, calculate the target joint angles of the three motors corresponding to the target end posture through inverse kinematics, and obtain the target joint angle of the first motor from the target joint angle; at the same time; , Decoupling the movement of the first motor from the movement of the second motor and the third motor to obtain the local attitude control error and the local terminal angular velocity for controlling the second motor and the third motor.
  • Step4 According to the target joint angle, the first bracket is driven by the first motor for closed-loop control; according to the local attitude control error and the local end angular velocity, the second motor and the third motor are used to drive the second bracket and the third bracket for closed-loop control.
  • the method in this embodiment may further include:
  • Step11 Detect whether the control mode of the pan/tilt has been switched, and when it is determined that the control mode of the pan/tilt is switched, the switching process of the control mode of the pan/tilt can be smoothly processed.
  • Controlling the gimbal through the above-mentioned gimbal control method not only expands the range of gimbal attitude control; moreover, it can ensure the stable performance of the gimbal in the neighborhood of the singularity; specifically, it can make the gimbal under different motion conditions Down (such as pushing the rocker, turning the handle and pushing where to stop, etc.), the movement decoupling is realized, and the stability and reliability of the pan/tilt and load are further improved.
  • FIG. 19 is a schematic structural diagram of a pan/tilt control device provided by an embodiment of the present invention. referring to FIG. 19, this embodiment provides a pan/tilt control device that can perform the above-mentioned pan/tilt control The method, wherein the pan-tilt at least includes a first support, a second support, and a third support for connecting a load, which are sequentially connected; specifically, the pan-tilt control device includes:
  • the detection module 11 is used to detect whether the pan-tilt is located in a preset singularity neighborhood
  • the acquiring module 12 is used to acquire the target end attitude and the measurement end attitude of the pan/tilt when the pan/tilt is located in the neighborhood of the singularity;
  • the calculation module 13 is used to calculate the single-axis control component and the dual-axis control component according to the target end attitude and the measured end attitude; wherein the single-axis control component is related to the first support, and the dual-axis control component is related to the second support and the third support ;
  • the control module 14 is used to control the first support according to the single-axis control component, and to control the second support and the third support according to the dual-axis control component.
  • the device shown in FIG. 19 can also execute the methods of the embodiments shown in FIG. 1 to FIG. 17.
  • parts that are not described in detail in this embodiment please refer to the related descriptions of the embodiments shown in FIG. 1 to FIG. 17.
  • the implementation process and technical effects of this technical solution refer to the description in the embodiment shown in FIG. 1 to FIG. 17, and will not be repeated here.
  • the structure of the pan/tilt control device shown in FIG. 19 can be implemented as an electronic device, which can be various devices such as a mobile phone, a tablet computer, and a server.
  • the electronic device may include: one or more processors 21 and one or more memories 22.
  • the memory 22 is used to store a program that supports the electronic device to execute the pan/tilt control method provided in the embodiments shown in FIG. 1 to FIG. 17.
  • the pan/tilt at least includes a first bracket, a second bracket, and a load connected in sequence.
  • the processor 21 is configured to execute a program stored in the memory 22. specific,
  • the program includes one or more computer instructions, and when one or more computer instructions are executed by the processor 21, the following steps can be implemented:
  • the single-axis control component and the dual-axis control component are calculated by measuring the end attitude; the single-axis control component is related to the first support, and the dual-axis control component is related to the second support and the third support; the first support is performed according to the single-axis control component Control and control the second bracket and the third bracket according to the dual-axis control component.
  • the structure of the pan/tilt control device may further include a communication interface 23 for the electronic device to communicate with other devices or a communication network.
  • the pan/tilt head further includes: a first motor, a second motor, and a third motor, one end of the first motor is connected to the first support, and the other end is connected to the carrier, and is used to drive the first support Rotate relative to the carrier; the second motor is arranged on the first support, and is used to drive the second support to rotate relative to the first support; the third motor is arranged on the second support , Used to drive the third bracket to rotate relative to the second bracket; when the processor 21 calculates the single-axis control component according to the target end attitude and the measured end attitude, the processor 21 may be used to execute: Motor, second motor and third motor corresponding to the first measurement joint angle, second measurement joint angle and third measurement joint angle; according to the target end posture, measurement end posture, first measurement joint angle, and second measurement joint angle And the third measuring joint angle, using Newton iterative algorithm to determine the target joint angle corresponding to the first motor; determining the target joint angle as a single-axis control component.
  • the processor 21 when the processor 21 calculates the dual-axis control component according to the target end posture and the measured end posture, the processor 21 can be used to execute: obtain the end angular velocity of the pan/tilt; determine according to the target end posture, the measured end posture and the end angular velocity Two-axis control component.
  • the processor 21 may be used to execute: determine the attitude control error of the pan/tilt according to the target end posture and the measured end posture;
  • the two-axis control component is determined according to the attitude control error and the end angular velocity.
  • the processor 21 determines the dual-axis control component according to the attitude control error and the end angular velocity
  • the processor 21 can be used to execute: for the attitude control error and the end angular velocity, removing the attitude control error and the end angular velocity and the first bracket
  • the related components generate the local attitude control error and the local end angular velocity related to the second support and the third support; the dual-axis control component is determined according to the local attitude control error and the local end angular velocity.
  • the processor 21 removes the components related to the first support from the attitude control error and the end angular velocity, and generates the local attitude control error and the local end angular velocity related to the second support and the third support.
  • the processor 21 can be used to perform: map the attitude control error and the end angular velocity into the joint angle space, and obtain the joint angle control error and the joint angular velocity corresponding to the first motor, the second motor, and the third motor; Joint angle control error and joint angular velocity, set the joint angle control error and joint angular velocity in the axial direction of the first motor to zero, and obtain the local joint angle control error in the axial direction of the second motor and the third motor.
  • the local joint angular velocity; the local joint angle control error and the local joint angular velocity are mapped back to the body coordinate system to obtain the local attitude control error and the local end angular velocity related to the second bracket and the third bracket.
  • the processor 21 may be used to execute: obtain the joint angle of the second motor; When the angle is within the range, it is determined that the pan/tilt is located in the neighborhood of the singular point; or, when the joint angle of the second motor is within the corresponding angle range outside the neighborhood of the singularity, it is determined that the pan/tilt is located outside the neighborhood of the singularity.
  • the processor 21 may be used to execute: calculate the three-axis control component according to the target end posture of the load and the measured end posture, where the three-axis control component is related to the first support, The second support is related to the third support; the first support, the second support and the third support are controlled according to the three-axis control components.
  • the processor 21 is further configured to: if the pan/tilt is located in the neighborhood of the singular point at the current moment, it is located outside the neighborhood of the singularity at the previous moment; or, if the pan/tilt is located outside the neighborhood of the singular point at the current moment, at the previous moment When located in the neighborhood of the singular point, obtain the first drive signal of the pan/tilt at the previous moment and the second drive signal at the current moment; determine at least one smooth transition signal according to the first drive signal and the second drive signal; based on the smooth transition The signal drives the pan/tilt to move.
  • the processor 21 may be used to execute: obtain a weighting coefficient corresponding to the first driving signal; use the weighting coefficient, The first drive signal and the second drive signal determine at least one smooth transition signal.
  • the processor 21 when the processor 21 obtains the weighting coefficient corresponding to the first driving signal, the processor 21 may be used to perform: obtain the preset switching time and the switching time for the switching operation; determine according to the switching time and the switching time Weighting factor.
  • the device shown in FIG. 20 can execute the method of the embodiment shown in FIG. 1 to FIG. 17.
  • parts that are not described in detail in this embodiment refer to the related description of the embodiment shown in FIG. 1 to FIG. 17.
  • the implementation process and technical effects of this technical solution refer to the description in the embodiment shown in FIG. 1 to FIG. 17, and will not be repeated here.
  • an embodiment of the present invention provides a computer-readable storage medium, the storage medium is a computer-readable storage medium, and the computer-readable storage medium stores program instructions, and the program instructions are used to implement the cloud of FIG. 1 to FIG. Station control method.
  • FIG. 21 is a schematic structural diagram of a pan/tilt provided by an embodiment of the present invention
  • FIG. 22 is a schematic structural diagram of a pan/tilt provided by an embodiment of the present invention. Referring to FIGS. 21-22, this embodiment provides A pan/tilt 100, which includes at least
  • the control device is used to control the first bracket 101, the second bracket 102 and the third bracket 103.
  • the pan/tilt head 100 in this embodiment specifically includes a bracket part for carrying a load 200, and the bracket part is used to mount the load 200 on the handheld carrier 10 to allow the above
  • the handheld carrier 10 carries the above-mentioned load 200 for operation.
  • the load 200 may be an image acquisition device (for example, a photographing device), a heat source detection device, a life detection device, and the like.
  • the bracket part of the pan/tilt head 100 may include multiple brackets. Specifically, in the illustrated embodiment, the bracket part includes a first bracket 101, a second bracket 102, and a third bracket 103 that are sequentially connected; the first bracket 101 described above. It is used to rotatably connect the handheld carrier 10 so that the handheld pan/tilt 100 can be rotatably connected to the handheld carrier 10 through the first bracket 101.
  • the pan/tilt head 100 also includes a first motor 107, a second motor 108, and a third motor 109.
  • first motor 101 is connected to the first support 101, and the other end is connected to the carrier 10 for driving the
  • the first support 101 rotates relative to the carrier 10
  • the second motor 108 is arranged on the first support 101, and is used to drive the second support 102 to rotate relative to the first support 101
  • the three motors 109 are arranged on the second support 102 and are used to drive the third support 103 to rotate relative to the second support 102.
  • the third bracket 103 is connected to the clamping portion 105, and the clamping portion 105 is used to carry the load 200; it is understood that in other embodiments, the number of brackets included in the bracket portion may be one, two, or four. Or more.
  • the processor is further configured to: obtain the first measured joint angle and the second measured joint angle corresponding to the first motor, the second motor, and the third motor, respectively. Measure the joint angle and the third measurement joint angle; according to the target end posture, the measurement end posture, the first measurement joint angle, the second measurement joint angle and the third measurement joint angle, the Newton iterative algorithm is used to determine the relationship with the first motor The corresponding target joint angle; the target joint angle is determined as the single-axis control component.
  • the aforementioned handheld carrier 10 is used for the user to hold.
  • the above-mentioned load 200 is a photographing device.
  • the photographing device may be a camera, a video camera, a mobile phone, etc. for daily photography.
  • the aforementioned photographing device may also be in other forms, such as an ultrasonic imaging device, an infrared imaging device, and so on. The user can carry out photographing operations by carrying the load 200 on the handheld platform 100.
  • the processor is further configured to: obtain the terminal angular velocity of the pan/tilt; and determine the dual-axis control component according to the target terminal posture, the measured terminal posture, and the terminal angular velocity.
  • the processor is further configured to: determine the attitude control error of the pan/tilt according to the target end attitude and the measured end attitude; and determine the dual-axis control component according to the attitude control error and the end angular velocity.
  • the processor is further configured to: for the attitude control error and the end angular velocity, remove the components related to the first support in the attitude control error and the end angular velocity, and generate a connection with the second support
  • the local attitude control error and the local end angular velocity related to the third bracket is determined according to the local attitude control error and the local end angular velocity.
  • the processor is further configured to: map the attitude control error and the end angular velocity to the joint angle space to obtain joint angle control errors corresponding to the first motor, the second motor, and the third motor And the joint angular velocity; for the joint angle control error and the joint angular velocity, the joint angle control error and the joint angular velocity in the axial direction of the first motor are set to zero to obtain the axial and the joint angular velocity of the second motor.
  • the local joint angle control error and the local joint angular velocity in the axial direction of the third motor; the local joint angle control error and the local joint angular velocity are mapped back to the body coordinate system to obtain the local related to the second bracket and the third bracket Attitude control error and local end angular velocity.
  • the processor is further configured to: obtain the joint angle of the second motor; when the joint angle of the second motor is within the angle range corresponding to the singular point neighborhood, determine that the pan/tilt is located at the singularity Point neighborhood; or, when the joint angle of the second motor is within the angle range corresponding to the singular point neighborhood, it is determined that the pan/tilt is located outside the singular point neighborhood.
  • the processor is further configured to calculate a three-axis control component according to the target end attitude and the measured end attitude of the payload, wherein the three-axis control The components are related to the first support, the second support and the third support; the first support, the second support and the third support are controlled according to the three-axis control component.
  • the processor is further configured to: if the pan/tilt is located in the neighborhood of the singularity at the current moment, it was located outside the neighborhood of the singularity at the previous moment; or, if the pan/tilt is located near the singularity at the current moment Outside the domain, when the previous moment is in the neighborhood of the singularity, the first drive signal of the pan/tilt at the previous moment and the second drive signal of the current moment are acquired; according to the first drive signal and the second drive signal
  • the driving signal determines at least one smooth transition signal; based on the smooth transition signal, the pan/tilt is driven to move.
  • the processor is further configured to: obtain a weighting coefficient corresponding to the first driving signal; and use the weighting coefficient, the first driving signal, and the second driving signal to determine at least one smooth transition signal.
  • the processor is further configured to: obtain a preset switching time and a switching time for performing a switching operation; and determine the weighting coefficient according to the switching time and the switching time.
  • pan/tilt platform control device corresponding to FIG. 20.
  • details please refer to the foregoing statement content, and will not be repeated here.
  • FIG. 23 is a schematic structural diagram of a movable platform provided by an embodiment of the present invention. referring to FIG. 23, it can be seen that another aspect of this embodiment provides a movable platform, and the movable platform is at least one of the following: none Human aerial vehicles, unmanned ships, unmanned vehicles; specifically, the movable platform includes:
  • the power system 302 is arranged on the body 301 and is used to provide power for the movable platform;
  • the pan-tilt 303 is installed on the body 301.
  • the related detection device for example: IMU
  • the method disclosed may be implemented in other ways.
  • the embodiments of the remote control device described above are merely illustrative.
  • the division of the modules or units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components. Can be combined or integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, remote control devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present invention essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to make a computer processor (processor) execute all or part of the steps of the method described in each embodiment of the present invention.
  • the aforementioned storage media include: U disk, mobile hard disk, Read-Only Memory (ROM), Random Access Memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes.

Abstract

A cradle head control method and device, a cradle head and a storage medium, the cradle head at least comprising a first support (101), a second support (102) and a third support (103) used for connecting a load, which are connected in sequence. The cradle head control method comprises: detecting whether the cradle head is located in a preset singular point neighborhood (S1); when the cradle head is located in the the singular point neighborhood, obtaining a target end attitude of the cradle head and measuring the end attitude (S2); calculating a single-axis control component and a dual-axis control component according to the target end attitude and the measured end attitude, the single-axis control component relating to the first support, and the dual-axis control component relating to the second support and the third support (S3); and controlling the first support according to the single-axis control component, and controlling the second support and the third support according to the dual-axis control component (S4).

Description

云台控制方法、装置、云台和存储介质PTZ control method, device, PTZ and storage medium 技术领域Technical field
本发明涉及控制领域,尤其涉及一种云台控制方法、装置、云台和存储介质。The invention relates to the field of control, and in particular to a pan-tilt control method, device, pan-tilt and storage medium.
背景技术Background technique
物理上把一个存在又不存在的点称为奇点(或奇异点)。在机械领域中,奇异点可以是指机械臂处于某一个特定的关节位置组合时,末端失去某个方向的自由度。Physically, a point that exists but does not exist is called a singularity (or singularity). In the mechanical field, a singular point can mean that the end of the robotic arm loses a certain degree of freedom in a certain direction when the robot arm is in a certain combination of joint positions.
目前,云台在奇异点及其邻域时,因为与云台相对应的雅克比矩阵奇异或者接近奇异,那么通过雅克比逆矩阵,把由末端惯性测量模块测量的速度映射到的关节角空间的角速度及其噪声将会非常大,进而会影响云台控制的稳定性,导致难以实现姿态的准确控制。At present, when the gimbal is at the singular point and its neighborhood, because the Jacobian matrix corresponding to the gimbal is singular or close to singular, the speed measured by the end inertial measurement module is mapped to the joint angle space through the Jacobian inverse matrix The angular velocity and its noise will be very large, which will affect the stability of the pan/tilt control and make it difficult to achieve accurate attitude control.
发明内容Summary of the invention
本发明提供了一种云台控制方法、装置、云台和存储介质,用于解决现有技术中存在的因奇异点邻域而影响云台控制的稳定性,难以实现姿态准确控制的问题。The invention provides a pan/tilt control method, device, pan/tilt and storage medium, which are used to solve the problems in the prior art that the stability of the pan/tilt control is affected by the neighborhood of singular points, and it is difficult to achieve accurate posture control.
本发明的第一方面是为了提供一种云台控制方法,所述云台至少包括依次连接的第一支架、第二支架和用于连接负载的第三支架;所述方法包括:The first aspect of the present invention is to provide a pan-tilt control method, the pan-tilt at least includes a first support, a second support and a third support for connecting a load connected in sequence; the method includes:
检测所述云台是否位于预设的奇异点邻域;Detecting whether the PTZ is located in the neighborhood of a preset singularity;
当所述云台位于奇异点邻域时,获取所述云台的目标末端姿态和测量末端姿态;When the pan/tilt is located in the neighborhood of a singular point, acquiring the target end attitude and the measurement end attitude of the pan/tilt;
根据所述目标末端姿态和测量末端姿态计算单轴控制分量和双轴控制分量;其中,所述单轴控制分量与所述第一支架相关,所述双轴控制分量与所述第二支架和第三支架相关;The single-axis control component and the dual-axis control component are calculated according to the target end attitude and the measured end attitude; wherein the single-axis control component is related to the first support, and the dual-axis control component is related to the second support and The third bracket is related;
根据所述单轴控制分量对所述第一支架进行控制,并根据所述双轴控制分量对所述第二支架和第三支架进行控制。The first bracket is controlled according to the single-axis control component, and the second bracket and the third bracket are controlled according to the dual-axis control component.
本发明的第二方面是为了提供一种云台的控制装置,所述云台至少包括依次连接的第一支架、第二支架和用于连接负载的第三支架;所述控制装置包括:The second aspect of the present invention is to provide a control device for a pan/tilt head, the pan/tilt head at least includes a first bracket, a second bracket and a third bracket for connecting a load, which are connected in sequence; the control device includes:
存储器,用于存储计算机程序;Memory, used to store computer programs;
处理器,用于运行所述存储器中存储的计算机程序以实现:检测所述云台是否位于预设的奇异点邻域;当所述云台位于奇异点邻域时,获取所述云台的目标末端姿态和测量末端姿态;根据所述目标末端姿态和测量末端姿态计算单轴控制分量和双轴控制分量;其中,所述单轴控制分量与所述第一支架相关,所述双轴控制分量与所述第二支架和第三支架相关;根据所述单轴控制分量对所述第一支架进行控制,并根据所述双轴控制分量对所述第二支架和第三支架进行控制。The processor is configured to run a computer program stored in the memory to realize: detecting whether the pan/tilt is located in the neighborhood of a preset singularity; when the pan/tilt is located in the neighborhood of the singularity, acquiring the information of the pan/tilt The target end posture and the measurement end posture; the single-axis control component and the dual-axis control component are calculated according to the target end posture and the measured end posture; wherein, the single-axis control component is related to the first bracket, and the dual-axis control The component is related to the second support and the third support; the first support is controlled according to the single-axis control component, and the second support and the third support are controlled according to the dual-axis control component.
本发明的第三方面是为了提供一种云台控制设备,所述云台至少包括依次连接的第一支架、第二支架和用于连接负载的第三支架;所述控制设备包括:The third aspect of the present invention is to provide a pan-tilt control device, the pan-tilt at least includes a first support, a second support and a third support for connecting a load connected in sequence; the control device includes:
检测模块,用于检测所述云台是否位于预设的奇异点邻域;The detection module is used to detect whether the pan/tilt is located in the neighborhood of a preset singularity;
获取模块,用于当所述云台位于奇异点邻域时,获取所述云台的目标末端姿态和测量末端姿态;An acquiring module, configured to acquire the target end attitude and measurement end attitude of the pan/tilt when the pan/tilt is located in the neighborhood of the singularity;
计算模块,用于根据所述目标末端姿态和测量末端姿态计算单轴控制分量和双轴控制分量;其中,所述单轴控制分量与所述第一支架相关,所述双轴控制分量与所述第二支架和第三支架相关;The calculation module is used to calculate a single-axis control component and a dual-axis control component according to the target end posture and the measured end posture; wherein the single-axis control component is related to the first bracket, and the dual-axis control component is related to the The second bracket is related to the third bracket;
控制模块,用于根据所述单轴控制分量对所述第一支架进行控制,并根据所述双轴控制分量对所述第二支架和第三支架进行控制。The control module is configured to control the first bracket according to the single-axis control component, and control the second bracket and the third bracket according to the dual-axis control component.
本发明的第四方面是为了提供一种云台,其特征在于,至少包括:The fourth aspect of the present invention is to provide a pan/tilt head, which is characterized in that it includes at least:
依次连接的第一支架、第二支架和用于连接负载的第三支架;The first support, the second support and the third support for connecting the load connected in sequence;
上述第二方面所述的云台控制装置,所述控制装置用于对所述第一支架、第二支架和第三支架进行控制。In the pan-tilt control device of the second aspect described above, the control device is used to control the first bracket, the second bracket, and the third bracket.
本发明的第五方面是为了提供一种计算机可读存储介质,所述存储介质为计算机可读存储介质,该计算机可读存储介质中存储有程序指令,所述程序指令用于第一方面所述的云台控制方法。The fifth aspect of the present invention is to provide a computer-readable storage medium, the storage medium is a computer-readable storage medium, the computer-readable storage medium stores program instructions, and the program instructions are used in the first aspect. The described PTZ control method.
本发明提供的云台控制方法、装置、云台和存储介质,当所述云台位于 奇异点邻域时,通过获取所述云台的目标末端姿态和测量末端姿态,根据所述目标末端姿态和测量末端姿态计算单轴控制分量和双轴控制分量,实现了将三个支架的云台解耦成一个第一支架和一个双轴支架,其中,双轴支架包括第二支架和第三支架,并分别利用单轴控制分量和双轴控制分量对第一支架、第二支架和第三支架的运动进行解耦控制,不仅有效地实现了在云台位于奇异点邻域内时,能够保证云台姿态的稳定性,并且也扩大了对云台进行姿态控制的范围,进一步提高了该方法的实用性,有利于市场的推广与应用。According to the pan/tilt control method, device, pan/tilt and storage medium provided by the present invention, when the pan/tilt is located in the vicinity of a singular point, the target end attitude of the pan/tilt is acquired and the measured end attitude is determined according to the target end attitude Calculate the single-axis control component and the dual-axis control component with the measurement end attitude, and realize the decoupling of the three brackets into a first bracket and a dual-axis bracket. The dual-axis bracket includes a second bracket and a third bracket. , And use the single-axis control component and the dual-axis control component to decouple the movement of the first bracket, the second bracket, and the third bracket. This not only effectively realizes that when the pan/tilt is located in the neighborhood of the singular point, it can ensure the cloud The stability of the posture of the platform also expands the scope of the posture control of the PTZ, further improves the practicability of the method, and is beneficial to market promotion and application.
附图说明Description of the drawings
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described here are used to provide a further understanding of the application and constitute a part of the application. The exemplary embodiments and descriptions of the application are used to explain the application and do not constitute an improper limitation of the application. In the attached picture:
图1为现有技术中提供的对云台进行控制的示意图;Fig. 1 is a schematic diagram of controlling the PTZ provided in the prior art;
图2为本发明实施例提供的一种云台控制方法的流程示意图;FIG. 2 is a schematic flowchart of a method for controlling a pan-tilt according to an embodiment of the present invention;
图3为本发明实施例提供的一种云台未在奇异点邻域的示意图;FIG. 3 is a schematic diagram of a pan-tilt not in the neighborhood of a singular point according to an embodiment of the present invention;
图4为本发明实施例提供的一种云台位于奇异点邻域的示意图;4 is a schematic diagram of a pan-tilt located in the neighborhood of a singular point according to an embodiment of the present invention;
图5为本发明实施例提供的根据所述目标末端姿态和测量末端姿态计算单轴控制分量的流程示意图;FIG. 5 is a schematic flow chart of calculating a single-axis control component according to the target end pose and the measured end pose provided by an embodiment of the present invention;
图6为本发明实施例提供的根据所述目标末端姿态和测量末端姿态计算单轴控制分量的算法示意图;6 is a schematic diagram of an algorithm for calculating a single-axis control component based on the target end attitude and the measured end attitude provided by an embodiment of the present invention;
图7为本发明实施例提供的将所述目标关节角度对第一支架进行控制的示意图;FIG. 7 is a schematic diagram of controlling the target joint angle to the first bracket according to an embodiment of the present invention;
图8为本发明实施例提供的根据所述目标末端姿态和测量末端姿态计算双轴控制分量的流程示意图;FIG. 8 is a schematic flow chart of calculating a dual-axis control component according to the target end pose and the measured end pose provided by an embodiment of the present invention;
图9为本发明实施例提供的根据所述目标末端姿态、测量末端姿态和末端角速度确定所述双轴控制分量的流程示意图;9 is a schematic flowchart of determining the dual-axis control component based on the target end attitude, the measured end attitude, and the end angular velocity according to an embodiment of the present invention;
图10为本发明实施例提供的根据所述姿态控制误差和末端角速度确定所述双轴控制分量的流程示意图;FIG. 10 is a schematic flowchart of determining the dual-axis control component according to the attitude control error and the terminal angular velocity according to an embodiment of the present invention;
图11为本发明实施例提供的针对所述姿态控制误差和末端角速度,去除所述姿态控制误差和末端角速度中与所述第一支架相关的分量,生成与所述第二支架和第三支架相关的局部姿态控制误差和局部末端角速度的流程示意 图;Figure 11 is an embodiment of the present invention for the attitude control error and the end angular velocity, removing the components related to the first support from the attitude control error and the end angular velocity, and generating the second support and the third support Schematic diagram of the flow of related local attitude control error and local end angular velocity;
图12为本发明实施例提供的根据所述双轴控制分量对所述第二支架和第三支架进行控制的示意图;12 is a schematic diagram of controlling the second bracket and the third bracket according to the dual-axis control component according to an embodiment of the present invention;
图13为本发明实施例提供的检测所述云台是否位于奇异点邻域的流程示意图;FIG. 13 is a schematic diagram of a process of detecting whether the PTZ is located in the neighborhood of a singularity according to an embodiment of the present invention;
图14为本发明实施例提供的另一种云台控制方法的流程示意图;14 is a schematic flowchart of another method for controlling a pan/tilt head according to an embodiment of the present invention;
图15为本发明实施例提供的又一种云台控制方法的流程示意图;15 is a schematic flowchart of another method for controlling a pan/tilt head according to an embodiment of the present invention;
图16为本发明实施例提供的根据所述第一驱动信号和所述第二驱动信号确定至少一个平滑过渡信号的流程示意图;16 is a schematic flowchart of determining at least one smooth transition signal according to the first driving signal and the second driving signal according to an embodiment of the present invention;
图17为本发明实施例提供的获取与所述第一驱动信号相对应的加权系数的流程示意图;FIG. 17 is a schematic flowchart of obtaining a weighting coefficient corresponding to the first driving signal according to an embodiment of the present invention;
图18为本发明应用实施例提供的一种云台控制方法的流程示意图;18 is a schematic flowchart of a method for controlling a pan/tilt head provided by an application embodiment of the present invention;
图19为本发明实施例提供的一种云台控制设备的结构示意图;19 is a schematic structural diagram of a pan-tilt control device provided by an embodiment of the present invention;
图20为本发明实施例提供的一种云台控制装置的结构示意图;20 is a schematic structural diagram of a pan-tilt control device provided by an embodiment of the present invention;
图21为本发明实施例提供的一种云台的结构示意图一;21 is a schematic structural diagram 1 of a pan-tilt according to an embodiment of the present invention;
图22为本发明实施例提供的一种云台的结构示意图二;FIG. 22 is a second structural diagram of a pan-tilt according to an embodiment of the present invention;
图23为本发明实施例提供的一种可移动平台的结构示意图。FIG. 23 is a schematic structural diagram of a movable platform provided by an embodiment of the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of the embodiments of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field of the present invention. The terms used in the description of the present invention herein are only for the purpose of describing specific embodiments, and are not intended to limit the present invention.
为了便于理解本申请的技术方案和技术效果,下面对现有技术进行简要说明:In order to facilitate the understanding of the technical solutions and technical effects of the present application, the following briefly describes the prior art:
现有技术中,云台(例如:手持云台)的三轴姿态闭环控制器一般为位置环-速度环的双环控制器,如图1所示,R tar为末端(相机)目标姿态、R eb为 末端(相机)测量(融合)姿态,δR为姿态控制误差,C p为位置环控制器,C v为速度环控制器,J -1为雅克比逆矩阵,P为受控对象(电机),ω b为末端角速度,
Figure PCTCN2019100433-appb-000001
为关节角速度,Fusion为惯性测量单元(Inertial measurement unit,简称IMU)进行数据融合;通过上述的末端目标姿态R tar和末端角速度可以实现对云台的双环闭环控制。其中,与云台相对应的雅克比矩阵描述了各关节角速度与云台末端体坐标系下速度的非线性映射关系。雅克比逆矩阵通常被用来把位置环误差和角速度映射到关节角空间,即满足公式
Figure PCTCN2019100433-appb-000002
从而把体坐标系下的控制量变成各个电机的控制量,经过速度环控制器后,各电机将分别得到实现姿态控制所需的输出力矩。
In the prior art, the three-axis attitude closed-loop controller of the pan/tilt (for example, handheld pan/tilt) is generally a position loop-speed loop dual-loop controller. As shown in Figure 1, R tar is the end (camera) target attitude, and R eb is the end (camera) measurement (fusion) attitude, δR is the attitude control error, C p is the position loop controller, C v is the speed loop controller, J -1 is the Jacobian inverse matrix, and P is the controlled object (motor ), ω b is the terminal angular velocity,
Figure PCTCN2019100433-appb-000001
For joint angular velocity, Fusion is an inertial measurement unit (IMU) for data fusion; through the above-mentioned end target posture R tar and end angular velocity, dual-loop closed-loop control of the pan/tilt can be realized. Among them, the Jacobian matrix corresponding to the gimbal describes the nonlinear mapping relationship between the angular velocity of each joint and the velocity in the end body coordinate system of the gimbal. The Jacobian inverse matrix is usually used to map the position loop error and angular velocity to the joint angle space, that is, satisfy the formula
Figure PCTCN2019100433-appb-000002
Thus, the control quantity under the body coordinate system is changed to the control quantity of each motor. After the speed loop controller, each motor will obtain the output torque required to realize the attitude control.
反之,
Figure PCTCN2019100433-appb-000003
其中,J为雅克比矩阵。
on the contrary,
Figure PCTCN2019100433-appb-000003
Among them, J is the Jacobian matrix.
然而,当云台的关节角度处在奇异点邻域时,雅克比矩阵接近奇异(不可逆),此时,根据末端角速度ω b和关节角速度
Figure PCTCN2019100433-appb-000004
的关系
Figure PCTCN2019100433-appb-000005
可知,为了获得末端某些方向上的速度,所需的关节角速度
Figure PCTCN2019100433-appb-000006
将会非常大。与此同时,因为雅克比逆矩阵,某些元素的数值将会变得很大,末端惯性测量模块的测量噪声也会被雅克比逆矩阵放大。这样容易使得云台的控制难以稳定,从而难以实现姿态控制和增稳。
However, when the joint angle of the gimbal is in the neighborhood of the singular point, the Jacobian matrix is close to singular (irreversible). At this time, according to the terminal angular velocity ω b and the joint angular velocity
Figure PCTCN2019100433-appb-000004
Relationship
Figure PCTCN2019100433-appb-000005
It can be seen that in order to obtain the speed in some directions of the end, the required joint angular velocity
Figure PCTCN2019100433-appb-000006
It will be very big. At the same time, because of the Jacobian inverse matrix, the value of some elements will become very large, and the measurement noise of the terminal inertial measurement module will also be amplified by the Jacobian inverse matrix. This easily makes the control of the pan/tilt difficult to stabilize, which makes it difficult to achieve attitude control and stabilization.
为了解决上述问题,现有技术提出了以下几种解决方案:(a)在奇异点邻域设计结构限位。(b)在奇异点邻域设计软件限位,或设计规避轨迹绕开奇异点。(c)冗余连杆设计,把奇异点设计在非常用的区域。In order to solve the above-mentioned problems, the prior art proposes the following solutions: (a) Design structural limits in the neighborhood of singular points. (b) Design software limit in the neighborhood of singularity, or design to avoid trajectory to avoid singularity. (c) Redundant connecting rod design, the singularity is designed in the very useful area.
针对上述解决方案(a)和解决方案(b)而言,其主要是通过规避的方法来避免进入奇异点邻域的情况。然而,这些方法的限位一般都会设计的距离奇异点比较远(例如:一般在30度以上,主要由构型和传感器噪声决定),这样大大减小了云台的运动范围;尤其对于一些构型的云台而言,为满足某些使用需求而使得奇异点与正常工作空间更接近,如非正交构型的云台,在某个方向上的运动范围将会进一步减小。针对上述解决方案(c)而言,其并没有实际上解决奇异点邻域控制的问题,而且冗余设计增加了体积、重量与设计和物料成本等。For the above solution (a) and solution (b), it is mainly to avoid entering the neighborhood of singular points through evasion methods. However, the limits of these methods are generally designed to be far from the singular point (for example: generally above 30 degrees, mainly determined by the configuration and sensor noise), which greatly reduces the range of movement of the gimbal; especially for some configurations For the type of gimbal, in order to meet certain usage requirements, the singularity is closer to the normal working space. For example, the non-orthogonal configuration of the gimbal will have a further reduced range of motion in a certain direction. Regarding the above solution (c), it does not actually solve the problem of singularity neighborhood control, and redundant design increases the volume, weight, design, and material cost.
下面结合附图,对本发明的一些实施方式作详细说明。在各实施例之间不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Hereinafter, some embodiments of the present invention will be described in detail with reference to the accompanying drawings. Provided that there is no conflict between the various embodiments, the following embodiments and the features in the embodiments can be combined with each other.
图2为本发明实施例提供的一种云台控制方法的流程示意图;为了解决现有技术中存在的因奇异点邻域而影响云台控制的稳定性,难以实现姿态准确 控制的问题,参考附图2所示,本实施例提供了一种云台控制方法,其中,云台至少可以包括依次连接的第一支架、第二支架和用于连接负载的第三支架,上述负载可以为照相机、摄像机或者其他具有拍摄功能的任意设备。另外,该控制方法的执行主体是云台控制装置,可以理解的是,该控制装置可以实现为软件、或者软件和硬件的组合;在控制装置执行该控制方法时,可以实现在云台相对于奇异点邻域处于不同状态时,采用不同的控制策略对云台中的第一支架、第二支架和第三支架进行控制。具体的,该方法包括:Figure 2 is a schematic flow chart of a method for controlling a pan/tilt head provided by an embodiment of the present invention; in order to solve the problem that the stability of the pan/tilt control is affected by the neighborhood of singular points in the prior art, it is difficult to achieve accurate attitude control. As shown in FIG. 2, this embodiment provides a pan/tilt control method, wherein the pan/tilt may at least include a first support, a second support, and a third support for connecting a load, the load may be a camera , Video camera or any other device with shooting function. In addition, the main body of the control method is the pan/tilt control device. It can be understood that the control device can be implemented as software or a combination of software and hardware; when the control device executes the control method, it can be implemented in the pan/tilt relative to When the neighborhood of the singular point is in different states, different control strategies are adopted to control the first bracket, the second bracket and the third bracket in the pan-tilt. Specifically, the method includes:
S1:检测云台是否位于预设的奇异点邻域。S1: Check whether the PTZ is located in the neighborhood of the preset singularity.
当所述云台处在奇异点时,雅克比矩阵的奇异值最小值等于0或矩阵行列式等于零;而当所述云台位于奇异点邻域时,雅克比矩阵接近奇异,也就是雅克比矩阵的奇异值最小值在预设的第一范围内或矩阵行列式在预设的第二范围内。具体的,参考附图3-4所示,云台还包括第一电机107、第二电机108和第三电机109,第一电机107的一端通过转动件104连接于第一支架101上,该转动件104用于使得第一支架101能够相对于第一电机107进行转动,从而使得云台能够在收纳状态和使用状态之间进行切换;而第一电机107的另一端与载体10相连,用于驱动所述第一支架101相对于所述载体10转动;所述第二电机108设置于所述第一支架101上,用于驱动所述第二支架102相对于第一支架101进行转动;所述第三电机109设置于所述第二支架102上,用于驱动所述第三支架103相对于第二支架102进行转动。When the pan/tilt is at a singular point, the minimum value of the singular value of the Jacobian matrix is equal to 0 or the matrix determinant is equal to zero; and when the pan/tilt is located in the neighborhood of the singular point, the Jacobian matrix is close to singularity, that is, the Jacobian The minimum value of the singular value of the matrix is within a preset first range or the matrix determinant is within a preset second range. Specifically, referring to Figures 3-4, the pan/tilt head also includes a first motor 107, a second motor 108, and a third motor 109. One end of the first motor 107 is connected to the first bracket 101 through a rotating member 104. The rotating member 104 is used to enable the first bracket 101 to rotate relative to the first motor 107, so that the pan/tilt can be switched between the storage state and the use state; and the other end of the first motor 107 is connected to the carrier 10, To drive the first support 101 to rotate relative to the carrier 10; the second motor 108 is arranged on the first support 101 for driving the second support 102 to rotate relative to the first support 101; The third motor 109 is disposed on the second support 102 and is used to drive the third support 103 to rotate relative to the second support 102.
下面对云台是否位于奇异点邻域的状态进行简要说明:当所述云台处于奇异点时,第一电机107的轴线、第二电机108的轴线和第三电机109的轴线位于同一平面上,也即:云台的yaw轴、roll轴和pitch轴位于同一平面上,所述第二电机108位于预设的关节角度;当所述云台处于奇异点邻域时,所述第一电机107的的轴线、第二电机108的轴线和第三电机109的轴线位于或接近位于同一平面上,也即:云台的yaw轴、roll轴和pitch轴位于或者接近位于同一平面上,所述第二电机108位于预设的关节角度范围内。需要说明的是,无论是正交云台还是非正交云台,只要第一电机107的轴线、第二电机108的轴线和第三电机109的轴线位于同一平面上,均可认为该云台处于奇异点。The following briefly explains whether the pan/tilt is located in the neighborhood of the singular point: when the pan/tilt is at the singular point, the axis of the first motor 107, the axis of the second motor 108 and the axis of the third motor 109 are on the same plane , That is, the yaw axis, roll axis, and pitch axis of the pan/tilt are located on the same plane, and the second motor 108 is located at the preset joint angle; when the pan/tilt is in the neighborhood of the singular point, the first The axis of the motor 107, the axis of the second motor 108, and the axis of the third motor 109 are located or close to being on the same plane, that is, the yaw axis, roll axis and pitch axis of the pan/tilt are located or approximately on the same plane, so The second motor 108 is located within the preset joint angle range. It should be noted that whether it is an orthogonal pan/tilt or a non-orthogonal pan/tilt, as long as the axis of the first motor 107, the axis of the second motor 108, and the axis of the third motor 109 are on the same plane, it can be regarded as the pan/tilt. At a singularity.
其中,奇异点邻域是指位于奇异点附近的角度区域,上述的奇异点可以针对云台进行计算获得,而邻域的具体范围可以根据用户的需求进行设置。另外,本实施例对于检测云台是否位于奇异点邻域的具体实现方式不做限定, 本领域技术人员可以根据具体的应用需求和设计需求进行设置,例如:可以获取与云台相对应的雅克比矩阵,通过雅克比矩阵判断奇异值是否小于预设阈值,或雅克比矩阵判断矩阵行列式是否小于预设阈值,在奇异值小于或等于预设阈值时,或者矩阵行列式小于或等于预设阈值时,则可以确定云台进入奇异点邻域。参考附图9所示,本实施例中的检测云台是否位于奇异点邻域可以包括:Among them, the singular point neighborhood refers to an angular area located near the singular point. The above-mentioned singular point can be calculated for the PTZ, and the specific range of the neighborhood can be set according to the needs of the user. In addition, this embodiment does not limit the specific implementation of detecting whether the pan/tilt is located in the neighborhood of the singularity. Those skilled in the art can set it according to specific application requirements and design requirements. For example, the Jacques corresponding to the pan/tilt may be obtained. Ratio matrix, the Jacobian matrix judges whether the singular value is less than the preset threshold, or the Jacobian matrix judges whether the matrix determinant is less than the preset threshold, when the singular value is less than or equal to the preset threshold, or the matrix determinant is less than or equal to the preset threshold When the threshold is set, it can be determined that the pan/tilt enters the neighborhood of singularity. Referring to FIG. 9, the detecting whether the PTZ is located in the neighborhood of the singularity in this embodiment may include:
S11:获取第二电机的关节角度。S11: Obtain the joint angle of the second motor.
S12:在第二电机的关节角度位于奇异点邻域所对应的角度范围内时,则确定云台位于奇异点邻域。或者,S12: When the joint angle of the second motor is within the angle range corresponding to the singular point neighborhood, it is determined that the pan/tilt is located in the singular point neighborhood. or,
S13:在第二电机的关节角度位于奇异点邻域外所对应的角度范围内时,则确定云台位于奇异点邻域外。S13: When the joint angle of the second motor is within the angle range corresponding to the neighborhood of the singularity, it is determined that the pan/tilt is located outside the neighborhood of the singularity.
其中,对于包括第一支架、第二支架和第三支架的三轴云台而言,雅克比矩阵是否奇异只与第二电机的关节角度有关。因此,对于云台而言,更简单的奇异性判断的方法是,通过第二电机所对应的关节角度可以准确地检测云台是否位于奇异点邻域。具体的,可以通过角度传感器来获取第二电机的关节角度,在获取到第二电机的关节角度之后,可以将第二电机的关节角度与奇异点邻域所对应的角度范围进行比较,在第二电机的关节角度位于奇异点邻域所对应的角度范围内时,则可以确定云台位于奇异点邻域,其中,奇异点邻域所对应的角度范围包括:至少两个角度边界值和位于两个角度边界值之间的任意角度中间值;第二电机的关节角度位于奇异点邻域所对应的角度范围内包括以下两种情况:第二电机的关节角度等于奇异点邻域中的任意一个角度中间值,第二电机的关节角度等于奇异点邻域所对应的角度边界值。在第二电机的关节角度位于奇异点邻域所对应的角度范围外时,也即,第二电机的关节角度既不等于角度边界值,也不等于角度中间值,则可以确定云台位于奇异点邻域外。Among them, for a three-axis pan/tilt head including the first bracket, the second bracket and the third bracket, whether the Jacobian matrix is singular is only related to the joint angle of the second motor. Therefore, for the pan/tilt, a simpler singularity determination method is to accurately detect whether the pan/tilt is located in the neighborhood of the singularity through the joint angle corresponding to the second motor. Specifically, the joint angle of the second motor can be obtained through the angle sensor. After the joint angle of the second motor is obtained, the joint angle of the second motor can be compared with the angle range corresponding to the singular point neighborhood. When the joint angle of the second motor is within the angle range corresponding to the singular point neighborhood, it can be determined that the gimbal is located in the singular point neighborhood, where the angle range corresponding to the singular point neighborhood includes: at least two angular boundary values and The intermediate value of any angle between the two angle boundary values; the joint angle of the second motor is within the angle range corresponding to the singular point neighborhood. There are two cases: the joint angle of the second motor is equal to any of the singular point neighborhoods An intermediate value of the angle, the joint angle of the second motor is equal to the boundary value of the angle corresponding to the neighborhood of the singular point. When the joint angle of the second motor is outside the angle range corresponding to the singular point neighborhood, that is, the joint angle of the second motor is neither equal to the angle boundary value nor the angle intermediate value, it can be determined that the gimbal is at the singularity Point outside the neighborhood.
同理的,在云台包括多个支架时,可以通过位于中间部分的支架所对应的关节角度来检测云台是否位于奇异点邻域。举例来说:在云台包括依次连接的第一支架、第二支架、第三支架和用于连接负载的第四支架、以及用于驱动第一支架相对于载体进行转动的第一电机、用于驱动第二支架相对于第一支架进行转动的第二电机、用于驱动第三支架相对于第二支架进行转动的第三电机和用于驱动第四支架相对于负载进行转动的第四电机时,可以获取 第二电机的第二关节角度和/或第三电机的第三关节角度,通过第二关节角度和/或第三关节角度来检测云台是否位于奇异点邻域中;具体的,在第二关节角度和/或第三关节角度位于奇异点邻域所对应的角度范围内时,则确定云台位于奇异点邻域。或者,在第二关节角度和/或第三关节角度位于奇异点邻域所对应的角度范围外时,则可以确定云台位于奇异点邻域外。Similarly, when the pan-tilt includes multiple supports, it can be detected whether the pan-tilt is located in the neighborhood of the singularity through the joint angles corresponding to the supports located in the middle part. For example: the pan/tilt includes a first support, a second support, a third support, and a fourth support for connecting the load, and a first motor for driving the first support to rotate relative to the carrier. A second motor that drives the second bracket to rotate relative to the first bracket, a third motor that drives the third bracket to rotate relative to the second bracket, and a fourth motor that drives the fourth bracket to rotate relative to the load When, the second joint angle of the second motor and/or the third joint angle of the third motor can be obtained, and the second joint angle and/or the third joint angle can be used to detect whether the pan/tilt is located in the neighborhood of the singular point; When the second joint angle and/or the third joint angle are within the angle range corresponding to the singular point neighborhood, it is determined that the pan/tilt is located in the singular point neighborhood. Alternatively, when the second joint angle and/or the third joint angle are outside the angle range corresponding to the singular point neighborhood, it can be determined that the pan/tilt is outside the singular point neighborhood.
通过获取第二电机的关节角度,而后基于第二电机的关节角度来检测云台是否位于奇异点邻域,不仅可以保证对云台是否位于奇异点邻域进行检测的准确性,并且还提高了数据处理的效率和质量,进而保证了对云台进行检测的质量和效率。By obtaining the joint angle of the second motor, and then detecting whether the pan/tilt is located in the neighborhood of the singularity based on the joint angle of the second motor, not only can the accuracy of detecting whether the pan/tilt is located in the neighborhood of the singularity be ensured, but also improve The efficiency and quality of data processing ensure the quality and efficiency of PTZ detection.
S2:当云台位于奇异点邻域时,获取云台的目标末端姿态和测量末端姿态。S2: When the gimbal is located in the neighborhood of the singular point, obtain the target end attitude of the gimbal and measure the end attitude.
在确定云台位于奇异点邻域时,则可以获取云台的目标末端姿态和测量末端姿态,其中,目标末端姿态可以是指云台上负载(相机)所需要达到的最终姿态,测量末端姿态可以是指针对云台上负载(相机)所测量的当前姿态。一般情况下,目标末端姿态可以是用户指定或者用户输入的,或者,可以通过对云台相关参数进行计算,获得目标末端姿态;而测量末端姿态可以通过检测装置对负载进行检测获得,或者,也可以根据末端的惯性测量单元(Inertial measurement unit,简称IMU)进行数据融合得到,具体的,一个IMU可以包含三轴加速度计和三轴陀螺仪,融合三轴加速度计和三轴陀螺仪的数据,就能算出末端姿态。在另一实施例中,一个IMU可以包括三轴加速度计、三轴陀螺仪以及三轴磁力计,通过融合三轴加速度计、三轴陀螺仪以及三轴磁力计,就可以算出末端姿态。When it is determined that the gimbal is located in the neighborhood of the singular point, the target end posture and the measurement end posture of the gimbal can be obtained, where the target end posture can refer to the final posture that the load (camera) needs to reach on the gimbal, and the measurement end posture It can be a pointer to the current attitude measured by the load (camera) on the PTZ. In general, the end posture of the target can be specified by the user or input by the user, or the end posture of the target can be obtained by calculating the related parameters of the pan/tilt; while the end posture of the measurement can be obtained by detecting the load by the detection device, or, also It can be obtained by data fusion according to the inertial measurement unit (IMU) at the end. Specifically, an IMU can contain a three-axis accelerometer and a three-axis gyroscope, fusing the data of the three-axis accelerometer and the three-axis gyroscope, The end posture can be calculated. In another embodiment, an IMU may include a three-axis accelerometer, a three-axis gyroscope, and a three-axis magnetometer. By fusing the three-axis accelerometer, the three-axis gyroscope, and the three-axis magnetometer, the end posture can be calculated.
S3:根据目标末端姿态和测量末端姿态计算单轴控制分量和双轴控制分量;其中,单轴控制分量与第一支架相关,双轴控制分量与第二支架和第三支架相关。S3: Calculate the single-axis control component and the dual-axis control component according to the target end posture and the measured end posture; wherein the single-axis control component is related to the first support, and the dual-axis control component is related to the second support and the third support.
在获取到目标末端姿态和测量末端姿态之后,可以对目标末端姿态和测量末端姿态进行分析处理,从而可以获得与第一支架相关的单轴控制分量和与第二支架和第三支架相关的双轴控制分量。需要注意的是,针对第一支架、第二支架和第三支架而言,单轴控制分量仅与第一支架相关,其与第二支架和第三支架不相关;双轴控制分量仅与第二支架和第三支架相关,其与第一支架不相关。After obtaining the target end attitude and the measurement end attitude, the target end attitude and the measurement end attitude can be analyzed and processed, so that the single-axis control component related to the first bracket and the dual-axis control component related to the second bracket and the third bracket can be obtained. Axis control component. It should be noted that for the first bracket, the second bracket and the third bracket, the single-axis control component is only related to the first bracket, and it is not related to the second and third brackets; the dual-axis control component is only related to the first bracket. The second bracket is related to the third bracket, which is not related to the first bracket.
S4:根据单轴控制分量对第一支架进行控制,并根据双轴控制分量对第二支架和第三支架进行控制。S4: Control the first bracket according to the single-axis control component, and control the second bracket and the third bracket according to the dual-axis control component.
在获取到单轴控制分量之后,可以根据单轴控制分量对第一支架进行控制,在获取到双轴控制分量之后,可以根据双轴控制分量对第二支架和第三支架进行控制。将现有的三轴姿态闭环控制器等效解耦成两个控制器,其中一个控制器用于对第一支架进行控制,另外一个控制器用于对第二支架和第三支架进行控制,这样,第二支架和第三支架可以等效为一个双轴云台,其对应的雅克比矩阵维度降阶为二维,解决了三维雅克比矩阵具有奇异性的问题,从而避免了云台因奇异点邻域而影响对云台进行控制的稳定性的情况,有效地保证了对云台姿态进行精确控制。After the single-axis control component is obtained, the first support can be controlled according to the single-axis control component. After the dual-axis control component is obtained, the second support and the third support can be controlled according to the dual-axis control component. The existing three-axis attitude closed-loop controller is equivalently decoupled into two controllers. One controller is used to control the first support, and the other is used to control the second support and the third support. In this way, The second bracket and the third bracket can be equivalent to a dual-axis gimbal, and the corresponding Jacobian matrix dimension is reduced to two-dimensional, which solves the problem of the singularity of the three-dimensional Jacobian matrix and avoids the singularity of the gimbal. The neighborhood affects the stability of the control of the PTZ, which effectively ensures the precise control of the PTZ attitude.
本实施例提供的云台控制方法,通过检测云台是否位于奇异点邻域,当云台位于奇异点邻域时,获取云台的目标末端姿态和测量末端姿态,根据目标末端姿态和测量末端姿态计算单轴控制分量和双轴控制分量,实现了将三个支架的云台解耦成一个第一支架和一个双轴支架,其中,双轴支架包括第二支架和第三支架,并分别利用单轴控制分量和双轴控制分量对第一支架、第二支架和第三支架的运动进行解耦控制,不仅有效地实现了在云台位于奇异点邻域内时,能够保证云台姿态的稳定性,并且也扩大了对云台进行姿态控制的范围,进一步提高了该方法的实用性,有利于市场的推广与应用。The pan/tilt control method provided in this embodiment detects whether the pan/tilt is located in the neighborhood of the singular point. When the pan/tilt is located in the neighborhood of the singular point, the target end attitude and the measurement end attitude of the pan/tilt are acquired, and the target end attitude and the measurement end The single-axis control component and the dual-axis control component of the attitude calculation realize the decoupling of the three brackets into a first bracket and a dual-axis bracket. The dual-axis bracket includes the second bracket and the third bracket, and they are respectively The single-axis control component and the dual-axis control component are used to decouple the movement of the first bracket, the second bracket, and the third bracket, which not only effectively realizes that when the pan/tilt is located in the neighborhood of the singular point, it can ensure the attitude of the pan/tilt. It is stable, and also expands the range of attitude control of the PTZ, further improves the practicability of the method, and is beneficial to market promotion and application.
图5为本发明实施例提供的根据目标末端姿态和测量末端姿态计算单轴控制分量的流程示意图;图6为本发明实施例提供的根据目标末端姿态和测量末端姿态计算单轴控制分量的算法示意图;在上述实施例的基础上,继续参考附图5-图6所示,本实施例对于根据目标末端姿态和测量末端姿态计算单轴控制分量的具体实现方式不做限定,本领域技术人员可以根据具体的应用需求和设计需求进行设置,较为优选的,可以通过云台上的电机来获取单轴控制分量,此时,参考附图3所示,云台上的电机可以包括第一电机107、第二电机108和第三电机109,第一电机107的一端连接于第一支架101上,另一端与载体10相连,用于驱动所述第一支架101相对于所述载体10转动;所述第二电机108设置于所述第一支架101上,用于驱动所述第二支架102相对于第一支架101进行转动;所述第三电机109设置于所述第二支架102上,用于驱动所述第三支架103相对于第二支架102进行转动。Fig. 5 is a schematic diagram of a flow chart for calculating a single-axis control component based on the target end posture and a measured end posture provided by an embodiment of the present invention; Fig. 6 is an algorithm for calculating a single-axis control component based on the target end posture and the measured end posture provided by an embodiment of the present invention Schematic diagram; on the basis of the above embodiment, continue to refer to Figures 5 to 6, this embodiment does not limit the specific implementation of calculating the single-axis control component based on the target end posture and the measured end posture. Those skilled in the art It can be set according to specific application requirements and design requirements. Preferably, the single-axis control component can be obtained through the motor on the pan/tilt. At this time, referring to Figure 3, the motor on the pan/tilt may include the first motor 107. A second motor 108 and a third motor 109. One end of the first motor 107 is connected to the first support 101, and the other end is connected to the carrier 10 for driving the first support 101 to rotate relative to the carrier 10; The second motor 108 is arranged on the first bracket 101, and is used to drive the second bracket 102 to rotate relative to the first bracket 101; the third motor 109 is arranged on the second bracket 102, It is used to drive the third bracket 103 to rotate relative to the second bracket 102.
具体的,根据目标末端姿态和测量末端姿态计算单轴控制分量可以包括:Specifically, calculating the single-axis control component based on the target end attitude and the measured end attitude may include:
S31:分别获取与第一电机、第二电机和第三电机相对应的第一测量关节角度、第二测量关节角度和第三测量关节角度。S31: Obtain the first measured joint angle, the second measured joint angle, and the third measured joint angle corresponding to the first motor, the second motor, and the third motor, respectively.
具体的,可以通过角度检测装置对第一电机所在关节进行角度检测,从而可以获得与第一电机相对应的第一测量关节角度,相类似的,通过角度检测装置分别对第二电机所在关节和第三电机所在关节进行角度检测,从而可以获得与第二电机相对应的第二关节角度和与第三电机相对应的第三关节角度。Specifically, the angle detection device can be used to detect the angle of the joint where the first motor is located, so that the first measured joint angle corresponding to the first motor can be obtained. Similarly, the angle detection device is used to separately detect the joint and the joint where the second motor is located. The angle detection is performed on the joint where the third motor is located, so that the second joint angle corresponding to the second motor and the third joint angle corresponding to the third motor can be obtained.
S32:根据目标末端姿态、测量末端姿态、第一测量关节角度、第二测量关节角度和第三测量关节角度,利用牛顿迭代算法确定与第一电机相对应的目标关节角度。S32: According to the target end posture, the measured end posture, the first measured joint angle, the second measured joint angle, and the third measured joint angle, a Newton iterative algorithm is used to determine the target joint angle corresponding to the first motor.
其中,牛顿迭代算法是逆运动学求解技术中采用数值计算求解的方法,而逆运动学求解用于计算末端姿态对应的关节角度。对于正交构型和一些简单的非正交构型,逆运动学有解析解,但对于复杂的非正交构型或考虑正交构型在装配时引入的非正交误差,一般性的连杆构型没有统一的逆运动学解析解。在没有逆运动学解析解的情况下,其求解通常可以采用数值计算的方法来计算,如牛顿迭代算法。Among them, the Newton iterative algorithm is a method of numerical calculation in the inverse kinematics solution technology, and the inverse kinematics solution is used to calculate the joint angle corresponding to the end pose. For orthogonal configurations and some simple non-orthogonal configurations, inverse kinematics has analytical solutions, but for complex non-orthogonal configurations or considering the non-orthogonal errors introduced by orthogonal configurations during assembly, general There is no unified inverse kinematics analytical solution for connecting rod configuration. In the absence of an analytical solution for inverse kinematics, the solution can usually be calculated by numerical methods, such as Newton's iterative algorithm.
在利用牛顿迭代算法确定与第一电机相对应的目标关节角度的过程中,因为牛顿迭代算法的初值必须在真值(所要求得的目标解)附近,也为了加快迭代初始阶段的迭代速度,可以把迭代关节角度的初值设置为进入奇异控制邻域瞬间的三个关节角度测量值,该三个关节角度测量可以分别是指与第一电机所在关节相对应的第一测量关节角度、与第二电机所在关节相对应的第二测量关节角度和与第三电机所在关节相对应的第三测量关节角度。In the process of using the Newton iterative algorithm to determine the target joint angle corresponding to the first motor, because the initial value of the Newton iterative algorithm must be near the true value (the required target solution), it is also in order to speed up the iteration speed in the initial stage of the iteration. , The initial value of the iterative joint angle can be set to the three joint angle measurement values at the moment of entering the singular control neighborhood. The three joint angle measurements can refer to the first measured joint angle corresponding to the joint where the first motor is located. The second measurement joint angle corresponding to the joint where the second motor is located and the third measurement joint angle corresponding to the joint where the third motor is located.
此外,牛顿迭代算法用到了雅克比矩阵,由于除了奇异点邻域外,雅克比矩阵都是可逆的,所以在利用牛顿迭代算法确定与第一电机相对应的目标关节角度的过程中,可以通过调整进入奇异点邻域时的迭代步长λ,使得雅克比矩阵在除了奇异点邻域外的其他区域迭代总能收敛;其中,在对迭代步长λ进行调整时,可以按照越靠近奇异点时,迭代步长越小的规则对迭代步长进行调整。需要注意的是,无论对迭代步长进行何种调整,只需要限制迭代结果不能等于奇异点角度(考虑CPU计算精度,限制迭代结果不在奇异点极小的邻域内),便能得到逆运动学的解。In addition, the Newton iterative algorithm uses the Jacobian matrix. Since the Jacobian matrix is invertible except for the neighborhood of singular points, the newton iterative algorithm can be used to determine the target joint angle corresponding to the first motor. The iteration step size λ when entering the singular point neighborhood makes the Jacobian matrix always converge in other regions except the singular point neighborhood; among them, when the iteration step size λ is adjusted, the closer the singular point is, The smaller the iteration step size is to adjust the iteration step size. It should be noted that no matter what adjustments are made to the iteration step size, you only need to limit the iteration result not to be equal to the singular point angle (considering the CPU calculation accuracy, limit the iteration result not to be in the neighborhood of the extremely small singular point) to obtain inverse kinematics Solution.
具体的,在确定与第一电机相对应的目标关节角度时,参考附图6所示, 包括以下步骤:Specifically, when determining the target joint angle corresponding to the first motor, referring to FIG. 6, the following steps are included:
(32.1)在获取到第一测量关节角度、第二测量关节角度和第三测量关节角度之后,可以获取第一电机、第二电机和第三电机在预设初始位置的第一轴向、第二轴向和第三轴向,其中,预设初始位置可以是指第一电机、第二电机和第三电机的电机关节角度为0°的位置,另外,第一轴向、第二轴向和第三轴向均可以是向量表示信息。而后利用前向运动学公式和上述所获得的参数,计算测量关节角度θ对应的测量关节姿态。(32.1) After obtaining the first measurement joint angle, the second measurement joint angle, and the third measurement joint angle, the first axis and the first axis of the first motor, the second motor and the third motor at the preset initial positions can be obtained. The second axis and the third axis, where the preset initial position may refer to the position where the motor joint angle of the first motor, the second motor and the third motor is 0°. In addition, the first axis and the second axis Both the and the third axis can be vectors representing information. Then, the forward kinematics formula and the parameters obtained above are used to calculate the measured joint posture corresponding to the measured joint angle θ.
Figure PCTCN2019100433-appb-000007
Figure PCTCN2019100433-appb-000007
其中,R j为与第一电机、第二电机和第三电机相对应的测量关节姿态,该测量关节姿态为末端姿态和手柄姿态的差,例如:测量关节姿态可以为末端姿态与手柄姿态的差值。另外,ξ 1是第一电机在(体坐标系下)预设初始位置的轴向,ξ 2是第二电机在(体坐标系下)预设初始位置的轴向,ξ 3是第三电机在(体坐标系下)预设初始位置的轴向,
Figure PCTCN2019100433-appb-000008
为第一电机在(体坐标系下)预设初始位置的轴向的反对称矩阵,
Figure PCTCN2019100433-appb-000009
为第二电机在(体坐标系下)预设初始位置的轴向的反对称矩阵,
Figure PCTCN2019100433-appb-000010
为第三电机在(体坐标系下)预设初始位置的轴向的反对称矩阵;θ 1、θ 2和θ 3分别为与第一电机、第二电机和第三电机相对应的第一测量关节角度、第二测量关节角度和第三测量关节角度;具体应用时,上述的θ 1、θ 2和θ 3可以是指进入奇异点邻域瞬间的三个关节角度测量值(分别与第一电机、第二电机和第三电机相对应)。优选地,关节角度可通过霍尔传感器、磁编码器等传感器测量得到。
Among them, R j is the measured joint posture corresponding to the first motor, the second motor and the third motor. The measured joint posture is the difference between the end posture and the handle posture. For example, the measured joint posture can be the difference between the end posture and the handle posture. Difference. In addition, ξ 1 is the axis of the first motor at the preset initial position (in the body coordinate system), ξ 2 is the axis of the second motor at the preset initial position (in the body coordinate system), and ξ 3 is the third motor Preset the axis of the initial position (under the body coordinate system),
Figure PCTCN2019100433-appb-000008
Is the axial antisymmetric matrix of the first motor at the preset initial position (under the body coordinate system),
Figure PCTCN2019100433-appb-000009
Is the axial antisymmetric matrix of the second motor at the preset initial position (under the body coordinate system),
Figure PCTCN2019100433-appb-000010
Is the axial antisymmetric matrix of the third motor at the preset initial position (under the body coordinate system); θ 1 , θ 2 and θ 3 are the first motor corresponding to the first motor, the second motor and the third motor. Measure the joint angle, the second measurement joint angle, and the third measurement joint angle; in specific applications, the above θ 1 , θ 2 and θ 3 can refer to the three joint angle measurement values at the moment of entering the neighborhood of the singular point (respectively with the first One motor, the second motor and the third motor correspond). Preferably, the joint angle can be measured by sensors such as Hall sensors and magnetic encoders.
(32.2)在获得测量关节姿态R j之后,可以利用测量关节姿态R j和测量末端姿态(测量相机姿态)R eb,计算手柄测量姿态R h(32.2) After the measured joint posture R j is obtained, the measured joint posture R j and the measured end posture (measurement camera posture) R eb can be used to calculate the handle measurement posture R h .
R h=R ebR j -1 R h =R eb R j -1
其中,R h为手柄测量姿态,R eb为测量末端姿态,R j -1为测量关节姿态的逆矩阵。在另一实施例中,所述手柄测量姿态可由视觉传感器或IMU和指南针融合计算得到。 Among them, R h is the measured posture of the handle, Reb is the measured end posture, and R j -1 is the inverse matrix of the measured joint posture. In another embodiment, the measured posture of the handle may be calculated by fusion of a vision sensor or an IMU and a compass.
(32.3)利用前向运动学公式和牛顿迭代算法,计算第k次迭代的目标关节角度
Figure PCTCN2019100433-appb-000011
对应迭代的目标关节姿态
Figure PCTCN2019100433-appb-000012
(32.3) Use forward kinematics formula and Newton iteration algorithm to calculate the target joint angle of the kth iteration
Figure PCTCN2019100433-appb-000011
The target joint pose corresponding to the iteration
Figure PCTCN2019100433-appb-000012
Figure PCTCN2019100433-appb-000013
Figure PCTCN2019100433-appb-000013
其中,
Figure PCTCN2019100433-appb-000014
为与第k次迭代的目标关节角度相对应的目标关节姿态,
Figure PCTCN2019100433-appb-000015
以及
Figure PCTCN2019100433-appb-000016
分别为第一电机、第二电机和第三电机在预设初始位置的第一轴向、第二轴向和第三轴向;
Figure PCTCN2019100433-appb-000017
Figure PCTCN2019100433-appb-000018
为在进行K次迭代时,分别与第一电机、第二电机和第三电机相对应的第一目标关节角度、第二目标关节角度和第三目标关节角度。
among them,
Figure PCTCN2019100433-appb-000014
Is the target joint pose corresponding to the target joint angle of the kth iteration,
Figure PCTCN2019100433-appb-000015
as well as
Figure PCTCN2019100433-appb-000016
Are the first axis, the second axis, and the third axis of the first motor, the second motor, and the third motor at the preset initial positions, respectively;
Figure PCTCN2019100433-appb-000017
with
Figure PCTCN2019100433-appb-000018
It is the first target joint angle, the second target joint angle, and the third target joint angle corresponding to the first motor, the second motor, and the third motor respectively during K iterations.
(32.4)在获取到目标关节姿态
Figure PCTCN2019100433-appb-000019
之后,可以由手柄测量姿态R h和迭代的目标关节姿态
Figure PCTCN2019100433-appb-000020
计算迭代的目标末端姿态
Figure PCTCN2019100433-appb-000021
(32.4) After obtaining the target joint pose
Figure PCTCN2019100433-appb-000019
After that, the posture R h and the iterated target joint posture can be measured by the handle
Figure PCTCN2019100433-appb-000020
Calculate the iterative target end pose
Figure PCTCN2019100433-appb-000021
Figure PCTCN2019100433-appb-000022
Figure PCTCN2019100433-appb-000022
其中,
Figure PCTCN2019100433-appb-000023
为在第K次迭代中的目标末端姿态,R h为手柄测量姿态,
Figure PCTCN2019100433-appb-000024
为与第K次迭代的目标关节角度相对应的目标关节姿态。
among them,
Figure PCTCN2019100433-appb-000023
Is the end attitude of the target in the Kth iteration, R h is the measured attitude of the handle,
Figure PCTCN2019100433-appb-000024
Is the target joint pose corresponding to the target joint angle of the Kth iteration.
(32.5)在获取目标末端姿态
Figure PCTCN2019100433-appb-000025
之后,可以计算迭代的目标末端姿态
Figure PCTCN2019100433-appb-000026
与目标末端姿态R tar的迭代姿态误差ΔR (k)
(32.5) In obtaining the target end attitude
Figure PCTCN2019100433-appb-000025
After that, the iterative target end pose can be calculated
Figure PCTCN2019100433-appb-000026
Iterative attitude error ΔR (k) from the target end attitude R tar .
Figure PCTCN2019100433-appb-000027
Figure PCTCN2019100433-appb-000027
其中,ΔR (k)为迭代姿态误差,
Figure PCTCN2019100433-appb-000028
为在第K次迭代过程中的目标末端姿态,R tar为目标末端姿态。
Among them, ΔR (k) is the iterative attitude error,
Figure PCTCN2019100433-appb-000028
Is the target end attitude in the Kth iteration, R tar is the target end attitude.
(32.6)将迭代姿态误差ΔR (k)转换成轴角表示形式δθ (k)(32.6) Convert the iterative attitude error ΔR (k) into the axis angle representation δθ (k) .
(32.7)利用迭代的目标关节角度
Figure PCTCN2019100433-appb-000029
计算对应的雅克比矩阵
Figure PCTCN2019100433-appb-000030
(32.7) Use the iterative target joint angle
Figure PCTCN2019100433-appb-000029
Calculate the corresponding Jacobian matrix
Figure PCTCN2019100433-appb-000030
Figure PCTCN2019100433-appb-000031
Figure PCTCN2019100433-appb-000031
其中,
Figure PCTCN2019100433-appb-000032
为与K次迭代的目标关节角度相对应的雅克比矩阵,
Figure PCTCN2019100433-appb-000033
以及
Figure PCTCN2019100433-appb-000034
分别为第一电机、第二电机和第三电机在预设初始位置的第一轴向、第二轴向和第三轴向;
Figure PCTCN2019100433-appb-000035
Figure PCTCN2019100433-appb-000036
分别为在进行K次迭代时,与第一电机、第二电机和第三电机相对应的第一目标关节角度、第二目标关节角度和第三目标关节角度。
among them,
Figure PCTCN2019100433-appb-000032
Is the Jacobian matrix corresponding to the target joint angle of K iterations,
Figure PCTCN2019100433-appb-000033
as well as
Figure PCTCN2019100433-appb-000034
Are the first axis, the second axis, and the third axis of the first motor, the second motor, and the third motor at the preset initial positions, respectively;
Figure PCTCN2019100433-appb-000035
with
Figure PCTCN2019100433-appb-000036
These are the first target joint angle, the second target joint angle, and the third target joint angle corresponding to the first motor, the second motor, and the third motor during K iterations.
(32.8)利用雅克比矩阵,计算目标关节角度的迭代关节角度误差Δθ (k)(32.8) Using the Jacobian matrix, calculate the iterative joint angle error Δθ (k) of the target joint angle.
Figure PCTCN2019100433-appb-000037
Figure PCTCN2019100433-appb-000037
其中,Δθ (k)为与目标关节角度相对应的迭代关节角度误差,
Figure PCTCN2019100433-appb-000038
为雅克比矩阵的逆矩阵;δθ (k)为迭代姿态误差的轴角表示形式。
Where Δθ (k) is the iterative joint angle error corresponding to the target joint angle,
Figure PCTCN2019100433-appb-000038
Is the inverse matrix of the Jacobian matrix; δθ (k) is the axis angle representation of the iterative attitude error.
(32.9)更新第k+1次的迭代目标关节角度。(32.9) Update the k+1th iteration target joint angle.
Figure PCTCN2019100433-appb-000039
Figure PCTCN2019100433-appb-000039
其中,
Figure PCTCN2019100433-appb-000040
为进行第K+1次迭代的迭代目标关节角度,该迭代目标关节角度可以包括与第一电机相对应的第一目标关节角度
Figure PCTCN2019100433-appb-000041
与第二电机相对 应的第二目标关节角度
Figure PCTCN2019100433-appb-000042
和与第三电机相对应的第三目标关节角度
Figure PCTCN2019100433-appb-000043
Figure PCTCN2019100433-appb-000044
为进行第K次迭代的迭代目标关节角度,λ为迭代步长系数,Δθ (k)为迭代关节角度误差。
among them,
Figure PCTCN2019100433-appb-000040
To perform the iterative target joint angle of the K+1th iteration, the iterative target joint angle may include the first target joint angle corresponding to the first motor
Figure PCTCN2019100433-appb-000041
The second target joint angle corresponding to the second motor
Figure PCTCN2019100433-appb-000042
And the third target joint angle corresponding to the third motor
Figure PCTCN2019100433-appb-000043
Figure PCTCN2019100433-appb-000044
In order to perform the iteration target joint angle of the Kth iteration, λ is the iteration step coefficient, and Δθ (k) is the iteration joint angle error.
(32.10)判断迭代关节角度误差是否小于阈值,在迭代关节角度误差小于或等于阈值时,则停止迭代,输出
Figure PCTCN2019100433-appb-000045
从而实现了利用牛顿迭代算法确定与第一电机、第二电机和第三电机相对应的目标关节角度;在迭代关节角度误差大于阈值时,则重复步骤32.3-32.10,直至迭代关节角度误差小于或等于阈值时为止,输出
Figure PCTCN2019100433-appb-000046
中第一电机的目标关节角度θ tar1
(32.10) Determine whether the iterative joint angle error is less than the threshold. When the iterative joint angle error is less than or equal to the threshold, stop the iteration and output
Figure PCTCN2019100433-appb-000045
In this way, the Newton iterative algorithm is used to determine the target joint angles corresponding to the first motor, the second motor and the third motor; when the iterative joint angle error is greater than the threshold, steps 32.3-32.10 are repeated until the iterative joint angle error is less than or When equal to the threshold, output
Figure PCTCN2019100433-appb-000046
The target joint angle θ tar1 of the first motor in the middle .
在实际应用中,因为目标末端姿态的变化比较平滑,并且控制周期短(微秒级别),所以迭代收敛的速度快。通常情况下,每个控制周期里仅执行一次迭代即可获得与第一电机相对应的目标关节角度。In practical applications, because the target end attitude changes smoothly and the control period is short (microsecond level), the iterative convergence speed is fast. Normally, only one iteration is performed in each control cycle to obtain the target joint angle corresponding to the first motor.
S33:将目标关节角度确定为单轴控制分量。S33: Determine the target joint angle as a single-axis control component.
在获取到目标关节角度之后,可以将目标关节角度确定为单轴控制分量,从而可以根据该目标关节角度对第一支架进行闭环控制,如图7所示,在获取到目标关节角度θ tar1之后,可以将目标关节角度θ tar1输入到位置环控制器C p,从而可以获取与目标关节角度θ tar1相对应的位置信息d,而后利用位置信息d可以对受控对象P(第一电机)进行控制,从而可以获得第一电机所对应的测量关节角度θ 1,而后再次利用测量关节角度θ 1和目标关节角度θ tar1对第一电机进行控制,从而实现了利用目标关节角度通过第一电机对第一支架进行闭环控制。 After the target joint angle is obtained, the target joint angle can be determined as a single-axis control component, so that the first bracket can be closed-loop controlled according to the target joint angle, as shown in Figure 7, after the target joint angle θ tar1 is obtained , The target joint angle θ tar1 can be input to the position loop controller C p , so that the position information d corresponding to the target joint angle θ tar1 can be obtained, and then the controlled object P (first motor) can be performed using the position information d Through the control, the measured joint angle θ 1 corresponding to the first motor can be obtained, and then the measured joint angle θ 1 and the target joint angle θ tar1 are used to control the first motor again, so as to realize the use of the target joint angle through the first motor. The first bracket performs closed-loop control.
通过上述方式获得单轴控制分量,有效地保证了单轴控制分量获取的准确可靠性,进而提高了基于单轴控制分量对第一支架进行控制的稳定可靠性。Obtaining the single-axis control component in the above manner effectively guarantees the accuracy and reliability of the acquisition of the single-axis control component, thereby improving the stability and reliability of the control of the first bracket based on the single-axis control component.
图8为本发明实施例提供的根据目标末端姿态和测量末端姿态计算双轴控制分量的流程示意图;在上述实施例的基础上,继续参考附图8所示,本实施例对于根据目标末端姿态和测量末端姿态计算双轴控制分量的具体实现方式不做限定,本领域技术人员可以根据具体的应用需求和设计需求进行设置,较为优选的,本实施例中的根据目标末端姿态和测量末端姿态计算双轴控制分量可以包括:Figure 8 is a schematic diagram of a flow chart for calculating a dual-axis control component based on the target end pose and the measured end pose provided by an embodiment of the present invention; on the basis of the foregoing embodiment, with continued reference to Figure 8, the present embodiment is The specific implementation of the calculation of the dual-axis control component and the measurement of the terminal posture are not limited, and those skilled in the art can set it according to specific application requirements and design requirements. Preferably, according to the target terminal posture and the measurement terminal posture in this embodiment Calculation of dual-axis control components can include:
S34:获取云台的末端角速度。S34: Obtain the end angular velocity of the gimbal.
其中,可以通过角速度传感器对云台的末端(相机)进行角度检测,从而可以获取到云台的末端角速度。Among them, the angle detection of the end (camera) of the pan-tilt can be performed by an angular velocity sensor, so that the end angular velocity of the pan-tilt can be obtained.
S35:根据目标末端姿态、测量末端姿态和末端角速度确定双轴控制分量。S35: Determine the dual-axis control component according to the target end attitude, the measured end attitude and the end angular velocity.
在获取到末端角速度之后,可以利用目标末端姿态、测量末端姿态和末端角速度来确定双轴控制分量,具体的,参考附图9所示,根据目标末端姿态、测量末端姿态和末端角速度确定双轴控制分量可以包括:After the terminal angular velocity is obtained, the target terminal attitude, the measured terminal attitude and the terminal angular velocity can be used to determine the dual-axis control component. Specifically, referring to Figure 9, the dual-axis control component can be determined according to the target terminal attitude, the measured terminal attitude and the terminal angular velocity. Control components can include:
S351:根据目标末端姿态和测量末端姿态确定云台的姿态控制误差。S351: Determine the attitude control error of the PTZ according to the target end attitude and the measured end attitude.
其中,在获取到目标末端姿态和测量末端姿态之后,可以将目标末端姿态和测量末端姿态进行比较,从而可以确定云台的姿态控制误差。举例来说:姿态控制误差可以为目标末端姿态与测量末端姿态的差值;或者,姿态控制误差也可以为测量末端姿态与目标末端姿态的比值;或者,姿态控制误差也可以为(目标末端姿态-测量末端姿态)与目标末端姿态的比值;具体的,本领域技术人员可以根据不同的设计需求采用不同的方式来确定云台的姿态控制误差,在此不再赘述。Among them, after obtaining the target end posture and the measurement end posture, the target end posture and the measurement end posture can be compared, so that the attitude control error of the pan/tilt can be determined. For example, the attitude control error can be the difference between the target end attitude and the measured end attitude; or the attitude control error can also be the ratio of the measured end attitude to the target end attitude; or the attitude control error can also be (target end attitude -Measuring the ratio of the end posture of the target) to the end posture of the target; specifically, those skilled in the art can use different methods to determine the attitude control error of the PTZ according to different design requirements, which will not be repeated here.
S352:根据姿态控制误差和末端角速度确定双轴控制分量。S352: Determine the dual-axis control component according to the attitude control error and the terminal angular velocity.
在获取到姿态控制误差之后,可以对姿态控制误差和末端角速度进行分析处理,根据分析处理结果可以确定双轴控制分量。具体的,参考附图10所示,本实施例中的根据姿态控制误差和末端角速度确定双轴控制分量可以包括:After the attitude control error is obtained, the attitude control error and the end angular velocity can be analyzed and processed, and the dual-axis control component can be determined according to the analysis and processing results. Specifically, referring to FIG. 10, determining the dual-axis control component according to the attitude control error and the terminal angular velocity in this embodiment may include:
S3521:针对姿态控制误差和末端角速度,去除姿态控制误差和末端角速度中与第一支架相关的分量,生成与第二支架和第三支架相关的局部姿态控制误差和局部末端角速度。S3521: For the attitude control error and the end angular velocity, remove the components related to the first support from the attitude control error and the end angular velocity, and generate the local attitude control error and the local end angular velocity related to the second support and the third support.
具体的,参考附图11所示,针对姿态控制误差和末端角速度,去除姿态控制误差和末端角速度中与第一支架相关的分量,生成与第二支架和第三支架相关的局部姿态控制误差和局部末端角速度可以包括:Specifically, referring to FIG. 11, for the attitude control error and the end angular velocity, the components related to the first support in the attitude control error and the end angular velocity are removed, and the local attitude control errors related to the second support and the third support are generated. The local end angular velocity can include:
S35211:将姿态控制误差和末端角速度映射至关节角空间中,获得与第一电机、第二电机和第三电机相对应的关节角度控制误差和关节角速度。S35211: Map the attitude control error and the end angular velocity to the joint angle space, and obtain the joint angle control error and the joint angular velocity corresponding to the first motor, the second motor, and the third motor.
S35212:针对关节角度控制误差和关节角速度,将位于第一电机的轴向上的关节角度控制误差和关节角速度置零,获得位于第二电机的轴向和第三电机的轴向上的局部关节角度控制误差和局部关节角速度。S35212: For joint angle control error and joint angular velocity, set the joint angle control error and joint angular velocity on the axis of the first motor to zero to obtain the local joints on the axis of the second motor and the axis of the third motor Angle control error and local joint angular velocity.
S35213:将局部关节角度控制误差和局部关节角速度映射回体坐标系,获得与第二支架和第三支架相关的局部姿态控制误差和局部末端角速度。S35213: Map the local joint angle control error and the local joint angular velocity back to the body coordinate system to obtain the local attitude control error and the local end angular velocity related to the second bracket and the third bracket.
其中,在云台位于奇异点邻域内时,为了实现对第二支架和第三支架的 姿态进行准确控制,需要将第一支架的运动与第二支架和第三支架的运动解耦,若将第一支架的运动、第二支架的运动和第三支架的运动看作为三维运动的话,则需要将第二支架的运动和第三支架的运动在三维运动中解耦出来。具体的,由雅克比逆矩阵J(θ) -1,分别把姿态控制误差δR和末端角速度ω b映射到关节角空间,得到关节角度控制误差θ e和关节角速度
Figure PCTCN2019100433-appb-000047
Among them, when the pan/tilt is located in the neighborhood of the singular point, in order to accurately control the posture of the second bracket and the third bracket, the movement of the first bracket needs to be decoupled from the movement of the second bracket and the third bracket. If the movement of the first bracket, the movement of the second bracket and the movement of the third bracket are regarded as three-dimensional movement, the movement of the second bracket and the movement of the third bracket need to be decoupled from the three-dimensional movement. Specifically, from the Jacobian inverse matrix J(θ) -1 , the attitude control error δR and the end angular velocity ω b are respectively mapped to the joint angle space to obtain the joint angle control error θ e and the joint angular velocity
Figure PCTCN2019100433-appb-000047
θ e=J(θ) -1δR θ e =J(θ) -1 δR
Figure PCTCN2019100433-appb-000048
Figure PCTCN2019100433-appb-000048
针对第一支架而言,需要将关节角度控制误差θ e和关节角速度
Figure PCTCN2019100433-appb-000049
位于第一电机的电机轴方向上的关节角度控制误差
Figure PCTCN2019100433-appb-000050
和关节角速度
Figure PCTCN2019100433-appb-000051
置零,从而可以获得位于第二电机的轴向和第三电机的轴向上的局部关节角度控制误差
Figure PCTCN2019100433-appb-000052
和局部关节角速度
Figure PCTCN2019100433-appb-000053
即:
For the first bracket, the joint angle control error θ e and the joint angular velocity need to be
Figure PCTCN2019100433-appb-000049
Joint angle control error in the direction of the motor shaft of the first motor
Figure PCTCN2019100433-appb-000050
And joint angular velocity
Figure PCTCN2019100433-appb-000051
Set to zero to obtain the local joint angle control error in the axial direction of the second motor and the axial direction of the third motor
Figure PCTCN2019100433-appb-000052
And local joint angular velocity
Figure PCTCN2019100433-appb-000053
which is:
Figure PCTCN2019100433-appb-000054
Figure PCTCN2019100433-appb-000054
Figure PCTCN2019100433-appb-000055
Figure PCTCN2019100433-appb-000055
其中,
Figure PCTCN2019100433-appb-000056
among them,
Figure PCTCN2019100433-appb-000056
而后,利用雅克比矩阵J(θ),把局部关节角度控制误差
Figure PCTCN2019100433-appb-000057
和局部关节角速度
Figure PCTCN2019100433-appb-000058
映射回体坐标系,从而可以获得与第二支架和第三支架相关的局部姿态控制误差
Figure PCTCN2019100433-appb-000059
和局部末端角速度
Figure PCTCN2019100433-appb-000060
Then, using the Jacobian matrix J(θ), the local joint angle control error
Figure PCTCN2019100433-appb-000057
And local joint angular velocity
Figure PCTCN2019100433-appb-000058
Mapping back to the body coordinate system, so as to obtain the local attitude control errors related to the second bracket and the third bracket
Figure PCTCN2019100433-appb-000059
And local end angular velocity
Figure PCTCN2019100433-appb-000060
Figure PCTCN2019100433-appb-000061
Figure PCTCN2019100433-appb-000061
Figure PCTCN2019100433-appb-000062
Figure PCTCN2019100433-appb-000062
其中,针对第二支架和第三支架而言,可以将其结构看作为一个二连杆结构,三维姿态控制也随之变成了二维姿态控制,而对于上述二连杆结构而言,其雅克比矩阵
Figure PCTCN2019100433-appb-000063
也降阶成二维,不存在奇异点:
Among them, for the second bracket and the third bracket, the structure can be regarded as a two-link structure, and the three-dimensional attitude control also becomes a two-dimensional attitude control. For the above-mentioned two-link structure, Jacobian matrix
Figure PCTCN2019100433-appb-000063
Also reduced to two-dimensional, there is no singularity:
Figure PCTCN2019100433-appb-000064
Figure PCTCN2019100433-appb-000064
此时,当利用局部姿态控制误差
Figure PCTCN2019100433-appb-000065
和局部末端角速度
Figure PCTCN2019100433-appb-000066
对第二支架和第三支架控制时,在位置环输入为解耦后的姿态控制误差
Figure PCTCN2019100433-appb-000067
速度环反馈为解耦后的体角速度
Figure PCTCN2019100433-appb-000068
并且,体坐标系到关节角空间的映射关系改为二维雅克比逆矩阵
Figure PCTCN2019100433-appb-000069
At this time, when using the local attitude control error
Figure PCTCN2019100433-appb-000065
And local end angular velocity
Figure PCTCN2019100433-appb-000066
When controlling the second bracket and the third bracket, the position loop input is the attitude control error after decoupling
Figure PCTCN2019100433-appb-000067
The velocity loop feedback is the body angular velocity after decoupling
Figure PCTCN2019100433-appb-000068
And, the mapping relationship from the body coordinate system to the joint angle space is changed to a two-dimensional Jacobian inverse matrix
Figure PCTCN2019100433-appb-000069
通过上述方式获取到局部姿态控制误差和局部末端角速度,有效地实现了对第一支架的运动与第二支架的运动、第三支架的运动进行解耦,从而可以获得与第二支架和第三支架相关的局部姿态控制误差和局部末端角速度,进而提高了对第二支架和第三支架的运动进行姿态控制的稳定可靠性。The local attitude control error and the local end angular velocity are obtained through the above method, which effectively realizes the decoupling of the movement of the first bracket, the movement of the second bracket, and the movement of the third bracket, so as to obtain the connection between the second bracket and the third bracket. The local attitude control error and the local terminal angular velocity related to the support further improve the stability and reliability of the attitude control of the movement of the second support and the third support.
S3522:根据局部姿态控制误差与局部末端角速度确定双轴控制分量。S3522: Determine the dual-axis control component according to the local attitude control error and the local end angular velocity.
在获取到局部姿态控制误差和局部末端角速度之后,可以根据局部姿态控制误差与局部末端角速度确定双轴控制分量,具体的,一种可实现的方式为:将局部姿态控制误差和局部末端角速度确定为双轴控制分量;或者,也可以对局部姿态控制误差和局部末端角速度进行分析处理,根据分析处理结果来确定双轴控制分量。After obtaining the local attitude control error and the local terminal angular velocity, the biaxial control component can be determined according to the local attitude control error and the local terminal angular velocity. Specifically, one possible way is to determine the local attitude control error and the local terminal angular velocity. It is a dual-axis control component; alternatively, the local attitude control error and local end angular velocity can be analyzed and processed, and the dual-axis control component can be determined according to the analysis and processing results.
其中,在将局部姿态控制误差和局部末端角速度直接确定为双轴控制分量时,则可以根据局部姿态控制误差和局部末端角速度对第二支架和第三支架进行控制。参考附图12所示,此时的根据双轴控制分量对第二支架和第三支架进行控制可以包括如下过程:(1)在获取到目标末端(相机)姿态R tar和测量(融合)末端(相机)姿态R eb之后,可以根据目标末端姿态R tar和测量末端姿态R eb获得姿态控制误差δR,而后针对姿态控制误差δR,获得局部姿态控制误差
Figure PCTCN2019100433-appb-000070
将局部姿态控制误差
Figure PCTCN2019100433-appb-000071
输入到位置环控制器C p,从而获取目标末端角速度,通过雅克比逆矩阵将所述目标末端角速度映射到关节角空间,获得目标关节角速度;
Among them, when the local attitude control error and the local end angular velocity are directly determined as the dual-axis control components, the second support and the third support can be controlled according to the local attitude control error and the local end angular velocity. Referring to FIG. 12, the control of the second bracket and the third bracket according to the dual-axis control component at this time may include the following processes: (1) After acquiring the target end (camera) attitude R tar and measuring (fusion) end after (camera) pose R eb, can be obtained according to the target posture terminal R tar and R eb posture measuring tip attitude control error δR, then for attitude control error δR, obtain the local attitude control error
Figure PCTCN2019100433-appb-000070
Local attitude control error
Figure PCTCN2019100433-appb-000071
Input to the position loop controller C p to obtain the target end angular velocity, and map the target end angular velocity to the joint angular space through the Jacobian inverse matrix to obtain the target joint angular velocity;
(2)获取测量末端角速度ω b,而后对测量末端角速度ω b进行逆运动学解耦处理(Kinematic decoupling),获得与第二电机和第三电机相对应的局部末端角速度
Figure PCTCN2019100433-appb-000072
通过雅克比逆矩阵将所述目标末端角速度映射到关节角空间,获得测量关节角速度;
(2) Obtain the measured end angular velocity ω b , and then perform inverse kinematic decoupling (Kinematic decoupling) on the measured end angular velocity ω b to obtain the local end angular velocity corresponding to the second motor and the third motor
Figure PCTCN2019100433-appb-000072
Map the target end angular velocity to the joint angular space through the Jacobian inverse matrix to obtain the measured joint angular velocity;
(3)计算所述目标关节角速度和所述测量关节角速度的差值,而后将差值输入到速度环控制器C v,从而可以获得用于对受控对象P(第二电机和第三电机)进行控制的力矩,从而实现了利用局部姿态控制误差和局部末端角速度,通过第二电机和第三电机对第二支架和第三支架进行闭环控制。 (3) Calculate the difference between the target joint angular velocity and the measured joint angular velocity, and then input the difference to the speed loop controller C v , so as to obtain the control object P (the second motor and the third motor) ) To control the torque, so as to realize the closed-loop control of the second bracket and the third bracket through the second motor and the third motor by using the local attitude control error and the local terminal angular velocity.
需要说明的是,本实施例中的步骤S34-S35与步骤S31-S33之间的执行顺序并不限于序号所显示的顺序,也即,步骤S34-S35也可以在步骤S31-S33之前执行,或者,步骤S34-S35也可以与步骤S31-S33同时执行。It should be noted that the order of execution between steps S34-S35 and steps S31-S33 in this embodiment is not limited to the order shown by the serial number, that is, steps S34-S35 can also be executed before steps S31-S33. Alternatively, steps S34-S35 can also be executed simultaneously with steps S31-S33.
通过上述方式计算获得双轴控制分量(即局部姿态控制误差
Figure PCTCN2019100433-appb-000073
和局部末端角速度
Figure PCTCN2019100433-appb-000074
),有效地保证了双轴控制分量获取的准确可靠性,进而提高了基于双轴控制分量对第二支架和第三支架的运动姿态进行控制的稳定可靠性。
The two-axis control component (that is, the local attitude control error
Figure PCTCN2019100433-appb-000073
And local end angular velocity
Figure PCTCN2019100433-appb-000074
), which effectively guarantees the accuracy and reliability of the acquisition of the dual-axis control component, thereby improving the stability and reliability of the control of the movement posture of the second bracket and the third bracket based on the dual-axis control component.
图14为本发明实施例提供的另一种云台控制方法的流程示意图;在上述实施例的基础上,参考附图14所示,在确定云台位于奇异点邻域外之后,本 实施例中的方法还可以包括:Figure 14 is a schematic flow chart of another method for controlling a pan/tilt head provided by an embodiment of the present invention; on the basis of the above-mentioned embodiment, referring to FIG. 14, after determining that the pan/tilt head is located outside the neighborhood of a singular point, in this embodiment The method can also include:
S201:根据负载的目标末端姿态和测量末端姿态计算三轴控制分量,其中,三轴控制分量与第一支架、第二支架和第三支架相关。S201: Calculate the three-axis control component according to the target end posture of the load and the measured end posture, where the three-axis control component is related to the first support, the second support, and the third support.
S202:根据三轴控制分量对第一支架、第二支架和第三支架进行控制。S202: Control the first support, the second support and the third support according to the three-axis control components.
具体的,当云台位于奇异点邻域外时,此时对云台的姿态控制不会存在奇异点邻域而影响云台控制稳定性的情况,因此,在获取到目标末端姿态和测量末端姿态之后,可以通过前述的三轴姿态闭环控制器对第一支架、第二支架和第三支架进行控制,具体的,参考附图1所示,根据三轴控制分量对第一支架、第二支架和第三支架进行控制可以包括如下过程:Specifically, when the gimbal is located outside the neighborhood of the singular point, the attitude control of the gimbal will not affect the stability of the gimbal control due to the neighborhood of the singular point. Therefore, the end attitude of the target and the measurement end attitude are obtained. After that, the first bracket, the second bracket, and the third bracket can be controlled by the aforementioned three-axis attitude closed-loop controller. Specifically, referring to FIG. 1, the first bracket and the second bracket are controlled according to the three-axis control components. Controlling with the third bracket can include the following processes:
(1)在获取到目标末端(相机)姿态R tar和测量(融合)末端(相机)姿态R eb之后,可以根据目标末端姿态R tar和测量末端姿态R eb获得姿态控制误差δR,而后将姿态控制误差δR输入到位置环控制器C p,从而获取目标末端角速度,通过雅克比逆矩阵将所述目标末端角速度映射到关节角空间,获得目标关节角速度; After (1) terminal (camera) pose R eb in access to the target terminal (the camera) pose R tar and measuring (fusion) can be obtained pose the target terminal posture R tar and measuring tip attitude R eb control error [delta] R, and will pose The control error δR is input to the position loop controller C p to obtain the target end angular velocity, and the target end angular velocity is mapped to the joint angular space through the Jacobian inverse matrix to obtain the target joint angular velocity;
(2)获取测量末端角速度ω b,而后通过雅克比逆矩阵,将所述测量末端角速度ω b映射至关节角空间,获得测量关节角速度
Figure PCTCN2019100433-appb-000075
(2) Obtain the measured end angular velocity ω b , and then use the Jacobian inverse matrix to map the measured end angular velocity ω b to the joint angular space to obtain the measured joint angular velocity
Figure PCTCN2019100433-appb-000075
(3)计算所述目标关节角速度和所述测量关节角速度的差值,而后将差值输入到速度环控制器C v,从而可以获得用于对受控对象P(第一电机、第二电机和第三电机)进行控制的力矩,进而实现了通过第一电机、第二电机和第三电机分别带动第一支架、与第二支架和第三支架进行三轴闭环控制,有效地保证了对云台姿态进行精确控制。 (3) Calculate the difference between the target joint angular velocity and the measured joint angular velocity, and then input the difference to the speed loop controller C v , so as to obtain the control object P (first motor, second motor And the third motor) to control the torque, and then the first motor, the second motor and the third motor are used to drive the first support, and the second support and the third support to perform three-axis closed-loop control, which effectively ensures the PTZ attitude is precisely controlled.
图15为本发明实施例提供的又一种云台控制方法的流程示意图;在上述任意一个实施例的基础上,参考附图15所示,本实施例中的方法还可以包括:Fig. 15 is a schematic flow chart of yet another method for controlling a pan/tilt head provided by an embodiment of the present invention; on the basis of any of the above embodiments, referring to Fig. 15, the method in this embodiment may further include:
S301:若云台在当前时刻位于奇异点邻域,在上一时刻位于奇异点邻域外;或者,若云台在当前时刻位于奇异点邻域外,在上一时刻位于奇异点邻域时,则获取云台在上一时刻的第一驱动信号和在当前时刻的第二驱动信号。S301: If the pan/tilt is located in the neighborhood of the singular point at the current moment and was outside the neighborhood of the singular point at the previous moment; or, if the pan/tilt is located outside the neighborhood of the singular point at the current moment and was located in the neighborhood of the singular point at the previous moment, then Acquire the first driving signal of the pan/tilt at the previous moment and the second driving signal of the current moment.
为了便于描述,将云台位于奇异点邻域的状态称为云台处于奇异点控制模式,将云台位于奇异点邻域外的状态称为云台处于三轴控制模式;由此可知,在对云台进行控制时,云台可以处于不同的控制模式,并且云台的不同控制模式之间可以进行切换,例如:云台在当前时刻位于奇异点邻域,在上一时刻位于奇异点邻域外,即云台由上一时刻的三轴控制模式切换为当前时 刻的奇异点控制模式;或者,云台在当前时刻位于奇异点邻域外,在上一时刻位于奇异点邻域,也即,云台由上一时刻的奇异点邻域模式切换为当前时刻的三轴控制模式。For ease of description, the state where the pan/tilt is located in the neighborhood of the singular point is called the pan/tilt in the singular point control mode, and the state where the pan/tilt is located outside the neighborhood of the singular point is called the pan/tilt in the three-axis control mode; When the pan/tilt is controlled, the pan/tilt can be in different control modes, and the different control modes of the pan/tilt can be switched, for example: the pan/tilt is located in the neighborhood of the singularity at the current moment, and outside the neighborhood of the singularity at the previous moment , That is, the pan/tilt is switched from the three-axis control mode at the last moment to the singular point control mode at the current moment; or, the pan/tilt is located outside the singular point neighborhood at the current moment, and is located in the singular point neighborhood at the previous moment, that is, cloud The station is switched from the singular point neighborhood mode at the previous moment to the three-axis control mode at the current moment.
当云台在不同的控制模式之间进行切换时,为了保证云台以及位于云台上的负载工作的稳定性,可以获取云台在上一时刻的第一驱动信号和在当前时刻的第二驱动信号,其中,第一驱动信号和第二驱动信号可以是以下任意一种形式:控制力矩、转速信号、电压信号、电流信号等。When the pan-tilt is switched between different control modes, in order to ensure the stability of the pan-tilt and the load on the pan-tilt, the first driving signal of the pan-tilt at the previous moment and the second driving signal at the current moment can be obtained. The driving signal, where the first driving signal and the second driving signal can be in any of the following forms: control torque, rotational speed signal, voltage signal, current signal, and so on.
S302:根据第一驱动信号和第二驱动信号确定至少一个平滑过渡信号。S302: Determine at least one smooth transition signal according to the first driving signal and the second driving signal.
在获取到第一驱动信号和第二驱动信号之后,可以对第一驱动信号和第二驱动信号进行分析处理,从而可以确定至少一个平滑过渡信号,具体的,参考附图16所示,根据第一驱动信号和第二驱动信号确定至少一个平滑过渡信号可以包括:After the first drive signal and the second drive signal are acquired, the first drive signal and the second drive signal can be analyzed and processed, so that at least one smooth transition signal can be determined. Specifically, referring to FIG. The determination of at least one smooth transition signal by a driving signal and a second driving signal may include:
S3021:获取与第一驱动信号相对应的加权系数。S3021: Obtain a weighting coefficient corresponding to the first driving signal.
其中,参考附图17所示,获取与第一驱动信号相对应的加权系数可以包括:Wherein, referring to FIG. 17, obtaining the weighting coefficient corresponding to the first driving signal may include:
S30211:获取预设的切换时间和进行切换操作的切换时刻。S30211: Acquire the preset switching time and the switching time for performing the switching operation.
其中,切换时间为云台进行控制模式切换操作所需要的总时间,该切换时间可以是用户指定或者用户预先配置的。而切换时刻是指云台进行控制模式切换操作所历经的时刻。举例来说:切换时间为5min,切换开始时间为12:00,那么根据切换时间5min可以确定与切换开始时间12:00相对应的切换结束时间12:05,切换时刻则为切换开始时间12:00与切换结束时间12:05中的任意一个时间点。Wherein, the switching time is the total time required for the pan/tilt to perform the control mode switching operation, and the switching time may be specified by the user or pre-configured by the user. The switching time refers to the time that the pan/tilt head performs the control mode switching operation. For example: the switching time is 5min and the switching start time is 12:00, then the switching end time 12:05 corresponding to the switching start time 12:00 can be determined according to the switching time 5min, and the switching time is the switching start time 12: Either time between 00 and the switching end time 12:05.
S30212:根据切换时间和切换时刻确定加权系数。S30212: Determine the weighting coefficient according to the switching time and the switching moment.
其中,在获取到切换时间和切换时刻之后,可以利用以下公式确定加权系数:Among them, after the handover time and handover time are obtained, the following formula can be used to determine the weighting coefficient:
Figure PCTCN2019100433-appb-000076
Figure PCTCN2019100433-appb-000076
其中,μ为加权系数,t 0为切换时间,t为切换时刻。 Among them, μ is the weighting coefficient, t 0 is the switching time, and t is the switching time.
通过上述公式可知,加权系数与切换时刻满足线性关系,随着切换时刻的不断变化,加权系数也会发生变化。需要注意的是,本实施例中的加权系数与切换时间和切换时刻的关系并不限于上述所例举的公式,本领域技术人 员还可以根据不同的应用场景、不同的控制参数和工况,将加权系数和切换时刻之间的对应关系确定为其他线性或非线性的映射关系,在此不再赘述。It can be seen from the above formula that the weighting coefficient and the switching time meet a linear relationship, and as the switching time changes continuously, the weighting coefficient will also change. It should be noted that the relationship between the weighting coefficient and the switching time and the switching time in this embodiment is not limited to the above-exemplified formulas, and those skilled in the art can also according to different application scenarios, different control parameters and operating conditions, The correspondence between the weighting coefficient and the switching time is determined to be other linear or non-linear mapping relations, which will not be repeated here.
S3022:利用加权系数、第一驱动信号和第二驱动信号确定至少一个平滑过渡信号。S3022: Determine at least one smooth transition signal by using the weighting coefficient, the first driving signal and the second driving signal.
在获取到加权系数、第一驱动信号和第二驱动信号之后,可以利用以下公式确定至少一个平滑过渡信号:After obtaining the weighting coefficient, the first driving signal, and the second driving signal, the following formula may be used to determine at least one smooth transition signal:
T=μT former+(1-μ)T latter T=μT former +(1-μ)T latter
其中,T为平滑过渡信号,μ为加权系数,T former为第一驱动信号,T latter为第二驱动信号。 Among them, T is the smooth transition signal, μ is the weighting coefficient, T former is the first driving signal, and T latter is the second driving signal.
S303:基于平滑过渡信号驱动云台进行运动。S303: Drive the pan/tilt to move based on the smooth transition signal.
在获取到平滑过渡信号之后,可以基于平滑过渡信号驱动云台进行运动,具体的,可以使得云台由第一驱动信号、平滑过渡信号调整至第二驱动信号,需要注意的是,在驱动云台进行运动的过程中,第一驱动信号和第二驱动信号是实时变化的,而在切换的过渡期间的驱动信号是由第一驱动信号和第二驱动信号共同确定;从而实现了在云台进行模式切换的过程中,云台的运动可以平滑进行过渡,进而保证了云台的稳定可靠性。After the smooth transition signal is obtained, the pan/tilt can be driven to move based on the smooth transition signal. Specifically, the pan/tilt can be adjusted from the first drive signal and the smooth transition signal to the second drive signal. It should be noted that when driving the cloud During the movement of the platform, the first drive signal and the second drive signal change in real time, and the drive signal during the switching transition period is determined by the first drive signal and the second drive signal together; During the mode switching, the movement of the pan/tilt can be smoothly transitioned, thereby ensuring the stability and reliability of the pan/tilt.
通过上述过程,有效地实现了平滑地处理云台在三轴控制模式和奇异点控制模式之间进行来回切换,使得云台在切换过程中无抖动,从而保证了负载工作的稳定可靠性,同时也保证了云台工作的稳定可靠性,进一步提高了该方法的实用性。Through the above process, the smooth processing of the gimbal switching back and forth between the three-axis control mode and the singular point control mode is effectively realized, so that the gimbal has no jitter during the switching process, thus ensuring the stability and reliability of the load work. It also ensures the stability and reliability of the pan-tilt work, and further improves the practicability of the method.
具体应用时,参考附图18所示,本应用实施例提供了一种云台控制方法,该云台控制方法可以在云台位于奇异点邻域内时,将用于对第一支架、第二支架和第三支架进行控制的第一电机、第二电机和第三电机解耦成一个第一电机和一个双轴稳定器(包括:用于对第二支架进行控制的第二电机和用于对第三支架进行控制的第三电机),相对应的,用于控制第一电机、第二电机和第三电机的三轴姿态闭环控制器也可以解耦成两个控制器来实现。For specific applications, referring to FIG. 18, this application embodiment provides a pan/tilt control method. The pan/tilt control method can be used to control the first bracket and the second bracket when the pan/tilt is located in the neighborhood of the singular point. The first motor, the second motor and the third motor controlled by the support and the third support are decoupled into a first motor and a biaxial stabilizer (including: a second motor for controlling the second support and a Correspondingly, the three-axis attitude closed-loop controller for controlling the first motor, the second motor and the third motor can also be decoupled into two controllers.
其中,第一个控制器为用于控制第一电机的关节角度闭环控制器。具体的,在利用关节角度闭环控制器对第一电机进行控制时,需要先通过逆运动学求解,计算目标末端姿态对应的目标关节角度,再利用第一电机的目标关节角度和角度传感器的测量关节角度对第一电机进行关节角度闭环控制,具体的实现方式可参考上述实施例的陈述内容,在此不再赘述。Among them, the first controller is a joint angle closed loop controller for controlling the first motor. Specifically, when using the joint angle closed-loop controller to control the first motor, it is necessary to first solve it through inverse kinematics to calculate the target joint angle corresponding to the target end posture, and then use the target joint angle of the first motor and the measurement of the angle sensor The joint angle performs closed-loop control of the joint angle of the first motor. For a specific implementation manner, please refer to the content of the foregoing embodiment, which will not be repeated here.
另一个控制器为用于控制第二电机和第三电机的双轴姿态闭环控制器。在利用双轴姿态闭环控制器对第二电机和第三电机进行控制时,首先,需要把姿态控制误差和角速度在第一电机方向上的分量分离,保留姿态控制误差和角速度在第二电机和第三电机方向上的分量。这时,第二电机和第三电机的结构可以等效为一个双轴稳定器,从而把雅克比矩阵的维度降阶成二维,解决了雅克比矩阵奇异性问题,进一步的,可以利用二维的位置环-速度环的姿态闭环控制器来控制第二电机和第三电机,具体的实现方式可参考上述实施例的陈述内容,在此不再赘述。The other controller is a dual-axis attitude closed-loop controller for controlling the second motor and the third motor. When using a dual-axis attitude closed-loop controller to control the second motor and the third motor, firstly, it is necessary to separate the attitude control error and the angular velocity component in the direction of the first motor, and keep the attitude control error and angular velocity in the second motor and The component in the third motor direction. At this time, the structure of the second motor and the third motor can be equivalent to a two-axis stabilizer, thereby reducing the dimension of the Jacobian matrix to two dimensions, solving the problem of the singularity of the Jacobian matrix. The position loop-speed loop posture closed-loop controller of the dimension is used to control the second motor and the third motor. For the specific implementation manner, please refer to the statement content of the foregoing embodiment, which will not be repeated here.
具体的,该云台控制方法包括如下步骤:Specifically, the PTZ control method includes the following steps:
step1:针对云台进行奇异性判断,获取云台上第二电机的关节角度,根据第二电机的关节角度判断云台所处的控制模式。Step1: Perform singularity judgment for the gimbal, obtain the joint angle of the second motor on the gimbal, and judge the control mode of the gimbal according to the joint angle of the second motor.
step2:在第二电机的关节角度位于奇异点邻域所对应的角度范围时,则确定云台处于奇异点控制模式;若第二电机的关节角度未在奇异点邻域所对应的角度范围内时,则确定云台处于三轴控制模式。step2: When the joint angle of the second motor is within the angle range corresponding to the singular point neighborhood, determine that the gimbal is in singular point control mode; if the joint angle of the second motor is not within the angle range corresponding to the singular point neighborhood , It is determined that the pan/tilt is in three-axis control mode.
step31:在云台处于三轴控制模式时,则可以获取到用于对第一支架、第二支架和第三支架进行控制的三轴控制量,根据三轴控制量,通过第一电机、第二电机和第三电机对第一支架、第二支架和第三支架进行控制。step31: When the pan/tilt is in the three-axis control mode, the three-axis control value used to control the first, second and third supports can be obtained. According to the three-axis control value, the first motor and the second The second motor and the third motor control the first support, the second support and the third support.
step32:在云台处于奇异点控制模式时,则通过逆运动学求解,计算目标末端姿态所对应的三个电机的目标关节角度,从该目标关节角度中获取第一电机的目标关节角度;同时,对第一电机的运动与第二电机和第三电机的运动进行解耦,获得用于对第二电机和第三电机进行控制的局部姿态控制误差与局部末端角速度。step32: When the gimbal is in the singular point control mode, calculate the target joint angles of the three motors corresponding to the target end posture through inverse kinematics, and obtain the target joint angle of the first motor from the target joint angle; at the same time; , Decoupling the movement of the first motor from the movement of the second motor and the third motor to obtain the local attitude control error and the local terminal angular velocity for controlling the second motor and the third motor.
step4:根据目标关节角度,通过第一电机带动第一支架进行闭环控制;根据局部姿态控制误差、局部末端角速度,通过第二电机和第三电机分别带动第二支架和第三支架进行闭环控制。Step4: According to the target joint angle, the first bracket is driven by the first motor for closed-loop control; according to the local attitude control error and the local end angular velocity, the second motor and the third motor are used to drive the second bracket and the third bracket for closed-loop control.
另外,在上述对云台进行控制的过程中,本实施例中的方法还可以包括:In addition, in the above process of controlling the PTZ, the method in this embodiment may further include:
step11:检测云台的控制模式是否发生了切换,在确定云台的控制模式发生切换时,则可以对云台控制模式的切换过程进行平滑处理操作。Step11: Detect whether the control mode of the pan/tilt has been switched, and when it is determined that the control mode of the pan/tilt is switched, the switching process of the control mode of the pan/tilt can be smoothly processed.
通过上述云台控制方法对云台进行控制,不仅扩大云台姿态控制的范围;并且,在奇异点邻域内,能保证云台的稳定性能;具体的,可以使得云台在不同的运动工况下(如推动摇杆,手柄转动和推哪儿停哪儿等),实现运动 解耦,进一步提高了云台和负载工作的稳定可靠性。Controlling the gimbal through the above-mentioned gimbal control method not only expands the range of gimbal attitude control; moreover, it can ensure the stable performance of the gimbal in the neighborhood of the singularity; specifically, it can make the gimbal under different motion conditions Down (such as pushing the rocker, turning the handle and pushing where to stop, etc.), the movement decoupling is realized, and the stability and reliability of the pan/tilt and load are further improved.
图19为本发明实施例提供的一种云台控制设备的结构示意图;参考附图19所示,本实施例提供了一种云台控制设备,该云台控制设备可以执行上述的云台控制方法,其中,云台至少包括依次连接的第一支架、第二支架和用于连接负载的第三支架;具体的,云台控制设备包括:Figure 19 is a schematic structural diagram of a pan/tilt control device provided by an embodiment of the present invention; referring to FIG. 19, this embodiment provides a pan/tilt control device that can perform the above-mentioned pan/tilt control The method, wherein the pan-tilt at least includes a first support, a second support, and a third support for connecting a load, which are sequentially connected; specifically, the pan-tilt control device includes:
检测模块11,用于检测云台是否位于预设的奇异点邻域;The detection module 11 is used to detect whether the pan-tilt is located in a preset singularity neighborhood;
获取模块12,用于当云台位于奇异点邻域时,获取云台的目标末端姿态和测量末端姿态;The acquiring module 12 is used to acquire the target end attitude and the measurement end attitude of the pan/tilt when the pan/tilt is located in the neighborhood of the singularity;
计算模块13,用于根据目标末端姿态和测量末端姿态计算单轴控制分量和双轴控制分量;其中,单轴控制分量与第一支架相关,双轴控制分量与第二支架和第三支架相关;The calculation module 13 is used to calculate the single-axis control component and the dual-axis control component according to the target end attitude and the measured end attitude; wherein the single-axis control component is related to the first support, and the dual-axis control component is related to the second support and the third support ;
控制模块14,用于根据单轴控制分量对第一支架进行控制,并根据双轴控制分量对第二支架和第三支架进行控制。The control module 14 is used to control the first support according to the single-axis control component, and to control the second support and the third support according to the dual-axis control component.
需要注意的是,图19所示装置还可以执行图1-图17所示实施例的方法,本实施例未详细描述的部分,可参考对图1-图17所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1-图17所示实施例中的描述,在此不再赘述。It should be noted that the device shown in FIG. 19 can also execute the methods of the embodiments shown in FIG. 1 to FIG. 17. For parts that are not described in detail in this embodiment, please refer to the related descriptions of the embodiments shown in FIG. 1 to FIG. 17. For the implementation process and technical effects of this technical solution, refer to the description in the embodiment shown in FIG. 1 to FIG. 17, and will not be repeated here.
在一个可能的设计中,图19所示云台控制设备的结构可实现为一电子设备,该电子设备可以是手机、平板电脑、服务器等各种设备。如图20所示,该电子设备可以包括:一个或多个处理器21和一个或多个存储器22。其中,存储器22用于存储支持电子设备执行上述图1-图17所示实施例中提供的云台控制方法的程序,云台至少包括依次连接的第一支架、第二支架和用于连接负载的第三支架;其中,负载包括以下至少之一:图像获取装置、热源探测装置、生命探测装置。处理器21被配置为用于执行存储器22中存储的程序。具体的,In a possible design, the structure of the pan/tilt control device shown in FIG. 19 can be implemented as an electronic device, which can be various devices such as a mobile phone, a tablet computer, and a server. As shown in FIG. 20, the electronic device may include: one or more processors 21 and one or more memories 22. Wherein, the memory 22 is used to store a program that supports the electronic device to execute the pan/tilt control method provided in the embodiments shown in FIG. 1 to FIG. 17. The pan/tilt at least includes a first bracket, a second bracket, and a load connected in sequence. The third bracket; wherein the load includes at least one of the following: image acquisition device, heat source detection device, life detection device. The processor 21 is configured to execute a program stored in the memory 22. specific,
程序包括一条或多条计算机指令,其中,一条或多条计算机指令被处理器21执行时能够实现如下步骤:The program includes one or more computer instructions, and when one or more computer instructions are executed by the processor 21, the following steps can be implemented:
运行存储器中存储的计算机程序以实现:检测云台是否位于预设的奇异点邻域;当云台位于奇异点邻域时,获取云台的目标末端姿态和测量末端姿态;根据目标末端姿态和测量末端姿态计算单轴控制分量和双轴控制分量;其中,单轴控制分量与第一支架相关,双轴控制分量与第二支架和第三支架 相关;根据单轴控制分量对第一支架进行控制,并根据双轴控制分量对第二支架和第三支架进行控制。Run the computer program stored in the memory to realize: detect whether the pan/tilt is located in the neighborhood of the preset singularity; when the pan/tilt is located in the neighborhood of the singularity, obtain the target end attitude and measurement end attitude of the pan/tilt; according to the target end attitude and The single-axis control component and the dual-axis control component are calculated by measuring the end attitude; the single-axis control component is related to the first support, and the dual-axis control component is related to the second support and the third support; the first support is performed according to the single-axis control component Control and control the second bracket and the third bracket according to the dual-axis control component.
其中,该云台控制装置的结构中还可以包括通信接口23,用于电子设备与其他设备或通信网络通信。Wherein, the structure of the pan/tilt control device may further include a communication interface 23 for the electronic device to communicate with other devices or a communication network.
进一步的,云台还包括:第一电机、第二电机和第三电机,所述第一电机的一端连接于所述第一支架上,另一端与载体相连,用于驱动所述第一支架相对于所述载体转动;所述第二电机设置于所述第一支架上,用于驱动所述第二支架相对于第一支架进行转动;所述第三电机设置于所述第二支架上,用于驱动所述第三支架相对于第二支架进行转动;在处理器21根据目标末端姿态和测量末端姿态计算单轴控制分量时,该处理器21可以用于执行:分别获取与第一电机、第二电机和第三电机相对应的第一测量关节角度、第二测量关节角度和第三测量关节角度;根据目标末端姿态、测量末端姿态、第一测量关节角度、第二测量关节角度和第三测量关节角度,利用牛顿迭代算法确定与第一电机相对应的目标关节角度;将目标关节角度确定为单轴控制分量。Further, the pan/tilt head further includes: a first motor, a second motor, and a third motor, one end of the first motor is connected to the first support, and the other end is connected to the carrier, and is used to drive the first support Rotate relative to the carrier; the second motor is arranged on the first support, and is used to drive the second support to rotate relative to the first support; the third motor is arranged on the second support , Used to drive the third bracket to rotate relative to the second bracket; when the processor 21 calculates the single-axis control component according to the target end attitude and the measured end attitude, the processor 21 may be used to execute: Motor, second motor and third motor corresponding to the first measurement joint angle, second measurement joint angle and third measurement joint angle; according to the target end posture, measurement end posture, first measurement joint angle, and second measurement joint angle And the third measuring joint angle, using Newton iterative algorithm to determine the target joint angle corresponding to the first motor; determining the target joint angle as a single-axis control component.
进一步的,在处理器21根据目标末端姿态和测量末端姿态计算双轴控制分量时,该处理器21可以用于执行:获取云台的末端角速度;根据目标末端姿态、测量末端姿态和末端角速度确定双轴控制分量。Further, when the processor 21 calculates the dual-axis control component according to the target end posture and the measured end posture, the processor 21 can be used to execute: obtain the end angular velocity of the pan/tilt; determine according to the target end posture, the measured end posture and the end angular velocity Two-axis control component.
进一步的,在处理器21根据目标末端姿态、测量末端姿态和末端角速度确定双轴控制分量时,该处理器21可以用于执行:根据目标末端姿态和测量末端姿态确定云台的姿态控制误差;根据姿态控制误差和末端角速度确定双轴控制分量。Further, when the processor 21 determines the dual-axis control component according to the target end posture, the measured end posture, and the end angular velocity, the processor 21 may be used to execute: determine the attitude control error of the pan/tilt according to the target end posture and the measured end posture; The two-axis control component is determined according to the attitude control error and the end angular velocity.
进一步的,在处理器21根据姿态控制误差和末端角速度确定双轴控制分量时,该处理器21可以用于执行:针对姿态控制误差和末端角速度,去除姿态控制误差和末端角速度中与第一支架相关的分量,生成与第二支架和第三支架相关的局部姿态控制误差和局部末端角速度;根据局部姿态控制误差与局部末端角速度确定双轴控制分量。Further, when the processor 21 determines the dual-axis control component according to the attitude control error and the end angular velocity, the processor 21 can be used to execute: for the attitude control error and the end angular velocity, removing the attitude control error and the end angular velocity and the first bracket The related components generate the local attitude control error and the local end angular velocity related to the second support and the third support; the dual-axis control component is determined according to the local attitude control error and the local end angular velocity.
进一步的,在处理器21针对姿态控制误差和末端角速度,去除姿态控制误差和末端角速度中与第一支架相关的分量,生成与第二支架和第三支架相关的局部姿态控制误差和局部末端角速度时,该处理器21可以用于执行:将姿态控制误差和末端角速度映射至关节角空间中,获得与第一电机、第二电 机和第三电机相对应的关节角度控制误差和关节角速度;针对关节角度控制误差和关节角速度,将位于第一电机的轴向上的关节角度控制误差和关节角速度置零,获得位于第二电机的轴向和第三电机的轴向上的局部关节角度控制误差和局部关节角速度;将局部关节角度控制误差和局部关节角速度映射回体坐标系,获得与第二支架和第三支架相关的局部姿态控制误差和局部末端角速度。Further, for the attitude control error and the end angular velocity, the processor 21 removes the components related to the first support from the attitude control error and the end angular velocity, and generates the local attitude control error and the local end angular velocity related to the second support and the third support. When the time, the processor 21 can be used to perform: map the attitude control error and the end angular velocity into the joint angle space, and obtain the joint angle control error and the joint angular velocity corresponding to the first motor, the second motor, and the third motor; Joint angle control error and joint angular velocity, set the joint angle control error and joint angular velocity in the axial direction of the first motor to zero, and obtain the local joint angle control error in the axial direction of the second motor and the third motor. And the local joint angular velocity; the local joint angle control error and the local joint angular velocity are mapped back to the body coordinate system to obtain the local attitude control error and the local end angular velocity related to the second bracket and the third bracket.
进一步的,在处理器21检测云台是否位于奇异点邻域时,该处理器21可以用于执行:获取第二电机的关节角度;在第二电机的关节角度位于奇异点邻域所对应的角度范围内时,则确定云台位于奇异点邻域;或者,在第二电机的关节角度位于奇异点邻域外所对应的角度范围内时,则确定云台位于奇异点邻域外。Further, when the processor 21 detects whether the pan-tilt is located in the neighborhood of the singular point, the processor 21 may be used to execute: obtain the joint angle of the second motor; When the angle is within the range, it is determined that the pan/tilt is located in the neighborhood of the singular point; or, when the joint angle of the second motor is within the corresponding angle range outside the neighborhood of the singularity, it is determined that the pan/tilt is located outside the neighborhood of the singularity.
进一步的,在确定云台位于奇异点邻域外之后,该处理器21可以用于执行:根据负载的目标末端姿态和测量末端姿态计算三轴控制分量,其中,三轴控制分量与第一支架、第二支架和第三支架相关;根据三轴控制分量对第一支架、第二支架和第三支架进行控制。Further, after determining that the pan/tilt is located outside the neighborhood of the singular point, the processor 21 may be used to execute: calculate the three-axis control component according to the target end posture of the load and the measured end posture, where the three-axis control component is related to the first support, The second support is related to the third support; the first support, the second support and the third support are controlled according to the three-axis control components.
进一步的,处理器21还用于:若云台在当前时刻位于奇异点邻域,在上一时刻位于奇异点邻域外;或者,若云台在当前时刻位于奇异点邻域外,在上一时刻位于奇异点邻域时,则获取云台在上一时刻的第一驱动信号和在当前时刻的第二驱动信号;根据第一驱动信号和第二驱动信号确定至少一个平滑过渡信号;基于平滑过渡信号驱动云台进行运动。Further, the processor 21 is further configured to: if the pan/tilt is located in the neighborhood of the singular point at the current moment, it is located outside the neighborhood of the singularity at the previous moment; or, if the pan/tilt is located outside the neighborhood of the singular point at the current moment, at the previous moment When located in the neighborhood of the singular point, obtain the first drive signal of the pan/tilt at the previous moment and the second drive signal at the current moment; determine at least one smooth transition signal according to the first drive signal and the second drive signal; based on the smooth transition The signal drives the pan/tilt to move.
进一步的,在处理器21根据第一驱动信号和第二驱动信号确定至少一个平滑过渡信号时,该处理器21可以用于执行:获取与第一驱动信号相对应的加权系数;利用加权系数、第一驱动信号和第二驱动信号确定至少一个平滑过渡信号。Further, when the processor 21 determines at least one smooth transition signal according to the first driving signal and the second driving signal, the processor 21 may be used to execute: obtain a weighting coefficient corresponding to the first driving signal; use the weighting coefficient, The first drive signal and the second drive signal determine at least one smooth transition signal.
进一步的,在处理器21获取与第一驱动信号相对应的加权系数时,该处理器21可以用于执行:获取预设的切换时间和进行切换操作的切换时刻;根据切换时间和切换时刻确定加权系数。Further, when the processor 21 obtains the weighting coefficient corresponding to the first driving signal, the processor 21 may be used to perform: obtain the preset switching time and the switching time for the switching operation; determine according to the switching time and the switching time Weighting factor.
图20所示装置可以执行图1-图17所示实施例的方法,本实施例未详细描述的部分,可参考对图1-图17所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1-图17所示实施例中的描述,在此不再赘述。The device shown in FIG. 20 can execute the method of the embodiment shown in FIG. 1 to FIG. 17. For parts that are not described in detail in this embodiment, refer to the related description of the embodiment shown in FIG. 1 to FIG. 17. For the implementation process and technical effects of this technical solution, refer to the description in the embodiment shown in FIG. 1 to FIG. 17, and will not be repeated here.
另外,本发明实施例提供了一种计算机可读存储介质,存储介质为计算 机可读存储介质,该计算机可读存储介质中存储有程序指令,程序指令用于实现上述图1-图17的云台控制方法。In addition, an embodiment of the present invention provides a computer-readable storage medium, the storage medium is a computer-readable storage medium, and the computer-readable storage medium stores program instructions, and the program instructions are used to implement the cloud of FIG. 1 to FIG. Station control method.
图21为本发明实施例提供的一种云台的结构示意图一;图22为本发明实施例提供的一种云台的结构示意图二,参考附图21-22所示,本实施例提供了一种云台100,该云台100至少包括21 is a schematic structural diagram of a pan/tilt provided by an embodiment of the present invention; FIG. 22 is a schematic structural diagram of a pan/tilt provided by an embodiment of the present invention. Referring to FIGS. 21-22, this embodiment provides A pan/tilt 100, which includes at least
依次连接的第一支架101、第二支架102和用于连接负载200的第三支架103;The first bracket 101, the second bracket 102 and the third bracket 103 for connecting the load 200 connected in sequence;
上述图20实施例所对应的云台控制装置,控制装置用于对第一支架101、第二支架102和第三支架103进行控制。For the pan-tilt control device corresponding to the above embodiment in FIG. 20, the control device is used to control the first bracket 101, the second bracket 102 and the third bracket 103.
进一步的,参考附图21-22所示,本实施例中的云台100具体包括用于承载负载200的支架部,该支架部用于将负载200装设于手持载体10上,以允许上述手持载体10搭载上述负载200进行作业。负载200可以为图像获取装置(例如,拍摄装置)、热源探测装置、生命探测装置等。Further, referring to Figures 21-22, the pan/tilt head 100 in this embodiment specifically includes a bracket part for carrying a load 200, and the bracket part is used to mount the load 200 on the handheld carrier 10 to allow the above The handheld carrier 10 carries the above-mentioned load 200 for operation. The load 200 may be an image acquisition device (for example, a photographing device), a heat source detection device, a life detection device, and the like.
其中,云台100的支架部可以包括多个支架,具体在图示的实施例中,支架部包括依次相连接的第一支架101、第二支架102及第三支架103;上述第一支架101用于能够转动地连接手持载体10,使手持云台100能够通过第一支架101转动地连接于手持载体10上。云台100上还包括第一电机107、第二电机108和第三电机109,所述第一电机101的一端连接于所述第一支架101上,另一端与载体10相连,用于驱动所述第一支架101相对于所述载体10转动;所述第二电机108设置于所述第一支架101上,用于驱动所述第二支架102相对于第一支架101进行转动;所述第三电机109设置于所述第二支架102上,用于驱动所述第三支架103相对于第二支架102进行转动。上述第三支架103与夹持部105相连接,该夹持部105用于承载负载200;可以理解的是,在其他实施例中,支架部包括的支架的数量可以为一个、两个、四个或者更多。The bracket part of the pan/tilt head 100 may include multiple brackets. Specifically, in the illustrated embodiment, the bracket part includes a first bracket 101, a second bracket 102, and a third bracket 103 that are sequentially connected; the first bracket 101 described above. It is used to rotatably connect the handheld carrier 10 so that the handheld pan/tilt 100 can be rotatably connected to the handheld carrier 10 through the first bracket 101. The pan/tilt head 100 also includes a first motor 107, a second motor 108, and a third motor 109. One end of the first motor 101 is connected to the first support 101, and the other end is connected to the carrier 10 for driving the The first support 101 rotates relative to the carrier 10; the second motor 108 is arranged on the first support 101, and is used to drive the second support 102 to rotate relative to the first support 101; The three motors 109 are arranged on the second support 102 and are used to drive the third support 103 to rotate relative to the second support 102. The third bracket 103 is connected to the clamping portion 105, and the clamping portion 105 is used to carry the load 200; it is understood that in other embodiments, the number of brackets included in the bracket portion may be one, two, or four. Or more.
进一步的,在上述云台所述结构的基础上,所述处理器,还用于:分别获取与所述第一电机、第二电机和第三电机相对应的第一测量关节角度、第二测量关节角度和第三测量关节角度;根据所述目标末端姿态、测量末端姿态、第一测量关节角度、第二测量关节角度和第三测量关节角度,利用牛顿迭代算法确定与所述第一电机相对应的目标关节角度;将所述目标关节角度确定为所述单轴控制分量。Further, on the basis of the structure of the above-mentioned pan/tilt, the processor is further configured to: obtain the first measured joint angle and the second measured joint angle corresponding to the first motor, the second motor, and the third motor, respectively. Measure the joint angle and the third measurement joint angle; according to the target end posture, the measurement end posture, the first measurement joint angle, the second measurement joint angle and the third measurement joint angle, the Newton iterative algorithm is used to determine the relationship with the first motor The corresponding target joint angle; the target joint angle is determined as the single-axis control component.
进一步的,上述手持载体10用于供使用者进行把持。在本实施例中,上 述负载200为拍摄装置,这里,拍摄装置可以为日常拍摄用的相机、摄像机、手机等。当然,在其他的实施例中,上述拍摄装置还可以为其他形式,例如超声波成像装置、红外成像装置等。使用者能够通过手持云台100搭载负载200进行拍摄作业。Further, the aforementioned handheld carrier 10 is used for the user to hold. In this embodiment, the above-mentioned load 200 is a photographing device. Here, the photographing device may be a camera, a video camera, a mobile phone, etc. for daily photography. Of course, in other embodiments, the aforementioned photographing device may also be in other forms, such as an ultrasonic imaging device, an infrared imaging device, and so on. The user can carry out photographing operations by carrying the load 200 on the handheld platform 100.
进一步的,所述处理器,还用于:获取所述云台的末端角速度;根据所述目标末端姿态、测量末端姿态和末端角速度确定所述双轴控制分量。Further, the processor is further configured to: obtain the terminal angular velocity of the pan/tilt; and determine the dual-axis control component according to the target terminal posture, the measured terminal posture, and the terminal angular velocity.
进一步的,所述处理器,还用于:根据所述目标末端姿态和测量末端姿态确定所述云台的姿态控制误差;根据所述姿态控制误差和末端角速度确定所述双轴控制分量。Further, the processor is further configured to: determine the attitude control error of the pan/tilt according to the target end attitude and the measured end attitude; and determine the dual-axis control component according to the attitude control error and the end angular velocity.
进一步的,所述处理器,还用于:针对所述姿态控制误差和末端角速度,去除所述姿态控制误差和末端角速度中与所述第一支架相关的分量,生成与所述第二支架和第三支架相关的局部姿态控制误差和局部末端角速度;根据所述局部姿态控制误差与所述局部末端角速度确定所述双轴控制分量。Further, the processor is further configured to: for the attitude control error and the end angular velocity, remove the components related to the first support in the attitude control error and the end angular velocity, and generate a connection with the second support The local attitude control error and the local end angular velocity related to the third bracket; the two-axis control component is determined according to the local attitude control error and the local end angular velocity.
进一步的,所述处理器,还用于:将所述姿态控制误差和所述末端角速度映射至关节角空间中,获得与第一电机、第二电机和第三电机相对应的关节角度控制误差和关节角速度;针对所述关节角度控制误差和关节角速度,将位于所述第一电机的轴向上的关节角度控制误差和关节角速度置零,获得位于所述第二电机的轴向和所述第三电机的轴向上的局部关节角度控制误差和局部关节角速度;将所述局部关节角度控制误差和局部关节角速度映射回体坐标系,获得与所述第二支架和第三支架相关的局部姿态控制误差和局部末端角速度。Further, the processor is further configured to: map the attitude control error and the end angular velocity to the joint angle space to obtain joint angle control errors corresponding to the first motor, the second motor, and the third motor And the joint angular velocity; for the joint angle control error and the joint angular velocity, the joint angle control error and the joint angular velocity in the axial direction of the first motor are set to zero to obtain the axial and the joint angular velocity of the second motor. The local joint angle control error and the local joint angular velocity in the axial direction of the third motor; the local joint angle control error and the local joint angular velocity are mapped back to the body coordinate system to obtain the local related to the second bracket and the third bracket Attitude control error and local end angular velocity.
进一步的,所述处理器,还用于:获取第二电机的关节角度;在所述第二电机的关节角度位于奇异点邻域所对应的角度范围内时,则确定所述云台位于奇异点邻域;或者,在所述第二电机的关节角度位于奇异点邻域外所对应的角度范围内时,则确定所述云台位于奇异点邻域外。Further, the processor is further configured to: obtain the joint angle of the second motor; when the joint angle of the second motor is within the angle range corresponding to the singular point neighborhood, determine that the pan/tilt is located at the singularity Point neighborhood; or, when the joint angle of the second motor is within the angle range corresponding to the singular point neighborhood, it is determined that the pan/tilt is located outside the singular point neighborhood.
进一步的,在确定所述云台位于奇异点邻域外之后,所述处理器,还用于:根据所述负载的目标末端姿态和测量末端姿态计算三轴控制分量,其中,所述三轴控制分量与所述第一支架、第二支架和第三支架相关;根据所述三轴控制分量对所述第一支架、第二支架和第三支架进行控制。Further, after determining that the pan/tilt is located outside the neighborhood of the singular point, the processor is further configured to calculate a three-axis control component according to the target end attitude and the measured end attitude of the payload, wherein the three-axis control The components are related to the first support, the second support and the third support; the first support, the second support and the third support are controlled according to the three-axis control component.
进一步的,所述处理器,还用于:若所述云台在当前时刻位于奇异点邻域,在上一时刻位于奇异点邻域外;或者,若所述云台在当前时刻位于奇异 点邻域外,在上一时刻位于奇异点邻域时,则获取所述云台在上一时刻的第一驱动信号和在当前时刻的第二驱动信号;根据所述第一驱动信号和所述第二驱动信号确定至少一个平滑过渡信号;基于所述平滑过渡信号驱动所述云台进行运动。Further, the processor is further configured to: if the pan/tilt is located in the neighborhood of the singularity at the current moment, it was located outside the neighborhood of the singularity at the previous moment; or, if the pan/tilt is located near the singularity at the current moment Outside the domain, when the previous moment is in the neighborhood of the singularity, the first drive signal of the pan/tilt at the previous moment and the second drive signal of the current moment are acquired; according to the first drive signal and the second drive signal The driving signal determines at least one smooth transition signal; based on the smooth transition signal, the pan/tilt is driven to move.
进一步的,所述处理器,还用于:获取与所述第一驱动信号相对应的加权系数;利用所述加权系数、第一驱动信号和第二驱动信号确定至少一个平滑过渡信号。Further, the processor is further configured to: obtain a weighting coefficient corresponding to the first driving signal; and use the weighting coefficient, the first driving signal, and the second driving signal to determine at least one smooth transition signal.
进一步的,所述处理器,还用于:获取预设的切换时间和进行切换操作的切换时刻;根据所述切换时间和切换时刻确定所述加权系数。Further, the processor is further configured to: obtain a preset switching time and a switching time for performing a switching operation; and determine the weighting coefficient according to the switching time and the switching time.
本实施例提供的云台的具体实现原理和实现效果与图20所对应的云台控制装置相一致,具体可参考上述陈述内容,在这里不再赘述。The specific implementation principles and implementation effects of the pan/tilt platform provided in this embodiment are consistent with the pan/tilt platform control device corresponding to FIG. 20. For details, please refer to the foregoing statement content, and will not be repeated here.
图23为本发明实施例提供的一种可移动平台的结构示意图;参考附图23可知,本实施例的另一方面提供了一种可移动平台,该可移动平台为以下至少之一:无人飞行器、无人船、无人车;具体的,该可移动平台包括:FIG. 23 is a schematic structural diagram of a movable platform provided by an embodiment of the present invention; referring to FIG. 23, it can be seen that another aspect of this embodiment provides a movable platform, and the movable platform is at least one of the following: none Human aerial vehicles, unmanned ships, unmanned vehicles; specifically, the movable platform includes:
机体301; Body 301;
动力系统302,设置于所述机体301上,用于为所述可移动平台提供动力;The power system 302 is arranged on the body 301 and is used to provide power for the movable platform;
图21-图22所述的云台,所述云台303设置于机体301上。In the pan-tilt described in FIGS. 21-22, the pan-tilt 303 is installed on the body 301.
本实施例提供的可移动平台的具体实现原理和实现效果与图21-图22所对应的云台的具体实现原理和效果相一致,具体可参考上述陈述内容,在这里不再赘述。The specific implementation principles and implementation effects of the movable platform provided in this embodiment are consistent with those of the pan-tilt corresponding to Figs. 21-22. For details, please refer to the foregoing statements, and will not be repeated here.
以上各个实施例中的技术方案、技术特征在与本相冲突的情况下均可以单独,或者进行组合,只要未超出本领域技术人员的认知范围,均属于本申请保护范围内的等同实施例。The technical solutions and technical features in each of the above embodiments can be singly or combined in case of conflict with the present invention. As long as they do not exceed the cognitive scope of those skilled in the art, they all belong to the equivalent embodiments within the protection scope of this application. .
在本发明所提供的几个实施例中,应该理解到,所揭露的相关检测装置(例如:IMU)和方法,可以通过其它的方式实现。例如,以上所描述的遥控装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,遥控装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present invention, it should be understood that the related detection device (for example: IMU) and method disclosed may be implemented in other ways. For example, the embodiments of the remote control device described above are merely illustrative. For example, the division of the modules or units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components. Can be combined or integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, remote control devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得计算机处理器(processor)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present invention essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to make a computer processor (processor) execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage media include: U disk, mobile hard disk, Read-Only Memory (ROM), Random Access Memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes.
以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the embodiments of the present invention, and do not limit the scope of the present invention. Any equivalent structure or equivalent process transformation made by using the content of the description and drawings of the present invention, or directly or indirectly applied to other related technologies In the same way, all fields are included in the scope of patent protection of the present invention.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: It is still possible to modify the technical solutions described in the foregoing embodiments, or equivalently replace some or all of the technical features; these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present invention range.

Claims (36)

  1. 一种云台控制方法,其特征在于,所述云台至少包括依次连接的第一支架、第二支架和用于连接负载的第三支架;所述方法包括:A pan-tilt control method, characterized in that the pan-tilt at least includes a first support, a second support, and a third support for connecting a load, which are sequentially connected; the method includes:
    检测所述云台是否位于预设的奇异点邻域;Detecting whether the PTZ is located in the neighborhood of a preset singularity;
    当所述云台位于奇异点邻域时,获取所述云台的目标末端姿态和测量末端姿态;When the pan/tilt is located in the neighborhood of a singular point, acquiring the target end attitude and the measurement end attitude of the pan/tilt;
    根据所述目标末端姿态和测量末端姿态计算单轴控制分量和双轴控制分量;其中,所述单轴控制分量与所述第一支架相关,所述双轴控制分量与所述第二支架和第三支架相关;The single-axis control component and the dual-axis control component are calculated according to the target end attitude and the measured end attitude; wherein the single-axis control component is related to the first support, and the dual-axis control component is related to the second support and The third bracket is related;
    根据所述单轴控制分量对所述第一支架进行控制,并根据所述双轴控制分量对所述第二支架和第三支架进行控制。The first bracket is controlled according to the single-axis control component, and the second bracket and the third bracket are controlled according to the dual-axis control component.
  2. 根据权利要求1所述的方法,其特征在于,所述云台还包括第一电机、第二电机和第三电机,所述第一电机的一端连接于所述第一支架上,另一端与载体相连,用于驱动所述第一支架相对于所述载体转动;所述第二电机设置于所述第一支架上,用于驱动所述第二支架相对于第一支架进行转动;所述第三电机设置于所述第二支架上,用于驱动所述第三支架相对于第二支架进行转动;根据所述目标末端姿态和测量末端姿态计算单轴控制分量,包括:The method of claim 1, wherein the pan/tilt head further comprises a first motor, a second motor, and a third motor, one end of the first motor is connected to the first support, and the other end is connected to the The carrier is connected to drive the first bracket to rotate relative to the carrier; the second motor is arranged on the first bracket and is used to drive the second bracket to rotate relative to the first bracket; The third motor is arranged on the second support and is used to drive the third support to rotate relative to the second support; the calculation of the single-axis control component according to the target end posture and the measured end posture includes:
    分别获取与所述第一电机、第二电机和第三电机相对应的第一测量关节角度、第二测量关节角度和第三测量关节角度;Acquiring the first measured joint angle, the second measured joint angle, and the third measured joint angle corresponding to the first motor, the second motor, and the third motor, respectively;
    根据所述目标末端姿态、测量末端姿态、第一测量关节角度、第二测量关节角度和第三测量关节角度,利用牛顿迭代算法确定与所述第一电机相对应的目标关节角度;According to the target end posture, the measured end posture, the first measured joint angle, the second measured joint angle, and the third measured joint angle, a Newton iterative algorithm is used to determine the target joint angle corresponding to the first motor;
    将所述目标关节角度确定为所述单轴控制分量。The target joint angle is determined as the single-axis control component.
  3. 根据权利要求1所述的方法,其特征在于,根据所述目标末端姿态和测量末端姿态计算双轴控制分量,包括:The method according to claim 1, wherein calculating a dual-axis control component based on the target end attitude and the measured end attitude comprises:
    获取所述云台的末端角速度;Obtaining the terminal angular velocity of the pan/tilt;
    根据所述目标末端姿态、测量末端姿态和末端角速度确定所述双轴控制分量。The dual-axis control component is determined according to the target end posture, the measured end posture, and the end angular velocity.
  4. 根据权利要求3所述的方法,其特征在于,根据所述目标末端姿态、测量末端姿态和末端角速度确定所述双轴控制分量,包括:The method according to claim 3, wherein determining the dual-axis control component according to the target end posture, the measured end posture, and the end angular velocity comprises:
    根据所述目标末端姿态和测量末端姿态确定所述云台的姿态控制误差;Determining the attitude control error of the PTZ according to the target end attitude and the measurement end attitude;
    根据所述姿态控制误差和末端角速度确定所述双轴控制分量。The two-axis control component is determined according to the attitude control error and the terminal angular velocity.
  5. 根据权利要求4所述的方法,其特征在于,根据所述姿态控制误差和末端角速度确定所述双轴控制分量,包括:The method according to claim 4, wherein determining the dual-axis control component according to the attitude control error and the terminal angular velocity comprises:
    针对所述姿态控制误差和末端角速度,去除所述姿态控制误差和末端角速度中与所述第一支架相关的分量,生成与所述第二支架和第三支架相关的局部姿态控制误差和局部末端角速度;For the attitude control error and the end angular velocity, remove the components related to the first bracket from the attitude control error and the end angular velocity, and generate the local attitude control error and the local end related to the second bracket and the third bracket Angular velocity
    根据所述局部姿态控制误差与所述局部末端角速度确定所述双轴控制分量。The two-axis control component is determined according to the local attitude control error and the local terminal angular velocity.
  6. 根据权利要求5所述的方法,其特征在于,针对所述姿态控制误差和末端角速度,去除所述姿态控制误差和末端角速度中与所述第一支架相关的分量,生成与所述第二支架和第三支架相关的局部姿态控制误差和局部末端角速度,包括:The method according to claim 5, characterized in that, for the attitude control error and the end angular velocity, the components related to the first support in the attitude control error and the end angular velocity are removed to generate the second support The local attitude control error and local end angular velocity related to the third bracket include:
    将所述姿态控制误差和所述末端角速度映射至关节角空间中,获得与第一电机、第二电机和第三电机相对应的关节角度控制误差和关节角速度;Mapping the attitude control error and the end angular velocity to the joint angle space, and obtain the joint angle control error and the joint angular velocity corresponding to the first motor, the second motor, and the third motor;
    针对所述关节角度控制误差和关节角速度,将位于所述第一电机的轴向上的关节角度控制误差和关节角速度置零,获得位于所述第二电机的轴向和所述第三电机的轴向上的局部关节角度控制误差和局部关节角速度;Regarding the joint angle control error and the joint angular velocity, the joint angle control error and the joint angular velocity in the axial direction of the first motor are set to zero to obtain the axial direction of the second motor and the third motor. Local joint angle control error and local joint angular velocity in the axial direction;
    将所述局部关节角度控制误差和局部关节角速度映射回体坐标系,获得与所述第二支架和第三支架相关的局部姿态控制误差和局部末端角速度。The local joint angle control error and the local joint angular velocity are mapped back to the body coordinate system to obtain the local attitude control error and the local end angular velocity related to the second bracket and the third bracket.
  7. 根据权利要求2所述的方法,其特征在于,检测所述云台是否位于奇异点邻域,包括:The method according to claim 2, wherein detecting whether the pan-tilt is located in the neighborhood of a singular point comprises:
    获取第二电机的关节角度;Acquiring the joint angle of the second motor;
    在所述第二电机的关节角度位于奇异点邻域所对应的角度范围内时,则确定所述云台位于奇异点邻域;或者,When the joint angle of the second motor is within the angle range corresponding to the singular point neighborhood, it is determined that the pan/tilt is located in the singular point neighborhood; or,
    在所述第二电机的关节角度位于奇异点邻域外所对应的角度范围内时,则确定所述云台位于奇异点邻域外。When the joint angle of the second motor is within the angle range corresponding to outside the singular point neighborhood, it is determined that the pan/tilt is located outside the singular point neighborhood.
  8. 根据权利要求7所述的方法,其特征在于,在确定所述云台位于奇异点邻域外之后,所述方法还包括:The method according to claim 7, wherein after determining that the pan-tilt is located outside the neighborhood of a singular point, the method further comprises:
    根据所述负载的目标末端姿态和测量末端姿态计算三轴控制分量,其中,所述三轴控制分量与所述第一支架、第二支架和第三支架相关;Calculating a three-axis control component according to the target end posture and the measured end posture of the load, wherein the three-axis control component is related to the first support, the second support, and the third support;
    根据所述三轴控制分量对所述第一支架、第二支架和第三支架进行控制。The first support, the second support and the third support are controlled according to the three-axis control components.
  9. 根据权利要求1-8中任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-8, wherein the method further comprises:
    若所述云台在当前时刻位于奇异点邻域,在上一时刻位于奇异点邻域外;或者,若所述云台在当前时刻位于奇异点邻域外,在上一时刻位于奇异点邻域时,则获取所述云台在上一时刻的第一驱动信号和在当前时刻的第二驱动信号;If the pan/tilt is located in the neighborhood of the singular point at the current moment, it was located outside the neighborhood of the singular point at the previous moment; or, if the pan/tilt is located outside the neighborhood of the singular point at the current moment, when it was located in the neighborhood of the singular point at the previous moment , Acquiring the first drive signal of the pan/tilt at the previous moment and the second drive signal of the pan/tilt at the current moment;
    根据所述第一驱动信号和所述第二驱动信号确定至少一个平滑过渡信号;Determining at least one smooth transition signal according to the first driving signal and the second driving signal;
    基于所述平滑过渡信号驱动所述云台进行运动。Drive the pan/tilt to move based on the smooth transition signal.
  10. 根据权利要求9所述的方法,其特征在于,根据所述第一驱动信号和所述第二驱动信号确定至少一个平滑过渡信号,包括:The method according to claim 9, wherein determining at least one smooth transition signal according to the first driving signal and the second driving signal comprises:
    获取与所述第一驱动信号相对应的加权系数;Acquiring a weighting coefficient corresponding to the first driving signal;
    利用所述加权系数、第一驱动信号和第二驱动信号确定至少一个平滑过渡信号。At least one smooth transition signal is determined using the weighting coefficient, the first driving signal and the second driving signal.
  11. 根据权利要求10所述的方法,其特征在于,获取与所述第一驱动信号相对应的加权系数,包括:The method according to claim 10, wherein obtaining a weighting coefficient corresponding to the first driving signal comprises:
    获取预设的切换时间和进行切换操作的切换时刻;Obtain the preset switching time and the switching time of the switching operation;
    根据所述切换时间和切换时刻确定所述加权系数。The weighting coefficient is determined according to the switching time and the switching moment.
  12. 一种云台的控制装置,其特征在于,所述云台至少包括依次连接的第一支架、第二支架和用于连接负载的第三支架;所述控制装置包括:A control device for a pan-tilt, characterized in that the pan-tilt at least includes a first support, a second support, and a third support for connecting a load, which are sequentially connected; the control device includes:
    存储器,用于存储计算机程序;Memory, used to store computer programs;
    处理器,用于运行所述存储器中存储的计算机程序以实现:检测所述云台是否位于预设的奇异点邻域;当所述云台位于奇异点邻域时,获取所述云台的目标末端姿态和测量末端姿态;根据所述目标末端姿态和测量末端姿态计算单轴控制分量和双轴控制分量;其中,所述单轴控制分量与所述第一支架相关,所述双轴控制分量与所述第二支架和第三支架相关;根据所述单轴控制分量对所述第一支架进行控制,并根据所述双轴控制分量对所述第二支架和第三支架进行控制。The processor is configured to run a computer program stored in the memory to realize: detecting whether the pan/tilt is located in the neighborhood of a preset singularity; when the pan/tilt is located in the neighborhood of the singularity, acquiring the information of the pan/tilt The target end posture and the measurement end posture; the single-axis control component and the dual-axis control component are calculated according to the target end posture and the measured end posture; wherein, the single-axis control component is related to the first bracket, and the dual-axis control The component is related to the second support and the third support; the first support is controlled according to the single-axis control component, and the second support and the third support are controlled according to the dual-axis control component.
  13. 根据权利要求12所述的装置,其特征在于,所述云台还包括:第一电机、第二电机和第三电机,所述第一电机的一端连接于所述第一支架上,另一端与载体相连,用于驱动所述第一支架相对于所述载体转动;所述第二电机设置于所述第一支架上,用于驱动所述第二支架相对于第一支架进行转 动;所述第三电机设置于所述第二支架上,用于驱动所述第三支架相对于第二支架进行转动;所述处理器,还用于:The device according to claim 12, wherein the pan/tilt head further comprises: a first motor, a second motor, and a third motor, one end of the first motor is connected to the first bracket, and the other end It is connected with the carrier and is used to drive the first support to rotate relative to the carrier; the second motor is arranged on the first support and is used to drive the second support to rotate relative to the first support; The third motor is arranged on the second support and is used for driving the third support to rotate relative to the second support; the processor is also used for:
    分别获取与所述第一电机、第二电机和第三电机相对应的第一测量关节角度、第二测量关节角度和第三测量关节角度;Acquiring the first measured joint angle, the second measured joint angle, and the third measured joint angle corresponding to the first motor, the second motor, and the third motor, respectively;
    根据所述目标末端姿态、测量末端姿态、第一测量关节角度、第二测量关节角度和第三测量关节角度,利用牛顿迭代算法确定与所述第一电机相对应的目标关节角度;According to the target end posture, the measured end posture, the first measured joint angle, the second measured joint angle, and the third measured joint angle, a Newton iterative algorithm is used to determine the target joint angle corresponding to the first motor;
    将所述目标关节角度确定为所述单轴控制分量。The target joint angle is determined as the single-axis control component.
  14. 根据权利要求12所述的装置,其特征在于,所述处理器,还用于:The device according to claim 12, wherein the processor is further configured to:
    获取所述云台的末端角速度;Obtaining the terminal angular velocity of the pan/tilt;
    根据所述目标末端姿态、测量末端姿态和末端角速度确定所述双轴控制分量。The dual-axis control component is determined according to the target end posture, the measured end posture, and the end angular velocity.
  15. 根据权利要求14所述的装置,其特征在于,所述处理器,还用于:The device according to claim 14, wherein the processor is further configured to:
    根据所述目标末端姿态和测量末端姿态确定所述云台的姿态控制误差;Determining the attitude control error of the PTZ according to the target end attitude and the measurement end attitude;
    根据所述姿态控制误差和末端角速度确定所述双轴控制分量。The two-axis control component is determined according to the attitude control error and the terminal angular velocity.
  16. 根据权利要求15所述的装置,其特征在于,所述处理器,还用于:The device according to claim 15, wherein the processor is further configured to:
    针对所述姿态控制误差和末端角速度,去除所述姿态控制误差和末端角速度中与所述第一支架相关的分量,生成与所述第二支架和第三支架相关的局部姿态控制误差和局部末端角速度;For the attitude control error and the end angular velocity, remove the components related to the first bracket from the attitude control error and the end angular velocity, and generate the local attitude control error and the local end related to the second bracket and the third bracket Angular velocity
    根据所述局部姿态控制误差与所述局部末端角速度确定所述双轴控制分量。The two-axis control component is determined according to the local attitude control error and the local terminal angular velocity.
  17. 根据权利要求16所述的装置,其特征在于,所述处理器,还用于:The device according to claim 16, wherein the processor is further configured to:
    将所述姿态控制误差和所述末端角速度映射至关节角空间中,获得与第一电机、第二电机和第三电机相对应的关节角度控制误差和关节角速度;Mapping the attitude control error and the end angular velocity to the joint angle space, and obtain the joint angle control error and the joint angular velocity corresponding to the first motor, the second motor, and the third motor;
    针对所述关节角度控制误差和关节角速度,将位于所述第一电机的轴向上的关节角度控制误差和关节角速度置零,获得位于所述第二电机的轴向和所述第三电机的轴向上的局部关节角度控制误差和局部关节角速度;Regarding the joint angle control error and the joint angular velocity, the joint angle control error and the joint angular velocity in the axial direction of the first motor are set to zero to obtain the axial direction of the second motor and the third motor. Local joint angle control error and local joint angular velocity in the axial direction;
    将所述局部关节角度控制误差和局部关节角速度映射回体坐标系,获得与所述第二支架和第三支架相关的局部姿态控制误差和局部末端角速度。The local joint angle control error and the local joint angular velocity are mapped back to the body coordinate system to obtain the local attitude control error and the local end angular velocity related to the second bracket and the third bracket.
  18. 根据权利要求12所述的装置,其特征在于,所述处理器,还用于:The device according to claim 12, wherein the processor is further configured to:
    获取第二电机的关节角度;Acquiring the joint angle of the second motor;
    在所述第二电机的关节角度位于奇异点邻域所对应的角度范围内时,则确定所述云台位于奇异点邻域;或者,When the joint angle of the second motor is within the angle range corresponding to the singular point neighborhood, it is determined that the pan/tilt is located in the singular point neighborhood; or,
    在所述第二电机的关节角度位于奇异点邻域外所对应的角度范围内时,则确定所述云台位于奇异点邻域外。When the joint angle of the second motor is within the angle range corresponding to outside the singular point neighborhood, it is determined that the pan/tilt is located outside the singular point neighborhood.
  19. 根据权利要求18所述的装置,其特征在于,在确定所述云台位于奇异点邻域外之后,所述处理器,还用于:The apparatus according to claim 18, wherein after determining that the pan-tilt is located outside the neighborhood of a singular point, the processor is further configured to:
    根据所述负载的目标末端姿态和测量末端姿态计算三轴控制分量,其中,所述三轴控制分量与所述第一支架、第二支架和第三支架相关;Calculating a three-axis control component according to the target end posture and the measured end posture of the load, wherein the three-axis control component is related to the first support, the second support, and the third support;
    根据所述三轴控制分量对所述第一支架、第二支架和第三支架进行控制。The first support, the second support and the third support are controlled according to the three-axis control components.
  20. 根据权利要求12-19中任意一项所述的装置,其特征在于,所述处理器,还用于:The device according to any one of claims 12-19, wherein the processor is further configured to:
    若所述云台在当前时刻位于奇异点邻域,在上一时刻位于奇异点邻域外;或者,若所述云台在当前时刻位于奇异点邻域外,在上一时刻位于奇异点邻域时,则获取所述云台在上一时刻的第一驱动信号和在当前时刻的第二驱动信号;If the pan/tilt is located in the neighborhood of the singular point at the current moment, it was located outside the neighborhood of the singular point at the previous moment; or, if the pan/tilt is located outside the neighborhood of the singular point at the current moment, when it was located in the neighborhood of the singular point at the previous moment , Acquiring the first drive signal of the pan/tilt at the previous moment and the second drive signal of the pan/tilt at the current moment;
    根据所述第一驱动信号和所述第二驱动信号确定至少一个平滑过渡信号;Determining at least one smooth transition signal according to the first driving signal and the second driving signal;
    基于所述平滑过渡信号驱动所述云台进行运动。Drive the pan/tilt to move based on the smooth transition signal.
  21. 根据权利要求20所述的装置,其特征在于,所述处理器,还用于:The device according to claim 20, wherein the processor is further configured to:
    获取与所述第一驱动信号相对应的加权系数;Acquiring a weighting coefficient corresponding to the first driving signal;
    利用所述加权系数、第一驱动信号和第二驱动信号确定至少一个平滑过渡信号。At least one smooth transition signal is determined using the weighting coefficient, the first driving signal and the second driving signal.
  22. 根据权利要求21所述的方法,其特征在于,所述处理器,还用于:The method according to claim 21, wherein the processor is further configured to:
    获取预设的切换时间和进行切换操作的切换时刻;Obtain the preset switching time and the switching time of the switching operation;
    根据所述切换时间和切换时刻确定所述加权系数。The weighting coefficient is determined according to the switching time and the switching moment.
  23. 一种云台,其特征在于,至少包括:A pan-tilt, characterized in that it at least includes:
    依次连接的第一支架、第二支架和用于连接负载的第三支架;The first support, the second support and the third support for connecting the load connected in sequence;
    控制装置,所述控制装置包括:A control device, the control device includes:
    存储器,用于存储计算机程序;Memory, used to store computer programs;
    处理器,用于运行所述存储器中存储的计算机程序以实现:检测所述云台是否位于预设的奇异点邻域;当所述云台位于奇异点邻域时,获取所述云 台的目标末端姿态和测量末端姿态;根据所述目标末端姿态和测量末端姿态计算单轴控制分量和双轴控制分量;其中,所述单轴控制分量与所述第一支架相关,所述双轴控制分量与所述第二支架和第三支架相关;根据所述单轴控制分量对所述第一支架进行控制,并根据所述双轴控制分量对所述第二支架和第三支架进行控制。The processor is configured to run a computer program stored in the memory to realize: detecting whether the pan/tilt is located in the neighborhood of a preset singularity; when the pan/tilt is located in the neighborhood of the singularity, acquiring the information of the pan/tilt The target end posture and the measurement end posture; the single-axis control component and the dual-axis control component are calculated according to the target end posture and the measured end posture; wherein the single-axis control component is related to the first bracket, and the dual-axis control The component is related to the second support and the third support; the first support is controlled according to the single-axis control component, and the second support and the third support are controlled according to the dual-axis control component.
  24. 根据权利要求23所述的云台,其特征在于,所述负载包括以下至少之一:The pan/tilt head according to claim 23, wherein the load comprises at least one of the following:
    图像获取装置、热源探测装置、生命探测装置。Image acquisition device, heat source detection device, life detection device.
  25. 根据权利要求24所述的云台,其特征在于,所述云台还包括:第一电机、第二电机和第三电机,所述第一电机的一端连接于所述第一支架上,另一端与载体相连,用于驱动所述第一支架相对于所述载体转动;所述第二电机设置于所述第一支架上,用于驱动所述第二支架相对于第一支架进行转动;所述第三电机设置于所述第二支架上,用于驱动所述第三支架相对于第二支架进行转动;所述处理器,还用于:The pan/tilt head according to claim 24, wherein the pan/tilt head further comprises: a first motor, a second motor and a third motor, one end of the first motor is connected to the first bracket, and the other One end is connected with the carrier and is used to drive the first bracket to rotate relative to the carrier; the second motor is arranged on the first bracket and is used to drive the second bracket to rotate relative to the first bracket; The third motor is arranged on the second support, and is used to drive the third support to rotate relative to the second support; the processor is also used for:
    分别获取与所述第一电机、第二电机和第三电机相对应的第一测量关节角度、第二测量关节角度和第三测量关节角度;Acquiring the first measured joint angle, the second measured joint angle, and the third measured joint angle corresponding to the first motor, the second motor, and the third motor, respectively;
    根据所述目标末端姿态、测量末端姿态、第一测量关节角度、第二测量关节角度和第三测量关节角度,利用牛顿迭代算法确定与所述第一电机相对应的目标关节角度;According to the target end posture, the measured end posture, the first measured joint angle, the second measured joint angle, and the third measured joint angle, a Newton iterative algorithm is used to determine the target joint angle corresponding to the first motor;
    将所述目标关节角度确定为所述单轴控制分量。The target joint angle is determined as the single-axis control component.
  26. 根据权利要求24所述的云台,其特征在于,所述处理器,还用于:The pan/tilt head according to claim 24, wherein the processor is further configured to:
    获取所述云台的末端角速度;Obtaining the terminal angular velocity of the pan/tilt;
    根据所述目标末端姿态、测量末端姿态和末端角速度确定所述双轴控制分量。The dual-axis control component is determined according to the target end posture, the measured end posture, and the end angular velocity.
  27. 根据权利要求26所述的云台,其特征在于,所述处理器,还用于:The pan/tilt head according to claim 26, wherein the processor is further configured to:
    根据所述目标末端姿态和测量末端姿态确定所述云台的姿态控制误差;Determining the attitude control error of the PTZ according to the target end attitude and the measurement end attitude;
    根据所述姿态控制误差和末端角速度确定所述双轴控制分量。The two-axis control component is determined according to the attitude control error and the terminal angular velocity.
  28. 根据权利要求27所述的云台,其特征在于,所述处理器,还用于:The pan/tilt head according to claim 27, wherein the processor is further configured to:
    针对所述姿态控制误差和末端角速度,去除所述姿态控制误差和末端角速度中与所述第一支架相关的分量,生成与所述第二支架和第三支架相关的局部姿态控制误差和局部末端角速度;For the attitude control error and the end angular velocity, remove the components related to the first bracket from the attitude control error and the end angular velocity, and generate the local attitude control error and the local end related to the second bracket and the third bracket Angular velocity
    根据所述局部姿态控制误差与所述局部末端角速度确定所述双轴控制分量。The two-axis control component is determined according to the local attitude control error and the local terminal angular velocity.
  29. 根据权利要求28所述的云台,其特征在于,所述处理器,还用于:The pan-tilt according to claim 28, wherein the processor is further configured to:
    将所述姿态控制误差和所述末端角速度映射至关节角空间中,获得与第一电机、第二电机和第三电机相对应的关节角度控制误差和关节角速度;Mapping the attitude control error and the end angular velocity to the joint angle space, and obtain the joint angle control error and the joint angular velocity corresponding to the first motor, the second motor, and the third motor;
    针对所述关节角度控制误差和关节角速度,将位于所述第一电机的轴向上的关节角度控制误差和关节角速度置零,获得位于所述第二电机的轴向和所述第三电机的轴向上的局部关节角度控制误差和局部关节角速度;Regarding the joint angle control error and the joint angular velocity, the joint angle control error and the joint angular velocity in the axial direction of the first motor are set to zero to obtain the axial direction of the second motor and the third motor. Local joint angle control error and local joint angular velocity in the axial direction;
    将所述局部关节角度控制误差和局部关节角速度映射回体坐标系,获得与所述第二支架和第三支架相关的局部姿态控制误差和局部末端角速度。The local joint angle control error and the local joint angular velocity are mapped back to the body coordinate system to obtain the local attitude control error and the local end angular velocity related to the second bracket and the third bracket.
  30. 根据权利要求24所述的云台,其特征在于,所述处理器,还用于:The pan/tilt head according to claim 24, wherein the processor is further configured to:
    获取第二电机的关节角度;Acquiring the joint angle of the second motor;
    在所述第二电机的关节角度位于奇异点邻域所对应的角度范围内时,则确定所述云台位于奇异点邻域;或者,When the joint angle of the second motor is within the angle range corresponding to the singular point neighborhood, it is determined that the pan/tilt is located in the singular point neighborhood; or,
    在所述第二电机的关节角度位于奇异点邻域外所对应的角度范围内时,则确定所述云台位于奇异点邻域外。When the joint angle of the second motor is within the angle range corresponding to outside the singular point neighborhood, it is determined that the pan/tilt is located outside the singular point neighborhood.
  31. 根据权利要求30所述的云台,其特征在于,在确定所述云台位于奇异点邻域外之后,所述处理器,还用于:The pan/tilt head according to claim 30, wherein after determining that the pan/tilt head is located outside the neighborhood of the singularity, the processor is further configured to:
    根据所述负载的目标末端姿态和测量末端姿态计算三轴控制分量,其中,所述三轴控制分量与所述第一支架、第二支架和第三支架相关;Calculating a three-axis control component according to the target end posture and the measured end posture of the load, wherein the three-axis control component is related to the first support, the second support, and the third support;
    根据所述三轴控制分量对所述第一支架、第二支架和第三支架进行控制。The first support, the second support and the third support are controlled according to the three-axis control components.
  32. 根据权利要求24-31中任意一项所述的云台,其特征在于,所述处理器,还用于:The pan/tilt head according to any one of claims 24-31, wherein the processor is further configured to:
    若所述云台在当前时刻位于奇异点邻域,在上一时刻位于奇异点邻域外;或者,若所述云台在当前时刻位于奇异点邻域外,在上一时刻位于奇异点邻域时,则获取所述云台在上一时刻的第一驱动信号和在当前时刻的第二驱动信号;If the pan/tilt is located in the neighborhood of the singular point at the current moment, it was located outside the neighborhood of the singular point at the previous moment; or, if the pan/tilt is located outside the neighborhood of the singular point at the current moment, when it was located in the neighborhood of the singular point at the previous moment , Acquiring the first drive signal of the pan/tilt at the previous moment and the second drive signal of the pan/tilt at the current moment;
    根据所述第一驱动信号和所述第二驱动信号确定至少一个平滑过渡信号;Determining at least one smooth transition signal according to the first driving signal and the second driving signal;
    基于所述平滑过渡信号驱动所述云台进行运动。Drive the pan/tilt to move based on the smooth transition signal.
  33. 根据权利要求32所述的云台,其特征在于,所述处理器,还用于:The pan-tilt according to claim 32, wherein the processor is further configured to:
    获取与所述第一驱动信号相对应的加权系数;Acquiring a weighting coefficient corresponding to the first driving signal;
    利用所述加权系数、第一驱动信号和第二驱动信号确定至少一个平滑过渡信号。At least one smooth transition signal is determined using the weighting coefficient, the first driving signal and the second driving signal.
  34. 根据权利要求33所述的云台,其特征在于,所述处理器,还用于:The pan-tilt according to claim 33, wherein the processor is further configured to:
    获取预设的切换时间和进行切换操作的切换时刻;Obtain the preset switching time and the switching time of the switching operation;
    根据所述切换时间和切换时刻确定所述加权系数。The weighting coefficient is determined according to the switching time and the switching moment.
  35. 一种可移动平台,其特征在于,包括:A movable platform, characterized in that it comprises:
    机体;Body
    动力系统,设置于所述机体上,用于为所述可移动平台提供动力;The power system is arranged on the body and used to provide power to the movable platform;
    权利要求23-34中任意一项所述的云台,所述云台设置于所述机体上。The pan/tilt according to any one of claims 23-34, which is arranged on the body.
  36. 一种计算机可读存储介质,其特征在于,所述存储介质为计算机可读存储介质,该计算机可读存储介质中存储有程序指令,所述程序指令用于实现权利要求1-11中任意一项所述的云台控制方法。A computer-readable storage medium, wherein the storage medium is a computer-readable storage medium, the computer-readable storage medium stores program instructions, and the program instructions are used to implement any one of claims 1-11 PTZ control method described in item.
PCT/CN2019/100433 2019-08-13 2019-08-13 Cradle head control method and device, cradle head and storage medium WO2021026779A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980034068.2A CN112272806A (en) 2019-08-13 2019-08-13 Holder control method and device, holder and storage medium
PCT/CN2019/100433 WO2021026779A1 (en) 2019-08-13 2019-08-13 Cradle head control method and device, cradle head and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/100433 WO2021026779A1 (en) 2019-08-13 2019-08-13 Cradle head control method and device, cradle head and storage medium

Publications (1)

Publication Number Publication Date
WO2021026779A1 true WO2021026779A1 (en) 2021-02-18

Family

ID=74349509

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/100433 WO2021026779A1 (en) 2019-08-13 2019-08-13 Cradle head control method and device, cradle head and storage medium

Country Status (2)

Country Link
CN (1) CN112272806A (en)
WO (1) WO2021026779A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103727939A (en) * 2013-12-31 2014-04-16 清华大学 Biaxial rotating attitude measurement system and measuring method thereof
CN107466350A (en) * 2016-08-03 2017-12-12 深圳市大疆灵眸科技有限公司 Hand-held head
US20180194009A1 (en) * 2017-01-11 2018-07-12 Seiko Epson Corporation Robot control device and robotic system
CN108513651A (en) * 2017-06-27 2018-09-07 深圳市大疆灵眸科技有限公司 Hand-held cradle head device and its control method and computer readable storage medium
CN108594862A (en) * 2018-02-26 2018-09-28 广州市景沃电子有限公司 A method of each axis of three-axis stabilization system is solved close to horizontal plane singular problem

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH075727Y2 (en) * 1985-04-17 1995-02-08 松下電器産業株式会社 Anti-vibration device
JP3881258B2 (en) * 2002-02-26 2007-02-14 三菱電機株式会社 Satellite attitude control device
EP3119342B1 (en) * 2014-03-17 2021-05-12 Intuitive Surgical Operations, Inc. System for maintaining a tool pose
CN204422952U (en) * 2015-01-09 2015-06-24 廖易仑 Real-time controlled motion camera stabilizator
CN105619389B (en) * 2016-03-17 2017-06-20 西安理工大学 A kind of symmetric parallel mechanism without Singularity
CN110076783B (en) * 2019-06-14 2021-01-19 北京邮电大学 Planar under-actuated mechanical arm position control method based on fuzzy control and Lyapunov function

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103727939A (en) * 2013-12-31 2014-04-16 清华大学 Biaxial rotating attitude measurement system and measuring method thereof
CN107466350A (en) * 2016-08-03 2017-12-12 深圳市大疆灵眸科技有限公司 Hand-held head
US20180194009A1 (en) * 2017-01-11 2018-07-12 Seiko Epson Corporation Robot control device and robotic system
CN108513651A (en) * 2017-06-27 2018-09-07 深圳市大疆灵眸科技有限公司 Hand-held cradle head device and its control method and computer readable storage medium
CN108594862A (en) * 2018-02-26 2018-09-28 广州市景沃电子有限公司 A method of each axis of three-axis stabilization system is solved close to horizontal plane singular problem

Also Published As

Publication number Publication date
CN112272806A (en) 2021-01-26

Similar Documents

Publication Publication Date Title
CN109000612B (en) Equipment angle estimation method and device, camera shooting assembly and aircraft
WO2019223270A1 (en) Method and apparatus for estimating angle and angular velocity of electric motor of gimbal, and gimbal and aerial vehicle
WO2019223271A1 (en) Correction method and device for yaw of aircraft, and aircraft
WO2019227384A1 (en) Pan-tilt control method and pan-tilt
WO2019134154A1 (en) Control method for non-orthogonal tripod head, tripod head thereof, and storage device
WO2018120059A1 (en) Control method and system for cradle head, cradle head, and unmanned aerial vehicle
US11265471B2 (en) Gimbal control method, device, gimbal, system, and storage medium
WO2018120012A1 (en) Method and device for controlling cradle head, and cradle head
CN104811588B (en) A kind of boat-carrying based on gyroscope is surely as control method
JP7354202B2 (en) handheld gimbal
WO2019100249A1 (en) Method of controlling gimbal, gimbal, and unmanned aerial vehicle
WO2019227347A1 (en) Gimbal control method, gimbal, photography device, and readable storage medium
WO2019056381A1 (en) Method for controlling gimbal head, gimbal head controller, and gimbal head
WO2020062298A1 (en) Gimbal and control method therefor, and movable platform
WO2016154996A1 (en) Stabilized platform, follow-up control system thereof and method therefor
WO2020042064A1 (en) Cradle head control method and device, cradle head system and unmanned aerial vehicle
WO2018209592A1 (en) Movement control method for robot, robot and controller
WO2021134644A1 (en) Gimbal control method and gimbal
US20210018138A1 (en) Gimbal mode switching method, device, mobile platform and storage medium
WO2020000423A1 (en) Control method for gimbal, gimbal, aerial vehicle, and computer-readable storage medium
WO2021026779A1 (en) Cradle head control method and device, cradle head and storage medium
Marchand et al. Visual servoing through mirror reflection
WO2022000291A1 (en) Gimbal control method, gimbal assembly, apparatus, movable platform, and storage medium
WO2019205152A1 (en) Cradle head control method and cradle head
CN114764241A (en) Motion state control method, device and equipment and readable storage medium

Legal Events

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

Ref document number: 19941417

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19941417

Country of ref document: EP

Kind code of ref document: A1