A method and system for online processing of servo frequency sweep data
The servo sweep frequency data is calculated by the Fourier series expansion method, which solves the problems of limited storage space and noise influence in servo control and realizes efficient data processing and accurate system identification.
Patent Information
- Application Number
- CN202310339812.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2043-03-28
AI Technical Summary
In existing servo control technology, the frequency sweep data processing method is affected by the measurement signal bias and noise, resulting in inaccurate identification results and large storage requirements, making it difficult to achieve real-time data processing on chips with limited storage space.
The Fourier series expansion method is used to calculate the Fourier cosine term coefficient and Fourier sine term coefficient of each frequency sweep point. The output amplitude and phase are calculated by combining the amplitude of the input data without delay, thus reducing storage requirements.
In the case of poor signal-to-noise ratio, only a small amount of storage space is needed to meet the servo control requirements, which improves the accuracy of the recognition results and reduces the storage space requirements.
Smart Images

Figure CN116539955B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of servo control technology, and more particularly to a method and system for online processing of servo frequency sweep data. Background Art
[0002] System identification is the premise of servo debugging. Knowing the characteristics of the controlled object and judging whether the controlled object exceeds the design requirements are the primary tasks of algorithm designers and servo debugging personnel. Based on engineering practice, a variety of identification methods have been produced. Due to the common friction and eccentric disturbances in servo, identification in the servo field is mostly carried out by frequency sweeping method. Frequency sweeping is divided into single-point frequency sweeping and chirp signal frequency sweeping. Previous data processing methods require that the input and output data in the frequency sweeping process be stored under the same time base, and then the transfer function between the input and output data is obtained by time domain identification means or FFT transformation method. However, the above data processing methods have the following problems: (1) When using time domain identification means, it will be affected by the bias and noise of the measurement signal. The same set of frequency sweeping data will have different identification results when using different objective functions. At the same time, the time domain identification method cannot intuitively obtain the Bode diagram of the transmission link of the system; (2) By inputting The Bode plot of the system transfer function obtained by FFT difference of the output signal is usually affected by measurement noise and the inherent spectrum leakage factor of FFT, resulting in inaccurate amplitude and phase information of the obtained transfer function; (3) In order to make the system output enter the steady-state link at each frequency point, the entire frequency sweep time period is generally long, so the amount of data required to be stored is large, usually reaching hundreds of thousands to millions of floating-point numbers. In order to ensure the real-time data storage, the data is generally output in the on-chip space or through a high-speed interface. However, the chips used in servo control are mostly cost-effective chips such as DSPC28335 / DSPC2812, with limited external communication and storage space, making it difficult to ensure the frequency sweep data storage function and capability. Summary of the Invention
[0003] The present invention aims to solve the technical problems existing in the prior art and provides a method and system for online processing of servo frequency sweep data.
[0004] According to a first aspect of the present invention, a method for online processing of servo frequency sweep data is provided, comprising:
[0005] Based on the measured output data during the servo frequency sweep process, a Fourier series expansion is performed at each frequency sweep point to calculate the Fourier series coefficients at each frequency sweep point, wherein the Fourier series coefficients include Fourier cosine term coefficients and Fourier sine term coefficients;
[0006] When the input data corresponding to the measured output data has no delay, the output amplitude and output phase at each frequency sweep point are calculated based on the Fourier cosine term coefficient, the Fourier sine term coefficient and the input amplitude at each frequency sweep point.
[0007] According to a second aspect of the present invention, there is provided a servo frequency sweep data online processing system, comprising:
[0008] A first calculation module is configured to perform a Fourier series expansion on each frequency sweep point based on the measured output data during the servo frequency sweep process, and calculate the Fourier series coefficients at each frequency sweep point, wherein the Fourier series coefficients include Fourier cosine term coefficients and Fourier sine term coefficients;
[0009] The second calculation module is used to calculate the output amplitude and output phase at each sweep frequency point based on the Fourier cosine term coefficient, the Fourier sine term coefficient and the input amplitude at each sweep frequency point when the input data corresponding to the measured output data has no delay.
[0010] The present invention provides a method and system for online processing of servo frequency sweep data, which performs Fourier series expansion on the measured output data and calculates the Fourier series coefficients at each frequency sweep point. It only needs to store the Fourier coefficients at each frequency sweep point to obtain the amplitude and phase of the corresponding frequency point. Compared with the original method that needs to store the measured output data sequence and the input data sequence, it saves storage space and has a small space requirement for the storage device. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 Schematic diagram of open-loop frequency sweep identification of servo equipment;
[0012] Figure 2 This is the schematic diagram for sensitivity identification of servo equipment;
[0013] Figure 3 This is the schematic diagram of closed-loop identification;
[0014] Figure 4 Schematic diagram of the frequency sweep process;
[0015] Figure 5 A flow chart of an online processing method for servo frequency sweep data provided by the present invention;
[0016] Figure 6 Schematic diagram of the amplitude-frequency curve for each frequency sweep point;
[0017] Figure 7 Schematic diagram of the phase-frequency curve for each frequency sweep point;
[0018] Figure 8 This is a structural diagram of an online processing system for underworld frequency sweep data provided by the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. In addition, the technical features in the various embodiments or single embodiments provided by the present invention can be arbitrarily combined with each other to form a feasible technical solution. This combination is not restricted by the sequence of steps and / or structural composition mode, but must be based on the ability of ordinary technicians in this field to implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0020] Based on the problems in the background technology, the present invention proposes a data scanning data processing method based on online Fourier series expansion, which can achieve the corresponding servo control technology requirements with only a small amount of storage space (hundreds to thousands of floating-point spaces) when the signal-to-noise ratio is poor.
[0021] The method provided by the present invention can be used for open-loop identification, sensitivity identification, and closed-loop identification. The relevant identification principles can be found in Figure 1 、 Figure 2 and Figure 3 As shown, the corresponding logical flow of data processing in the identification process Figure 4 shown.
[0022] See Figure 4 The identification process is as follows: During the data sweep at the current frequency point, the input signal amplitude u(k) is calculated based on the sweep count k and the sampling period. The output signal g(k) is collected. Based on the count k, it is determined whether the stable period has been reached. If the stable period has been reached, a Fourier series expansion is performed to obtain the corresponding Fourier series. If the stable period has not been reached, the average value of g(k) is calculated. If the current frequency point is swept, the count k is reset to zero, and the next frequency point is entered, completing the control solution for the current frequency point.
[0023] Figure 5 A flow chart of a servo frequency sweep data online processing method provided by the present invention is as follows: Figure 1 As shown, the method includes:
[0024] S1, based on the measured output data during the servo frequency sweep process, perform Fourier series expansion at each frequency sweep point, and calculate the Fourier series coefficients at each frequency sweep point, wherein the Fourier series coefficients include Fourier cosine term coefficients and Fourier sine term coefficients.
[0025] It is understandable that for each frequency point, the Fourier series expansion at the corresponding frequency point is performed on the DSP to calculate the Fourier series coefficients at the corresponding frequency point. The Fourier series expansion is performed according to the following formula:
[0026]
[0027] Where:
[0028] a i ——The frequency of the measured signal is ω i The Fourier cosine coefficient of the series, dimension is ° / s;
[0029] b i ——The frequency of the measured signal is ω i The Fourier sine coefficient of the series, dimension is ° / s;
[0030] n——The number of sweep data cycles recorded at the i-th sweep point, dimensionless;
[0031] T s ——Sampling time of frequency sweep test, unit: seconds;
[0032] T i ——The period of the i-th frequency sweep point, unit: second;
[0033] N——The number of sampling points corresponding to the nth period of the i-th sweep point;
[0034] g(k) is the measurement sampling sequence from the start of the Fourier series calculation of the i-th sweep point to the completion of the data calculation and recording of n cycles, with the start time being g(0) and the count increasing sequentially;
[0035] ——The average value measured during the frequency sweep calculation process;
[0036] ω i ——Sweep frequency, unit: rad / s, and frequency f i (Unit: Hz) is the relationship between ω i =f i ×2π;
[0037] k is the measurement sampling sequence number from the start of the Fourier series calculation of the i-th sweep point to the completion of the data calculation and recording of n cycles. The starting time is 0 and the count increases in time sequence.
[0038] According to the above formula (1), the Fourier series coefficients at each frequency sweep point are obtained, including the Fourier series cosine term coefficients and the Fourier series sine term coefficients.
[0039] S2, when the input data corresponding to the measured output data has no delay, calculating the output amplitude and output phase at each frequency sweep point based on the Fourier cosine term coefficient, the Fourier sine term coefficient and the input amplitude at each frequency sweep point.
[0040] It can be understood that the sequence of input signals u(k) corresponding to the above measurement output is as follows:
[0041] u(k)=A i ·cos(ω i ·k·T s ) (2);
[0042] Where:
[0043] A i ——The input amplitude at each frequency sweep point is a constant value. The unit depends on whether the loop is closed or not. In closed loop, the unit is consistent with the measurement unit. In open loop, the unit is consistent with the control input physical quantity.
[0044] ω i ——Sweep frequency, unit: rad / s, and frequency f i (Unit: Hz) is the relationship between ω i =f i ×2π;
[0045] k is the measurement sampling sequence number from the start of the Fourier series calculation of the i-th sweep point to the completion of the data calculation and recording of the n-cycle data, with the start time being 0 and the count increasing in time sequence;
[0046] T s ——Sampling time of sweep frequency test, unit: seconds.
[0047] The measured input data can be expressed according to formula (2), where the purpose of using a cosine signal as the input data is to inject a step disturbance (cos(0)=1) into the system at each frequency sweep test to verify the system's stability under disturbance.
[0048] When it is determined according to formula (2) that there is no delay in the input data, the above frequency domain data is processed in MATLAB, the amplitude and phase at the corresponding frequency point are calculated, and the frequency response curve of the system is drawn (logarithmic coordinates, obtained based on the definition of the Bode plot), and the frequency characteristics corresponding to the amplitude and phase at each frequency point are obtained.
[0049] The output amplitude and output phase at each frequency sweep point can be calculated based on the Fourier cosine term coefficient, Fourier sine term coefficient, and input amplitude at each frequency sweep point. Specifically,
[0050] For the frequency point ω i The amplitude G i The calculation formula is as follows:
[0051]
[0052] For the frequency point ω i The amplitude at The calculation formula is as follows:
[0053]
[0054] According to the above formula (3) and formula (4), the amplitude and phase of each frequency point can be calculated.
[0055] It should be noted that the present invention stores the Fourier series of each frequency point obtained, including the Fourier series cosine term coefficient a i and b i and the Fourier series sine term coefficient, the corresponding output amplitude and output phase can be calculated according to formula (4). That is, for each frequency point, only three numbers need to be stored, a i 、b i and ω i , the corresponding output amplitude and output phase can be calculated. Compared with the traditional method that needs to store the output data sequence g(k) and input data u(k), and then obtain the output amplitude and output phase of each frequency point through fitting method, the method of the present invention requires less storage space. For example, the open-loop identification result of the transfer function of equal amplitude current to servo angular velocity of a certain device is shown below. During identification, the sampling is 4KHz, and 400 points are swept at equal intervals in the range of 5 to 400Hz. The storage space required for all identification data is less than 2000 points. The amplitude-frequency curve of each sweep frequency point is as follows: Figure 6 As shown, the phase-frequency curve of each frequency sweep point is as follows Figure 7 shown.
[0056] In addition, the mean of the measured output data is obtained in formula (1): That is, the measured output data is mean filtered, which reduces the mean drift and enhances the signal-to-noise ratio.
[0057] The final effect of this frequency sweep technology is mainly limited by the following factors:
[0058] (1) Safety protection: To prevent the frequency sweep amplitude or frequency sweep acceleration set by the user from exceeding the physical capability of the system, whether it is an open-loop or closed-loop frequency sweep, the output amplitude limiter must be added in the final link of the control signal. Even the derivative of the output signal should be limited according to the characteristics of the selected system.
[0059] (2) Time accuracy of function calls: Based on the requirements of information collection, the input and output signals need to be aligned under the same time base to ensure the time accuracy of the input and output signals. Otherwise, the phase of the identified object will be inaccurate.
[0060] (3) Feedback mean drift speed: The feedback signal's mean drift speed should remain close within each frequency sweep cycle. Since the frequency sweep typically starts at 5 Hz and the total number of sweep cycles is typically 20, the feedback signal mean drift within 2 seconds must be less than 1% of the corresponding sweep amplitude. Based on experience in over a dozen projects, this constraint is generally negligible.
[0061] (4) Nyquist sampling frequency: Sweep frequency testing is naturally limited by the Nyquist sampling frequency.
[0062] (5) High-frequency signal-to-noise ratio constraint: Since the physical device itself is a low-pass system, the same energy can only cause the device to move at a smaller amplitude in the high-frequency band. Limited by factors such as the resolution of the measuring element, the system's signal-to-noise ratio is relatively low. This is reflected in the presence of glitches in the amplitude of the high-frequency sweep results (depending on the specific controlled object, for optoelectronic devices sampling at 1 kHz and above, this frequency is generally above 300 Hz).
[0063] See also Figure 8 The present invention further provides a servo frequency sweep data online processing system, comprising a first calculation module 801 and a second calculation module 802, wherein:
[0064] A first calculation module 801 is configured to perform a Fourier series expansion on each frequency sweep point based on the measured output data during the servo frequency sweep process, and calculate the Fourier series coefficients at each frequency sweep point, wherein the Fourier series coefficients include Fourier cosine term coefficients and Fourier sine term coefficients;
[0065] The second calculation module 802 is used to calculate the output amplitude and output phase at each frequency sweeping point based on the Fourier cosine term coefficient, the Fourier sine term coefficient and the input amplitude at each frequency sweeping point when the input data corresponding to the measured output data has no delay.
[0066] It can be understood that the servo frequency sweeping data online processing system provided by the present invention corresponds to the servo frequency sweeping data online processing method provided by the aforementioned embodiments. The relevant technical features of the servo frequency sweeping data online processing system can refer to the relevant technical features of the servo frequency sweeping data online processing method, which will not be repeated here.
[0067] Aiming at the servo equipment frequency sweep with limited storage space, low signal-to-noise ratio, friction eccentricity, etc., the present invention proposes a method for online processing of frequency sweep data, and processes it into corresponding frequency domain data. It can effectively resist the influence of noise and achieve the purpose of identification test under the requirement of small storage data (for each transmission characteristic, only 4 to 5 times the number of frequency sweep points are required).
[0068] It should be noted that, in the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0069] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0070] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A method for online processing of servo frequency sweep data, characterized in that: include: Based on the measured output data during the servo frequency sweep process, a Fourier series expansion is performed at each frequency sweep point to calculate the Fourier series coefficients at each frequency sweep point, wherein the Fourier series coefficients include Fourier cosine term coefficients and Fourier sine term coefficients; When the input data corresponding to the measured output data has no delay, the output amplitude and output phase at each frequency sweep point are calculated based on the Fourier cosine term coefficient, the Fourier sine term coefficient and the input amplitude at each frequency sweep point.
2. The method for online processing of servo frequency sweep data according to claim 1, characterized in that: The method of performing Fourier series expansion on each frequency sweep point based on the measured output data during the servo frequency sweep process and calculating the Fourier series coefficients at each frequency sweep point includes: (1); Where: ——The frequency of the measured signal is The Fourier cosine coefficient of the series, dimension is ° / s; ——The frequency of the measured signal is The Fourier sine coefficient of the series, dimension is ° / s; ——The number of sweep data cycles recorded at the i-th sweep point, dimensionless; ——Sampling time of frequency sweep test, unit: seconds; ——The period of the i-th frequency sweep point, unit: second; ——The number of sampling points corresponding to the n cycles of the ith sweep point; ——The measurement sampling sequence from the start of the calculation of the Fourier series of the i-th sweep point to the completion of the calculation and recording of the data of n cycles, with the starting time being g(0), and the count increases sequentially; ——The average value measured during the frequency sweep calculation process; ——Sweep frequency, unit: rad / s, and frequency f i The relationship between =f i ×2π, where f i The unit is Hz; ——The measurement sampling sequence number from the start moment of calculating the Fourier series of the i-th sweep point to the completion of the data calculation and recording of n cycles, with the starting moment as 0 and the count increasing in time sequence.
3. The servo frequency sweep data online processing method according to claim 1 or 2, characterized in that: The sequence of input data corresponding to the measured output data is as follows: (2) ; Where: ——The input amplitude at each frequency sweep point is a constant value. The unit depends on whether the loop is closed or not. In closed loop, the unit is consistent with the measurement unit. In open loop, the unit is consistent with the control input physical quantity. ——Sweep frequency, unit: rad / s, and frequency f i The relationship between =f i ×2π, where f i The unit is Hz; ——The measurement sampling sequence number from the start moment of calculating the Fourier series of the i-th sweep point to the completion of the data calculation and recording of n cycles, with the start moment being numbered 0 and the count increasing in time sequence; ——Sampling time of sweep frequency test, unit: seconds.
4. The method for online processing of servo frequency sweep data according to claim 2, characterized in that: The calculating the output amplitude and output phase at each frequency sweep point based on the Fourier cosine term coefficient, the Fourier sine term coefficient, and the input amplitude at each frequency sweep point includes: For frequency points The amplitude at The calculation formula is as follows: (3); For frequency points Phase The calculation formula is as follows: (4)。 5. A servo frequency sweep data online processing system, characterized in that: include: A first calculation module is configured to perform a Fourier series expansion on each frequency sweep point based on the measured output data during the servo frequency sweep process, and calculate the Fourier series coefficients at each frequency sweep point, wherein the Fourier series coefficients include Fourier cosine term coefficients and Fourier sine term coefficients; The second calculation module is used to calculate the output amplitude and output phase at each sweep frequency point based on the Fourier cosine term coefficient, the Fourier sine term coefficient and the input amplitude at each sweep frequency point when the input data corresponding to the measured output data has no delay.
Citation Information
Patent Citations
Electric motor control device
CN113661649A
Phase delay correction system
GB9825943D0