The disclosure of Japanese Patent Application No.2003-395232 filed Nov. 26, 2003 including specification, drawings and claims is incorporated herein by reference in its entirety.
1. Field of the Invention
The present invention relates to a delay device, a power supply device, and a program product for delaying signals.
2. Description of the Related Art
For obtaining a value of a waveform such as of electric voltage or electric current at a time that is an arbitrary time T0 before, what has to be done is only to delay the waveform such as of the electric voltage or electric current by the time T0 with a delay element (dead-time element) as shown in
In addition, for realizing the delay element that operates for a discrete time, the delay element as shown in
For realizing the delay element as shown in
Also, there is another method as shown in
This example is composed of the A/D converter 101, a CPU (Central Processing Unit) 102, a ROM (Read Only Memory) 103, the RAM 104, and the I/F 105.
The waveform inputted into the AID converter 101 is sampled at intervals of the prescribed time period Ts to thereby be stored in the RAM 104 sequentially via the CPU 102. The data stored in the RAM 104 are sequentially read out by the CPU 102 when the prescribed time T0 has passed after the sampling to thereby be outputted via the I/F 105.
According to the above-described operation, it is possible to delay the output of the input waveform by the time T0.
However, in the method shown in the above-stated patent document, for improving resolution of the data to be outputted, there is a problem of increasing circuit size since many shift resisters are required therein.
Meanwhile, in the method shown in
The present invention is made based on the above-mentioned considerations, and an object of the present invention is to provide a delay device with high resolution without increasing circuit size, a power supply device employing such a delay device, and a program product for delaying signals for realizing such a delay device.
To attain the above-mentioned object, according to the present invention, a delay device which is inputted a signal with periodicity and outputs the signal after a delay by a prescribed time T0 includes a sampling circuit for sampling the signals with periodicity at intervals of a prescribed time period Ts, a storage circuit for storing data sampled by the sampling circuit in a past certain amount of time, and an estimation circuit for estimating a value of the signal at a time that is the prescribed time T0 before a certain time point and between the samplings based on the data stored in the storage circuit.
This allows offering the delay device with high resolution without increasing circuit size.
In another invention, in addition to the above-described invention, the estimation circuit estimates the value of the signal at the time that is the prescribed time T0 before using M (M>1) data stored in the storage circuit and existing in the vicinity of the datum to be estimated by interpolating the data into an (M−1) polynominal. This allows correct estimation even with a small number of data.
In still another invention, in addition to the above-described inventions, the estimation circuit estimates the value of the signal at the time that is the prescribed time T0 before using four data stored in the storage circuit and existing in the vicinity of the datum to be estimated by interpolating the data into a cubic polynominal. This allows obtaining further approximate output signal to an ideal waveform.
In still another invention, in addition to the above-described inventions, the delay device further includes a measurement circuit for measuring a time period of the signal, and a reset means for resetting a value of a parameter used by the estimation circuit for estimating the value of the signal in response to the measurement result of the measurement circuit. This allows correct estimation even in the case of the signal fluctuating.
In still another invention, in addition to the above-described inventions, the sampling circuit samples at shorter intervals than those for storing in the storage circuit and there is further included a filtering circuit for filtering the data sampled by the sampling circuit. This allows preventing occurance of aliasing.
Further, in the present invention, a power supply device having the delay device which is inputted a detection signal of voltage or current of a commercial power source and outputs the same after the delay by the prescribed period of time T0 being a time period of the voltage or current of the commercial power source or its integral multiple icludes a sampling circuit for sampling the detection signals of the voltage or current of the commercial power source at intervals Ts being shorter than the prescribed period of time T0 that is a time period of the voltage or current of the commercial power source or its integral multiple, a storage circuit for storing the data sampled by the sampling circuit in a past certain amount of time, an estimation circuit for estimating a value of a detection signal at one point being the prescribed time T0 before the certain time point and between the samplings based on the data stored in the storage circuit, and a control circuit for controlling an internal circuit of the power supply device based on the value obtained by the estimation circuit.
Therefore, in the power supply device such as a switching power supply and an uninterruptible power supply, it is possible to realize the delay element of the resolution enough for control with a small memory capacity.
Furthermore, in the present invention, a computer-readable program product for delaying signals, which makes a computer execute a processing of inputting the signal with periodicity and outputting the same after the delay by the prescribed time T0, makes the computer to function as a sampling means for sampling the signals with periodicity at intervals of the prescribed time period Ts, a storage means for storing the data sampled by the sampling means in a past certain amount of time, an estimate means for estimating the value of the signal the prescribed time T0 before based on the data stored in the storage means, and output means for outputting the value obtained by the estimate means.
Therefore, with this program product being installed, it is possible to provide the delay device with high resolution without increasing circuit size.
Hereinafter, an embodiment of the present invention will be described based on the accompanying drawings.
The delay circuit 10 is configured by an AID converter 11, a DSP (Digital Signal Processor) 12, a ROM 13, a RAM 14, and an I/F 15, and inputs for example output voltages of the UPS 21 controlled by the UPS control circuit 20 as an input signal and outputs them after a delay by a prescribed time T0.
Here, the A/D converter 11, which is a sampling circuit, samples an output voltage or an output current of the UPS 21 at intervals of the prescribed time period Ts and outputs after converting the same into digital data. The DSP 12, as an estimation circuit, a measurement circuit, a reset means, and a filtering circuit, outputs the digital data outputted from the A/D converter 11 after conducting a prescribed calculation processing.
The ROM 13 stores a program to be executed by the DSP 12. As a storage circuit, the RAM 14 temporarily stores data in the course of the processing, when the DSP 12 executes a prescribed processing. The I/F 15, which is an output circuit, supplies the data outputted from the DSP 12 to the UPS control circuit 20.
The UPS 21 is a so-called uninterruptible power supply device and provided with an internal battery, so that it outputs electric power from the battery after converting it into ac power in case of electric power outage. The UPS control circuit 20 is a control circuit for controlling the UPS 21 and executes a selective block control or the like for selectively blocking the UPS for example when a plurality of UPSs are operated in parallel and any of the UPSs is down, in response to the signals outputted from the delay circuit 10.
Note that the delay circuit 10 and the UPS control circuit 20 are provided outside the UPS 21 here, however, the delay circuit 10 and the UPS control circuit 20 may be provided inside the UPS 21.
Next, the operation of the above-described embodiment will be outlined.
The sampling time period Ts indicates a time period in which the A/D converter 11 samples an input signal. The thinned-out sampling time period Tss indicates a substantial sampling time period which is after the data sampled by the A/D converter 11 being thinned out at a constant rate by the DSP 12.
The delay time T0 indicates a time intended to delay and, in this embodiment, the time from t=0 to the position denoted by the numeral symbol 42.
If the thinned-out rate is m, the following relation will be established between the thinned-out sampling time period Tssand the sampling time period Ts. Note that m=5 in the example in
Tss=m·Ts (equation 1)
Where a primary number of division N is defined as follows. Note that a floor [ ] is a floor function which gives an integral number of the number in parentheses by rounding down fractions below decimal point.
When calculating the signal value at a time that is T0 before (the value denoted by the numeral symbol 42 in
y(t−T0)≅a1y[N−1]+a2y[N]+a3y[N+1]+a4y[N+2] (equation 3)
Where, coefficients a1 to a4 contained in the equation 3 are calculated by the following equation,
Provided that Di is calculated by the following equation.
Specifically, if T0 is a desired time to delay, Ts is a sampling time, and N1=20, N2=21, N3=22, and N4=23, according to the equation 5, the coefficients a1 to a4 become a1=−0.0623, a2=0.5564, a3=0.5685, a4=−0.0627 respectively, assuming that Ni (i=1, 2, 3, 4) indicates respective current values at time points (N−1), N, (N+1), (N+2) in
Subsequently, the description will be provided for the operation of the embodiment shown in
Step S10: the DSP 12 initializes various types of parameters.
Step S11: the DSP 12 measures a time period of an inputted signal.
Specifically, the time period is measured by measuring a time between zero-cross points of the inputted signals.
Step S12: the DSP 12 determines whether or not the delay time T0 is changed. That is, when the time periods of the inputted signals fluctuate, the delay time T0 is required to be changed, thereby the DSP 12 goes to Step S13 if the delay time T0 is changed and the DSP 12 goes to Step S14 if the delay time T0 is unchanged.
Step S13: the DSP 12 executes a processing for resetting the values of the coefficients a1 to a4 as parameters. Specifically, the values of the coefficients a1 to a4 as parameters are reset based on the equations 4 and 5.
Step S14: the DSP 12 assigns “1” as an initial value to a parameter count which counts the number of processings.
Step S15: the DSP 12 obtains sampled data outputted from the A/D converter 11.
Step S16: the DSP 12 filters the data obtained in Step S15. Specifically, the DSP 12 executes a processing for example of applying a 2nd order low-pass filter to the data obtained in Step S15. For information, this processing is carried out for preventing aliasing from occurring.
Step S17: the DSP 12 determines whether or not the value of the parameter count equals to the thinned-out rate m, and if equals, goes to Step S19, and if not, goes to Step S18.
Sep S18: the DSP 12 gives an increment to the value of the parameter count by one and returns to Step S15 to thereby repeat the same processes.
Step S19: the DSP 12 executes a computation for obtaining the input signal at the time that is T0 before. That is, to obtain the product of y (t−T0) using the equation 3. For reference, this processing will be detailed later.
Step S20: the DSP 12 outputs via the I/F 15 an estimated value of the input signal at the time that is T0 before obtained in Step S19.
Step S21: the DSP 12 determines whether or not to repeat the processing, and if yes, returns to Step S11 to repeat the same processing, and if not, ends the processing.
Through the above processing, it is possible to obtain and output the estimate value of the input signal T0 before.
Subsequently, the caluculation processings shown in Step S15 to S20 will be detailed.
After starting the processing shown in the drawing, first, a filtering is performed. Here, u indicates an input signal, uf0 and uf1 are variables to store mid-flow status of the filtering, uff0 and uff1 are variables to store data completed the filterling, and af and bf are filter coefficients. An equation x (n) (N=1, 2, . . . , (N+3)) is an array to store filtered data. The k, k1 to k3 are variables to assign an address to an array. Incidentally, a storage area for these variables is provided in a not-shown register of the DSP 12 or in the RAM 14.
As shown in
Subsequently, the value of the variable count is compared with the thinned-out magnification m, and if they are the same, then the flow branches to the right side in
When branched to the right side, the value of k is determined whether or not it equals to (N+3) or more, and if it does, the flow branches to the right side, and the value of the k is updated to (k−(N+2)). If not, the, flow branches to immediate below to thereby go to the next processing without doing anything.
Subsequently, the variable k1 is updated to the value of (k+1), and the k1 is determined whether or not it equals to (N+3) or more, if it does, the flow branches to the right side to thereby update the k1 to the value of (k1−(N+2)). If not, the flow branches to immediate below to thereby go to the next processing without doing anything.
Subsequently, a variable k2 is updated to the value of (k+2). Then, the k2 is determined whether or not it equals to (N+3) or more, and if it does, the flow branches to the right side to thereby update the k2 to the value of (k2−(N+2)). If not, the flow branches to immediate below to thereby go to the next processing without doing anything.
Subsequently, a variable k3 is updated to the value of (k+3). Then, the k3 is determined whether or not it equals to (N+3) or more, and if it does, the flow branches to the right side to thereby update the k3 to the value of (k3−(N+2)). If not, the flow branches to immediate below to thereby go to the next processing without doing anything.
Subsequently, the estimate value of the input sinal that is T0 before is calculated by a1*x(k)+a2*x(k1)+a3*x(k2)+a4*x(k3) to thereby substitute the product for the variable y. Also, the value of the uff1 is substituted for an array x (k).
Subsequently, the values of the variable k and the variable count are incrementally changed by one respectively, and the uf0 is updated to the value of the uf1 and the uff0 is updated to the value of the uff1.
The processings of Step S15 to S20 shown in
Subsequently, validity of the embodiment of the present invention will be described.
In such a circuit as shown in
When such a signal is inputted and when the delay circuit 10 operates ideally, the signal as shown in
As described in the above, according to the embodiment of the present invention, M=3 or below is acceptable, however, a condition of M=4 or more under which an output signal closer to the ideal waveform is obtainable is desirable. Besides, considering calculation volume, M=4 is further desirable.
As described hereinbefore, according to the embodiment of the present invention, the signal at the time that is T0 before is estimated using M data in the vicinity of the signal with the (M−1) polynominal, so that correct data can be obtained even if the sampling time period Ts is longer.
Further, the sampling time period can be made longer which enables to reduce the storage area of the RAM 14, so that the production cost can be reduced.
Incidentally, in the above embodiment, as an arithmetical unit for the delay circuit 10, the DSP 12 is employed, whereas, a CPU can be employed. Also, as peripheral circuits of the DSP 12, the A/D converter 11, the ROM 13, the RAM 14, and the I/F 15 are provided, whereas, a part or all of these can be built in the DSP 12.
Further, the measurement of the time period of the input signal shown in
Furthermore, in the above embodiment, the data delayed by the delay circuit 10 is designed to be inputted into the UPS control circuit 20, whereas, the other usage is also acceptable for the data.
Incidentally, the above function of processing can be realized by a computer. When using the computer, a program will be provided. In the program, the function of processing that the delay device should have is written. By executing the program on the computer, the above-mentioned function of processing is realized on the computer. The processing program can be recorded in a program product such as computer-readable recording media. As computer-readable recording media, there are a magnetic-recording device, an optical disk, a magneto-optic recording medium, a semiconductor memory, and the like. As magneto-optic recording devices, there are a hard disk drive (HDD), a flexible disk (FD), a magnetic tape, and the like. As optical disks, there are a DVD (Digital Versatile Disk), a DVD RAM (Random Access Memory), a CD-ROM (Compact Disk Read Only Memory), CD-R (Recordable)/RW (ReWritable), and the like. As magneto-optic recording media, there are an MO (Magneto-Optical disk), and the like.
For distributing the program, for instance, a portable recording media such as the DVD and the CD-ROM in which the program is recorded are offered. Alternatively, the program can be transferred via a network from a server computer storing the program to the other computer.
The computer for executing the program stores in its memory device the program, for example, that is recorded in the portable recording medium or that is transferred from the server computer. The computer reads out the program from its memory device to execute a processing in accordance with the program. Alternatively, the computer can execute the processing according to the program by directly reading out the program from the portable memory medium. Further, the computer can execute a processing, on a case-by-case basis, in accordance with the program it received.
The present invention may be used in a delay circuit which outputs a signal with periodicity by delaying the same.
The present invention enables to provide a delay device with high resolution, a power supply device using such a delay device, and a program product for delaying signals which can realize such a delay device.
Number | Date | Country | Kind |
---|---|---|---|
2003-395232 | Nov 2003 | JP | national |