Angle measurement method and device of holder, electronic equipment and storage medium

By combining Hall effect sensors and neural networks, the problem of insufficient accuracy in gimbal angle measurement has been solved, achieving high-precision and high-reliability gimbal angle measurement, which is applicable to fields such as industrial automation, security monitoring, and drones.

CN120991697APending Publication Date: 2025-11-21REMO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511234294.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Traditional gimbal angle measurement technology suffers from problems such as decreased accuracy, low reliability, and high maintenance costs, making it difficult to meet the requirements of high precision and high reliability.

Method used

Hall coordinate data is acquired by a gimbal with a Hall sensor attached, and the joint angle is determined by a trained neural network based on the Hall coordinate data. The neural network is trained based on discrete reference sample data of discrete reference positions.

Benefits of technology

It enables precise determination of gimbal joint angles in complex environments, has strong anti-interference capabilities, meets the requirements of high precision and real-time performance, avoids mechanical wear and contact resistance changes, and improves the accuracy and reliability of gimbal angle measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120991697A_ABST
    Figure CN120991697A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a pan-tilt angle measurement method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining the Hall coordinate data of a target magnetic device at a current position through a target pan-tilt; wherein the target holder is bound with a set number of Hall sensors; inputting the Hall coordinate data of the current position into a target neural network to obtain a joint angle of the target holder at the current position; wherein the target neural network is obtained by training discrete reference sample data of a discrete reference position which is discretely measured according to a fixed interval Euler angle in the movement process of the holder relative to the magnetic device. According to the technical scheme, the joint angle of the holder can be accurately measured, and the accuracy of holder angle measurement is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gimbal angle measurement technology, and in particular to a gimbal angle measurement method, device, electronic device and storage medium. Background Technology

[0002] In fields such as industrial automation, security monitoring, drones and robots, the gimbal is a core motion control component, and its angle measurement accuracy directly affects the stability of the system and the accuracy of target tracking.

[0003] Traditional gimbal angle measurement technology mainly relies on mechanical encoders, potentiometers, or optical sensors. However, while mechanical encoders can provide high angular resolution, their mechanical structure is susceptible to wear, leading to a gradual decrease in accuracy over long-term use. Furthermore, their reliability is significantly reduced in environments with high vibration or shock. Potentiometer solutions, although lower in cost, suffer from nonlinear errors caused by changes in contact resistance and have a limited lifespan, making it difficult to meet the requirements for high precision and high reliability. Optical sensors, while enabling non-contact measurement, are sensitive to environmental interference such as dust and oil, have high maintenance costs, and are difficult to adapt to harsh working environments. Summary of the Invention

[0004] This invention provides a method, device, electronic device, and storage medium for measuring the angle of a gimbal, which can accurately measure the joint angle of the gimbal and improve the accuracy of gimbal angle measurement.

[0005] According to one aspect of the present invention, a method for measuring the angle of a gimbal is provided, comprising:

[0006] The Hall coordinate data of the target magnetic device at its current position is obtained by using a target gimbal; wherein, the target gimbal is equipped with a set number of Hall sensors;

[0007] The Hall coordinate data of the current position is input into the target neural network to obtain the joint angle of the target gimbal at the current position;

[0008] The target neural network is trained using discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the movement of the gimbal relative to the magnetic device.

[0009] According to another aspect of the present invention, a gimbal angle measuring device is provided, comprising:

[0010] The Hall coordinate data acquisition module is used to acquire the Hall coordinate data of the target magnetic device at its current position through the target gimbal; wherein, the target gimbal is equipped with a set number of Hall sensors;

[0011] The joint angle determination module is used to input the Hall coordinate data of the current position into the target neural network to obtain the joint angle of the target gimbal at the current position;

[0012] The target neural network is trained using discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the movement of the gimbal relative to the magnetic device.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] At least one processor; and

[0015] A memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the gimbal angle measurement method according to any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the angle measurement method of the gimbal according to any embodiment of the present invention.

[0018] This invention employs a target gimbal equipped with a predetermined number of Hall sensors to acquire Hall coordinate data of a target magnetic device at its current position. This Hall coordinate data is then input into a target neural network to obtain the joint angle of the target gimbal at that position. The target neural network is trained using discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the gimbal's movement relative to the magnetic device. This solution, based on the target neural network and the Hall coordinate data of the target magnetic device at its current position, determines the joint angle of the target gimbal, solving the problem of insufficient accuracy in gimbal angle measurement in existing technologies. It enables precise measurement of the gimbal's joint angle, improving the accuracy of gimbal angle measurement.

[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart of a gimbal angle measurement method provided in Embodiment 1 of the present invention;

[0022] Figure 2 This is a schematic diagram of a gimbal angle measuring device provided in Embodiment 2 of the present invention;

[0023] Figure 3 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. Detailed Implementation

[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0025] It should be noted that the terms "target," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0026] Example 1

[0027] Figure 1This is a flowchart of a gimbal angle measurement method provided in Embodiment 1 of the present invention. This embodiment is applicable to the case of measuring the joint angle of a gimbal based on a neural network. The method can be executed by a gimbal angle measurement device, which can be implemented in software and / or hardware, and is generally integrated into an electronic device. This electronic device can be a terminal device or a server device, as long as it can execute the gimbal angle measurement method. The present invention does not limit the specific type of electronic device. Accordingly, as... Figure 1 As shown, the method includes the following operations:

[0028] S110. Obtain Hall coordinate data of the target magnetic device at its current position through the target gimbal; wherein, the target gimbal is equipped with a set number of Hall sensors.

[0029] The target gimbal can be any gimbal requiring joint angle measurement. For example, the target gimbal can be a motion control gimbal mounted on devices such as drones, surveillance cameras, and robots. The target magnetic device can be of any shape, including but not limited to curved magnets or ring magnets; this embodiment does not limit the specific type of the target magnetic device. The current position can be the relative position of the target magnetic device and the target gimbal. The Hall coordinate data can be magnetic field data acquired using a Hall sensor. The Euler angle can be used to describe the orientation of the target gimbal in three-dimensional space. The set quantity can be a pre-set number of Hall sensors, for example, three. The Hall sensor can be a magnetoelectric conversion device based on the Hall effect, used to measure the Hall coordinate data of the target magnetic device at its current position.

[0030] In this embodiment of the invention, to measure the angle of the target gimbal, a target magnetic device and the gimbal to be measured can first be selected as the target gimbal. For example, an arc-shaped magnet can be selected as the target magnetic device. Using an arc-shaped magnet as the target magnetic device for angle measurement of the target gimbal effectively avoids machine wear caused by contact through non-contact measurement, and the arc-shaped magnet has good stability to environmental changes, exhibiting strong anti-interference capabilities. After selecting the target magnetic device, it can be fixed, and the target gimbal can be driven to move relative to the target magnetic device. For example, the target gimbal can be driven to rotate, causing relative movement between the target gimbal and the target magnetic device. Correspondingly, during the relative movement of the target gimbal and the target magnetic device, the Hall coordinate data of the target magnetic device at its current position can be obtained by the target gimbal, which is equipped with a set number of Hall sensors.

[0031] In an optional embodiment of the present invention, after obtaining the Hall coordinate data of the target magnetic device at the current position through the target gimbal, the method may further include: normalizing the Hall coordinate data at the current position to obtain normalized Hall coordinate data at the current position.

[0032] The normalization process can be the process of converting the Hall coordinate data of the current location into a standard normal distribution.

[0033] In this embodiment of the invention, after acquiring the Hall coordinate data of the target magnetic device at its current position via the target gimbal, the Hall coordinate data at the current position can be normalized to convert it into a standard normal distribution. Converting the Hall coordinate data to a standard normal distribution eliminates the influence of the dimensions of the Hall coordinate data at the current position through the mean and standard deviation. Simultaneously, even when the data distribution fluctuates, it ensures that the values ​​after standard normalization are within a reasonable range, thereby enhancing the measurement system's ability to resist noise and outlier interference.

[0034] In a specific example, when normalizing the Hall coordinate data of the current location, the average value of each dimension of the Hall coordinate data of the current location can be calculated based on the following formula:

[0035]

[0036] Where, μ X X is the average of the coordinates of each dimension of the Hall coordinate data at the current location, N is the total number of Hall coordinate data at the current location, and X is the average of the coordinates of each dimension of the Hall coordinate data at the current location. i These are the coordinates of each dimension of the Hall coordinate data for the current location.

[0037] Furthermore, the standard deviation of each dimension of the Hall coordinate data at the current location can be calculated based on the following formula:

[0038]

[0039] Where, σ X This represents the standard deviation of each dimension of the Hall coordinate data for the current location.

[0040] Finally, the normalized Hall coordinate data for the current position can be obtained using the following formula:

[0041]

[0042] Among them, Z i These are the coordinate values ​​of each dimension of the Hall coordinate data for the current position after normalization.

[0043] S120. Input the Hall coordinate data of the current position into the target neural network to obtain the joint angle of the target gimbal at the current position; wherein, the target neural network is trained using discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the movement of the gimbal relative to the magnetic device.

[0044] The target neural network can be trained using discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the relative motion of the gimbal to the magnetic device. The joint angle at the current position can be the angle of the target gimbal relative to its reference position. The fixed interval of Euler angles can be achieved by uniformly dividing an angle range into several equally sized angle segments, each segment having a fixed size. For example, during the relative motion of the gimbal to the magnetic device, data can be collected every 1 degree. The discrete reference position can be a specific discrete position of the target gimbal during its relative movement to the target magnetic device. The discrete reference sample data can be collected data from multiple discrete positions measured at fixed intervals of Euler angles during the relative motion of the gimbal to the magnetic device.

[0045] Accordingly, after determining the current Hall coordinates of the target magnetic device at its current position, these coordinates can be input into the target neural network. The output of the target neural network is obtained through forward propagation, and this output can be used as the joint angle of the target gimbal at its current position. The target neural network can automatically learn and extract features from discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the movement of the gimbal relative to the magnetic device. This allows for effective prediction of unseen data, thereby achieving accurate measurement of the target gimbal's joint angle.

[0046] In an optional embodiment of the present invention, the step of inputting the Hall coordinate data of the current position into the target neural network to obtain the joint angle of the target gimbal at the current position may include: inputting the normalized Hall coordinate data of the current position into the target neural network to obtain the joint angle of the target gimbal at the current position.

[0047] In this embodiment of the invention, when the Hall coordinate data of the current position is input into the target neural network to obtain the joint angle of the target gimbal at the current position, the normalized Hall coordinate data of the current position can be input into the target neural network so as to determine the joint angle of the target gimbal at the current position through the output of the target neural network.

[0048] In an optional embodiment of the present invention, the training method of the target neural network includes steps A and B, as detailed below:

[0049] Step A: Obtain discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the movement of the gimbal relative to the magnetic device; wherein, the discrete reference sample data includes Hall coordinate sample data and Euler angle sample data.

[0050] Step B: Train the neural network using the discrete reference sample data of the discrete reference positions to obtain the trained target neural network.

[0051] In this embodiment of the invention, when training the target neural network, discrete reference data of discrete positions measured at fixed intervals of Euler angles during the relative motion of multiple gimbals with respect to the magnetic device can first be acquired as discrete reference sample data. After acquiring the discrete reference sample data, the Hall coordinate sample data in the discrete reference sample data can be used as the input data of the neural network, and the Euler angle sample data in the discrete reference sample data can be used as the output data of the neural network. The neural network is trained until the accuracy of the neural network exceeds a threshold, such as 95%, or reaches a preset number of iterations, thereby obtaining the trained target neural network.

[0052] In an optional embodiment of the present invention, after obtaining discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the process of acquiring the movement of the gimbal relative to the magnetic device, the method may further include: normalizing the Hall coordinate sample data of each discrete reference position to obtain normalized discrete reference sample data; the step of training the neural network using the discrete reference sample data of the discrete reference positions to obtain a trained target neural network may include: training the neural network using the normalized discrete reference sample data to obtain the trained target neural network.

[0053] In another optional embodiment of the present invention, the training method of the target neural network includes steps A, C, and B' training, as detailed below:

[0054] Step A: Obtain discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the movement of the gimbal relative to the magnetic device; wherein, the discrete reference sample data includes Hall coordinate sample data and Euler angle sample data.

[0055] Step C: Normalize the Hall coordinate sample data of each discrete reference position to obtain normalized discrete reference sample data.

[0056] Step B': Train the neural network using the normalized discrete reference sample data to obtain the trained target neural network.

[0057] In this embodiment of the invention, after acquiring discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the movement of the gimbal relative to the magnetic device, the Hall coordinate sample data of each discrete reference position can be normalized to obtain normalized Hall coordinate sample data. The Euler angle sample data and the normalized Hall coordinate sample data are then used as the normalized discrete reference sample data. After obtaining the normalized discrete reference sample data, the neural network can be trained using this data to obtain a trained target neural network.

[0058] In an optional embodiment of the present invention, training the neural network using the normalized discrete reference sample data to obtain the trained target neural network may include a forward propagation step and a backward propagation step, as detailed below:

[0059] Forward propagation steps: The Hall coordinate sample data in the normalized discrete reference sample data is used as input data and sequentially input into the input layer of the neural network; the input data is weighted and summed with the weights of each neuron in the hidden layer of the neural network, and then processed by the activation function to undergo nonlinear transformation; finally, the data is passed to the output layer, and the output layer outputs the predicted value of the joint angle of the gimbal at the current position; the loss function value is calculated based on the predicted value of the joint angle of the gimbal at the current position and the Euler angle sample data in the discrete reference sample data.

[0060] Backpropagation steps: Starting from the output layer, calculate the gradient of the loss function with respect to the weights of the output layer neurons using the chain rule based on the loss function value; continue to calculate the gradient of the loss function with respect to the weights of the hidden layer neurons layer by layer using the chain rule; based on the calculated gradients, update the weights and biases of each layer of the neural network using the optimizer to reduce the loss function value; repeat the forward propagation and backpropagation steps until the loss function value converges to a set threshold or reaches a preset number of training iterations.

[0061] In this embodiment of the invention, when training a neural network using the normalized discrete reference sample data to obtain a trained target neural network, the following steps may be included:

[0062] Forward propagation step: Assuming the neural network consists of two hidden layers, each with 5 hidden elements, the Hall coordinate sample data from the normalized discrete reference sample data can be used as the input vector [h1, h2, h3] of the neural network. T Then the weighted input of the j-th neuron in the first hidden layer is:

[0063]

[0064] The output is obtained after processing with the tanh activation function:

[0065] a 1j =tanhh( Z1j )

[0066] Combine the 5 outputs of the first hidden layer into a vector a1 = [a 11 a 12 a 13 a 14 a 15 ] T .

[0067] Among them, Z 1j a is the weighted input of the j-th neuron in the first hidden layer. 1j The output of each neuron in the first hidden layer is obtained after processing with the tanh activation function. a1 is the output obtained after processing with the tanh activation function in the first hidden layer. 11 The output, a, is obtained after processing the first neuron in the first hidden layer using the tanh activation function. 12 The output, a, is obtained after processing the second neuron in the first hidden layer using the tanh activation function. 13 The output, a, is obtained after processing the tanh activation function of the third neuron in the first hidden layer. 14 The output, a, is obtained after processing the tanh activation function of the 4th neuron in the first hidden layer. 15 The output is obtained after processing the tanh activation function of the 5th neuron in the first hidden layer.

[0068] The weighted input of the k-th neuron in the second hidden layer is:

[0069]

[0070] The output is obtained after processing with tanh activation numbers:

[0071] a 2k =tanh(Z2) k )

[0072] Combine the five outputs of the second hidden layer into a vector a2 = [a 21 a 22 a 23 a 24 a 25 ] T .

[0073] Among them, Z 2ka is the weighted input to the k-th neuron in the second hidden layer. 2k The output of each neuron in the second hidden layer is obtained after processing with the tanh activation function, a2 is the output obtained after processing with the tanh activation function in the second hidden layer, a 21 The output, a, is obtained after processing the first neuron in the second hidden layer using the tanh activation function. 22 The output, a, is obtained after processing the second neuron in the second hidden layer using the tanh activation function. 23 The output, a, is obtained after processing the tanh activation function of the third neuron in the second hidden layer. 24 The output, a, is obtained after processing the tanh activation function of the 4th neuron in the second hidden layer. 25 The output is obtained after processing the tanh activation function of the 5th neuron in the second hidden layer.

[0074] Since only one angle value needs to be output, the output layer has only one neuron, and its output is:

[0075]

[0076] Where θ is the output of the neural network, that is, the predicted value of the joint angle of the gimbal at the current position, and b3 is the bias gradient of the output layer.

[0077] Furthermore, the loss function value can be calculated based on the predicted value of the joint angle of the gimbal at the current position and the Euler angle sample data in the discrete reference sample data.

[0078] Backpropagation steps: Based on the loss function value, the gradient of the loss function with respect to the weights of the output layer neurons is calculated using the chain rule backpropagation algorithm. After obtaining the gradient of the output layer neuron weights, the gradient of the loss function with respect to the weights of each hidden layer neuron can be calculated again using the chain rule. Based on the calculated gradients, the optimizer can update the weight gradients and bias gradients of each layer of the neural network to reduce the loss function value. The backpropagation algorithm enables the neural network to automatically learn and optimize its parameters from discrete reference sample data, thus simplifying the complexity of neural network training and improving its efficiency. Furthermore, the backpropagation algorithm can accelerate the convergence of the neural network, improve its generalization ability, and reduce the risk of overfitting.

[0079] Repeat the forward propagation and backward propagation steps until the loss function value converges to the set threshold or the preset number of training iterations are reached, and the trained target neural network can be obtained.

[0080] In a specific example, suppose the input vector of the neural network is [h1, h2, h3]. TThe normalized Hall coordinate sample data can then be analyzed using the Mean Squared Error (MSE) loss function with respect to θ. i The error δ3 in the partial derivative calculation is:

[0081]

[0082] Where MSE is the mean squared error loss function, n is the number of discrete reference sample data collected, and θ i Let θ be the Euler angle of the actual gimbal in the i-th discrete reference sample data. i δ3 represents the predicted output of the i-th discrete reference sample data, and δ3 represents the output error of the neural network.

[0083] Furthermore, the weight gradient and bias gradient of the output layer can be calculated:

[0084] Weight gradient:

[0085] Bias gradient:

[0086] Among them, w 3k This is the updated weight gradient from the output layer to the k-th neuron in the second hidden layer. Let α be the weight gradient from the output layer to the k-th neuron in the second hidden layer before updating, and α be the learning rate of the neural network. 2k b is the activation value of the k-th neuron in the second hidden layer. 3k This is the bias gradient from the updated output layer to the k-th neuron in the second hidden layer. The bias gradient from the output layer to the k-th neuron in the second hidden layer before the update, where k is the index of each neuron in the second hidden layer.

[0087] The error for calculating the k-th neuron in the second hidden layer is:

[0088]

[0089] Where, δ 2k For the error term of the k-th neuron in the second hidden layer, δ 3k =δ3·w 3k , It is the derivative of the activation function tanh of the k-th neuron in the second hidden layer.

[0090] The weight gradient and bias gradient of the second hidden layer are then:

[0091] Weight gradient:

[0092] Bias gradient:

[0093] Among them, w 2k The weight gradient from the second hidden layer to the k-th neuron of the first hidden layer is updated. Before updating, the weight gradient from the second hidden layer to the k-th neuron of the first hidden layer is updated, δ2 is the error term of the second hidden layer, and a 1j The j-th activation value of the first hidden layer, b 2k This is the bias gradient from the second hidden layer to the k-th neuron in the first hidden layer after the update. The gradient is the bias gradient from the second hidden layer to the k-th neuron in the first hidden layer before the update, where j is the index of each neuron in the first hidden layer.

[0094] The error of the j-th neuron in the first hidden layer is calculated as follows:

[0095]

[0096] Where, δ 1j This is the error term for the j-th neuron in the first hidden layer.

[0097] The weight gradient and bias gradient of the first hidden layer are then:

[0098] Weight gradient:

[0099] Bias gradient:

[0100] Among them, w 1j The updated weight gradient of the j-th neuron in the first hidden layer. The weight gradient of the j-th neuron in the first hidden layer before the update, where δ1 is the error term of the first hidden layer, and a 1j The j-th activation value in the first hidden layer, b 1j This is the bias gradient of the j-th neuron in the first hidden layer after the update. h is the bias gradient of the j-th neuron in the first hidden layer before the update. i The activation value of the input layer is the normalized Hall coordinate data of the target magnetic device when the target gimbal is in its current position.

[0101] Furthermore, after obtaining the weight gradient and bias gradient of the loss function with respect to the weights of the hidden layer neurons, an optimizer can be used to update the weights and biases of each layer of the neural network to reduce the value of the loss function.

[0102] In summary, the gimbal angle measurement method provided by this invention can accurately determine the joint angle of a target gimbal at its current position in complex environments, exhibiting strong anti-interference capabilities. Simultaneously, its efficient computational mechanism ensures real-time acquisition of the gimbal's joint angle at its current position, thereby rapidly responding to dynamic changes in the gimbal and providing timely and reliable data support for subsequent precise control and operation. This effectively meets the high-precision and real-time requirements for gimbal angle measurement in practical applications. Furthermore, the above solution eliminates the need for mechanical contact, avoiding problems such as mechanical wear and changes in contact resistance. Moreover, changes in magnetic field strength are less affected by environmental factors, significantly improving the reliability of gimbal angle measurement.

[0103] This invention employs a target gimbal equipped with a predetermined number of Hall sensors to acquire Hall coordinate data of a target magnetic device at its current position. This Hall coordinate data is then input into a target neural network to obtain the joint angle of the target gimbal at that position. The target neural network is trained using discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the gimbal's movement relative to the magnetic device. This solution, based on the target neural network and the Hall coordinate data of the target magnetic device at its current position, determines the joint angle of the target gimbal, solving the problem of insufficient accuracy in gimbal angle measurement in existing technologies. It enables precise measurement of the gimbal's joint angle, improving the accuracy of gimbal angle measurement.

[0104] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information in this technical solution comply with relevant laws and regulations and do not violate public order and good morals.

[0105] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data comply with the relevant laws, regulations and standards of the relevant regions.

[0106] It should be noted that any arrangement or combination of the technical features in the above embodiments also falls within the protection scope of this invention.

[0107] Example 2

[0108] Figure 2 This is a schematic diagram of a gimbal angle measuring device provided in Embodiment 2 of the present invention, as shown below. Figure 2 As shown, the device includes: a Hall coordinate data acquisition module 210 and a joint angle determination module 220, wherein:

[0109] The Hall coordinate data acquisition module 210 is used to acquire the Hall coordinate data of the target magnetic device at its current position through the target gimbal; wherein, the target gimbal is bound with a set number of Hall sensors.

[0110] The joint angle determination module 220 is used to input the Hall coordinate data of the current position into the target neural network to obtain the joint angle of the target gimbal at the current position.

[0111] The target neural network is trained using discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the movement of the gimbal relative to the magnetic device.

[0112] This invention employs a target gimbal equipped with a predetermined number of Hall sensors to acquire Hall coordinate data of a target magnetic device at its current position. This Hall coordinate data is then input into a target neural network to obtain the joint angle of the target gimbal at that position. The target neural network is trained using discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the gimbal's movement relative to the magnetic device. This solution, based on the target neural network and the Hall coordinate data of the target magnetic device at its current position, determines the joint angle of the target gimbal, solving the problem of insufficient accuracy in gimbal angle measurement in existing technologies. It enables precise measurement of the gimbal's joint angle, improving the accuracy of gimbal angle measurement.

[0113] Optionally, the above-mentioned device may further include a normalization processing module for normalizing the Hall coordinate data of the current position to obtain the normalized Hall coordinate data of the current position.

[0114] Optionally, the joint angle determination module 220 is specifically used to: input the normalized Hall coordinate data of the current position into the target neural network to obtain the joint angle of the target gimbal at the current position.

[0115] Optionally, the above-mentioned device may further include a neural network training module, used to: acquire discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the movement of the gimbal relative to the magnetic device; wherein the discrete reference sample data includes Hall coordinate sample data and Euler angle sample data; and train the neural network using the discrete reference sample data of the discrete reference positions to obtain the trained target neural network.

[0116] Optionally, the above-mentioned device may further include a discrete reference sample data processing module, used to normalize the Hall coordinate sample data of each of the discrete reference positions to obtain normalized discrete reference sample data.

[0117] Optionally, the above-mentioned device may further include a neural network training module specifically used to: train the neural network using the normalized discrete reference sample data to obtain the trained target neural network.

[0118] Optionally, the above device may further include a neural network training module for: a forward propagation step: taking the Hall coordinate sample data in the normalized discrete reference sample data as input data and sequentially inputting it into the input layer of the neural network; the input data in the hidden layer of the neural network is weighted and summed with the weights of each neuron, and then processed by an activation function to undergo a nonlinear transformation; finally, the data is transmitted to the output layer, and the output layer outputs the predicted value of the joint angle of the gimbal at the current position; the loss function value is calculated based on the predicted value of the joint angle of the gimbal at the current position and the Euler angle sample data in the discrete reference sample data. A backpropagation step: starting from the output layer, calculating the gradient of the loss function with respect to the weights of the output layer neurons using the chain rule based on the loss function value; continuing to calculate the gradient of the loss function with respect to the weights of the hidden layer neurons layer by layer using the chain rule; updating the weights and biases of each layer of the neural network using an optimizer based on the calculated gradient to reduce the loss function value; repeating the forward propagation step and the backpropagation step until the loss function value converges to a set threshold or reaches a preset number of training iterations.

[0119] The above-described gimbal angle measuring device can execute the gimbal angle measuring method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in this embodiment can be found in the gimbal angle measuring method provided in any embodiment of the present invention.

[0120] Since the gimbal angle measuring device described above is capable of executing the gimbal angle measuring method in the embodiments of the present invention, those skilled in the art can understand the specific implementation and various variations of the gimbal angle measuring device in this embodiment based on the gimbal angle measuring method described in the embodiments of the present invention. Therefore, how the gimbal angle measuring device implements the gimbal angle measuring method in the embodiments of the present invention will not be described in detail here. Any device used by those skilled in the art to implement the gimbal angle measuring method in the embodiments of the present invention falls within the scope of protection of this application.

[0121] Example 3

[0122] Figure 3A schematic diagram of an electronic device 10 that can be used to implement embodiments 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 processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0123] like Figure 3 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0124] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0125] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the angle measurement method of a gimbal.

[0126] In some embodiments, the gimbal angle measurement method can be implemented as a computer program, which constitutes a computer program product and is tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the gimbal angle measurement method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the gimbal angle measurement method by any other suitable means (e.g., by means of firmware).

[0127] Optionally, the angle measurement method of the gimbal may include: acquiring Hall coordinate data of the target magnetic device at the current position through the target gimbal; wherein the target gimbal is equipped with a set number of Hall sensors; inputting the Hall coordinate data of the current position into a target neural network to obtain the joint angle of the target gimbal at the current position; wherein the target neural network is trained using discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the movement of the gimbal relative to the magnetic device.

[0128] Various embodiments 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-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0129] Computer programs used to implement 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, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0130] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0131] To provide interaction with a user, the systems and techniques described herein can 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 pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0132] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0133] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0134] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0135] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for measuring the angle of a gimbal, characterized in that, include: The Hall coordinate data of the target magnetic device at its current position is obtained by using a target gimbal; wherein, the target gimbal is equipped with a set number of Hall sensors; The Hall coordinate data of the current position is input into the target neural network to obtain the joint angle of the target gimbal at the current position; The target neural network is trained using discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the movement of the gimbal relative to the magnetic device.

2. The method according to claim 1, characterized in that, After acquiring the Hall coordinate data of the target magnetic device at its current position via the target gimbal, the method further includes: The Hall coordinate data of the current position is normalized to obtain the normalized Hall coordinate data of the current position; The step of inputting the Hall coordinate data of the current position into the target neural network to obtain the joint angle of the target gimbal at the current position includes: The normalized Hall coordinate data of the current position is input into the target neural network to obtain the joint angle of the target gimbal at the current position.

3. The method according to claim 1, characterized in that, The target neural network was trained using the following method: During the movement of the gimbal relative to the magnetic device, discrete reference sample data of discrete reference positions are obtained by measuring Euler angles at fixed intervals; wherein, the discrete reference sample data includes Hall coordinate sample data and Euler angle sample data. The neural network is trained using discrete reference sample data at the discrete reference positions to obtain the trained target neural network.

4. The method according to claim 3, characterized in that, After acquiring discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the movement of the gimbal relative to the magnetic device, the process further includes: The Hall coordinate sample data of each discrete reference position are normalized to obtain the normalized discrete reference sample data. The step of training the neural network using discrete reference sample data at the discrete reference positions to obtain a trained target neural network includes: The neural network is trained using the normalized discrete reference sample data to obtain the trained target neural network.

5. The method according to claim 4, characterized in that, The step of training the neural network using the normalized discrete reference sample data to obtain the trained target neural network includes: Forward propagation steps: The Hall coordinate sample data in the normalized discrete reference sample data is used as input data and sequentially input into the input layer of the neural network; the input data is weighted and summed with the weights of each neuron in the hidden layer of the neural network, and then processed by the activation function to undergo nonlinear transformation; finally, the data is passed to the output layer, and the output layer outputs the predicted value of the joint angle of the gimbal at the current position; the loss function value is calculated based on the predicted value of the joint angle of the gimbal at the current position and the Euler angle sample data in the discrete reference sample data. Backpropagation steps: Starting from the output layer, calculate the gradient of the loss function with respect to the weights of the output layer neurons using the chain rule based on the loss function value; continue to calculate the gradient of the loss function with respect to the weights of the hidden layer neurons layer by layer using the chain rule; based on the calculated gradient, use the optimizer to update the weights and biases of each layer of the neural network to reduce the loss function value. Repeat the forward propagation and backward propagation steps until the loss function value converges to a set threshold or reaches a preset number of training iterations.

6. A gimbal angle measuring device, characterized in that, include: The Hall coordinate data acquisition module is used to acquire the Hall coordinate data of the target magnetic device at its current position through the target gimbal; wherein, the target gimbal is equipped with a set number of Hall sensors; The joint angle determination module is used to input the Hall coordinate data of the current position into the target neural network to obtain the joint angle of the target gimbal at the current position; The target neural network is trained using discrete reference sample data of discrete reference positions measured at fixed intervals of Euler angles during the movement of the gimbal relative to the magnetic device.

7. The angle measuring device for a gimbal according to claim 6, characterized in that, Also includes: The normalization processing module is used to normalize the Hall coordinate data of the current position to obtain the normalized Hall coordinate data of the current position. The joint angle determination module is specifically used to input the normalized Hall coordinate data of the current position into the target neural network to obtain the joint angle of the target gimbal at the current position.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that is executed by the at least one processor to enable the at least one processor to perform the angle measurement method of the gimbal according to any one of claims 1-5.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the angle measurement method of the gimbal according to any one of claims 1-5.