Background and Summary of the Invention
Certain known frequency measurement techniques use the transfer oscillator sampling approach and require two samplers. (See, for example, U.S. Pat. No. 3,836,758 entitled Wide Frequency Range Counter System Utilizing Automatic Range Searching and Loop Compensation issued on Sept. 17, 1974 and the Hewlett-Packard Journal, May 1974.)
The present invention requires only one sampler which is alternately driven by two signals of frequencies f.sub.1 and f.sub.2, which are sufficiently close by design to ensure both IF frequencies output by the sampler have the same harmonic number, satisfying the equations,
Measurement of the sampler output f using the phase continuous switching technique then yields an accurate weighted average of the IF frequencies from which f.sub.x may be calculated.
Phase continuous switching is defined as the technique where the transition from f.sub.1 as the driving frequency of the sampler to f.sub.2 as the driving frequency or vice versa is done only when the two frequencies f.sub.1 and f.sub.2 are in phase. A mixer is employed to supply the difference frequency f.sub.2 - f.sub.1 as the trigger source for the transitions between f.sub.1 driving the sampler and f.sub.2 driving the sampler.
The technique of phase continuous switching facilitates accurate measurement of the IF output while alternating rapidly between the two driving frequencies f.sub.1 and f.sub.2. Using a single sampler system without this ability, one had to measure the IF frequency through multiple gating (to avoid the spurious counts which occur when switching at random phase), and thereby introduced quantization error as well as repeated systematic gating errors. Alternatively, one had to switch frequencies between long intervals to allow time for sufficiently accurate measurement of each IF frequency. The latter approach requires that the input frequency must be sufficiently free from frequency drift and modulation to allow accurate results to be obtained from long periods of measurement time.
Description of the Drawings
FIG. 1 is a schematic diagram of a frequency measurement system according to one embodiment of the invention.
FIG. 2 is a schematic diagram of a frequency measurement system according to another embodiment of the invention.
FIG. 3 is a schematic diagram of phase continuous switching apparatus useful for alternating between two sampling frequencies driving a single sampler in the embodiments of FIGS. 1 and 2.
Description of the Preferred Embodiment
Referring to the diagram of FIG. 1, there is shown a signal 5 of unknown frequency f.sub.x input to sampler 10. Sampler 10 is alternately driven by signals 61 and 66 of frequencies f.sub.1 and f.sub.2 provided by tunable oscillators 60 and 65. Alternating between the two signals is controlled by the difference frequency applied by mixer 70 through divider 75 to gates 50 and 55.
An input phase lock loop is provided when f.sub.1 is enabled by divider 75 which tunes f.sub.1 through phase detector 20 until the sampler 10 output is locked to a known frequency signal from signal generator 37. A second phase lock loop tunes oscillator 65 through phase detector 85, until f.sub.2 is locked to f.sub.1 within a desired offset.
Measurement of the average frequency f output by sampler 10 is accomplished by frequency counter 105 when gate 100 is enabled. The measured value for f and the known value of the frequency output by signal generator 37 are sufficient to calculate f.sub.x.
When f.sub.1 61 is driving the sampler it is phase locked to the input signal 5 in the following manner. The IF output of sampler 10 is applied to phase detector 30 through gate 40 which is enabled by signal 76. The generation of signal 76 is discussed below. The other signal applied to phase detector 30 through gate 35 is an IF signal of known frequency from signal generator 37. The output of phase detector 30 is coupled to dc amplifier circuit 20 which tunes voltage controled oscillator 60 to a frequency f.sub.1 that brings the phase lock loop to the locked condition
the generation of f.sub.2 is accomplished as follows. Signal 61 is applied to divider 80 and the resulting output is applied to phase detector 85. The other signal applied to phase detector 85 is the difference frequency from mixer 70. The output of phase detector 85 is applied to loop filter amplifier 90 which tunes voltage controlled oscillator 65 to effect the following relationship ##EQU1## and therefore ##EQU2##
Mixer 70 outputs the difference frequency, f.sub.2 - f.sub.1. Specific transitions of this difference frequency signal indicate when f.sub.1 61 and f.sub.2 66 are in phase. These transitions are used to clock divide by L circuit 75 causing signal 76 to change logic states only when f.sub.2 and f.sub.1 are in phase. Responding to signal 76, gates 50 and 55 alternately provide f.sub.1 61 then f.sub.2 66 as the sampling frequency. When signal 76 is in the logical 1 state, gate 50 selects signal 61 as the sampling frequency and gates 35 and 40 enable the input phase lock loop to tune voltage controlled oscillator 60 until the sampler output is locked to the IF.sub.1 output from signal generator 37. When signal 76 is in the logical zero state, f.sub.2 66 is provided as the sampling frequency through gate 55. Gates 35 and 40 are disabled so that phase detector 30 is not operating to tune voltage controlled oscillator 60 which coasts at the last frequency determined by the input phase lock loop.
When f.sub.2 66 is utilized as the sampling frequency the following equation is true
where N is the same harmonic number present when f.sub.1 61 is the sampling frequency.
Assuming L=2 for divider 75 (in which case f.sub.1 and f.sub.2 drive the sampler during equal time periods), the average frequency output by the sampler may be expressed as ##EQU3##
Accurate measurement of f is facilitated by the phase continuous switching technique of the present invention which ensures a smooth transition between the two sampling signals, thereby also ensuring a smooth transition between the two IF frequencies output from the sampler. Therefore, the measured value of the IF output will not contain spurious counts generated at the frequency transitions.
Calculations below indicate the derivation of the equation whereby f.sub.x can be computed from the measured value for f. Taking the equation Nf.sub.1 - f.sub.x = IF.sub.1 and multiplying it by 1 + 1/M
and substituting the solution for f.sub.2 in equation (3) into the equation Nf.sub.2 - f.sub.x = IF.sub.2 allows one to express f.sub.x in the following equations. ##EQU4##
f.sub.x is therefore expressed in an equation with only one unknown, i.e., IF.sub.2 since IF.sub.1 and M are determined by design. (It is not convenient to measure IF.sub.2 directly since that frequency only occurs periodically. However, f can be measured accurately as described below.)
Solving the equation ##EQU5## yields
f.sub.x can therefore be expressed as
again referring to FIG. 1, measurement of f is begun when the measurement enable signal 96 is present and signal 76 sets D flip-flop 95 which enables gate 100. Measurement of f will end on the strobe of flip-flop 95 by signal 76 which next follows the removal of the measurement enable signal 96. Use of flip-flop 95 ensures that the measurement of f will begin and end on the enabling of signal 61 to drive the sampler. Therefore, equal time periods of IF.sub.1 and IF.sub.2 will be counted by frequency counter 105 when L=2 for divide by L circuit 75. For other values of L, the position of IF.sub.1 and IF.sub.2 depends on the counting code of divide by L circuit 75. For example, for L=3 it is possible that f.sub. 1 may drive the sampler twice as long as f.sub.2 or vice versa. For these unequal weight cases, equation (5) should be modified accordingly.
Measurement is enabled by providing signal 96 after the phase lock loops have settled down to a reasonable quiescent state so that any initial gyrations during lock acquisition will not appear within the measurement phase.
After the measurement of f is completed, calculation of f.sub.x can be accomplished by digital processing. The contents of register 105 stored in the most significant bits of register 42, shifted enough from the least significant bit to effectively multiply f by the constant 2M. (M, in this embodiment, has been conveniently selected to be a number which is a power of two, such as 32, 64, 128, etc., to allow multiplication by shifting the appropriate number of places.) A constant having the value (2M+1) IF.sub.1 contained in register 44 is subtracted from the contents of register 42 to provide the calculated value for f.sub.x to display register 48. Subtract circuit 46 is similar to the SN74181 manufactured by Texas Instruments and others.
Referring to the schematic diagram of FIG. 2, there is shown the input signal 5 of unknown frequency f.sub.x input to sampler 10. The sampler is again alternately driven by signals 61 and 66. However, signal 61 is held at a constant frequency f.sub.1 by frequency source 260 while voltage controlled oscillator 65 is tuned by the phase lock loop to lock signal 66 of frequency f.sub.2 within the desired offset. The upper phase lock loop tunes voltage controlled oscillator 237 so that IF.sub.1 is locked to the sampler output whenever signal 61 is utilized as the sampling frequency. The loop is broken, allowing voltage controlled oscillator 237 to coast at the last frequency determined by the phase lock loop, whenever signal 75 toggles to the zero state to select signal 66 as the sampling frequency.
Referring to the schematic diagram of FIG. 2, signal 61 of frequency f.sub.1 is generated by oscillator 260 at a known frequency. Signal 66 of frequency f.sub.2 is then generated by voltage controlled oscillator 65 which is tuned through loop filter amplifier 90 so that ##EQU6## as described above in the description of the circuit of FIG. 1. The difference frequency, f.sub.2 - f.sub.1, from mixer 70 is coupled to divider 75 which applies signal 76 to gates 50 and 55, thereby alternately coupling signals 61 and 66 to the sampler 10. The output of the sampler is phase continuous since the transition between f.sub.1 of signal 61 as the sampling frequency and f.sub.2 of signal 66 as the sampling frequency or vice versa only occurs when f.sub.1 and f.sub. 2 are in phase.
When signal 61 is enabled as the sampling signal through gate 50, gate 35 and gate 40 are also enabled by control signal 76. The output from sampler 10 and the output of voltage controlled oscillator 237 are applied to phase detector 30 by filter amplifier 20 to tune voltage controlled oscillator 237 such that
since IF.sub.1 is no longer predetermined, use of the equation f.sub.x = 2Mf - (2M +1) IF.sub.1 to compute f.sub.x requires measurement of the IF.sub.1 signal from voltage controlled oscillator 237. This measurement is accomplished by frequency counter 238 when gate 239 is enabled by flip-flop 95.. f.sub.x is then computed from the equation f.sub.x = 2Mf - (2M +1) IF.sub.1 as before.
Referring to FIG. 3, the essential apparatus for phase continuous switching has been extracted from the frequency measurement apparatus described above. The mixer 70 indicates the phase relationship of the signals 61 and 66 through transitions of the difference frequency f.sub.2 - f.sub.1. Use of a filter between mixer 70 and divider 75 to isolate the difference frequency may be required if certain types of mixers are utilized. However, as is generally known, the use of square wave signals for signals 61 and 66 allows the use of a single D flip-flop or series of D flip-flops as mixer 70 to directly provide the difference frequency without additional filtering by applying the two signals of frequencies f.sub.1 and f.sub.2 to the D and clock inuts. (See e.g. PHASE-LOCKED LOOP SYSTEMS, Motorola Semiconductor Products, Inc., Second Ed., pp. 11-13, August 1973.)
The toggling of the output from divider 75 each L cycles of the difference frequency controls the enabling of gates 50 and 55. Because this toggling only occurs during periods when f.sub.1 and f.sub.2 are in phase the output of the driver 45 is phase continuous as is the resulting IF output of sampler 10.. Elimination of discontinuities during the transition period permits accurate measurement of the average IF frequency f and subsequent use of the measured value for computation of f.sub.x. Some implementation details are discussed below which enable one to obtain better performance.
Typically, a finite time (known as set up time) is needed for the D input of a flip-flop used as mixer 70 to settle after a signal is applied before successful clocking can occur. Therefore, the two signals f.sub.1 and f.sub.2 are not exactly in phase as indicated by the output of mixer 70. By adding a small fixed delay between AND gate 50 and the subsequent OR gate 110 (assuming f.sub.1 is connected to the D input), one can compensate for the phase difference due to the set up time.
By making use of the fact that the harmonic number is an integer, refinement of f.sub.x can be obtained. If f.sub.1 is known, as in the embodiment of FIG. 2, or measured, then the harmonic number can be computed after f.sub.x is determined by equation (10) by ##EQU7## If N' obtained by equation (13) is close to but not equal to an integer, then the expression should be replaced by the nearest integer N ##EQU8## Then an improved f.sub.x, called f.sub.x ', can be obtained by ##EQU9##
To select one IF frequency while suppressing others arising from different harmonic numbers, the sampler outputs (IF signals) are typically bandpass filtered. The presence of filters necessitates more than one pair (f.sub.1 and f.sub.2) of sampling frequencies to cover all input frequencies within a specific band. In practice, f.sub.1 is one of a set of possible frequencies available for band coverage. The choice of a set of sampling frequencies to cover a band consistent with an IF filter is a problem separate from the present invention. Also, equations 1 and 4 assume a specific side band, a completely equivalent system can be constructed using the opposite side band.