A multi-point calibration method and system for servo motors of an electro-optical pod
By using a multi-point calibration method, the servo motor of the photoelectric pod records the magnetic encoder angle in open-loop mode, forms a calibration table, and calculates the electrical angle in real time. This solves the problem of low accuracy in single-point calibration and achieves stable torque control and precise pointing across the entire range.
Patent Information
- Application Number
- CN202511535860.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-10-27
AI Technical Summary
After single-point calibration, the electrical angle calculation accuracy of the servo motor of the existing optoelectronic pod decreases when it is far from the calibration point, resulting in unstable torque and affecting the stability and pointing accuracy of the pod.
A multi-point calibration method is adopted. By installing a servo drive board on the servo motor and establishing a signal acquisition channel with the magnetic encoder, the motor is controlled to rotate in open-loop mode to record the magnetic encoder angle, forming a magnetic encoder calibration table, and the electrical angle is calculated in real time to achieve accurate correspondence and stable torque control across the entire range.
It achieves precise correspondence between electrical and mechanical angles of the servo motor across its entire rotation range, ensuring the stability of torque output and smooth commutation, thus improving the performance of the optoelectronic pod.
Smart Images

Figure CN121036627B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical fields of electronic digital data processing, intelligent manufacturing equipment, and servo control algorithms for aircraft airborne pods, and particularly to a multi-point calibration method and system for the servo motor of an optoelectronic pod. Background Technology
[0002] In the process of stabilizing imaging and accurately pointing, optoelectronic pods typically require servo motors to drive moving parts such as the pitch and azimuth axes to achieve rapid and smooth rotation control. To ensure the torque output and commutation accuracy of the servo motors, the electrical angle of the motors must be determined in conjunction with the detection results of magnetic encoders. However, existing technologies generally use a single-point positioning method for electrical angle calibration, that is, a one-time sampling is performed at a fixed position of the motor and used as a reference value. This type of single-point calibration method has significant drawbacks: on the one hand, single-point calibration can only guarantee high accuracy near the reference point, and when the motor moves away from the calibration point, the accuracy of the electrical angle calculation drops significantly; on the other hand, due to inaccurate electrical angle conversion, the servo motor is prone to torque fluctuations when moving away from the calibration point, leading to a decrease in the stability of the pod, resulting in pointing errors or imaging jitter. As a result, the motor torque cannot remain consistent throughout the entire rotation range, limiting the performance of the optoelectronic pod.
[0003] Therefore, the existing single-point calibration method cannot meet the high precision and high stability requirements of the optoelectronic pod. There is an urgent need for a new calibration method that can establish a precise correspondence between electrical angles and mechanical angles across the entire rotation range, thereby ensuring stable torque output of the servo motor. Summary of the Invention
[0004] To address the shortcomings of the existing technologies, this invention provides a multi-point calibration method and system for the servo motor of an optoelectronic pod. This method can solve the problems of low single-point calibration accuracy and unstable torque far from the calibration point, and achieve accurate correspondence between electrical and mechanical angles across the entire range, stable commutation, and torque control.
[0005] In a first aspect, the present invention provides a multi-point calibration method for the servo motor of an optoelectronic pod, comprising:
[0006] The servo drive board is fixedly installed on the servo motor at the controlled rotating shaft of the optoelectronic pod, and a signal acquisition channel is established between the servo drive board and the magnetic encoder for subsequent acquisition of the magnetic encoder angle corresponding to the mechanical rotation angle of the servo motor.
[0007] The servo motor is controlled to rotate in open-loop mode according to a preset electrical angle fixed step. When the servo motor reaches each preset electrical angle position, the corresponding magnetic encoder angle is recorded. Each recorded magnetic encoder angle is numbered as a point number according to the sampling order until the servo motor completes a full rotation. The sampling points are determined according to the number of motor pole pairs Pp to form a magnetic encoder calibration table. The total number of sampling points is 4×Pp.
[0008] During the operation of the servo motor, the magnetic encoder angle is read in real time. The real-time read magnetic encoder angle is compared with multiple magnetic encoder angles stored in the magnetic encoder calibration table to determine the interval formed by two adjacent sampling points in which the real-time read magnetic encoder angle falls. The magnetic encoder angle of the starting sampling point of the interval and the point number of the interval are also determined.
[0009] Based on the real-time read magnetic encoder angle, the magnetic encoder angle of the starting sampling point of the interval, and the point number of the interval, the current electrical angle of the servo motor is calculated, and the calculated current electrical angle is output to the servo drive board for commutation and torque control.
[0010] Secondly, the present invention provides a multi-point calibration system for the servo motor of an optoelectronic pod, wherein the multi-point calibration system for the servo motor of the optoelectronic pod uses the aforementioned multi-point calibration method for the servo motor of the optoelectronic pod.
[0011] Compared with the prior art, the beneficial effects of this invention are as follows:
[0012] This invention provides a multi-point calibration method and system for a servo motor of an optoelectronic pod. The method includes: fixing a servo drive board to the servo motor at the controlled rotating shaft of the optoelectronic pod, and establishing a signal acquisition channel between the servo drive board and the magnetic encoder for subsequent acquisition of the magnetic encoder angle corresponding to the mechanical rotation angle of the servo motor; controlling the servo motor to rotate in open-loop mode according to a preset electrical angle fixed step; recording the magnetic encoder angle corresponding to each preset electrical angle position when the servo motor reaches that position; numbering each recorded magnetic encoder angle as a position number according to the sampling order until the servo motor completes a full rotation; and determining the sampling point based on the number of pole pairs Pp of the motor. A magnetic encoder calibration table is formed by sampling points, with a total of 4 × Pp sampling points. During servo motor operation, the magnetic encoder angle is read in real time. This real-time angle is compared with multiple magnetic encoder angles stored in the calibration table to determine the interval formed by two adjacent sampling points falling within the real-time angle. The starting sampling point angle and the point number of this interval are also determined. Based on the real-time angle, the starting sampling point angle, and the point number, the current electrical angle of the servo motor is calculated and output to the servo drive board for commutation and torque control. This invention, through a comprehensive scheme of multi-point sampling table construction, real-time interval determination, and dynamic electrical angle calculation, solves the problems of low single-point calibration accuracy and unstable torque far from the calibration point, achieving accurate correspondence between electrical and mechanical angles across the entire range, and stable commutation and torque control. Attached Figure Description
[0013] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. Some specific embodiments of the invention will be described in detail below with reference to the accompanying drawings in an exemplary and non-limiting manner. The same reference numerals in the drawings designate the same or similar parts or components. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the drawings:
[0014] Figure 1 This is a flowchart illustrating a multi-point calibration method for the servo motor of the optoelectronic pod according to an embodiment of the present invention. Detailed Implementation
[0015] 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. Obviously, the described embodiments are merely 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.
[0016] See Figure 1 This embodiment provides a multi-point calibration method for the servo motor of an optoelectronic pod, including the following steps:
[0017] S101. Fix the servo drive board on the servo motor at the controlled rotating shaft of the photoelectric pod, and establish a signal acquisition channel between the servo drive board and the magnetic encoder for subsequent acquisition of the magnetic encoder angle corresponding to the mechanical rotation angle of the servo motor.
[0018] S102. Control the servo motor to rotate in open-loop mode according to a preset electrical angle fixed step. When the servo motor reaches each preset electrical angle position, record the corresponding magnetic encoder angle. Number each recorded magnetic encoder angle as a point number according to the sampling order until the servo motor completes a full rotation. Determine the sampling points according to the number of motor pole pairs Pp to form a magnetic encoder calibration table. The total number of sampling points is 4×Pp.
[0019] S103. During the operation of the servo motor, the magnetic encoder angle is read in real time. The real-time read magnetic encoder angle is compared with multiple magnetic encoder angles stored in the magnetic encoder calibration table. The interval formed by two adjacent sampling points into which the real-time read magnetic encoder angle falls is determined. The magnetic encoder angle of the starting sampling point of the interval and the point number of the interval are also determined.
[0020] S104. Based on the real-time read magnetic encoder angle, the magnetic encoder angle of the starting sampling point of the interval, and the point number of the interval, calculate the value of the current electrical angle of the servo motor, and output the calculated current electrical angle to the servo drive board for commutation and torque control.
[0021] In this embodiment, the overall scheme of multi-point sampling and table building, real-time interval determination, and dynamic calculation of electrical angles can solve the problems of low single-point calibration accuracy and unstable torque far from the calibration point, achieving accurate correspondence between electrical and mechanical angles across the entire range, stable commutation, and torque control. Specifically, by fixing the servo drive board on the servo motor at the controlled shaft of the photoelectric pod and establishing a signal acquisition channel between the servo drive board and the magnetic encoder, effective correspondence between the motor's mechanical angle and the magnetic encoder angle can be achieved, enabling real-time and accurate acquisition of the motor's rotation state. The servo motor is controlled to rotate in open-loop mode according to a preset electrical angle fixed step. When the servo motor reaches each preset electrical angle position, the corresponding magnetic encoder angle is recorded. Each recorded magnetic encoder angle is numbered as a position number according to the sampling sequence until the servo motor completes a full rotation. The sampling points are determined based on the number of motor pole pairs Pp, forming a magnetic encoder calibration table. The total number of sampling points is 4 × Pp. This solves the problems of low single-point positioning calibration accuracy and unstable motor torque when far from a single point position, achieving a multi-point coverage calibration mechanism and improving the accuracy of mapping between electrical and mechanical angles across the entire range. During servo motor operation, the magnetic encoder angle is read in real time. The real-time read magnetic encoder angle is compared with multiple magnetic encoder angles stored in the magnetic encoder calibration table to determine the interval formed by two adjacent sampling points where the real-time read magnetic encoder angle falls. The magnetic encoder angle of the starting sampling point of this interval and the position number of this interval are also determined. This solves the problem of the lack of an effective interval determination mechanism during real-time motor operation, which leads to the inability to dynamically correct the electrical angle, achieving accurate correspondence between real-time interval positioning and electrical angle. Based on the real-time read magnetic encoder angle, the magnetic encoder angle of the starting sampling point of the interval, and the point number of the interval, the current electrical angle of the servo motor is calculated, and the calculated current electrical angle is output to the servo drive board for commutation and torque control. This can solve the problem that the motor torque is affected and stable commutation cannot be achieved when it is far from the single-point calibration position. It can realize high-precision calculation of electrical angle and commutation control, so that the motor can maintain the consistency and stability of torque output throughout the entire rotation range.
[0022] Preferably, when forming the magnetic encoder calibration table, during the process of the servo motor completing a full open-loop rotation, the magnetic encoder angle is recorded sequentially according to a fixed step of 90° electrical angle. Each record is assigned a point number J, the value of which ranges from 0 to (4×Pp-1). For each record, a sampling timestamp, an open-loop rotation direction mark, and a sampling stability mark are saved simultaneously. When the number of pole pairs Pp of the motor is 7, the total number of sampling points is 28. Only after the magnetic encoder angles of all 28 points are completely recorded is a valid magnetic encoder calibration table generated.
[0023] In this embodiment, during the servo motor's completion of one full open-loop rotation, the magnetic encoder angle is recorded sequentially at fixed step intervals of 90°. Each record is assigned a point number J, and the sampling timestamp, open-loop rotation direction marker, and sampling stability marker are simultaneously saved. When the motor's pole pair number Pp is 7, the total number of sampling points is 28. A valid calibration table is generated only after all points are fully recorded. This solves the technical problems of insufficient single-point sampling data and the lack of completeness and stability in the calibration table. Traditional single-point calibration cannot cover the entire rotation range, is prone to errors at non-calibrated points, and the lack of time, direction, and stability markers leads to insufficient reliability of the sampling data. The solution provided in this embodiment not only ensures that the sampling points are evenly distributed throughout the motor's full rotation but also enhances the traceability and reliability of the data through additional timestamps, direction markers, and stability markers, thereby achieving full coverage and stable construction of the magnetic encoder calibration table.
[0024] Preferably, the current electrical angle of the servo motor is calculated using a linear interpolation model, specifically including: assuming the real-time read magnetic encoder angle is θm, assuming the magnetic encoder angle of the sampling point with position number J in the magnetic encoder calibration table is P[J], assuming the magnetic encoder angle difference between adjacent sampling points with position numbers J and J+1 is H[J], defining the deviation E=θm-P[J], and letting the current electrical angle θe of the servo motor be calculated according to θe=J×90°+(E / H[J])×90°; when the position number J is (4×Pp-1), the adjacent sampling point J+1 wraps around to position number 0 in the sense of a circular index.
[0025] In this embodiment, the real-time read magnetic encoder angle is θm, the sampling point angle with position number J is P[J], and the angle difference between two adjacent sampling points is H[J]. The deviation is defined as E=θm-P[J], and the current electrical angle is calculated according to θe=J×90°+(E / H[J])×90°. When J is the final point, the loop returns to 0, which can solve the problem that traditional methods cannot perform linear interpolation calculations within the interval. In the background technology, single-point calibration can only provide reference values, and it is impossible to accurately obtain the electrical angle within the interval during operation, resulting in unstable commutation and torque control. This embodiment establishes a linear interpolation model by defining clear variables (θm, P[J], H[J], E), which can calculate the electrical angle in real time based on the actual measured value within any interval, thereby achieving higher precision electrical angle conversion. The final effect is that the electrical angle calculation of the motor is continuous and accurate throughout the entire rotation range, avoiding torque abrupt changes and control jitter.
[0026] Preferably, when the electrical angle span is 90°, (E / H[J])×90° is equal to E×360° / (H[J]×4), and the current electrical angle θe is written as θe=E×360° / (H[J]×4)+J×90°; when different electrical angle reference zero positions or different rotation directions are used, it is calculated as θe=σ·E×360° / (H[J]×4)+J×90°, where σ is ±1 to match the rotation direction convention during calibration.
[0027] In this embodiment, when the electrical angle span is 90°, (E / H[J])×90° and E×360° / (H[J]×4) are equal. The electrical angle formula is written as θe=E×360° / (H[J]×4)+J×90°. A σ factor (σ=±1) is introduced to correct for different reference zero positions or rotation directions. This solves the problem of inconsistent calculation formulas under different calibration conditions, leading to inconsistent electrical angle calculation results. When the calibration zero position or rotation direction is different, the calculation formula needs additional correction. Without standardized expression, calculation deviations are easily caused. This embodiment introduces a σ factor for rotation direction adaptation, ensuring that the formula remains valid under different reference conditions. It can adapt to different installation zero positions and rotation directions, improving the system's compatibility and practicality.
[0028] Preferably, the difference between the real-time read magnetic encoder angle θm and the magnetic encoder angle P[J] in the magnetic encoder calibration table is calculated using a wraparound algorithm to ensure stable interval determination within the 0° and 360° neighborhood. When using the wraparound algorithm, the wraparound algorithm may include: defining a differential operator Δ(θ1,θ2)=mod(θ1-θ2+360°, 360°), where θ1 and θ2 are both angle values; when calculating the interval difference between adjacent sampling points, θ1 is taken as the magnetic encoder angle P[J+1] of the sampling point with position number J+1, and θ2 is taken as the magnetic encoder angle P[J] of the sampling point with position number J, to obtain the interval difference H[J]=Δ(P[J+1],P[J]); when calculating the difference between the real-time reading angle and the angle of the sampling point at the start of the interval, θ1 is taken as the real-time reading magnetic encoder angle θm, and θ2 is taken as the magnetic encoder angle P[J] of the sampling point with position number J, to obtain the deviation E=Δ(θm,P[J]); defining a symmetric differential operator Δs(θ1,θ2)=((θ1-θ2+180°) mod (360°)-180°, used to calculate the angle difference when the shortest radian difference is required; under the condition of satisfying the monotonicity of the interval between adjacent sampling points, the interval difference and the deviation within the interval are calculated by Δs(θ1,θ2).
[0029] In this embodiment, the difference between the real-time read magnetic encoder angle θm and the sampling point angle P[J] in the calibration table is calculated using a wraparound algorithm to ensure stable interval determination within the 0° and 360° neighborhood. Angles are modulo 360°; direct subtraction might result in large, erroneous differences near 0° and 360°, leading to interval determination errors and ultimately discontinuous electrical angle calculations. This embodiment employs a wraparound algorithm to renormalize the angle difference within the 0° and 360° neighborhood, ensuring stable interval determination, avoiding abrupt errors at angle boundaries, and making the electrical angle calculation results continuous and stable throughout the entire range, thus improving system reliability. A difference operator Δ(θ1,θ2) = mod(θ1 - θ2 + 360°, 360°) is defined and applied in the calculation of the interval difference H[J] and the deviation E. When the shortest arc difference is required, a symmetric difference operator Δs(θ1,θ2) = ((θ1 - θ2 + 180°) mod 360°) - 180° is further defined, which can solve the technical problem of ensuring monotonicity and avoiding large angle abrupt changes in the angle calculation process. The solution in this embodiment uses two types of difference operators: Δ ensures that the difference value is always a positively normalized result, and Δs ensures that the difference value takes the shortest arc length, which can ensure both continuity and monotonicity requirements. The achieved effect is that the angle difference calculation is stable and controllable, the electrical angle determination accuracy is higher, and boundary misjudgment and jitter are avoided.
[0030] Preferably, when determining the interval, the nearest neighbor principle is first used to initially select the point number J that minimizes Δ(θm, P[J]) in the magnetic encoder calibration table; then it is determined whether Δ(θm, P[J]) and H[J] satisfy the rotation consistency and monotonicity constraints in the numerical domain. If there is a sign of reverse crossing or an inconsistency flag is triggered near the interval boundary, the point number J is adjusted by ±1 according to the ring index and E and H[J] are recalculated.
[0031] In this embodiment, when determining the interval, the point index J that minimizes Δ(θm,P[J]) is first selected using the nearest neighbor principle. Then, it is determined whether Δ(θm,P[J]) and H[J] satisfy the rotational consistency and monotonicity constraints within the numerical domain. If inconsistency is triggered, the point index J is adjusted by ±1 according to the cyclic index, which can solve the problem that interval determination is easily affected by noise interference or boundary jitter. The scheme of this embodiment adds a rotational consistency and monotonicity verification mechanism, and performs cyclic index correction when an anomaly is detected. The effect is that the electrical angle interval determination is more robust, avoiding misjudgments caused by noise or boundary effects, thereby improving the continuity and accuracy of servo motor electrical angle calculation.
[0032] Preferably, during the open-loop rotation sampling, a dwell time threshold and an angular velocity threshold are set for each 90° electrical angle position. Only when the angular velocity is lower than the set threshold and the dwell time meets the set threshold is the magnetic encoder angle at the electrical angle position included in the valid sample. For each point number J, at least K repeated samplings are performed under the same environmental conditions, K≥2. Median filtering and interquartile range (IQR) are performed on the magnetic encoder angle set {Pk, [J]} obtained by repeated sampling to remove outliers. The mean is then taken as P[J] and written into the magnetic encoder calibration table. At the same time, H[J] is calculated based on the difference between adjacent mean values.
[0033] In this embodiment, during open-loop rotational sampling, a dwell time threshold and an angular velocity threshold are set for each 90° electrical angle position. The angle is only included in the valid sample when the angular velocity is below the threshold and the dwell time meets the threshold. At least K repeated samplings are performed on the same sampling point index J, and median filtering and IQR are used to remove outliers from the set {Pk, [J]}, and the mean is taken as P[J]. This can solve the problem that the sampling accuracy is affected by mechanical jitter, noise, or instantaneous instability. The scheme of this embodiment ensures the stability of sampling conditions through dual thresholds of velocity and time, and improves data robustness through repeated sampling and statistical filtering. The effect is that the calibration table data is more reliable and stable, the accuracy of subsequent electrical angle calculation is significantly improved, and calculation errors caused by noise or occasional jitter are avoided.
[0034] Preferably, during the closed-loop operation of the servo motor, when a systematic deviation in direction between the current electrical angle θe and the expected electrical angle is detected when the motor repeatedly passes near a fixed point J, an exponentially weighted average with a forgetting factor λ∈(0,1) is used to recursively update P[J] or H[J]. The update rule is P_new[J]=(1-λ)·P_old[J]+λ·P_meas[J] or H_new[J]=(1-λ)·H_old[J]+λ·H_meas[J]. After the recursive update is completed, a continuity and monotonicity check is performed on all intervals of the circular index. If discontinuity is detected, the system rolls back to the version before the update and prompts the user to enter the fast recalibration process. The trigger threshold and statistical window size of the recursive update are set by the controller parameter table. Among them, P_old[J] represents the angle value of the sampling point with point number J in the magnetic encoder calibration table before the recursive update; P_meas[ [J] represents the angle value of the sampling point with position number J measured in real time during the closed-loop operation of the servo motor; P_new[J] represents the angle value of the sampling point with position number J after the recursive update; H_old[J] represents the interval difference between position numbers J and J+1 before the recursive update; H_meas[J] represents the interval difference between position numbers J and J+1 measured in real time during the closed-loop operation of the servo motor; H_new[J] represents the interval difference between position numbers J and J+1 after the recursive update.
[0035] In this embodiment, during closed-loop operation, when a deviation is detected between the current electrical angle θe and the expected electrical angle after repeatedly passing near a fixed point J, an exponentially weighted average with a forgetting factor λ is used to recursively update P[J] or H[J]. The update rule is P_new[J] = (1-λ)·P_old[J] + λ·P_meas[J] or H_new[J] = (1-λ)·H_old[J] + λ·H_meas[J]. After the update, a continuity and monotonicity check is performed, which can solve the problem of calibration table inaccuracy due to temperature drift and component aging during long-term operation. This embodiment introduces an exponentially weighted recursive update mechanism when a systematic deviation is detected, dynamically correcting single-point data or interval differences while ensuring global continuity after the update. The effect is that the electrical angle calibration table has adaptive and self-repair capabilities, maintaining high accuracy during long-term operation and improving the stability and reliability of the system.
[0036] Preferably, the number of motor pole pairs Pp is automatically inferred through a self-test process when not explicitly configured by the user. The self-test process includes completing a full mechanical angle scan by constant low-speed open-loop rotation, statistically analyzing the repetitive patterns of the magnetic encoder angle sequence at 90° electrical angle intervals, or using the number of zero crossovers of the back EMF to assist in estimating Pp. If the confidence level is higher than a preset threshold, the total number of sampling points is set to 4×Pp and the process of multi-point sampling and table building is entered. If the inferred confidence level is lower than the threshold or an abnormal distribution of H[J] in adjacent intervals is found, the process of entering the running state is prohibited, and a prompt is made to perform manual confirmation or repeat the self-test.
[0037] In this embodiment, when the number of motor pole pairs Pp is not explicitly configured by the user, it is inferred through a self-test process. This process includes a full rotation at low speed and counting the repetition patterns or zero crossovers of the magnetic encoder angle sequence. When the confidence level is higher than a threshold, the total number of sampling points is set to 4 × Pp, and the process enters the table creation process. This solves the problem of motor parameters relying on manual input, which is prone to configuration errors or inconvenience. The solution in this embodiment automatically identifies the number of motor pole pairs through self-testing, avoiding reliance on manual configuration, and prohibits entry into the running state at low confidence levels, ensuring system safety. The achieved effect is improved automation and robustness, reduced human error, and guaranteed accuracy and reliability of the electrical angle calculation system.
[0038] It should also be noted that the embodiments of the present invention also provide a multi-point calibration system for the servo motor of the optoelectronic pod, wherein the multi-point calibration system for the servo motor of the optoelectronic pod uses the above-mentioned multi-point calibration method for the servo motor of the optoelectronic pod.
[0039] It should be noted that the above embodiments are merely preferred embodiments of the present invention, and the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention, and the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A multi-point calibration method for servo motors of an optical pod, characterized in that, The application relates to a method for calculating the current electric angle of a servo motor. The servo drive board is fixedly installed on a servo motor at a controlled rotating shaft of an optoelectronic pod, and a signal acquisition channel is established between the servo drive board and a magnetic encoder, which is used for subsequently acquiring the magnetic encoder angle corresponding to the mechanical rotation angle of the servo motor; The servo motor is controlled to rotate according to a preset electric angle fixed step in an open loop mode, the magnetic encoder angle corresponding to each preset electric angle position of the servo motor is recorded when the servo motor reaches each preset electric angle position, each recorded magnetic encoder angle is numbered as a point position serial number according to a sampling sequence, until the servo motor completes a whole circle rotation, the sampling points are determined according to the pole pair number Pp, a magnetic encoder calibration table is formed, and the total number of the sampling points is 4*Pp; During the operation of the servo motor, the magnetic encoder angle is read in real time, the real-time read magnetic encoder angle is compared with the plurality of magnetic encoder angles stored in the magnetic encoder calibration table, two adjacent sampling points into which the real-time read magnetic encoder angle falls are determined, and the magnetic encoder angle of the starting point sampling point of the interval and the point position serial number of the interval are determined; Based on the real-time read magnetic encoder angle, the magnetic encoder angle of the starting point sampling point of the interval and the point position serial number of the interval, the value of the current electric angle of the servo motor is calculated, and the calculated current electric angle is output to the servo drive board for commutation and torque control.
2. The method of claim 1, wherein, When the magnetic encoder calibration table is formed, the magnetic encoder angle is recorded according to the electric angle fixed step of 90 degrees in sequence during the process that the servo motor completes a whole circle open loop rotation, each time of recording is given a point position serial number J, the point position serial number J takes the value range of 0 to (4*Pp-1), and the sampling time stamp, the open loop rotation direction mark and the sampling stability mark are simultaneously stored for each record; when the pole pair number Pp is 7, the total number of the sampling points is 28, and a valid magnetic encoder calibration table is generated after the magnetic encoder angles of all the 28 points are completely recorded.
3. The method of claim 2, wherein, The value of the current electric angle of the servo motor is calculated through a linear interpolation model, specifically including: the real-time read magnetic encoder angle is θm, the sampling point magnetic encoder angle of the point position serial number J in the magnetic encoder calibration table is P[J], the magnetic encoder angle difference between the adjacent sampling points with the point position serial numbers J and J+1 is H[J], the deviation E is defined as E=θm-P[J], and the current electric angle θe of the servo motor is calculated as θe=J*90°+(E / H[J])*90°; when the point position serial number J is (4*Pp-1), the adjacent sampling point J+1 is back to the point position serial number 0 in the ring index sense.
4. The method of claim 3, wherein, When the interval electric angle span is 90 degrees, (E / H[J])*90° is equal to E*360° / (H[J]*4), and the current electric angle θe is written as θe=E*360° / (H[J]*4)+J*90°; when different electric angle reference zeros or different rotation directions are adopted, the current electric angle θe is calculated as θe=σ*E*360° / (H[J]*4)+J*90°, wherein sigma takes +1 or -1 to match the rotation direction convention during calibration.
5. The method of claim 3, wherein, The difference between the real-time reading of the magnetic encoder angle θm and the magnetic encoder angle P[J] in the magnetic encoder calibration table is calculated using a wrap-around algorithm to ensure stable interval determination in the 0° and 360° neighborhood.
6. The method of claim 5, wherein, The wrap-around algorithm includes defining a difference operator Δ(θ1, θ2) = mod(θ1-θ2+360°, 360°), where θ1 and θ2 are angle values; when calculating the interval difference between adjacent sampling points, taking θ1 as the magnetic encoder angle P[J+1] of the sampling point with point number J+1 and θ2 as the magnetic encoder angle P[J] of the sampling point with point number J to obtain the interval difference H[J] = Δ(P[J+1], P[J]); when calculating the difference between the real-time reading of the magnetic encoder angle and the angle of the interval starting sampling point, taking θ1 as the real-time reading of the magnetic encoder angle θm and θ2 as the magnetic encoder angle P[J] of the sampling point with point number J to obtain the interval bias E = Δ(θm, P[J]); defining a symmetric difference operator Δs(θ1, θ2) = ((θ1-θ2+180°) mod 360°)-180° for calculating the angle difference when the shortest radian difference is required; under the condition of satisfying the interval monotonicity between adjacent sampling points, the interval difference and the interval bias are calculated by Δs(θ1, θ2).
7. The method of claim 3, wherein, When determining the interval, the nearest neighbor principle is first used to preliminarily select the point number J in the magnetic encoder calibration table that minimizes Δ(θm, P[J]); then it is determined whether Δ(θm, P[J]) and H[J] satisfy the rotational consistency and monotonicity constraints in the numerical domain, if there is a reverse crossing sign or near the interval boundary trigger inconsistency flag, the point number J is adjusted by ±1 according to the ring index and E and H[J] are recalculated.
8. The method of claim 3, wherein, During open-loop rotation sampling, a dwell time threshold and an angular velocity threshold are set for each 90° electrical angle position, and only when the angular velocity is below the set threshold and the dwell time meets the set threshold, the magnetic encoder angle of the electrical angle position is counted as a valid sample; at least K times of repeated sampling are performed for each point number J under the same environmental conditions, K ≥ 2, median filtering and four-quartile range IQR outlier rejection are performed on the set of magnetic encoder angles obtained by repeated sampling {Pk, [J]}, and then the mean value is taken as P[J] and written into the magnetic encoder calibration table, and H[J] is calculated by the difference between adjacent mean values.
9. The method of claim 3, wherein, When the servo motor is in closed-loop operation, if the current electrical angle θe and the expected electrical angle are detected to have systematic deviation in the same direction when passing the fixed point number J for multiple times, the exponential weighted average with forgetting factor λ∈(0, 1) is used to recursively update P[J] or H[J], the update rule is P_new[J]=(1-λ)·P_old[J]+λ·P_meas[J] or H_new[J]=(1-λ)·H_old[J]+λ·H_meas[J]; after the recursive update, the continuity and monotonicity of the whole interval of the circular index are checked, if discontinuity is detected, the version before the update is rolled back and the fast recalibration process is prompted; the trigger threshold and the statistical window size of the recursive update are set by the controller parameter table; wherein P_old[J] represents the angle value of the sampling point with point number J in the encoder calibration table before the recursive update; P_meas[J] represents the real-time measured angle value of the sampling point with point number J in the closed-loop operation of the servo motor; P_new[J] represents the angle value of the sampling point with point number J after the recursive update; H_old[J] represents the interval difference between point numbers J and J+1 before the recursive update; H_meas[J] represents the real-time measured interval difference between point numbers J and J+1 in the closed-loop operation of the servo motor; H_new[J] represents the interval difference between point numbers J and J+1 after the recursive update.
10. A servo motor multi-point calibration system for an optical pod, comprising: The servo motor multi-point calibration system of the optoelectronic pod uses the servo motor multi-point calibration method of the optoelectronic pod according to any one of claims 1-9.
Citation Information
Patent Citations
Magnetic encoder calibration method and system
CN111076761A
Motor control method and device based on encoder, medium and program product
CN120566967A