CN120601804A - A data analysis method for the phase variation of encoder operational amplifier circuit with frequency - Google Patents
A data analysis method for the phase variation of encoder operational amplifier circuit with frequencyInfo
- Publication number
- CN120601804A CN120601804A CN202511101241.XA CN202511101241A CN120601804A CN 120601804 A CN120601804 A CN 120601804A CN 202511101241 A CN202511101241 A CN 202511101241A CN 120601804 A CN120601804 A CN 120601804A
- Authority
- CN
- China
- Prior art keywords
- phase
- frequency
- operational amplifier
- amplifier circuit
- segment
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P23/00—Arrangements or methods for the control of AC motors characterised by a control method other than vector control
- H02P23/14—Estimation or adaptation of motor parameters, e.g. rotor time constant, flux, speed, current or voltage
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P2203/00—Indexing scheme relating to controlling arrangements characterised by the means for detecting the position of the rotor
- H02P2203/03—Determination of the rotor position, e.g. initial rotor position, during standstill or low speed operation
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Control Of Electric Motors In General (AREA)
Abstract
The application belongs to the technical field of servo motor drivers, in particular to a data analysis method for the phase change of an operational amplifier circuit of an encoder along with frequency, which comprises the steps of obtaining time domain delay between an input signal and an output signal of the operational amplifier circuit, wherein the input signal is generated by a sine wave signal source with adjustable frequency; the method comprises the steps of calculating a phase delay angle under each frequency according to time domain delay, drawing a phase-frequency curve of the phase delay angle and the frequency, segmenting the phase-frequency curve by taking a transition point of a local slope of the phase-frequency curve as a segmented trigger point, carrying out linear fitting on each segment by adopting a least square method to obtain a phase compensation model of each segment, and compensating the phase delay angle according to the phase compensation model. The method eliminates the error of the identification of the servo motor command caused by the phase asynchronous.
Description
Technical Field
The application belongs to the technical field of servo motor drivers, and particularly relates to a data analysis method for the phase change of an operational amplifier circuit of an encoder along with frequency.
Background
In modern industrial automation and precision control systems, servo motor drives play a critical role, which are applied throughout high-end manufacturing equipment such as injection molding machines, textile machines, packaging machines, numerically controlled machine tools, etc. The servo motor driver performs accurate speed and position closed-loop control on the motor, so that the operation precision and the production efficiency of the whole system are ensured.
A typical servo motor drive system generally comprises two main parts, a control board and a power board. The control board is responsible for executing a core control algorithm to generate command signals required by the operation of the motor, and the power board drives the motor to complete corresponding actions according to the commands. In the signal processing link, the encoder signal is critical to achieving accurate closed loop control. However, these encoder signals typically need to pass through a conditioning circuit consisting of an operational amplifier circuit (Op-Amp) before entering the main controller.
As the encoder signal passes through the op-amp circuit, a phase delay is introduced that varies with the frequency of the signal. If multiple signals (e.g., a/B/Z phase signals) from the same encoder are subject to non-uniform phase delays after processing, the encoder signals will be out of sync. The asynchronous motion can cause misjudgment of the position or the speed of the servo motor by the controller, cause error in instruction identification, and can cause oscillation, out-of-control or shutdown of the system when serious, thereby forming a great threat to equipment safety and product quality. Therefore, the application proposes a strategy capable of accurately identifying and compensating the phase delay of the encoder signal with the frequency variation in the operational amplifier circuit, so as to ensure the signal synchronism and the system stability.
Disclosure of Invention
The embodiment of the application provides a data analysis method for the phase change of an operational amplifier circuit of an encoder along with frequency, which solves the problem that the phase delay of an encoder signal is changed along with frequency due to the characteristics of the operational amplifier circuit in the existing servo motor driver.
The present application has been achieved in such a way that,
A method of data analysis of the phase of an operational amplifier circuit of an encoder as a function of frequency, comprising:
Acquiring time domain delay between an input signal and an output signal of an operational amplifier circuit, wherein the input signal is generated by a sine wave signal source with adjustable frequency;
calculating a phase delay angle at each frequency according to the time domain delay;
Drawing a phase-frequency curve of a phase delay angle and frequency;
Taking a transition point of a local slope of the phase-frequency curve as a segmented trigger point, and segmenting the phase-frequency curve;
And linearly fitting each segment by adopting a least square method to obtain a phase compensation model of each segment, and compensating the phase delay angle according to the phase compensation model.
Further, obtaining a time domain delay between the input signal and the output signal of the operational amplifier circuit includes passing the input signal and the output signal of the operational amplifier circuit through a comparator to obtain an output signal of the comparator.
Further, calculating the phase delay angle at each frequency from the time domain delay includes:
calculating a signal period according to the frequency;
calculating the duty ratio of the time domain delay in the signal period to obtain the period duty ratio;
and converting the period duty ratio into an angle system to obtain the phase delay angle under the corresponding frequency.
Further, the transition point of the local slope of the phase-frequency curve is used as a trigger point for the segmentation, segmenting a phase-frequency curve, comprising:
calculating the change rate of the phase delay angle along with the frequency to obtain a local slope;
Determining whether the local slope change exceeds a set threshold or there is a sign change;
when the set threshold is exceeded or there is a sign change, the phase-frequency curve is segmented with the transition point of the local slope as the trigger point for the segmentation.
Further, the phase compensation model for each segment is expressed as:, Is the first The phase after the segment compensation is set to be equal to the phase after the segment compensation,And (3) withIs the firstThe compensation coefficient of the segment is used to compensate,Is the firstThe frequency of the signal at which the signal is transmitted,And (3) withBy minimizing the firstResidual square sum of all data points within a segmentAnd (3) obtaining:
, For smoothed data points Is used for the phase delay angle of (a).
Further, outlier interpolation of the time delay and smoothing of the data are included.
Compared with the prior art, the application has the beneficial effects that:
The application improves the average accuracy of the phase compensation model from about 70% to 95.92% of the traditional single model based on the piecewise fitting of the slope characteristics. The high-precision direct conversion is used for accurately sensing the position and the speed of the servo motor, so that the error of the identification of the servo motor command caused by the phase asynchronous is fundamentally eliminated.
Accurate phase synchronization ensures that the servo driver can still stably operate under the working condition of high speed and high acceleration. The overshoot and oscillation of the system are reduced, the setting time is shortened, and the machining precision and the production efficiency are improved. Meanwhile, serious faults possibly caused by signal errors are avoided.
Drawings
FIG. 1 is a flow chart of a method for analyzing data of a phase change with frequency of an operational amplifier circuit of an encoder according to an embodiment of the present application;
Fig. 2 is a graph comparing effects of a single-segment fit in the prior art and a segment fit of the method of the present application, provided by an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following examples in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Referring to fig. 1, the application provides a data analysis method of phase change along with frequency of an operational amplifier circuit of an encoder, which comprises the following steps:
S1, obtaining time domain delay between an input signal and an output signal of the operational amplifier circuit, wherein the input signal is generated by a frequency-adjustable sine wave signal source, and the frequency-adjustable sine wave signal source can be used for generating a frequency-adjustable 1Vpp sine wave as an analog encoder signal source. The generated sine wave signal is input to a conditioning circuit of the operational amplifier circuit to be tested, and the conditioning circuit of the operational amplifier circuit comprises a circuit for amplifying, filtering, converting and the like the input signal. The frequency of the input signal can be synchronously measured through an oscilloscope or a data acquisition card, and the time domain delay between the input signal and the output signal is obtained after the input signal and the output signal of the operational amplifier circuit pass through a comparator, wherein the time domain delay unit is microsecond. Time domain delay refers to the lag of the output signal relative to the input signal on the time axis.
The frequencies cover a wide frequency range from 1 kHz to 2010 kHz, with corresponding time domain delays for different frequencies recorded.
S2, calculating a phase delay angle at each frequency according to the time domain delay;
The time domain delay is obtained from the raw measurement. The time domain delay is converted to a period independent phase angle for analysis of the phase characteristics as the frequency changes.
S3, drawing a phase-frequency curve of the phase delay angle and the frequency;
S4, taking a transition point of a local slope of the phase-frequency curve as a segmented trigger point, and segmenting the phase-frequency curve;
And S5, carrying out linear fitting on each segment by adopting a least square method to obtain a phase compensation model of each segment, and compensating the phase delay angle according to the phase compensation model.
Because the single linear model is used for fitting the phase delay data of the whole frequency band, the accuracy is low (about 70 percent), and the high-accuracy control requirement cannot be met. The root cause is that the frequency characteristics of the op-amp circuit (e.g., gain-bandwidth product limitations) result in a phase delay versus frequency that is not globally linear.
In the embodiment of the application, the segmentation point is automatically determined according to the local slope change characteristic of the phase-frequency curve, firstly, at one frequency, the frequency is selected as the starting frequency, one or more frequencies with the backward frequency are used as the ending frequency, a plurality of local slopes can be obtained by taking the ratio of the difference value of the phase delay angle corresponding to the two frequencies to the difference value between the two frequencies as the local slope, and the like, so that the transition point with the abrupt change of the local slope needs to be found, for example, the first local slope is 1, the second local slope is 1, the 3 rd local slope is 3, and the fourth local slope is 1, then the transition point corresponds to the third local slope, and the front and rear frequency ranges are segmented according to the starting frequency of the transition point as the boundary. The transition point is the trigger point for the frequency start segmentation.
And (3) performing linear fitting on each segment by adopting a least square method to obtain a phase compensation model of each segment, wherein a plurality of phase compensation models are obtained, but each phase compensation model corresponds to one frequency segment, and in the control of a servo driver, for any working frequency, the frequency segment to which the phase compensation model belongs is firstly judged, and then the corresponding phase compensation model is called to calculate the phase delay angle to be compensated. The controller adjusts the sampling or processing time sequence of the signal in advance or delay according to the phase delay angle, thereby realizing real-time and accurate compensation of the phase delay introduced by the operational amplifier circuit.
In one embodiment, calculating the phase delay angle at each frequency from the time domain delay includes:
calculating a signal period according to the frequency;
calculating the duty ratio of the time domain delay in the signal period to obtain the period duty ratio;
and converting the period duty ratio into an angle system to obtain the phase delay angle under the corresponding frequency.
Calculating the signal period from the frequency, for any frequency, wherein,In hertz (Hz),In seconds(s),The first of the representationsThe frequency of the signal at which the signal is transmitted,Representation corresponds to the firstSignal period of several frequencies:
Calculating the duty ratio of the time domain delay in the signal period to obtain the period duty ratio: wherein Is the firstA time domain delay of one frequency and,Is the firstThe time domain delay of each frequency corresponds to a period duty cycle, thereby converting the time domain delay to a ratio relative to the period.
Converting the period duty ratio into an angle system to obtain a phase delay angle under the corresponding frequency, namely converting the period duty ratio into the angle system (0-360 degrees) to obtain the phase delay angle under the frequency:
wherein Is the phase delay angle.
In one embodiment, the phase delay angle obtained from the raw acquired data may contain measurement noise or outliers (e.g., zero values) due to instrument limitations, which can severely impact the accuracy of subsequent modeling. Therefore, strict data preprocessing is required. The application carries out abnormal value interpolation and data smoothing filtering on the time delay.
Wherein, the outlier interpolation processing forms a data sequence with phase delay angle and phase delay angleAs data points in the data sequence, linear interpolation is used to fill in zero or invalid data points that exist in the data sequence. Suppose in the data sequence, the firstPhase delay angle of interpolationPhase delay angle from the nearest valid data point before and afterAndIt is decided that the method comprises the steps of,Represent the firstPhase delay angle of interpolationThe phase delay angle of the nearest valid data point forward,Represent the firstPhase delay angle of interpolationThe phase delay angle of the nearest valid data point is interpolated as:
, wherein, Is the firstPhase delay angle of interpolationThe frequency corresponding to the last valid data point in the future,Is the firstPhase delay angle of interpolationThe frequency corresponding to the nearest valid data point is advanced.
The data smoothing filter is to smooth the interpolated data by using a Savitzky-Golay filter (Savitzky-Golay) to eliminate random measurement noise. The sachets-golay filter can effectively smooth data while preserving the main trend features by performing a low-order polynomial fit to the data points in the data sequence within a sliding window. Smoothed data pointsThe phase delay angle of (2) is calculated as follows:
Wherein, the In order to filter the window size,For the pre-calculated filter coefficients,For interpolated data pointsCorresponding phase delay angle.
In one embodiment. Segmenting the phase-frequency curve by taking a transition point of the local slope of the phase-frequency curve as a trigger point of segmentation, comprising:
calculating the change rate of the phase delay angle along with the frequency to obtain a local slope;
Determining whether the local slope change exceeds a set threshold or there is a sign change;
when the set threshold is exceeded or there is a sign change, the phase-frequency curve is segmented with the transition point of the local slope as the trigger point for the segmentation.
The phase compensation model for each segment is expressed as:, Is the first The phase after the segment compensation is set to be equal to the phase after the segment compensation,And (3) withIs the firstThe compensation coefficient of the segment is used to compensate,And (3) withBy minimizing the firstResidual square sum of all data points within a segmentAnd (3) obtaining:
, For smoothed data points Is used for the phase delay angle of (a).
First, the local slope (i.e., the rate of change of the phase delay angle with frequency) is calculated:
, wherein, Representing smoothed data pointsIs used for the phase delay angle of (a).Is the firstFrequency.
Ideally, the local slope is within a continuous bandShould remain relatively stable or exhibit monotonic changes. The application sets a slope change threshold criterion that when the local slope value is suddenly changed, sign is changed, or the average slope deviating from the current segment exceeds a preset threshold, the transition point which belongs to the physical characteristic is considered to be used as the boundary of segment fitting. For example, local slopeA segmentation is triggered when suddenly changing from a stable positive region to a negative value or a value of a significantly different order of magnitude.
Based on the above criteria, the whole frequency range is setIs divided into a plurality of sub-intervals,As a minimum value of the frequency of the signal,Is the frequency maximum.
For example, the transition point of the local slope corresponds to a start frequency that exhibits two distinct linear features after 50kHz, interspersed with an anomaly region where the local slope is negative. Thus, the effective fit region is divided into two segments, the first segment, from 50kHz to before the beginning of the outlier region. And a second stage, namely, from the end of the abnormal region to the highest frequency. For each segment, adopting a least square method to perform linear fitting, establishing a phase compensation model of the segment,
The resulting phase compensation models form a piecewise function. In the control of the servo driver, for any one working frequency, the frequency segment to which the working frequency belongs is judged first, and then a corresponding phase compensation model is called to calculate the phase delay angle to be compensated. The controller adjusts the sampling or processing time sequence of the signal in advance or delay according to the angle, thereby realizing real-time and accurate compensation of the phase delay introduced by the operational amplifier circuit.
The segmentation criteria in embodiments of the present application are based on data-driven slope characteristics rather than fixed frequency points. This means that the method of the application can automatically adapt to the unique frequency characteristics shown by the operational amplifier circuits of different models and different batches. The user only needs to collect the data again and run the algorithm, so that a highly customized phase compensation model can be generated for the new hardware, and the method has extremely strong universality and portability.
The accuracy of the phase compensation model can be assessed by calculating the relative error between the fitted value and the true (smoothed) valueThe method comprises the following steps:
。
And averaging the relative errors of all fitting points to obtain the overall average error of the phase compensation model. By the scheme of the application, the average relative error of the finally obtained phase compensation model is lower than 4.08%, namely the average precision is up to 95.92%.
Referring to the comparison graph of the effects of the single-segment fitting in the prior art and the segment fitting of the method provided by the embodiment of the application provided by fig. 2, the dashed line is the error condition of the curve fitted by the traditional method and the actual phase, and the solid line is the relative error of the phase after the segment fitting of the method, it can be found that the relative error of the segment fitting (solid line) is greatly reduced in the low frequency band and the high frequency band is always kept high precision compared with the error of the single-segment fitting.
On the other hand, the data analysis system for the frequency-dependent phase change of the operational amplifier circuit of the encoder provided by the embodiment of the application comprises a time domain delay module, a frequency-dependent phase change module and a frequency-dependent phase change module, wherein the time domain delay module is used for acquiring time domain delay between an input signal and an output signal of the operational amplifier circuit, and the input signal is generated by a sine wave signal source with adjustable frequency;
a phase delay angle calculation module for calculating a phase delay angle at each frequency according to the time domain delay;
The drawing module is used for drawing a phase-frequency curve of the phase delay angle and the frequency;
the segmentation module is used for taking a transition point of the local slope of the phase-frequency curve as a trigger point of segmentation to segment the phase-frequency curve;
And the compensation module is used for carrying out linear fitting on each segment by adopting a least square method to obtain a phase compensation model of each segment, and compensating the phase delay angle according to the phase compensation model.
The foregoing description of the preferred embodiments of the application is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the application.
Claims (6)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202511101241.XA CN120601804B (en) | 2025-08-07 | 2025-08-07 | A data analysis method for the phase variation of an encoder operational amplifier circuit with frequency. |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202511101241.XA CN120601804B (en) | 2025-08-07 | 2025-08-07 | A data analysis method for the phase variation of an encoder operational amplifier circuit with frequency. |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN120601804A true CN120601804A (en) | 2025-09-05 |
| CN120601804B CN120601804B (en) | 2025-10-31 |
Family
ID=96891942
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202511101241.XA Active CN120601804B (en) | 2025-08-07 | 2025-08-07 | A data analysis method for the phase variation of an encoder operational amplifier circuit with frequency. |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN120601804B (en) |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006261754A (en) * | 2005-03-15 | 2006-09-28 | Nippon Hoso Kyokai <Nhk> | Delay profile analysis circuit and apparatus using the same |
| US20080192811A1 (en) * | 2007-02-09 | 2008-08-14 | Nokia Corporation | Beamforming methods and apparatus |
| TW200917658A (en) * | 2007-10-08 | 2009-04-16 | Univ Southern Taiwan | Method of using frequency-independent square wave phase delay |
| JP2015225130A (en) * | 2014-05-26 | 2015-12-14 | 株式会社奥村組 | Active noise control system and active noise control method |
| CN112072975A (en) * | 2020-09-10 | 2020-12-11 | 苏州科技大学 | Sliding mode observation method and PMSM sensorless control system |
| CN115379550A (en) * | 2022-07-29 | 2022-11-22 | 西安空间无线电技术研究所 | A burst frame synchronization method, device and equipment based on scattered pilots |
-
2025
- 2025-08-07 CN CN202511101241.XA patent/CN120601804B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006261754A (en) * | 2005-03-15 | 2006-09-28 | Nippon Hoso Kyokai <Nhk> | Delay profile analysis circuit and apparatus using the same |
| US20080192811A1 (en) * | 2007-02-09 | 2008-08-14 | Nokia Corporation | Beamforming methods and apparatus |
| TW200917658A (en) * | 2007-10-08 | 2009-04-16 | Univ Southern Taiwan | Method of using frequency-independent square wave phase delay |
| JP2015225130A (en) * | 2014-05-26 | 2015-12-14 | 株式会社奥村組 | Active noise control system and active noise control method |
| CN112072975A (en) * | 2020-09-10 | 2020-12-11 | 苏州科技大学 | Sliding mode observation method and PMSM sensorless control system |
| CN115379550A (en) * | 2022-07-29 | 2022-11-22 | 西安空间无线电技术研究所 | A burst frame synchronization method, device and equipment based on scattered pilots |
Non-Patent Citations (1)
| Title |
|---|
| 代小林等: "测角误差的自适应分段多项式补偿方法研究", 仪表技术与传感器, no. 11, 30 November 2023 (2023-11-30), pages 112 - 115 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN120601804B (en) | 2025-10-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN101968641B (en) | Error correction system of machine tool XY plane | |
| EP2985907B1 (en) | Motor drive device | |
| JPH08179831A (en) | Quadrant projection correcting method for full-closed loop system | |
| CN110161969B (en) | Error compensation method and device | |
| CN110160436A (en) | A kind of error measurement method and measuring device of linear displacement transducer | |
| CN119508312A (en) | A high-precision hydraulic servo control system and its fault diagnosis method | |
| CN120601804B (en) | A data analysis method for the phase variation of an encoder operational amplifier circuit with frequency. | |
| CN117872958A (en) | A multi-axis linkage contour error control method based on time-delay synchronization | |
| CN114637256B (en) | Fly-cutting control method, device and system, electronic equipment and storage medium | |
| CN109581862B (en) | Driver embedded with disturbance estimation compensation algorithm | |
| CN119858288A (en) | Dual-mode parallelism real-time monitoring method and system based on injection molding machine | |
| CN111300984B (en) | Parameter self-tuning method for rotogravure printing system, rotogravure printing system | |
| CN109765844B (en) | Numerical control machine tool temperature error compensation estimation method and device | |
| CN119135011A (en) | Static feedforward compensation method for nonlinear disturbance of motor position based on system model | |
| WO2021124603A1 (en) | Motor control device and motor control method | |
| US10649014B2 (en) | Frequency characteristic measuring method at feed axis control unit | |
| CN118031812A (en) | Time grating displacement high-speed high-precision measurement method based on dynamic prediction interpolation resampling | |
| CN109067284A (en) | A kind of motor control method and device based on filtering error | |
| CN119045411B (en) | Reconstruction method and terminal of multi-axis pulse space trajectory | |
| Zhou et al. | A fast method for online closed-loop system identification | |
| CN121300239B (en) | Intelligent optimization system for the processing parameters of the gear train assembly | |
| JP2000033532A (en) | Equipment monitoring and control equipment | |
| CN114474637B (en) | Hydraulic system positioning control method and system based on load real-time displacement | |
| CN120263013B (en) | High-voltage servo driver control method and system based on intelligent high-efficiency control algorithm | |
| CN119087916B (en) | A feedforward method and device for a feeding system considering system delay |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |