Numerical control device having function of calculating frequency characteristic of control loop
09887865 ยท 2018-02-06
Assignee
Inventors
Cpc classification
G05B19/408
PHYSICS
G06F1/022
PHYSICS
G05B19/371
PHYSICS
G05B19/351
PHYSICS
International classification
G05B19/408
PHYSICS
Abstract
A numerical control device wherein a sinusoidal signal generated by a sine wave generation part is input by a control loop excitation part to a control loop of the control object, the input signal input to the control loop and the output signal from the control object are sampled by the data acquisition part periodically, and the sampling data is used by the frequency characteristic calculation part to calculate the frequency characteristic of the control loop to control the control object, wherein the frequency characteristic calculation part uses data obtained by inputting a sinusoidal signal obtained by shifting an initial phase of the sinusoidal signal by a phase shift part provided at a sine wave generation part by exactly a certain amount to the control loop a plurality of times to calculate the frequency characteristic of the control loop to thereby improve the measurement precision regardless of the sampling frequency.
Claims
1. A numerical control device which controls at least one control object, the numerical control device comprising: a sine wave generation part which generates a sinusoidal signal; a control loop excitation part which inputs the sinusoidal signal which is output from said sine wave generation part to a control loop of said control object; a data acquisition part which samples an input signal which is input to said control loop and an output signal which said control object outputs at a certain period; a frequency characteristic calculation part which uses the sampling data of the input signal and output signal to calculate the frequency characteristic of said control loop; and a phase shift part which shifts the phase of said sinusoidal signal, wherein the numerical control device is configured to perform an analysis of the frequency characteristic of the control loop calculated by the frequency characteristic calculation part, and adjust parameters of the control loop based on a result of the analysis to control the control object, and wherein the numerical control device is configured to obtain the sampling data of different phases on the sinusoidal signal by inputting a base sinusoidal signal having, at a frequency, an initial phase and at least one phase-shifted sinusoidal signal having, at said frequency, a phase shifted from the initial phase by a certain amount respectively, into said control loop a plurality of times to enable said frequency characteristic calculation part to calculate the frequency characteristic of said control loop.
2. The numerical control device according to claim 1, wherein said phase shift part is configured to generate a sinusoidal signal which is shifted from the initial phase by exactly 2/n at a time, said control loop excitation part is configured to input the sinusoidal signal which is shifted from the initial phase by exactly 2/n at a time to said control loop, and said frequency characteristic calculation part is configured to use data which is input k number of times to said control loop to calculate the frequency characteristic of said control loop.
3. The numerical control device according to claim 1, wherein said phase shift part is configured to generate k number of types of sinusoidal signals which are shifted from the initial phase by exactly 2/n at a time, said control loop excitation part is configured to input said k number of types of sinusoidal signals which are shifted from the initial phase by exactly 2/n at a time one time each at said control loop, and said frequency characteristic calculation part is configured to use the data which was input k number of times to said control loop to calculate the frequency characteristic of said control loop.
4. The numerical control device according to claim 3, wherein said phase shift part is configured to generate a first phase-shifted sinusoidal signal which is shifted from the initial phase by 2/3 and a second phase-shifted sinusoidal signal which is shifted by 2/3, said control loop excitation part is configured to input, into said control loop, three types of sinusoidal signals including the base sinusoidal signal which has the initial phase, the first phase-shifted sinusoidal signal where the initial phase is shifted by 2/3, and the second phase-shifted sinusoidal signal where the initial phase is shifted by 2/3, and said frequency characteristic calculation part is configured to use said three types of sinusoidal signals which are input to said control loop to calculate the frequency characteristic of said control loop.
5. The numerical control device according to claim 1, wherein when the frequency of the input signal is lower than a predetermined frequency, said control loop excitation part is configured to input the base sinusoidal signal having the initial phase exactly once to said control loop, and said frequency characteristic calculation part is configured to use sampling data of the input signal and output signal to calculate the frequency characteristic of said control loop, and when the frequency of the input signal is said predetermined frequency or more, said control loop excitation part is configured to input, into said control loop, the base sinusoidal signal having the initial phase and a phase-shifted sinusoidal signal which is shifted from the initial phase a plurality of times, and said frequency characteristic calculation part is configured to use sampling data of the plurality of input signals and the plurality of output signals corresponding to said plurality of input signals to calculate the frequency characteristic of said control loop.
6. The numerical control device according to claim 5, wherein said predetermined frequency is the Nyquist frequency.
Description
BRIEF DESCRIPTION OF DRAWINGS
(1) The present invention will be understood more clearly by referring to the following attached drawings.
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
DETAILED DESCRIPTION
(17) Below, referring to the drawings, a numerical control device which has the function of calculating a frequency characteristic of a control loop will be explained. However, it will be understood that the present invention is not limited to the drawings or the embodiments explained below. In the figures, the same component elements are assigned the same reference notations.
(18) Here, before explaining embodiments of the present invention, the method of calculating the frequency characteristic in a numerical control device up to now will be explained using
(19)
(20) Further, the numerical control device 1 is provided with parts for calculating the frequency characteristic of control object 3 such as a sine wave generation part 11, control loop excitation part 12, data acquisition part 13, and frequency characteristic calculation part 14. The sine wave generation part 11 can generate a sine wave of different frequencies. The control loop excitation part 12 is provided in the middle of the feedback signal line 21. It inputs a sinusoidal signal which is sent from the sine wave generation part 11 through the circuit 22 to the feedback signal line 21 to excite the control loop 2. The data acquisition part 13 receives as input a sinusoidal signal from the sine wave generation part 11 through a branch circuit 23 of the circuit 22 and receives as input the output signal of the control object 3 through a branch signal line 24 of the feedback signal line 21. The data acquisition part 13 is connected by an output circuit 25 to the frequency characteristic calculation part 14.
(21) Here, a routine for calculating the frequency response (frequency characteristic) of the control loop 2 in the numerical control device 1 which is shown in
(22) (1) First, an input signal U(t) of the frequency f(=2f) which was generated by the sine wave generation part is input to the control loop 2.
(23) (2) Next, the input signal U(t) and an output signal Y(t) which is output from the control object 3 when this input signal U(t) is input to the control loop 2 are sampled every sampling period t by the data acquisition part and input to the frequency characteristic calculation part 14.
(24) (3) In the frequency characteristic calculation part 14, the inputted input signal U(kt) and output signal Y(kt) are transformed by a Fourier transform to the functions U() and Y() of the frequency region .
(25) (4) After this, the frequency characteristic calculation part 14 calculates an amplitude ratio |Y()/U()| and a phase difference from the input signal U() and the output signal Y().
(26) (5) In the numerical control device 1, the processing from (1) to (4) is repeated while changing the frequency f(=2f) of the input signal U(t) which is input from the sine wave generation part to the control loop 2. The frequency characteristic calculation part 14 prepares a Bode plot from the amplitude ratio |Y()/U()| and the phase difference for each frequency.
(27) In this way, if inputting a sinusoidal signal to the control loop 2 and exciting the control loop 2 while gradually changing the frequency of the input signal from the minimum frequency to maximum frequency in the measurement region, a Bode plot can be prepared from the relationship of the input signal U(t) of the control loop 2 and the output signal Y(t) of the control object 3. Further, it is possible to analyze the frequency response of the control loop 2 based on the Bode plot and to adjust the parameters (integral gain, proportional gain, etc.) of the control loop 2 based on the results of analysis to give the desired frequency response.
(28) Note that, when inputting a sinusoidal signal to the control loop 2 to excite it, as shown in
(29)
(30) Further, when the input signal includes a frequency component of the Nyquist frequency (fs/2) or more, sampling of two or more points per period is not possible, so it is not possible to reproduce an analog signal from a digital signal. For this reason, in the method of calculation of the frequency characteristic of the control loop 2 in numerical control device of the comparative art, it was not possible to precisely evaluate the frequency characteristic of the Nyquist frequency (fs/2) or higher high frequency region.
(31) The present invention solves the problem of the method of calculation of the frequency characteristic of the control loop in the numerical control device of the comparative art.
(32) The numerical control device 1A of the present invention which is shown in
(33) Further, by inputting a sinusoidal signal shifted from the initial phase by exactly a certain amount (for example, 2/n at a time) to the control loop 2 k number of times, it is possible to sample at least k number of points per 1 period, so it is possible to precisely calculate the frequency characteristic even with a high frequency or short time measurement. Here, the series of steps of the flow until calculation of the amplitude ratio |Y(j)/U(j)| and the phase difference from the input signal when inputting a sinusoidal signal of the amplitude A and frequency f(=2f) shifted from the initial phase by 2/3 each to the control loop 2 three times and the output signals which are output from the control object 3 will be explained using
(34)
(35) Next, an input signal U(t/) of the same frequency f but shifted in phase from the initial phase by is input to the control loop 2. Further, the sampled input signal U(kt/) and output signal Y(kt/) of the input signal U(t/) and the output signal Y(t/) which is output from the control object 3 when the input signal U(t/) is input to the control loop 2 are input to the frequency characteristic calculation part 14.
(36) Furthermore, an input signal U(t+/) which has the same frequency f but has a phase which is shifted from the initial phase by is input to the control loop 2. Further, the sampled input signal U(kt+/) and output signal Y(kt+/) of the input signal U(t+/) and the output signal Y(t+/) which is output from the control object 3 when the input signal U(t+/) is input to the control loop 2 are input to the frequency characteristic calculation part 14.
(37) The detailed calculation formulas of the input signals U(kt), U(kt/), and U(kt+/) which are input to the frequency characteristic calculation part 14 and the output signals Y(kt), Y(kt/), and Y(kt+/) are shown in
(38) The sampled input signals U(kt), U(kt/), and U(kt+/) and output signals Y(kt), Y(kt/), and Y(kt+/) are transformed at the frequency characteristic calculation part 14 by Fourier transforms.
(39) Here, if making the input signal U(s) and making the output signal Y(s), the transfer function G(s) is expressed by formula 1.
G(s)=Y(s)/U(s)=L[Y(t)]/L[U(t)](1)
(40) Further, if entering s=j into formula 1, the denominator and numerator are expressed by complex numbers as shown in formula 2.
G(s)=Y(j)/U(j)=(x.sub.2+j.Math.y.sub.2)/(x.sub.1+j.Math.y.sub.1)(2)
(41) The numerator and the denominator become values at the time of transformation of the input signal U(t) and the output signal Y(t) by Fourier transforms at f=/2, so it will be understood that the following formula 3, formula 4, formula 5, and formula 6 correspond to x.sub.1, y.sub.1, x.sub.2, and y.sub.2.
(42)
(43) For this reason, the real component R.sub. and the imaginary component I.sub. can be found by entering formula 3, formula 4, formula 5, and formula 6 into formula 8 and formula 9 of the real part and imaginary part when rationalizing the denominator of formula 2.
(44)
(45) (Formula 3, formula 4, formula 5, and formula 6 can be entered into x.sub.1, y.sub.1, x.sub.2, and y.sub.2 respectively.)
(46) Here, T is the measurement time, t is the sampling time, and N=T/t.
(47) Further, the real component R.sub. and the imaginary component I.sub. can be entered into the following formula 10 and formula 11 to calculate the absolute value of the amplitude ratio and the phase delay.
(48)
(49)
(50) If inputting an input signal of a sine wave having a predetermined phase as its initial phase and a plurality input signals of sine waves shifted from the initial phase to the control loop 2, the points of sampling the sine wave shaped output signals from the control object 3 will shift. For this reason, as shown in
(51) Here, the flow chart which is shown in
(52) At the next step 602, the control loop excitation part 12 performs processing to input a sinusoidal signal to the control loop 2 a plurality of times. The input a plurality of times, for example, is processing where when the signals which the sine wave generation part 11 generates are the three types of the sinusoidal signal having a predetermined phase as the initial phase and sinusoidal signals having phases shifted from the initial phase by and , the three types of sinusoidal signals are respectively input to the control loop 2 a plurality of times of one time each. Note that, the three types of sinusoidal signals may be respectively input a plurality of times of two times or more each.
(53) At the next step 603, the data acquisition part 13 acquires the sinusoidal signal which is input to the control loop 2 (input signal) and the output signal from the control object 3. The data acquisition part 13 acquires the three types of sinusoidal signals which are input to the control loop 2 of the sinusoidal signal having a predetermined phase as the initial phase and sinusoidal signals having phases shifted from the initial phase by and and the three types of output signals which are output from the control object 3 for the input signals of these three types of sinusoidal signals.
(54) In the final step 604, the frequency characteristic calculation part 14 uses the input signal and the output signal to calculate the frequency characteristic of the control loop 2. The frequency characteristic calculation part 14 uses the three types of sinusoidal signals which are input to the control loop 2, that is, the sinusoidal signal which has the predetermined phase as an initial phase and the sinusoidal signals which have phases shifted from initial phase by and , and the three types of output signals which are output from the control object 3 corresponding to the input signals of the three types of sinusoidal signals to calculate the frequency characteristic of the control loop 2.
(55) In this way, a comparison of the case of using the sinusoidal signal shifted from the initial phase by 2/3 at a time to calculate the frequency characteristic of the control loop and the case of using only the sinusoidal signal not shifted from the initial phase to calculate the frequency characteristic of the control loop will be explained using
(56)
(57)
(58) On the other hand, if comparing the Bode plots which show the frequency characteristics which are shown in
(59) Therefore, when the frequency of the input signal is lower than a predetermined frequency (for example, Nyquist frequency), it is possible to input the initial phase sinusoidal signal just one time while not shifting it to the control loop 2 to calculate the frequency characteristic. Further, if the frequency of the input signal is higher than a predetermined frequency (for example, Nyquist frequency), a sinusoidal signal which is shifted from the initial phase by exactly a certain amount is input k number of times to the control loop to calculate the frequency characteristic. According to this method of calculation of the frequency characteristic, compared with the case of inputting a plurality of types of sinusoidal signals shifted in phase without regard as to the frequency of the input signal a plurality of times to the control loop 2, the signals are input a plurality of times for only the frequency required for the number of data points, so it becomes possible to measure the frequency characteristic in a short time.
(60) Note that, in the above obtained embodiment, the case of inputting sinusoidal signals shifted from the initial phase by a certain amount (for example, 2/n each) to the control loop k number of times to enable sampling of at least k number of points per 1 period was explained. In this case, if n=k and shifting the sinusoidal signal n number of times, the result becomes 1 period. However, for example, even if inputting a sinusoidal signal shifted by exactly /2 two times, it is believed that effect of the present invention will be explained. In this case, nk, so the present invention includes the case where nk as well.
(61) Above, the present invention will be explained with reference to preferred embodiments, but a person skilled in the art will understand that it can be modified and changed in various ways without departing from the scope of disclosure of the later explained claims.