Ball machine position correction method and device, electronic equipment and storage medium
By obtaining the current value and back potential period, determining the offset direction of the ball machine position, the correction of the ball machine position is achieved, solving the problem of equipment head-up/head-down in strong winds or vibration environments, and avoiding the motor heating and hardware costs.
Patent Information
- Application Number
- CN202310535497.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-09
- Publication Date
- 2024-11-12
AI Technical Summary
In strong winds or vibration environments, the motor of the ball gimbal can easily cause the equipment to rise/low down, causing the monitoring screen to shift. In the prior art, the phase locking force of the motor will cause serious heat generation, and monitoring the motor position through the position sensor will increase the hardware cost. .
By obtaining the current value, determining the back potential period and rotor position information, determining the phase order and the ball position offset direction based on the current value, and correcting the ball position.
On the basis of not affecting the normal operation of the motor and without increasing hardware costs, the correction of the position offset of the ball machine is achieved, solving the problems of motor heating and increased hardware costs, especially in strong winds or vibration environments.
Smart Images

Figure CN118944525A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video surveillance technology, and in particular to a method, device, electronic equipment and storage medium for correcting the position of a ball camera. Background Art
[0002] The full name of the ball camera is spherical camera or smart spherical camera. It is widely used in the field of video surveillance because it integrates zoom lens and pan / tilt function and has good stability and controllability.
[0003] In a windy or vibrating environment, the motor in the ball camera pan / tilt is affected by the external environment, which can easily cause the device to raise / lower its head, resulting in the monitoring screen being offset and the target monitoring screen being lost. In the prior art, the position offset of the ball camera is usually reduced by increasing the motor phase-locking force, or the position of the motor is monitored by a position sensor to perform position correction. However, increasing the motor phase-locking force will cause the motor to heat up severely, and monitoring the motor position by a position sensor will increase the size of the motor and increase the hardware cost. Therefore, there is an urgent need for a ball camera position offset detection and correction method to solve the problem of the device raising / lowering its head in a windy or vibrating environment. Summary of the invention
[0004] The invention provides a method, a device, an electronic device and a storage medium for correcting the position of a ball camera, so as to realize the correction of the position deviation of the ball camera.
[0005] In a first aspect, an embodiment of the present invention provides a method for correcting the position of a ball camera, the method comprising:
[0006] If it is determined that the position offset condition of the ball camera is met, the current value is obtained;
[0007] Determine the back electromotive force period according to the current value, and determine the rotor position information according to the back electromotive force period;
[0008] Determine a phase sequence according to the current value, and determine a direction of the ball camera position offset according to the phase sequence;
[0009] The position of the ball camera is corrected according to the rotor position information and the direction of the ball camera position offset.
[0010] In a second aspect, an embodiment of the present invention further provides a device for correcting the position of a ball camera, the device comprising:
[0011] A current value acquisition module, used to acquire the current value if it is determined that the position offset condition of the ball camera is met;
[0012] A rotor position information determination module, used to determine the back electromotive force period according to the current value, and determine the rotor position information according to the back electromotive force period;
[0013] A module for determining the position offset direction of the ball camera, used to determine the phase sequence according to the current value, and determine the position offset direction of the ball camera according to the phase sequence;
[0014] The ball camera position correction module is used to correct the position of the ball camera according to the rotor position information and the position offset direction of the ball camera.
[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for correcting the position of a ball camera as described in any one of the embodiments of the present invention is implemented.
[0016] In a fourth aspect, an embodiment of the present invention further provides a storage medium storing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute a method for correcting the position of a ball camera as described in any one of the embodiments of the present invention.
[0017] The technical solution of the embodiment of the present invention obtains the current value when the position of the ball camera is offset, determines the back electromotive force period according to the current value, determines the rotor position information according to the back electromotive force period, determines the phase sequence according to the current value, determines the direction of the position offset of the ball camera according to the phase sequence, and corrects the position of the ball camera according to the direction of the position offset of the ball camera and the back electromotive force period. The problem of increasing the phase locking force of the motor in the prior art, which causes serious heating of the motor, and the problem of increasing the hardware cost by monitoring the position of the motor through a position sensor are solved. The correction of the position offset of the ball camera is achieved without affecting the normal operation of the motor and without increasing additional hardware costs, especially for the scene where the ball camera is raised / lowered due to external environmental factors such as strong wind or vibration.
[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 It is a flow chart of a method for correcting the position of a ball camera provided in the first embodiment of the present invention;
[0021] Figure 2is a schematic diagram of a corresponding relationship between a phase sequence and a motor rotation direction provided by the first embodiment of the present invention;
[0022] Figure 3 is a flow chart of a method for correcting the position of a ball camera provided in Embodiment 2 of the present invention;
[0023] Figure 4 is a schematic diagram of a sinusoidal signal curve of each phase provided by the second embodiment of the present invention;
[0024] Figure 5 It is a structural schematic diagram of a device for correcting the position of a ball camera provided in Embodiment 3 of the present invention;
[0025] Figure 6 It is a structural schematic diagram of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] Embodiment 1
[0029] Figure 1 A flowchart of a method for correcting the position of a dome camera is provided for the first embodiment of the present invention. This embodiment is applicable to the situation where the dome camera position is corrected in a scenario where the dome camera is raised / lowered due to external environmental factors such as strong wind or vibration. The method can be executed by a dome camera position correction device, which can be implemented in the form of hardware and / or software and can be configured in a dome camera.
[0030] like Figure 1 As shown, the method includes:
[0031] S110: If it is determined that the position offset condition of the ball camera is met, the current value is obtained.
[0032] Meeting the position deviation condition of the ball camera means that the motor in the ball camera pan / tilt is affected by external factors such as strong wind or vibration, causing the ball camera pan / tilt to raise or lower its head. In a specific example, whether the position of the ball camera is offset can be determined by whether the monitoring area of the ball camera changes without a motor drive signal. Specifically, image detection can be performed on the continuous video frame images captured by the ball camera to determine whether the monitoring area between continuous video frame images changes. In another specific example, whether the position of the ball camera is offset can also be determined by whether the current of each phase of the motor of the ball camera changes without a motor drive signal. Specifically, the current value collected by the resistance sampling module of the ball camera can be monitored, and when the resistance sampling module collects the current value, it is determined that the current of each phase of the motor has changed.
[0033] The current value can be collected by the resistance sampling module of the ball camera. When the position offset condition of the ball camera is met, the current value collected by the resistance sampling module is saved in the register.
[0034] In this embodiment, the motor in the ball camera pan / tilt rotates under the influence of external factors such as strong wind or vibration, and the current of each phase of the motor changes, generating a back electromotive force. Therefore, in this embodiment, the deviation angle of the ball camera is calculated by real-time monitoring of the current value, thereby resetting the position of the ball camera. At the same time, since the determination of the position deviation of the ball camera and the collection and storage of the current value do not require additional hardware, the hardware cost is saved.
[0035] S120, determining a back electromotive force period according to the current value, and determining rotor position information according to the back electromotive force period.
[0036] When the rotor rotates, an induced potential is generated in the stator winding. The direction of the induced potential is opposite to the voltage of the winding, and the polarity is opposite to the excitation voltage, so it is generally called back electromotive force or back electromotive force. The amplitude of the back electromotive force changes periodically. It can be understood that when the rotor rotates, the current value also changes. Therefore, the period of the current value is the same as the period of the back electromotive force. By detecting the period of the current value, the period of the back electromotive force can be determined.
[0037] The rotor position information may include the number of rotor revolutions and the current rotor position. When the motor rotor rotates, the back electromotive force changes one cycle for each pair of magnetic poles it passes through. Therefore, for a 2-level motor, the back electromotive force undergoes a complete cycle for each rotation of the rotor. For motors with more than 2 levels, such as a 6-level motor, the rotor rotates one cycle and passes through three pairs of magnetic poles, and the back electromotive force changes three cycles accordingly. Therefore, after determining the back electromotive force cycle, the number of rotor revolutions can be determined based on the number of cycles through which the back electromotive force changes. At the same time, the current rotor position can be determined based on the position of the current back electromotive force in the current cycle.
[0038] Furthermore, the back EMF period is determined according to the current value, and the rotor position information is determined according to the back EMF period, including: determining a continuous sinusoidal signal according to each current value, performing zero crossing detection on the continuous sinusoidal signal to obtain the back EMF period; dividing the back EMF period into intervals; determining the number of rotor rotations according to the number of back EMF periods matching each current value; and determining the current rotor position according to the position of the target interval within the back EMF period and the time interval matching the target interval.
[0039] It can be understood that the change in current value conforms to the waveform of the sinusoidal curve, therefore, each current value obtained by real-time monitoring is converted into a continuous sinusoidal signal. Specifically, the current value can be converted into a sinusoidal signal by Fourier transform, but the present embodiment does not limit the specific method of signal conversion. The back electromotive force period can be obtained by performing zero-crossing detection on the sinusoidal signal curve of the continuous sinusoidal signal. In the sinusoidal signal curve, when the waveform is converted from the positive half cycle to the negative half cycle or from the negative half cycle to the positive half cycle, it passes through the zero position, and the zero-crossing detection is to detect this zero position. Further, the threshold of the zero-crossing detection can be set to a value slightly higher than the zero point, and the sinusoidal signal is zero when it is less than or equal to the preset threshold. The advantage of this setting is that it can avoid the misjudgment of the zero position caused by the noise interference of the sinusoidal signal.
[0040] The number of back EMF cycles that match each current value refers to the number of complete cycles of the back EMF corresponding to each current value starting from the monitoring of the current value. For the continuous sinusoidal signal converted from the monitored current value, the number of complete cycles can be determined. Different motor stages correspond to different corresponding relationships between the number of rotor rotations and the number of back EMF cycle changes. Therefore, the number of rotor rotations can be determined based on the number of back EMF cycles and the number of motor stages. Taking the above-mentioned 6-stage motor as an example, if the number of complete back EMF cycles is 15, it can be known that the number of rotor rotations is 5.
[0041] The purpose of dividing the back EMF period into intervals is to improve the accuracy of rotor position detection. Specifically, for the continuous sinusoidal signal obtained by converting the monitored current value, the number of back EMF periods that it has completely passed can be determined. However, when the current sinusoidal signal has not completed its periodic change, the current rotor position, that is, the rotor phase angle, cannot be directly determined based on the incomplete sinusoidal signal curve. Therefore, the back EMF period is divided into intervals to determine the target interval where the current sinusoidal signal is located. The rotor phase angle is calculated based on the position of the target interval in the back EMF period and the time interval corresponding to the target interval.
[0042] The back electromotive force period can be divided into intervals by determining the position characteristic points of the sinusoidal signal curve. The number of intervals can also be preset to divide the back electromotive force period into intervals. Preferably, the angles corresponding to each interval are the same. However, this embodiment does not limit the specific method of interval division.
[0043] S130, determining a phase sequence according to the current value, and determining a direction of the ball camera position offset according to the phase sequence.
[0044] The phase sequence is the excitation sequence of each phase of the motor. The direction of the ball machine position offset is the direction of the motor's rotation. The excitation sequence corresponds to the motor's rotation. Taking a three-phase motor as an example, when sampling the current value, the three phases of the motor are sampled separately. There is a conversion relationship between the current value and the back electromotive force, and there is a phase difference between the back electromotive forces of the three phases. Therefore, the sampled current values of each phase are converted into the back electromotive force of the three phases. The excitation sequence of each phase of the motor can be obtained by the time when the back electromotive force of each phase appears.
[0045] Specifically, the back electromotive force of each phase can be expressed by the following formula: E A =U d cos(θ)-I A R A ; Among them, E A 、E B and E C Represent the back electromotive force of the three phases, U d is the motor voltage, θ is the rotor phase angle, I A ,I B and I C They are the current values of the three phases, R A , R B and R C are the winding resistances of the three phases respectively.
[0046] Figure 2 A schematic diagram of the correspondence between the phase sequence and the motor rotation direction is provided, such as Figure 2As shown, when the motor is running upward, the phase sequence of each phase is A→B→C, and when the motor is running downward, the phase sequence of each phase is C→B→A. Therefore, the position offset direction of the ball camera can be obtained according to the phase sequence of each phase and the corresponding relationship between the phase sequence and the motor direction.
[0047] S140, calibrating the position of the ball camera according to the rotor position information and the position offset direction of the ball camera.
[0048] In this embodiment, after the rotor position information and the direction of the ball camera position deviation are determined, the ball camera position can be reset. Specifically, a driving signal is sent to the motor to control the motor to run in a direction opposite to the direction of the ball camera position deviation, and reset is performed according to the rotor position information.
[0049] The technical solution of the embodiment of the present invention obtains the current value when the position of the ball camera is offset, determines the back electromotive force period according to the current value, determines the rotor position information according to the back electromotive force period, determines the phase sequence according to the current value, determines the direction of the position offset of the ball camera according to the phase sequence, and corrects the position of the ball camera according to the direction of the position offset of the ball camera and the back electromotive force period. The problem of increasing the phase locking force of the motor in the prior art, which causes serious heating of the motor, and the problem of increasing the hardware cost by monitoring the position of the motor through a position sensor are solved. The correction of the position offset of the ball camera is achieved without affecting the normal operation of the motor and without increasing additional hardware costs, especially for the scene where the ball camera is raised / lowered due to external environmental factors such as strong wind or vibration.
[0050] Embodiment 2
[0051] Figure 3 A flowchart of a method for correcting the position of a ball camera provided in the second embodiment of the present invention. Based on the above embodiments, the embodiment of the present invention further specifies the specific judgment process of the ball camera position offset condition, the process of determining the rotor position information, and the process of determining the direction of the ball camera position offset.
[0052] like Figure 3 As shown, the method includes:
[0053] S210, determine whether the current value is detected and there is no motor drive signal within a preset time period. If so, execute S220, otherwise return to execute S210.
[0054] In this embodiment, under the premise that there is no motor drive signal within a preset time period, the current value of each phase of the motor is used as an example to determine the position deviation of the ball camera. The current of each phase of the motor is detected by the resistance sampling module. If the current value is detected, it means that the position of the ball camera is offset, and the detected current value of each phase is saved in the register.
[0055] S220: Obtain current value.
[0056] S230, determining a continuous sinusoidal signal according to each current value, performing zero-crossing detection on the continuous sinusoidal signal, and obtaining a back-electromotive force period.
[0057] The current values of each phase in the register are converted to obtain continuous sinusoidal signals, and the sinusoidal signals are detected to determine the back electromotive force period. The specific methods of signal conversion and zero-crossing detection have been described in the above embodiment, and will not be repeated in this embodiment.
[0058] S240, dividing the back electromotive force period into intervals.
[0059] Furthermore, S240 may further include: dividing the back electromotive force period into intervals according to the zero-crossing points and extreme value points of the sinusoidal signal curve formed by the continuous sinusoidal signals of each phase.
[0060] In this embodiment, the interval division is described by taking the interval division of the back electromotive force period according to the position characteristic points of the sinusoidal signal curve as an example.
[0061] The zero crossing point refers to the point where the sinusoidal signal curve intersects the zero point. The extreme value points include positive extreme value points and negative extreme value points. Taking a three-phase motor as an example, Figure 4 A schematic diagram of the sinusoidal signal curves of each phase is provided, such as Figure 4 As shown, within one back-EMF cycle, the three-phase sinusoidal signal curves correspond to zero-crossing points and extreme value points respectively, dividing the back-EMF cycle into 12 intervals. Because one back-EMF cycle corresponds to 360°, each interval corresponds to 30°.
[0062] S250, determining the number of revolutions of the rotor according to the number of back electromotive force cycles matching each current value.
[0063] Specifically, the number of revolutions of the rotor is determined according to the number of back-electromotive force cycles matching each current value and the number of motor stages.
[0064] How to determine the number of back-EMF cycles and the specific method of determining the number of rotor rotations based on the number of back-EMF cycles and the number of motor stages have been described in the above embodiments, and will not be repeated in this embodiment.
[0065] It should be noted that, since there is a conversion relationship between the current value and the back electromotive force, in this embodiment, the current value can be directly converted into a sinusoidal signal, and the number of rotor revolutions and the current rotor position can be determined based on the sinusoidal signal obtained by the current value conversion. The current value can also be converted into a back electromotive force, and the back electromotive force is converted into a sinusoidal signal, and the number of rotor revolutions and the current rotor position can be determined based on the sinusoidal signal obtained by the back electromotive force conversion, and this embodiment does not limit this.
[0066] S260: Determine the current rotor position according to the position of the target interval within the back electromotive force cycle and the time interval matching the target interval.
[0067] Furthermore, S260 may include: determining the rotor speed of the rotor in the target interval based on the electrical angle matching the target interval and the time interval matching the target interval; determining the current rotor position based on the position of the target interval in the back electromotive force cycle, the electrical angle matching the target interval, and the rotor speed of the rotor in the target interval.
[0068] Specifically, the rotor speed is determined by the following formula:
[0069]
[0070] Wherein, ω(k) represents the rotor speed, T(k) represents the time interval matching the target interval, that is, the time interval between two position feature points corresponding to the target interval, and θ1 represents the interval angle.
[0071] The rotor phase angle corresponding to different times matching the target interval is determined by the following formula:
[0072] θ(t)=N×θ1+ω(k)×t, t∈(0,T(k));
[0073] Wherein, θ(t) represents the rotor phase angle corresponding to different times matching the target interval, and N represents the position of the target interval within the back-EMF cycle.
[0074] Taking the above three-phase motor as an example, the back EMF period is divided into 12 intervals.
[0075] The technical solution of this embodiment can obtain the current rotor position, rotor speed and number of rotor rotations based on the current values of each phase of the motor obtained by sampling, thereby realizing automatic monitoring of the motor position offset and improving the accuracy of motor offset position detection.
[0076] S270. Determine a phase sequence according to the current value.
[0077] S280, determining the position offset direction of the ball camera according to the phase sequence of each current value and the mapping relationship between the preset phase sequence and the position offset direction of the ball camera.
[0078] The specific method of determining the phase sequence of the current values and determining the direction of the ball camera position offset according to the phase sequence has been described in the above embodiments, and will not be repeated in this embodiment.
[0079] S290, calibrating the position of the ball camera according to the rotor position information and the position offset direction of the ball camera.
[0080] The specific method for correcting the position of the ball camera has been described in the above embodiment, and will not be repeated in this embodiment.
[0081] Embodiment 3
[0082] Figure 5 This is a schematic diagram of the structure of a device for correcting the position of a ball camera provided in the third embodiment of the present invention. Figure 5 As shown, the device includes: a current value acquisition module 310, a rotor position information determination module 320, a ball camera position offset direction determination module 330 and a ball camera position correction module 340. Wherein:
[0083] The current value acquisition module 310 is used to acquire the current value if it is determined that the position offset condition of the ball camera is met;
[0084] A rotor position information determination module 320, configured to determine a back electromotive force period according to the current value, and determine the rotor position information according to the back electromotive force period;
[0085] The dome camera position offset direction determination module 330 is used to determine the phase sequence according to the current value, and determine the dome camera position offset direction according to the phase sequence;
[0086] The ball camera position correction module 340 is used to correct the position of the ball camera according to the rotor position information and the position offset direction of the ball camera.
[0087] The technical solution of the embodiment of the present invention obtains the current value when the position of the ball camera is offset, determines the back electromotive force period according to the current value, determines the rotor position information according to the back electromotive force period, determines the phase sequence according to the current value, determines the direction of the position offset of the ball camera according to the phase sequence, and corrects the position of the ball camera according to the direction of the position offset of the ball camera and the back electromotive force period. The problem of increasing the phase locking force of the motor in the prior art, which causes serious heating of the motor, and the problem of increasing the hardware cost by monitoring the position of the motor through a position sensor are solved. The correction of the position offset of the ball camera is achieved without affecting the normal operation of the motor and without increasing additional hardware costs, especially for the scene where the ball camera is raised / lowered due to external environmental factors such as strong wind or vibration.
[0088] Based on the above embodiment, the current value acquisition module 310 includes:
[0089] The ball camera position deviation condition judgment unit is used to determine that the ball camera position deviation condition is met if it is determined that the current value is detected and there is no motor drive signal within a preset time period.
[0090] Based on the above embodiment, the rotor position information includes the number of rotor rotations and the current rotor position;
[0091] The rotor position information determination module 320 includes:
[0092] A back-EMF period determination unit is used to determine a continuous sinusoidal signal according to each current value, and to perform zero-crossing detection on the continuous sinusoidal signal to obtain a back-EMF period;
[0093] A back-electromotive force period interval division unit, used for dividing the back-electromotive force period into intervals;
[0094] A rotor rotation number determination unit, used to determine the rotor rotation number according to the number of back electromotive force cycles matching each current value;
[0095] The current rotor position determination unit is used to determine the current rotor position according to the position of the target interval within the back electromotive force cycle and the time interval matching the target interval.
[0096] On the basis of the above embodiment, the back electromotive force period interval division unit is specifically used for:
[0097] The back electromotive force period is divided into intervals according to the zero-crossing points and extreme value points of the sinusoidal signal curve formed by the continuous sinusoidal signals of each phase.
[0098] On the basis of the above embodiment, the rotor rotation number determination unit is specifically used for:
[0099] The number of rotor revolutions is determined based on the number of back EMF cycles that match each current value and the number of motor stages.
[0100] Based on the above embodiment, the current rotor position determination unit is specifically used for:
[0101] Determining a rotor speed of the rotor in the target interval according to an electrical angle matching the target interval and a time interval matching the target interval;
[0102] The current rotor position is determined according to the position of the target interval within the back electromotive force cycle, the electrical angle matching the target interval, and the rotor speed of the rotor in the target interval.
[0103] Based on the above embodiment, the ball camera position offset direction determination module 330 includes:
[0104] The dome camera position offset direction determining unit is used to determine the dome camera position offset direction according to the phase sequence of each current value and the mapping relationship between the preset phase sequence and the dome camera position offset direction.
[0105] The device for correcting the position of a ball camera provided in an embodiment of the present invention can execute the method for correcting the position of a ball camera provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0106] Embodiment 4
[0107] Figure 6 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0108] like Figure 6As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0109] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0110] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for correcting the position of a ball camera.
[0111] In some embodiments, the method for correcting the position of the ball camera can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for correcting the position of the ball camera described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the method for correcting the position of the ball camera in any other appropriate manner (for example, by means of firmware).
[0112] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0113] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0114] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0115] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0116] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0117] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0118] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0119] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for correcting the position of a ball camera, characterized in that: include: If it is determined that the position offset condition of the ball camera is met, the current value is obtained; Determine the back electromotive force period according to the current value, and determine the rotor position information according to the back electromotive force period; Determine a phase sequence according to the current value, and determine a direction of the ball camera position offset according to the phase sequence; The position of the ball camera is corrected according to the rotor position information and the direction of the ball camera position offset.
2. The method according to claim 1, characterized in that Determine whether the conditions for the ball camera position offset are met, including: If it is determined that the current value is detected and there is no motor drive signal within the preset time period, it is determined that the position deviation condition of the ball camera is met.
3. The method according to claim 1, characterized in that The rotor position information includes the number of rotor revolutions and the current rotor position; Determine the back EMF period according to the current value, and determine the rotor position information according to the back EMF period, including: Determine a continuous sinusoidal signal according to each current value, perform zero-crossing detection on the continuous sinusoidal signal, and obtain a back electromotive force period; Dividing the back electromotive force period into intervals; The number of rotor revolutions is determined based on the number of back EMF cycles that match each current value; The current rotor position is determined according to the position of the target interval within the back electromotive force cycle and the time interval matching the target interval.
4. The method according to claim 3, characterized in that The back electromotive force period is divided into intervals, including: The back electromotive force period is divided into intervals according to the zero-crossing points and extreme value points of the sinusoidal signal curve formed by the continuous sinusoidal signals of each phase.
5. The method according to claim 3, characterized in that: The number of rotor revolutions is determined based on the number of back EMF cycles that match each current value, including: The number of rotor revolutions is determined based on the number of back EMF cycles that match each current value and the number of motor stages.
6. The method according to claim 3, characterized in that Determining the current rotor position according to the position of the target interval within the back electromotive force cycle and the time interval matching the target interval includes: Determining a rotor speed of the rotor in the target interval according to an electrical angle matching the target interval and a time interval matching the target interval; The current rotor position is determined according to the position of the target interval within the back electromotive force cycle, the electrical angle matching the target interval, and the rotor speed of the rotor in the target interval.
7. The method according to claim 1, characterized in that Determining the direction of the ball camera position offset according to the phase sequence includes: The position offset direction of the ball camera is determined according to the phase sequence of each current value and the mapping relationship between the preset phase sequence and the position offset direction of the ball camera.
8. A device for correcting the position of a ball camera, characterized in that: include: A current value acquisition module, used to acquire the current value if it is determined that the position offset condition of the ball camera is met; A rotor position information determination module, used to determine the back electromotive force period according to the current value, and determine the rotor position information according to the back electromotive force period; A module for determining the position offset direction of the ball camera, used to determine the phase sequence according to the current value, and determine the position offset direction of the ball camera according to the phase sequence; The ball camera position correction module is used to correct the position of the ball camera according to the rotor position information and the position offset direction of the ball camera.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for correcting the position of the ball camera as described in any one of claims 1-7 is implemented.
10. A storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to execute the method for correcting the position of a ball camera as described in any one of claims 1-7.
