System and method for detecting a fundamental frequency of an electric power system
09696355 ยท 2017-07-04
Assignee
Inventors
Cpc classification
H03L7/093
ELECTRICITY
G01R25/00
PHYSICS
G01R23/02
PHYSICS
International classification
G01R23/00
PHYSICS
H03L7/093
ELECTRICITY
G01R23/02
PHYSICS
G01R29/00
PHYSICS
G01R25/00
PHYSICS
Abstract
A system and method to detect the fundamental frequency of an electric input signal using a feedback control loop including a phase error detector, a loop controller, and a digitally controlled oscillator. The frequency detector may detect the fundamental frequency of an electric input signal and produce an output signal representing the fundamental frequency of the electric input signal. The frequency detector may further include a filter that may be coupled to the frequency detector output signal in order to remove spurious tones or noise from the output signal.
Claims
1. A fundamental frequency detector system, comprising: a phase error detector having inputs for an externally supplied input signal and a local reference input signal, and an output for a signal representing a comparison between them; a loop controller having an input coupled to the phase error detector output and an output for a control word representing an estimated fundamental frequency of the externally supplied input signal; a digitally controlled oscillator having an input coupled to the output of the loop controller and an output for the local reference input signal; wherein the output of the loop controller is the output of the frequency detector system.
2. The fundamental frequency detector system of claim 1, further comprising a programmable filter having an input coupled to the output of the loop controller and an output for a filtered signal.
3. The fundamental frequency detector system of claim 1, further comprising a controller having a first output for an initialization signal representing an approximation of an expected fundamental frequency of the externally supplied input signal, a second output for a select signal, and a third output for a reset signal.
4. The fundamental frequency detector system of claim 3, the loop controller further comprising an input for the reset signal.
5. The fundamental frequency detector system of claim 3, further comprising a multiplexer having a first input coupled to the loop controller output signal, a second input coupled to the initialization signal, a third input coupled to the controller select signal, and an output coupled to the digitally controlled oscillator.
6. The fundamental frequency detector system of claim 3, the controller further comprising an input coupled to the loop controller output.
7. The fundamental frequency detector system of claim 1, the loop controller further comprising a multiplier having an input coupled to the phase error detector output, a proportional gain value, and a multiplier output for a signal representing a multiplication of the phase error comparison by the proportional gain value and an output for a signal representing a running average of successive phase error multiplications.
8. The fundamental frequency detector system of claim 1, the loop controller further comprising an integrator having an input coupled to the phase error detector output, a gain value, and an output for a signal representing an integration of the phase error comparison multiplied by the gain value; and a summation module having an input coupled to the integrator output and an output for a signal representing a sum of successive phase error integrations.
9. The fundamental frequency detector system of claim 1, the loop controller further comprising a derivative calculator having an input coupled to the phase error detector output, a gain value, and a output for a signal representing a derivative of the phase error comparison multiplied by the derivative gain value; and a summation module having an input coupled to the derivative calculator output and an output for a signal representing a sum of successive phase error derivative calculations.
10. A method for operating a fundamental frequency detector system, the method comprising: receiving, at a phase error detector, a local reference input signal from a digitally controlled oscillator and an externally supplied input signal; determining, using the phase error detector, an error signal representing a difference between phases of the local reference input signal and the externally supplied input signal; estimating a fundamental frequency of the externally supplied input signal based at least in part on the error signal to obtain an estimated fundamental frequency; adjusting a frequency of the local reference input signal using the digitally controlled oscillator based at least in part on the estimated fundamental frequency to reduce the difference between phases of the local reference input signal and the externally supplied input signal; and outputting a frequency detector output signal, the frequency detector output signal generated based at least in part on the estimated fundamental frequency.
11. The method of claim 10, wherein outputting the frequency detector output signal comprises filtering the frequency detector output signal with a programmable filter.
12. The method of claim 10, further comprising: generating, at a controller, an initialization signal having a frequency approximating an expected fundamental frequency of the externally supplied input signal; setting the frequency of the local reference input signal using the digitally controlled oscillator to the frequency of the initialization signal in response to a controller select signal from the controller.
13. The method of claim 12, further comprising: resetting the frequency detector output signal.
14. The method of claim 12, wherein setting the frequency of the local reference input signal comprises: coupling, with a multiplexer, the initialization signal to the digitally controlled oscillator to control the frequency of the local reference input signal in response to the controller select signal.
15. The method of claim 10, further comprising: multiplying the error signal with a proportional gain value, wherein estimating the fundamental frequency of the externally supplied input signal comprises determining a running average of successive error signals multiplied with the proportional gain value.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
DETAILED DESCRIPTION
(6) Embodiments of the present invention provide techniques to perform frequency detection with reduced silicon area and power consumption. According to such embodiments, a frequency detector may be implemented as a feedback control loop including a phase error detector, a loop controller, and a digitally controlled oscillator. The frequency detector may detect the fundamental frequency of an input signal and produce an output signal representing the fundamental frequency of the input signal. The frequency detector may further include a filter that may be coupled to the frequency detector output signal in order to remove spurious tones or noise from the output signal. The silicon area and power consumption necessary to implement a frequency detector as a feedback control loop and filter may be less than the area and power consumption required to implement a zero-crossing detector.
(7) As illustrated in
(8) In an embodiment a filter 140 may be implemented to filter the output signal S.sub.OUT. The filter 140 may be configured based on the expected frequency drift of the input signal S1 to filter undesired noise or side-tones from the output signal S.sub.OUT. In a power system application, for example, the frequency of electricity within the power system may drift slowly over long periods of time (e.g., several hours). In such applications, the filter 140 may be configured to filter frequency changes in the output signal S.sub.OUT that may occur quickly over short periods of time (e.g., less than one second).
(9) The frequency detector 100 may find use in applications where the input signal S1 may have an unknown time-varying fundamental frequency. For example, the input signal S1 may be an electric signal having an expected fundamental frequency of 60 Hz. However, its actual fundamental frequency may drift away from 60 Hz over time, for example, drifting to 55 Hz. Determining the fundamental frequency of the input electric signal S1 may be performed to support signal processing calculations with the signal. For example, determining the fundamental frequency of an electric input signal S1 may allow for efficient algorithms to measure the energy present on the signal. In another example, determining the fundamental frequency of an electric input signal S1 may allow for efficient injection of electricity into a power system.
(10) In an embodiment, the frequency detector 100 also may include a multiplexer (MUX) 150 and a controller 160. The controller 160 may generate an initialization signal S.sub.INIT that approximates the expected frequency of the input signals S1. The MUX 150 may have inputs for the loop controller output control signal S.sub.ACCUM and initialization signal S.sub.INIT and may output one of these signals to the DCO 130 via the DCO control signal S.sub.DCO. Selection may be controlled by the controller 160 via the SELECT control signal. The controller may further reset the loop controller 120 running average to zero upon initialization or reset via the reset signal S.sub.RESET.
(11) In an embodiment, the frequency detector 100 may function in two states, an initialization state and an active state. Throughout both states, the frequency detector 100 may operate in a feedback control loop to converge on the fundamental frequency of the input signal S1. Stated another way, the goal of the frequency detector 100 is to minimize the phase error between the input signal S1 and the reference signal S2. To minimize the phase error between the two signals, the frequency detector 100 may self-adjust the frequency of the reference signal S2 by varying the DCO input control signal S.sub.DCO. For example, a positive value input control signal S.sub.DCO may cause the DCO 130 to speed up the frequency of the reference signal S2. Conversely, a negative input control signal S.sub.DCO may cause the DCO 130 to slow down the frequency of the reference signal S2. The range of frequencies that the DCO 130 may generate and the corresponding range of input control signals S.sub.DCO may be system-configurable parameters. As the frequency detector converges and the phase error between the two signals is minimized, the output signal S.sub.OUT may represent the fundamental frequency of the input signal S1.
(12) In order to efficiently converge on the unknown fundamental frequency of the input signal S1, the frequency detector 100 may be initialized to produce a reference signal S2 that is near an expected fundamental frequency of the input signal S1. For example, although a fundamental frequency of an input signal S1 may be at 55 Hz, an initialization signal S.sub.INIT may be input to the system at 60 Hz. Such an initialization signal S.sub.INIT may allow the frequency detector 100 to efficiently converge on the unknown fundamental frequency of the input signal S1 within a short period of time. The frequency detector 100 tolerance for an acceptable initialization signal S.sub.INIT may be a system-configurable feature and relate to the expected fundamental frequency of the input signal S1 and an acceptable convergence time for the frequency detector 100.
(13) The initialization and active states may be distinguished by which signal, S.sub.ACCUM or S.sub.INIT, may set the DCO control signal S.sub.DCO values. For the initialization state, S.sub.INIT may set the DCO control signal S.sub.DCO values. During the active state, the loop controller output control signal S.sub.ACCUM may set the DCO control signal S.sub.DCO values. Thus, various embodiments may be envisioned for determining which signal (S.sub.ACCUM or S.sub.INIT) drives the DCO frequency.
(14) In an embodiment, the controller 160 may activate the MUX 150 to select either the S.sub.INIT or the S.sub.ACCUM signal to set the DCO control signal S.sub.DCO values. At initialization, the controller 160 may reset the loop controller 120 running average to zero via the reset signal S.sub.RESET. This may clear any residual values that may have been stored in the loop controller 120 from prior frequency detections and may cause the loop controller output control signal S.sub.ACCUM to equal zero.
(15) Further, the controller 160 may activate the MUX 150 to select the initialization signal S.sub.INIT to set the DCO control signal S.sub.DCO n values. The DCO 130, in turn, may seed the frequency detector 100 with a reference signal S2 near the expected fundamental frequency of the input signal S1. Next, the phase error detector 110 may compare the phase alignment between the input signal S1 and the reference signal S2 and generate an output error signal S.sub.ERROR based on this comparison. The phase error comparison may indicate if the reference signal S2 phase is leading or lagging the input signal S1 phase by calculating the difference between the phase of the signal. For example, the phase error detector may receive an input signal S1 with a 55 Hz frequency and a reference signal S2 with a 60 Hz frequency. In this case, the reference signal S2 frequency may be leading the input signal S1 frequency by 5 Hz (i.e., 60 Hz55 Hz=5 Hz). The phase error detector 110 output error signal S.sub.ERROR, therefore, might represent a positive phase error value and indicate that the frequency of the reference signal S2 should be slowed down accordingly.
(16) After the frequency detector 100 is initialized, the loop controller 120 may begin to build a running average of successive phase error signals S.sub.ERROR. In various embodiments, the controller 160 may activate the MUX 150 to select the loop controller output control signal S.sub.ACCUM to set the DCO control signal S.sub.DCO values after either a predetermined time period or a check for non-zero values of the loop controller output control signal S.sub.ACCUM. In an embodiment, a switch may be implemented and controlled by the controller 160 to select an appropriate signal to set the DCO control signal S.sub.DCO values. In another embodiment, a mixer may be implemented to set the DCO control signal S.sub.DCO values and the controller 160 may enable and disable the S.sub.INIT and S.sub.ACCUM values to the mixer based on the appropriate state. In selecting the loop controller output control signal S.sub.ACCUM to set the DCO control signal S.sub.DCO values, the frequency detector 100 may transition into the active state. Similar to the initialization state, the frequency detector 100 may operate in the active state to minimize the phase error between the input signal S1 and the reference signal S2. As the frequency detector 100 converges on the fundamental frequency of the input signal S1, the output signal S.sub.OUT may represent the fundamental frequency of the input signal S1.
(17) In another embodiment, the controller 160 may further compare the frequency of the frequency detector output signal S.sub.OUT with the expected frequency of the input signal S1. If the frequency of S.sub.OUT diverges significantly from the expected frequency of the input signal S1, the controller 160 may reinitialize the frequency detector 100. The controller 160 may reset the loop controller 120 running average back to zero via the reset signal S.sub.RESET and activate the MUX 150 to select the initialization signal S.sub.INIT to set the DCO control signal S.sub.DCO values. Thus, the DCO 130 may re-seed the frequency detector 100 with a reference signal S2 near the expected frequency of the input signal S1 and the frequency detector 100 convergence process may restart. The limits that the two signals may diverge may be a system-configurable feature.
(18) Because the frequency detector 100 operates to converge on the fundamental frequency of the input signal S1 rather than count each zero-level crossing of the input signal, a system implementing a frequency detector 100 need only sample the input signal S1 at a rate sufficient to provide an accurate representation of the input signal S1. In comparison, a zero-crossing detector must sample the input signal S1 at a rate much faster than the input signal frequency in order to detect each and every instance that the input signal S1 amplitude equals the zero-level amplitude. Thus, a frequency detector 100 operating at a much slower sampling rate than a zero-crossing detector may draw less power than a similarly situated zero-crossing detector.
(19) Furthermore, a frequency detector 100 may be minimally affected by noise or spurious artifacts present on an input signal S1. As noted, the frequency detector loop controller 120 may operate to accumulate a running average of the phase error between the input signal S1 and the reference signal S2. Therefore, even if a single sample of the input signal contains an instantaneous spur, the effect of that single sample on the accumulated average of phase error signals may be minimal. Any noise present on an input signal S1 may merely result in a longer convergence time for the frequency detector 100, but the frequency detector should still converge on the fundamental frequency of the input signal S1. Thus, the frequency detector 100 may not require any pre-filtering or signal conditioning for the input signal S1 and may therefore be implemented within a reduced silicon area compared to a similarly situated zero-crossing detector.
(20)
(21) As frequency detector operation 200 continues in this looping manner, the estimate may converge on the fundamental frequency of the input signal S1. The frequency estimate may be output for further processing (block 250). In an embodiment, the output frequency estimate may be filtered to remove spurious tones or noise (block 260).
(22) As illustrated in
(23) In an energy measurement system 300, an electric signal 340 from a power system 310 may flow through a meter system 320 to a house 330. An embodiment of a meter system 320 may include a frequency detector 322, a controller 324, and an energy meter 326. The electric signal 340 may be coupled to both the frequency detector 322 and the energy meter 326. The frequency detector 322 may detect the fundamental frequency of the input electric signal and may output a signal F.sub.OUT with a frequency locked to the fundamental frequency. The controller 324 may receive the frequency detector output signal F.sub.OUT and may generate an output signal F.sub.REPORT representing a report of the fundamental frequency and harmonic frequency characteristics. The energy meter 326 may further receive the controller output and use the report to calculate the power usage of the house 330 as the electric signal 340 flows through the energy meter to the house 330.
(24) As illustrated in
(25) In a power generation system 400, an electric signal 430 from a power system 410 may flow into a generator system 420. An embodiment of a generator system 420 may include a frequency detector 422, a controller 424 and a generator driver 426. The input electric signal 430 flowing into the generator system 420 may be coupled to the frequency detector 422. The frequency detector 422 may detect the fundamental frequency of the input electric signal and may output a signal F.sub.OUT with a frequency locked to the fundamental frequency. The controller 424 may receive the frequency detector output signal F.sub.OUT and generate an output control signal F.sub.CONTROL that may tune the generator driver 440 to inject generated electricity 440 back into the power system 41 at the fundamental frequency (and phase) of the electricity present in the power system 410. In various embodiments, the generator driver 440 may be a hydrocarbon, a photovoltaic, a hydroelectric, or a wind power generator. Even as the fundamental frequency of the electricity in the power system 410 may drift over time, the frequency detector 422 may keep the frequency of the generated electricity 450 locked to the drifting fundamental frequency of electricity in the power system 410.
(26)
(27) Through each of the successive feedback control loops of the frequency detector 500, a phase error detector 520 may compare the phase of the input signal S1 with the reference signal S2 to generate successive phase error signals S.sub.ERROR. Each successive phase error signal S.sub.ERROR may be input to the loop controller 510 wherein the loop controller may operate on the phase error signal S.sub.ERROR to produce an output control signal S.sub.ACCUM. The loop controller output signal S.sub.ACCUM may be coupled to a digitally controlled oscillator (DCO) 530. Each successive loop controller output control signal S.sub.ACCUM may drive the DCO 530 to update the frequency of the reference signal S2 to minimize the phase error between the input signal S1 and the reference signal S2. The loop controller 510 may drive the frequency detector 500 to minimize phase error through successive calculations that may account for the phase error of the present phase error comparison, the past phase error comparisons, or the anticipated phase comparisons.
(28) In an embodiment, the loop controller 510 may include a multiplier 512. The multiplier 512 may multiply S.sub.ERROR by a proportional gain control value G.sub.P to generate a proportional output signal S.sub.P. The proportional output signal S.sub.P may represent a phase error estimate of the current phase error comparison. A multiplier 512 may be implemented to reduce each current phase error comparison in proportion to its instantaneous value.
(29) In another embodiment, the loop controller 510 may include an integrator 514. The integrator 514 may integrate successive phase error comparisons generated by the phase error detector 520. The integrator 514 may apply a gain control value G.sub.I to each new integration value to generate an integrated output signal S.sub.I. The integrator output signal S.sub.I may represent the past phase error of successive phase error comparisons. An integrator 514 may be implemented to slowly drive the phase error between the input signal S1 and the reference signal S2 toward zero by minimizing the cumulative error of each successive phase error comparison as it changes with each updated frequency of the reference signal S2.
(30) In yet another embodiment, the loop controller 510 may include a derivative calculator 516. The derivative calculator 516 may calculate the rate of change between successive phase error comparisons. The derivative calculator 516 may apply a gain control value G.sub.D to each rate of change value to produce a derivative output signal S.sub.D. A derivative calculator 516 may be implemented to speed up the rate that the frequency detector 500 converges on the fundamental frequency of the input signal S1 by anticipating the next phase error comparison that may result from the present calculation of the loop controller output control signal S.sub.ACCUM.
(31) In various embodiments, the input phase error signal S.sub.ERROR may be applied to any implementation of the multiplier 512, the integrator 514, and the derivative 516 combination in common. A loop controller 510 implemented in such a manner may be termed a proportional, integrator, derivative (PID) loop controller. Each operation may have its own respective gain control value G.sub.P, G.sub.I, and G.sub.D that may be used to weight the respective multiplier, integrator, and derivative 512, 514, 516 output signals S.sub.P, S.sub.I, and S.sub.D. A summation 518 may then sum each implemented output signal S.sub.P, S.sub.I, and S.sub.D to produce an output control signal S.sub.ACCUM that updates the frequency of the reference signal S2 through successive feedback control loops. In an embodiment, the gain control values G.sub.P, G.sub.I, and G.sub.D may be hard-coded in the loop controller 510. In another embodiment, the gain control values G.sub.P, G.sub.I, and G.sub.D may be communicated to the loop controller 510 by a controller 540.
(32) The rate at which the frequency detector 500 may converge upon the phase of the input signal S1 may be based on several factors including: the signal characteristics of the input signal S1 including any noise that may be present on the signal, the implementation of at least one of the multiplier 512, the integrator 514, and the derivative 516, and their respective gain control values, G.sub.P, G.sub.I, and G.sub.D.
(33) In a power system environment, for example, electricity from the power system may be particularly noisy. Signal spikes and harmonics may be induced from transmission lines and switching devices in the system. However, the fundamental frequency of electricity present in the system may drift slowly within a prescribed tolerance of an expected fundamental frequency for the system (e.g., 60 Hz for US residential power systems). In such environments, implementing the multiplier and integrator 512, 514 may provide an appropriate frequency detector 500 convergence time rather than further implementing the derivative 516.
(34) In such power system applications, the multiplier 512 may be implemented to induce a loop controller 510 response that reacts quickly to the slow frequency changes of an electric input signal S1 thus, decreasing the convergence time of the frequency detector 500. However, the multiplier 512 may produce an output signal S.sub.P that never fully drives the frequency detector 500 to converge on the phase of the electric input signal S1. Rather, the multiplier 512 may instead produce an output signal S.sub.P that is constantly offset from the input signal S1 by a factor corresponding to the proportional gain control value G.sub.P. Thus, the integrator 514 may be implemented to compensate for the offset induced by the multiplier operation 512 and fully drive the phase error between the electric input signal S1 and the reference signal S2 to zero. The response time of the integrator 514 may be determined by the integrator gain control value G.sub.I. Implementing the integrator 514 without the multiplier 512 may not be beneficial because it reacts slowly to frequency changes and thus, may not be able to keep up with both the frequency changes in the electric input signal S1 and the updating frequency changes in the reference signal S2.
(35) If the electric input signal S1 were noiseless or had very little noise, the derivative 516 could further be implemented in the loop controller 510. The derivative 516 may be useful because it reacts quickly to fast frequency changes and serves to minimize both the inherently slow response of the integrator 514 and the offset induced by the multiplier 512. However, the inherent sensitivity of the derivative 516 to fast frequency changes makes it equally sensitive to high frequency noise that may be present on the electric input signal S1. When high frequency noise is present on the electric input signal S1, the derivative 516 may produce an output signal S.sub.D that erroneously attempts to minimize the effects of the high frequency noise rather than the responses of the multiplier and integrator 512, 514 and thus may introduce instability into the frequency detector 500. Further, because the fundamental frequency of electricity within a power system may change slowly over time, a frequency detector 500 implemented in such a system may not require the derivative 516 to efficiently converge on the fundamental frequency of an electric input signal S1.
(36) It follows that a loop controller 510 with multiplier and integrator 512, 514 may be implemented in a frequency detector 500 to efficiently detect the fundamental frequency of electricity within a power system. As discussed, the respective gain control values G.sub.P and G.sub.I for the multiplier and integrator 512, 514 may be hard-coded within the loop controller 510 or set by the controller 540. These values may be tuned based on the expected input signal frequency and the desired convergence time for the frequency detector 500 to converge on the fundamental frequency of electricity within a power system.
(37)
(38) Through each of the successive feedback control loops of the frequency detector 600, a phase error detector 620 may compare the phase of the input signal S1 with the reference signal S2 to generate successive phase error signals S.sub.ERROR. Each successive phase error signal S.sub.ERROR may be input to a loop controller 610 wherein the loop controller may operate on the phase error signal S.sub.ERROR to produce an output signal S.sub.ACCUM. The loop controller output control signal S.sub.ACCUM may be coupled to a digitally controlled oscillator (DCO) 630. Each successive loop controller output control signal S.sub.ACCUM may drive the DCO 630 to update the frequency of the reference signal S2 to minimize the phase error between the input signal S1 and the reference signal S2. The reference signal S2 frequency may lock onto the input signal S1 frequency. When it does, the loop controller output control signal S.sub.ACCUM may represent the fundamental frequency of the input signal S1.
(39) A loop controller 610 may include a level controller 612, a divider 614, and a counter 616. The level controller 612 may receive the phase error signal S.sub.ERROR. The level controller 612 may be configured with various threshold levels and may associate the magnitude of the input phase error signal S.sub.ERROR within a certain threshold level. Each threshold level may have an associated a divider control number N.sub.1-N.sub.N representing a real number. The level controller 612 may have an output control signal DIV CTRL to set the divider control number N.sub.1-N.sub.N for the divider 614. The level controller 612 may further negate the sign of the input phase error signal S.sub.ERROR before outputting the signal to the divider 614. The divider 614 may divide the sign inverted phase error signal S.sub.ERROR by a level-associated divider control number N.sub.N and output a signed real number S.sub.DIV to the counter 616. The counter 616 may accumulate successive divisions from the divider 614 to output a loop controller output control signal S.sub.ACCUM representing a cumulative frequency error between the input signal S1 and the reference signal S2.
(40) The rate at which the frequency detector 600 may converge upon the phase of the input signal S1 may be based on the frequency range that the input signal S1 may be expected to drift across. For example, a frequency detector in a power system application may have a level controller configured with three threshold levels covering a range of +/5 Hz for a 10 Hz expected frequency drift of the input signal S1 (i.e., 55 Hz to 65 Hz). Each threshold level may be configured to correspond a magnitude (unsigned value) of the frequency difference between the input signal S1 and the reference signal S2. For example, the level detector 612 may be configured with a first threshold level covering an error range of 0-1 Hz, a second threshold level covering an error range of 1-3 Hz, and a third threshold level covering an error range of 3-5 Hz.
(41) The level controller 612 in the present example may be further configured to associate a divider control number N.sub.1-N.sub.3 with each of the three threshold levels. For example, a frequency difference in the range of the first threshold level (i.e., 0-1 Hz) may require a fine frequency adjustment as opposed to frequency difference in the range of the third threshold level (i.e., 3-5 Hz) that may require a more coarse frequency adjustment. Thus, a divider control number for the first level may be set with N.sub.1=4 (providing finer adjustments), while a divider control number for the third level may be set with N.sub.3=2 (providing coarser adjustments). After the level detector 612 determines an appropriate threshold level for a phase error value, it may negate the sign for the phase error signal S.sub.ERROR before driving the signal into the divider 614. Recall that a positive phase error difference may correspond to the reference signal S2 frequency leading the input signal S1 frequency. This, in turn, may require that the reference signal S2 frequency generated from the DCO 630 needs to be slowed down. Thus, the sign of the loop controller output control signal S.sub.ACCUM may be negated with respect to the sign of the phase error signal S.sub.ERROR.
(42) Next, the divider 614 may receive the sign negated phase error signal S.sub.ERROR and divide the signal by a divider control number N.sub.N as set by the level controller 612 to generate an output signal S.sub.DIV representing a proportional value of the instantaneous phase error. The counter 616 may receive the divider output signal S.sub.DIV and, through successive feedback control loops, maintain a cumulative phase estimate of the input signal S1 as compared to the reference signal S2. When the frequencies of the two signals converge, the phase error difference between the two signals may be minimized. At convergence, the counter 616 may produce a phase error estimate S.sub.ACCUM that is phase locked with the fundamental frequency of the input signal S1. The output signal S.sub.OUT may represent the fundamental frequency of the input signal S1.
(43) The level controller 612 may also include a feature that increments the divider control number N.sub.1 associated with the first threshold level for successive phase error signals S.sub.ERROR that fall within the first threshold level (i.e., N.sub.1=4 for the first pass through the loop, N.sub.1=5 for the second pass, etc). The effect of incrementing the divider control number N.sub.1 may be to provide finer frequency adjustments of the reference signal S2 when the frequency difference between the two signals remains within the first threshold level through successive feedback control loops. However, if a phase error signal S.sub.ERROR from a successive loop jumps outside the range of the first level threshold, the level counter 612 may reset the divider control number N.sub.1 associated with the first threshold level to its initial value.
(44) Further, the level controller 612 may also reset the cumulative value stored in the counter 616 to zero should the phase error signal S.sub.ERROR suddenly jump from, say, the first threshold level to the third threshold level after having been settled in the first threshold level for a predetermined period of time. Such a jump in threshold levels might indicate a system glitch or an interruption in the input signal S1 and therefore the cumulative value of the counter 616 may need to be reset. The criteria for determining when the counter 616 may be reset may be a system-configurable feature. The range of threshold levels and each divider control number N.sub.1-N.sub.N associated with a threshold level may also be a system-configurable feature. Finally, the increment range for the first threshold level control number N.sub.1 as well as the increment amount for this number (either whole number or fractional increments) may also be a system-configurable feature.
(45) As illustrated in
(46) In a motor control system 700, an electric signal 760 may flow into a control system 710. An embodiment of a control system 710 may include a frequency detector 720, a controller 730, and a motor driver 740. The electric signal 760 may flow into the control system 710 and may be coupled to the motor driver 740. The motor driver 740 may supply electricity to a motor 750 via a voltage control signal V.sub.CONTROL. By increasing or decreasing the frequency of the voltage control signal V.sub.CONTROL, the motor driver 740 may increase or decrease the motor 750 speed. To control the precise speed of the motor 750, the frequency of the motor stator windings may be monitored by the frequency detector 720 via a motor frequency signal F.sub.MOTOR. The frequency detector 720 may detect the fundamental frequency of motor frequency signal F.sub.MOTOR, and may output a signal F.sub.OUT with a frequency locked to that fundamental frequency. In turn, the controller 730 may receive the frequency detector output signal F.sub.OUT and may generate a frequency control word F.sub.CONTROL that may tune the motor driver 740 to adjust the motor 750 speed to a desired speed by changing the frequency of the voltage control signal V.sub.CONTROL.
(47) Several embodiments of the present invention are specifically illustrated and described herein. However, it will be appreciated that modifications and variations of the present invention are covered by the above teachings and within the purview of the appended claims without departing from the spirit and intended scope of the invention.