Method for acquiring frequency characteristic of servo system, electronic device and storage device

文档序号:1220239 发布日期:2020-09-04 浏览:9次 中文

阅读说明:本技术 获取伺服系统频率特性的方法、电子装置和存储装置 (Method for acquiring frequency characteristic of servo system, electronic device and storage device ) 是由 陶之雨 于 2018-08-01 设计创作,主要内容包括:本发明公开了一种获取伺服系统频率特性的方法、电子装置和存储装置,该方法包括:在至少一个指定频率范围内,对伺服系统依次提供不同频率的正弦激励信号以对伺服系统的输出信号进行分步扫描;在所述分步扫描的每一步中,对所述伺服系统的输出信号进行同步整周期采样,获取不同频率点处所述伺服系统的所述输出信号的幅值和相位;根据所述不同频率点处所述伺服系统的所述输出信号的幅值和相位以及所述正弦激励信号计算得到所述伺服系统的频率特性。通过对伺服系统提供不同频率的正弦激励信号,并对伺服系统的输出进行同步整周期采样,可以改善或消除频谱分析过程中的频率泄露和系统非线性模态特征,从而提高计算精度。因此,本发明可以提高获取到的伺服系统频率特性曲线的精度,有助于伺服系统的精确控制。(The invention discloses a method for acquiring frequency characteristics of a servo system, an electronic device and a storage device, wherein the method comprises the following steps: within at least one designated frequency range, providing sinusoidal excitation signals with different frequencies to the servo system in sequence so as to scan the output signals of the servo system step by step; in each step of the step-by-step scanning, synchronous whole-period sampling is carried out on the output signal of the servo system, and the amplitude and the phase of the output signal of the servo system at different frequency points are obtained; and calculating the frequency characteristic of the servo system according to the amplitude and the phase of the output signal of the servo system at the different frequency points and the sinusoidal excitation signal. By providing sinusoidal excitation signals with different frequencies for the servo system and carrying out synchronous whole-period sampling on the output of the servo system, frequency leakage and system nonlinear modal characteristics in the process of spectrum analysis can be improved or eliminated, and therefore calculation accuracy is improved. Therefore, the method and the device can improve the precision of the acquired frequency characteristic curve of the servo system and are beneficial to the precise control of the servo system.)

A method for obtaining a frequency characteristic of a servo system, comprising:

in at least one designated frequency range, sequentially providing sinusoidal excitation signals with different frequencies for a servo system so as to perform step scanning on an output signal of the servo system;

in each step of the step-by-step scanning, synchronous whole-period sampling is carried out on the output signal of the servo system, and the amplitude and the phase of the output signal of the servo system at different frequencies are obtained;

and calculating the frequency characteristic of the servo system according to the amplitude and the phase of the output signal of the servo system at different frequencies and the sinusoidal excitation signal.

The method of claim 1, wherein the step of sequentially providing sinusoidal excitation signals of different frequencies to the servo system over at least one specified frequency range to step-scan the output signal of the servo system comprises:

setting a scanning starting frequency, a frequency variable and a scanning ending frequency, wherein the scanning starting frequency and the scanning ending frequency determine the designated frequency range;

in a first step of said step-scan, providing said sinusoidal excitation signal to said servo system at a frequency equal to said sweep start frequency, and in each subsequent step of said step-scan, varying said sinusoidal excitation signal in frequency variable intervals until said sinusoidal excitation signal has a frequency greater than or equal to said sweep end frequency.

The method of claim 2, wherein the step of synchronously sampling the output signal of the servo system for a full period is embodied as:

setting a sampling point number and a sampling frequency for the specified frequency range, wherein the product of the frequency variable and the sampling point number is equal to the sampling frequency, and the product of the scanning starting frequency and the sampling point number is equal to an integral multiple of the sampling frequency;

and in each step of the step-by-step scanning, sampling the output signal of the servo system according to the sampling point number and the sampling frequency.

The method according to claim 1, wherein the step of calculating the frequency characteristic of the servo system from the amplitude and phase of the output signal of the servo system at the different frequency points and the sinusoidal excitation signal comprises:

according to the amplitude and the phase of the output signal of the servo system at the different frequency points, calculating the amplitude ratio of the output signal at the different frequency points relative to the sinusoidal excitation signal, calculating and correcting the phase difference of the output signal at the different frequency points relative to the sinusoidal excitation signal, and drawing an amplitude-frequency characteristic curve and a phase-frequency characteristic curve of the servo system according to the amplitude ratio and the phase difference of the output signal at the different frequency points relative to the sinusoidal excitation signal.

The method of claim 4, further comprising: and refining the amplitude-frequency characteristic curve and the phase-frequency characteristic curve by using a cubic spline interpolation technology.

The method of claim 4, wherein the step of obtaining the amplitude and phase of the output signal of the servo system at different frequency points comprises:

obtaining the amplitude and the phase of the output signal of the servo system at the different frequency points in the frequency domain by fast Fourier transform.

The method of claim 6, wherein the step of calculating and correcting the phase difference of the output signal relative to the sinusoidal excitation signal at the different frequency points comprises:

calculating the phase difference of the output signals at different frequency points relative to the sinusoidal excitation signal according to the phases of the output signals at the different frequency points in the frequency domain obtained by fast Fourier transform;

and correcting the phase difference of the output signals at the different frequency points relative to the sinusoidal excitation signal, so that the absolute value of the difference between the phase difference at the next frequency point and the phase difference at the previous frequency point in the two adjacent frequency points is less than pi.

The method of claim 7, wherein the step of correcting the phase difference of the output signal relative to the sinusoidal excitation signal at the different frequency points comprises:

setting an initial phase range;

determining whether the phase difference at a first frequency point within a total test frequency range is within the starting phase range;

when the phase difference at the first frequency point is not within the starting phase range, the phase difference at the first frequency point is made to fall within the starting phase range by increasing or decreasing by 2 pi.

The method of claim 8, wherein the step of correcting the phase difference of the output signal relative to the sinusoidal excitation signal at the different frequency points further comprises:

starting from a second frequency point in the total test frequency range, judging whether the absolute value of the difference value of the phase difference at the current frequency point and the phase difference at the previous frequency point is greater than pi;

when the absolute value of the difference is larger than pi and the phase difference at the current frequency point is larger than the phase difference at the previous frequency point, reducing the phase difference at the current frequency point by 2 pi, and returning to the step of judging whether the absolute value of the difference between the phase difference at the current frequency point and the phase difference at the previous frequency point is larger than pi or not;

when the absolute value of the difference is larger than pi and the phase difference at the current frequency point is smaller than the phase difference at the previous frequency point, increasing 2 pi to the phase difference at the current frequency point, and returning to the step of judging whether the absolute value of the difference between the phase difference at the current frequency point and the phase difference at the previous frequency point is larger than pi or not;

and when the absolute value of the difference value between the phase difference at the current frequency point and the phase difference at the previous frequency point is less than pi, finishing the correction of the phase difference at the current frequency point, and continuing to perform the correction at the next frequency point until the last frequency point in the total test frequency range.

An electronic device comprising a controller, the controller being loadable with program instructions and executing a method of obtaining a frequency characteristic of a servo system, the method comprising:

in at least one designated frequency range, sequentially providing sinusoidal excitation signals with different frequencies for a servo system so as to perform step scanning on an output signal of the servo system;

in each step of the step-by-step scanning, synchronous whole-period sampling is carried out on the output signal of the servo system, and the amplitude and the phase of the output signal of the servo system at different frequency points are obtained;

and calculating the frequency characteristic of the servo system according to the amplitude and the phase of the output signal of the servo system at the different frequency points and the sinusoidal excitation signal.

An electronic device according to claim 10, wherein the step of sequentially providing sinusoidal excitation signals of different frequencies to the servo system within at least one specified frequency range for step-scanning the output signal of the servo system comprises:

setting a scanning starting frequency, a frequency variable and a scanning ending frequency, wherein the scanning starting frequency and the scanning ending frequency determine the designated frequency range;

in a first step of said step-scan, providing said sinusoidal excitation signal to said servo system at a frequency equal to said sweep start frequency, and in each subsequent step of said step-scan, varying said sinusoidal excitation signal in frequency variable intervals until said sinusoidal excitation signal has a frequency greater than or equal to said sweep end frequency.

The electronic device according to claim 11, wherein the step of synchronously sampling the output signal of the servo system in whole period is embodied as:

setting a sampling point number and a sampling frequency for the specified frequency range, wherein the product of the frequency variable and the sampling point number is equal to the sampling frequency, and the product of the scanning starting frequency and the sampling point number is equal to an integral multiple of the sampling frequency;

and in each step of the step-by-step scanning, sampling the output signal of the servo system according to the sampling point number and the sampling frequency.

The electronic device according to claim 10, wherein the step of calculating the frequency characteristic of the servo system from the amplitude and phase of the output signal of the servo system at the different frequency points and the sinusoidal excitation signal comprises:

according to the amplitude and the phase of the output signal of the servo system at the different frequency points, calculating the amplitude ratio of the output signal at the different frequency points relative to the sinusoidal excitation signal, calculating and correcting the phase difference of the output signal at the different frequency points relative to the sinusoidal excitation signal, and drawing an amplitude-frequency characteristic curve and a phase-frequency characteristic curve of the servo system according to the amplitude ratio and the phase difference of the output signal at the different frequency points relative to the sinusoidal excitation signal.

The electronic device of claim 13, wherein the method of obtaining the frequency characteristic of the servo system further comprises: and refining the amplitude-frequency characteristic curve and the phase-frequency characteristic curve by using a cubic spline interpolation technology.

The electronic device of claim 13, wherein the step of obtaining the amplitude and phase of the output signal of the servo system at different frequency points comprises:

obtaining the amplitude and the phase of the output signal of the servo system at the different frequency points in the frequency domain by fast Fourier transform.

The electronic device of claim 15, wherein the step of calculating and correcting the phase difference of the output signal relative to the sinusoidal excitation signal at the different frequency points comprises:

calculating the phase difference of the output signals at different frequency points relative to the sinusoidal excitation signal according to the phases of the output signals at the different frequency points in the frequency domain obtained by fast Fourier transform;

and correcting the phase difference of the output signals at the different frequency points relative to the sinusoidal excitation signal, so that the absolute value of the difference between the phase difference at the next frequency point and the phase difference at the previous frequency point in the two adjacent frequency points is less than pi.

The electronic device of claim 16, wherein the step of correcting the phase difference of the output signal relative to the sinusoidal excitation signal at the different frequency points comprises:

setting an initial phase range;

determining whether the phase difference at a first frequency point within a total test frequency range is within the starting phase range;

when the phase difference at the first frequency point is not within the starting phase range, the phase difference at the first frequency point is made to fall within the starting phase range by increasing or decreasing by 2 pi.

The electronic device of claim 17, wherein the step of correcting the phase difference of the output signal relative to the sinusoidal excitation signal at the different frequency points further comprises:

starting from a second frequency point in the total test frequency range, judging whether the absolute value of the difference value of the phase difference at the current frequency point and the phase difference at the previous frequency point is greater than pi;

when the absolute value of the difference is larger than pi and the phase difference at the current frequency point is larger than the phase difference at the previous frequency point, reducing the phase difference at the current frequency point by 2 pi, and returning to the step of judging whether the absolute value of the difference between the phase difference at the current frequency point and the phase difference at the previous frequency point is larger than pi or not;

when the absolute value of the difference is larger than pi and the phase difference at the current frequency point is smaller than the phase difference at the previous frequency point, increasing 2 pi to the phase difference at the current frequency point, and returning to the step of judging whether the absolute value of the difference between the phase difference at the current frequency point and the phase difference at the previous frequency point is larger than pi or not;

and when the absolute value of the difference value between the phase difference at the current frequency point and the phase difference at the previous frequency point is less than pi, finishing the correction of the phase difference at the current frequency point, and continuing to perform the correction at the next frequency point until the last frequency point in the total test frequency range.

The electronic device of claim 18, wherein the electronic device acts on a torque control loop, a speed control loop, or a position control loop of the servo system.

An apparatus having a storage function, wherein program instructions are stored, and the program instructions can be loaded and executed to obtain a frequency characteristic of a servo system according to any one of claims 1 to 9.

1页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:自主移动装置的路径规划

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!