Frequency comparison circuit
This invention relates to frequency comparison circuit arrangements and particularly to such circuit arrangements in which a predetermined difference between two pulse repetition frequencies is indicated. 
     It is an object of the present invention to provide a novel pulse frequency comparison circuit arrangement for comparing the frequencies of two pulse trains and indicating a predetermined difference between them. 
     According to the present invention a pulse frequency comparison circuit arrangement for comparing the repetition frequencies of two pulse trains comprises a register means, operable to store a binary number, control means, operable to control the application of the pulse trains to the register such that pulses of one train cause the binary number to be increased and pulses of the other train cause the binary number to be decreased, setting means, responsive to a predetermined number of pulses of one pulse train to cause the register to store a predetermined binary number, and output means operable to give an indication when a specified upper or lower binary number is stored in said register means. 
    
    
     An embodiment of the present invention will now be described by way of example with reference to the accompanying drawing, in which the single FIGURE shows a schematic circuit arrangement according to the present invention. 
    
    
     The embodiment as described includes a plurality of bistable devices each of which is arranged to provide an output when set, and arranged to provide no output when reset. 
     The circuit arrangement 5 comprises control means 6, register means 7, setting means 8 and output means 9. 
     The two pulse trains are applied to input terminals 10 and 11 of the control means. A pulse of the first train, applied to the terminal 10, sets bistable devices 12 and 13. The output signal of the bistable device 12 opens a gate 14, to which the input terminal 11 is connected, and energizes a clock oscillator 15. The clock oscillator 15 has two output terminals 17 and 18 and provides a clock pulse at each output terminal alternately. 
     The output terminal of the bistable device 13 and the output terminal 17 of the clock oscillator 15 are connected as inputs to a NAND gate 19. The output terminal of the gate 19 is connected to the register means 7 and the output signal of the gate 19 provides an input signal to the register means 7. The register means comprises a shift register 20, an OR gate 21 and a shift pulse generator 22. 
     The output terminal of the gate 19 is also connected by way of an inverting gate 23 to a gate 24, which gate, when triggered, provides a reset pulse for the bistable device 13. The gate 24 is triggered by a pulse from a generator 25, itself triggered by each register shift pulse from the generator 22. 
     Thus for each input pulse applied to the terminal 10, the bistable device 13 is set, a clock pulse from the clock oscillator ouptput 17 triggers the gate 19 and results in the information in the shift register being moved one place in a direction to the left in the FIGURE. The occurrence of the register shift pulse also causes, by means of generator 25 and gates 23 and 24, the bistable device 13 to reset after each input pulse has been used. 
     The output signal of the gate 14 is used to set a bistable device 16 coupled to gates 26, 27 and 28 corresponding to gates 19, 23 and 24, and to the OR gate 21. A pulse from the train applied to the terminal 11 sets the bistable device 16, and a clock pulse from the output 18 of the clock oscillator 15 enables the stored pulse to pass to the shift register 20 and cause the information in the shift register to move one place to the right in the FIGURE. The gates 27 and 28 and the generator 25 cause the bistable device 16 to reset after the register shift pulse. 
     The shift register 20 is an eight-bit reversible shift register and is arranged to be reset by an external signal with a bit in stage-five and with all the other stages empty. Output signals are taken from the first and eighth stages to the output means 9. The output means comprise bistable devices 29 and 30, set to provide output signals from the first and eighth stages of the shift register respectively. 
     The setting means 8 includes a counter 31 triggered by clocked pulses from the gate 27 and providing a parallel output in binary form. Appropriate ones of the parallel output terminals are connected to a multi-input gate 32, along with the output of the generator 25, to provide an output count signal after a predetermined number of control pulses from the terminal 11 have been applied to the shift register 20. 
     The count signal is applied by way of a two-input OR gate 33 to a setting-pulse generator 34. The generator applies a pulse operable to set the shift register 20 and reset the bistable devices 12 after the predetermined number of control pulses have been counted; the counter 31 is also cleared. 
     An external setting pulse may be applied, by way of a terminal 35, to the other input terminal of the OR gate 33 and operate to reset bistable devices 29 and 30. 
     In operation an external setting pulse is applied to the terminal 35 such that the bistable devices 29 and 30 are reset directly and the shift register 20 and the bistable device 12 are reset by generator 34. A first input pulse appearing at the terminal 10 sets the bistable device 12 so as to open the gate 14, and energise the clock oscillator 15. The first input pulse also sets the bistable device 13 and produces an input to the gate 19. The first clock pulse, from the output 17 of the clock oscillator 15, opens the gate 19 and a pulse is applied to the shift register 20 to cause the stored bit to move one place to the left, that is, to stage-four, after which the generator 25 resets the bistable device 13. 
     The first pulse applied to the terminal 11 is passed through gate 14 and sets the bistable device 16. The second clock pulse from the oscillator 15 is produced at the output 18 and this opens the gate 26 and applies the pulse to the shift register causing the stored bit to move one place to the right, that is, from stage-four back to stage-five. The pulse also increases the count in the counter 31 by one. After the register shift, the output of the generator 25 causes the bistable device 16 to be reset. 
     The second pulse applied to the input terminal 10 sets the bistable device 13 and when the third clock pulse appears, from the output 17, the pulse is applied to the shift register to move the bit to the left to stage-four. The second pulse applied to the terminal 11, after the fourth clock pulse, returns the bit to stage-five of the register, again adding to the count of the counter 31. 
     Thus while the input pulses are produced at the same repetition frequency, the stored bit is moved between the stages-four and-five of the shift register in response to the output of the clock oscillator. After a predetermined number of pulses have been received by the terminal 11 the counter 31 produces an output to satisfy the conditions of the gate 32 such that setting-pulse generator 34 is operated to set the shift register 20, returning the stored bit to stage-five and to reset the bistable device 12. 
     The next input pulse sets the bistable 12 and opens the gate 14 and operates the clock oscillator 15, so that the cycle of operations is repeated for a period determined by the counting of a predetermined number of pulses by the counter 31. The arrangement thus shown in the FIGURE has the counter 31 connected to the gate 32 to give an output from the gate after every twenty pulses. 
     If during one 20-pulse period, the frequency of the train applied to terminal 10 exceeds the frequency of the train applied to terminal 11 then there will be more pulses to move the stored bit to the left than pulses to move it to the right. If in the 20-pulse period there are 23 pulses applied to the terminal 10 then the stored bit will be caused to enter stage-one of the register and set the bistable device 29 to provide an error signal indicating that the input frequency is too high. 
     Similarly if the frequency of the train applied to the terminal 10 is below the frequency of the train applied to the terminal 11 then the stored bit is moved to the right where, if it reaches stage-eight it sets the bistable device 30 and produces an error signal indicative of a low frequency. 
     When steps have been taken to restore the input signal to its correct frequency the external reset is operated manually or automatically to reset the shift register and the bistable devices 29 and 30. 
     As shown the permitted error for the input signal is 3 pulses in twenty, that is ± 15%, but this may be changed by altering the reset position of the stored bit in the shift register, altering the interconnections between the counter 31 and the gate 32, or by altering the capacity of the counter 31 and/or the shift register. 
     The only condition for satisfactory operation is that the frequency of the clock oscillator must be greater than twice the maximum possible input frequency of either train to permit both train pulses to be sampled for each one input pulse of that train. 
     The register means may comprise a bi-directional counting circuit with the output signal arranged to be given for predetermined values of the stored count. Also, the circuit may be employed to measure the deviation of frequency of one input train of pulses from that of a train of pulses produced by a controlled oscillator. In such a case, the pulse train from such an oscillator should be applied to the input terminal 11 so that these accurately controlled pulses are counted in the counter 31. A suitable oscillator may be incorporated in the control means 6 in place of the gate 14, the oscillator being energised by the output of the bistable circuit 12 in a manner similar to the clock oscillator 15.