Patent Description:
Service providers utilize distributed networks to provide services to customers over large geographic areas. For example, power companies use power distribution lines to carry power from one or more generating stations (power plants) to residential and commercial customer sites. The generating stations use alternating current (AC) to transmit power over long distances via the power distribution lines. Long-distance transmission can be accomplished using a relatively high voltage. Substations located near the customer sites provide a step-down from the high voltage to a lower voltage (e.g., using transformers). Power distribution lines carry this lower-voltage AC from the substations to the endpoint devices customer sites.

Typically, electronic energy meters are installed at customer sites to monitor energy consumption by customers. Electronic energy meters track the amount of energy consumed by customers, typically measured in kilowatt-hours ("kWh"). The service provider uses the energy consumption information for billing and other purposes such as resource allocation forecasting.

Analog-to-digital converters (ADC) are typically used to convert analog signals coming from the power distribution lines to digital signals to be processed further. When the sampling rate of an ADC is not an integer multiple of the line frequency of the power distribution lines, the calculation of energy measurements becomes complicated because compensation for fractional portions is needed.

Additionally, even if the sampling rate of an ADC is designed to be an integer multiple of the line frequency, the line frequency may deviate from its nominal value. The line frequency is typically <NUM> or <NUM>, but it is not uncommon for the line frequency to deviate from the nominal line frequency. For instance, the allowable range for <NUM> is ±<NUM>%, that is <NUM> to <NUM>. The line frequency jitter makes it even harder to have a sampling rate of an ADC that is an integer multiple of the line frequency. The prior art article <NPL>, discloses an arrangement for measuring power distribution system quantities, involving non-coherent sampling and digitizing of voltages/currents, and estimating a fundamental line frequency value for use in setting resampling parameters in order to provide coherently resampled signals for further processing.

Therefore, there is a need for resampling techniques that can facilitate simplified, accurate, and efficient energy measurements and are independent of ADC sampling rate and immune to the line frequency jitter.

Certain aspects and features include a system and method for converting the sampling rate of a power signal.

In accordance with one aspect of the disclosure, a method of processing power signals is provided. The method includes the following operations: receiving an analog poly-phase signal associated with power delivered using alternating current (AC), the analog poly-phase signal having at least one current component and at least one voltage component comprising a reference voltage component; converting, using an analog to digital converter (ADC), the analog poly-phase signal to a digital poly-phase signal sampled at a first sampling rate; detecting a fundamental frequency of the analog poly-phase signal based on the digital poly-phase signal; determining a second sampling rate, wherein the second sampling rate is based on and tracks the fundamental frequency; resampling the digital poly-phase signal at the second sampling rate; for each cycle of the resampled digital poly-phase signal: transforming the resampled digital poly-phase digital signal to a frequency-domain signal using Fast Fourier Transformation (FFT); calculating a phase angle of the reference voltage component based on the frequency-domain signal; adjusting the resampled digital poly-phase signal by compensating the calculated phase angle; and transforming the adjusted resampled digital poly-phase signal to an updated frequency-domain signal using FFT; and calculating one or more measurements based on the updated frequency-domain signal.

In accordance with another aspect of the disclosure, a device connected to a power distribution network is provided. The device includes sensing circuitry configured to receive an analog poly-phase signal associated with power delivered using alternating current (AC) over the power distribution network, wherein the analog poly-phase signal having at least one current component and at least one voltage component comprising a reference voltage configured to store the computer-readable instructions that, when executed by the processor, cause the processor to perform the following operations: converting, using an analog to digital converter (ADC), the analog poly-phase signal to a digital poly-phase signal sampled at a first sampling rate; detecting a fundamental frequency of the analog poly-phase signal based on the digital poly-phase signal; determining a second sampling rate, wherein the second sampling rate is based on and tracks the fundamental frequency; resampling the digital poly-phase signal at the second sampling rate; for each cycle of the resampled digital poly-phase signal: transforming the resampled digital poly-phase signal to a frequency-domain signal using Fast Fourier Transformation (FFT); calculating a phase angle of the reference voltage component based on the frequency-domain signal; adjusting the resampled digital poly-phase signal by compensating the calculated phase angle; and transforming the adjusted resampled digital poly-phase signal to an updated frequency-domain signal using FFT; and calculating one or more measurements based on the updated frequency-domain signal.

In accordance with yet another aspect of the disclosure, an electronic energy meter is provided. The electronic energy meter includes a sensor configured to receive an analog poly-phase signal associated with power delivered using alternating current (AC) over a power distribution network, the analog poly-phase signal having at least one current component and at least one voltage component comprising a reference voltage component; an analog to digital converter (ADC) configured to convert the analog poly-phase signal to a digital poly-phase signal sampled at a first sampling rate; and a power signal processing unit connected to the ADC. The power signal processing unit is configured to: detect a fundamental frequency of the analog poly-phase signal based on the digital poly-phase signal; determine a second sampling rate, wherein the second sampling rate is based on and tracks the fundamental frequency; resample the digital poly-phase signal at the second sampling rate; for each cycle of the resampled digital poly-phase signal: transform the resampled digital poly-phase signal to a frequency-domain signal using Fast Fourier Transformation (FFT); calculate a phase angle of the reference voltage component based on the frequency-domain signal; adjust the resampled digital poly-phase signal by compensating the calculated phase angle; and transform the adjusted resampled digital poly-phase signal to an updated frequency-domain signal using FFT; and calculate one or more measurements based on the updated frequency-domain signal.

These illustrative examples are mentioned not to limit or define the disclosure, but to provide examples to aid understanding thereof. Additional examples and further description are provided in the Detailed Description.

These and other features, aspects, and advantages of the present disclosure are better understood when the following Detailed Description is read with reference to the accompanying drawings, where:.

Aspects of the present invention relate to sampling rate conversion techniques for energy metering. In accordance with some aspects of the disclosure, an analog poly-phase signal is received by an ADC, and the analog poly-phase signal has, for example, three voltage components (e.g., phase A line voltage, phase B line voltage, and phase C line voltage) and three current components (e.g., phase A line current, phase B line current, and phase C line current). Among the voltage components and the current components, the phase A line voltage is used as a reference (sometimes referred to as a "reference channel") in one implementation.

A fundamental frequency detector detects a fundamental frequency (i.e., the line frequency) of the analog poly-phase signal based on the sampled digital poly-phase signal. The output sampling rate of a sampling rate converter (also referred to as a "resampler") is then determined based on the fundamental frequency. The output sampling rate tracks the fundamental frequency such that the output sampling rate is independent of the ADC sampling rate and immune to the line frequency jitter. The sampling rate converter then resamples the digital poly-phase signal. In one implementation, the resampling operation is based on two signal processing operations, namely an interpolation operation and a decimation operation. During the interpolation operation, the sampling rate is up-converted to a higher sampling rate; during the decimation operation, the higher sampling rate is downconverted to the output sampling rate, which tracks the fundamental frequency, as mentioned above. In one example, the sampling rate converter is implemented by using a poly-phase resampler which includes a poly-phase filter bank. A Fast Fourier Transform (FFT) bank then transforms the resampled poly-phase digital signal to a frequency-domain signal. A metering measurement calculator calculates a phase angle of the reference voltage component (e.g., the phase A line voltage). The calculated phase angle is sent to the sampling rate converter as feedback, and the resampled digital poly-phase signal is adjusted based on the calculated phase angle. In one implementation, the zero-crossing of the reference voltage component is locked to the first sample for each cycle of the resampled digital signal. As such, there is a phase lock loop, and the resampled digital poly-phase signal is phase-locked. After the resampled digital poly-phase signal is phase-locked, the metering measurement calculator can calculate various measurements based on the frequency-domain signal. Details of the aspects mentioned above will be described below with reference to <FIG>. As will be explained below, the sampling rate conversion techniques can facilitate simplified, accurate, and efficient energy measurements and are independent of ADC sampling rate and immune to the line frequency jitter.

<FIG> is a diagram illustrating an example environment in which an example power signal processing unit <NUM> operates. The power signal processing unit <NUM> is connected, either directly or indirectly, to an ADC <NUM>, which receives an input signal, either directly or indirectly, from power distribution lines. In one implementation, the input signal is an analog poly-phase signal, and the ADC <NUM> converts the analog poly-phase signal to a digital poly-phase signal. In one example, the input signal is an analog three-phase signal. In another example, the input signal is an analog two-phase signal. Although the analog three-phase signal is used as an example throughout the disclosure, it is not intended to be limiting. In some implementations, a compensation and adjustment unit <NUM> is coupled between the ADC <NUM> and the power signal processing unit <NUM>. The compensation and adjustment unit <NUM> is for calibration and temperature adjustment of the digital signal sampled by the ADC <NUM>. The power signal processing unit <NUM> is configured to process the digital poly-phase signal received from the ADC <NUM> and output various metering measurements such as voltage, current, and/or energy measurements. In the example shown in <FIG>, the power signal processing unit <NUM> includes, among other things, a fundamental frequency detector <NUM>, a sampling rate converter <NUM>, a Fast Fourier Transformation (FFT) bank <NUM>, and a metering measurement calculator <NUM>. It should be noted that the power signal processing unit <NUM> may also include other components in other implementations.

As mentioned above, the ADC <NUM> receives and converts the analog poly-phase signal to the digital poly-phase signal, which is sampled at a first sampling rate (also referred to as the "ADC sampling rate") FADC. In one implementation, the ADC <NUM> is connected to sensing circuitry, which is configured to receive the analog poly-phase signal k. In one implementation, the ADC <NUM> is connected to a sensor, which is configured to receive the analog poly-phase signal associated with power delivered using AC. As explained above, the analog poly-phase signal has at least one current component and at least one voltage component, one of which is a reference voltage component (e.g., phase A line voltage). In one example, the ADC sampling rate FADC is <NUM>. Other ADC sampling rates may be employed in other examples.

The digital poly-phase signal is further fed to the fundamental frequency detector <NUM>, which detects a fundamental frequency (i.e., the line frequency) FL of the analog poly-phase signal based on the converted digital poly-phase signal. In one implementation, the fundamental frequency detector <NUM> includes a band-pass filter and a zero-crossing detector, details of which will be described below with reference to <FIG>.

After the fundamental frequency FL is detected, the fundamental frequency FL is fed to the sampling rate converter <NUM>, and a second sampling rate (also referred to as the "output sampling rate") Fs is determined. The output sampling rate Fs is based on and tracks the fundamental frequency FL. When the fundamental frequency FL deviates from its nominal value, the output sampling rate FS adjusts proportionally. Thus, the output sampling rate FS is frequency-locked to the fundamental frequency FL. In other words, the power signal processing unit <NUM> includes a frequency lock loop <NUM> as shown in <FIG>. In one implementation, the output sampling rate Fs is an integer multiple of the fundamental frequency FL. Details of the output sampling rate Fs will be described below.

The sampling rate converter <NUM> also receives the digital poly-phase signal output by the ADC <NUM> (after being processed by the compensation and adjustment unit <NUM> in some implementations). The sampling rate converter <NUM> then resamples the digital poly-phase signal at the output sampling rate FS. Therefore, the digital poly-phase signal is converted from the ADC sampling rate FADC to the output sampling rate FS. The resampling ratio R is FS/FADC. In one implementation, the resampling process carried out by the sampling rate converter <NUM> includes, among other operations, the interpolation (also referred to as "up-sampling") operation and the decimation (also referred to as "down-sampling") operation, as mentioned above. In one implementation, the resampling process carried out by the sampling rate converter <NUM> is by using a poly-phase resampler having a poly-phase filter bank. Details of the interpolation operation, the decimation operation, and the poly-phase resampler will be described below with reference to <FIG>.

The FFT bank <NUM> receives and transforms the resampled digital poly-phase signal (after being buffered) to a frequency-domain signal using FFT. In one implementation, the FFT is performed in six channels (i.e., three voltage channels corresponding to three voltage components and three current channels corresponding to three current components) simultaneously. In one implementation, the FFT includes an N-point Discrete Fourier Transform (DFT). Details of the FFT bank and the transformation operations will be described below.

The metering measurement calculator <NUM> receives the frequency-domain signal and is capable of calculating voltage, current, and/or energy measurements such as DC voltage measurements, DC current measurements, fundamental RMS squared measurements, fundamental phase measurements, fundamental watt measurements, and the like. Among other things, a phase angle of the reference voltage component (e.g., the phase A line voltage) can be calculated. The resampled digital signal is then adjusted by compensating the calculated phase angle. In one implementation, the calculated phase angle is converted to a delta sample. After the adjustment using the calculated phase angle, the zero-crossing of the reference voltage component (e.g., the phase A line voltage) is phase-locked to a fixed location in the output sampling stream, while all other voltage components (e.g., the phase B line voltage and the phase C line voltage) and current components (e.g., the phase A line current, the phase B line current, and the phase C line current) are phase-adjusted along with the reference channel such that all channels are phase-locked together. As such, the power signal processing unit <NUM> has a phase lock loop <NUM> as shown in <FIG>. In one implementation, the phase angle is calculated and used for adjusting the resampled digital poly-phase signal for each cycle of the resampled digital poly-phase signal.

Subsequently, the adjusted resampled digital poly-phase signal, after being phase-locked, is transformed to an updated frequency-domain signal by the FFT bank <NUM>. Then, the metering measurement calculator <NUM> can calculate one or more measurements based on the updated frequency-domain signal. Details of the phase lock loop <NUM> will be described below.

<FIG> is a flowchart diagram illustrating an example method <NUM> of processing power signals. The example method <NUM> can be implemented based on, for example, the power signal processing unit <NUM> shown in <FIG>. It should be understood that, in some implementations, one or more of the steps described in <FIG> may be performed in a different order. Additionally, in some implementations, a method may include more or fewer steps than are described in <FIG>.

At step <NUM>, an analog poly-phase signal associated with power delivered using AC is received. In some implementations, the analog poly-phase signal has multiple current components and multiple voltage components, one of which is a reference voltage component. At step <NUM>, the analog poly-phase signal is converted to a digital poly-phase signal sampled at the ADC sample rate FADC using the ADC <NUM>.

At step <NUM>, the fundamental frequency FL of the analog poly-phase signal is detected based on the digital poly-phase signal. Details of the detection of the fundamental frequency FL will be described below with reference to <FIG>. At step <NUM>, the output sampling rate Fs is determined. The output sampling rate FS is based on and tracks the fundamental frequency FL.

At step <NUM>, the digital poly-phase signal is resampled at the output sampling rate FS. As mentioned above, the resampling operation may include the interpolation operation and the decimation operation in some implementations. In one implementation, the resampling process is implemented by using a poly-phase resampler having a poly-phase filter bank. Details of the interpolation operation, the decimation operation, and the poly-phase resampler will be described below with reference to <FIG>.

For each cycle of the resampled digital poly-phase signal, the resampled digital poly-phase signal is transformed to a frequency-domain signal using FFT at step <NUM>. In one implementation, the FFT includes an N-point Discrete Fourier Transform (DFT). Details of the FFT bank and the transformation operations will be described below. At step <NUM>, a phase angle of the reference voltage component (e.g., the phase A line voltage) is calculated based on the frequency-domain signal. At step <NUM>, the resampled digital poly-phase signal is then adjusted by compensating the calculated phase angle. In one implementation, the calculated phase angle is converted to a delta sample. After the adjustment using the calculated phase angle, the zero-crossing of the reference voltage component (e.g., the phase A line voltage) is phase-locked to a fixed location in the output sampling stream. At step <NUM>, the adjusted resampled digital poly-phase signal, after being phase-locked, is transformed to an updated frequency-domain signal. Details of steps <NUM>, <NUM>, <NUM>, and <NUM> will be described below.

At step <NUM>, one or more measurements are calculated based on the updated frequency-domain signal. Details of step <NUM> will be described below.

<FIG> is a flowchart diagram illustrating an example of step <NUM> shown in <FIG>. <FIG> is a diagram illustrating an example implementation <NUM> of the fundamental frequency detector <NUM> shown in <FIG>. In the example shown in <FIG>, the fundamental frequency detector <NUM> includes, among other things, an input voltage peak detector <NUM>, a switch <NUM>, a band-pass filter <NUM>, and a zero-crossing detector <NUM>. The input voltage peak detector <NUM> receives the reference voltage component Vref (e.g., the phase A line voltage) from the ADC <NUM>. The input voltage peak detector <NUM> detects peaks of the reference voltage component Vref. When the peaks are below the minimum peak voltage threshold (indicating a poor quality), the switch <NUM> is turned off based on a switch-off signal generated by the input voltage peak detector <NUM>, and the detection is turned off. As such, the detection of the fundamental frequency is disabled when the reference voltage component does not have good quality. Otherwise, the switch <NUM> is turned on, and the reference voltage component Vref is fed to the band-pass filter <NUM>.

Zero-crossing detection is very sensitive to noise and waveform distortions. Therefore, it is beneficial to apply the reference voltage component Vref to a band-pass filter before zero-crossing detection. In the example shown in <FIG>, the reference voltage component Vref signal is applied to the band-pass filter <NUM> to remove frequency components outside the passband of the band-pass filter <NUM> (step <NUM> shown in <FIG>). In one implementation, the band-pass filter <NUM> is an <NUM>th order elliptic biquadratic band-pass filter. <FIG> is a diagram illustrating an example <NUM>th order elliptic biquadratic band-pass filter <NUM>. <FIG> is a diagram illustrating one biquadratic filter used in the example <NUM>th order elliptic biquadratic band-pass filter <NUM> shown in <FIG>. The <NUM>th order elliptic biquadratic band-pass filter <NUM> includes four biquadratic filters <NUM>, <NUM>, <NUM>, and <NUM> in cascade. In other words, the output of the first stage biquadratic filter <NUM> becomes the input to the second stage biquadratic filter <NUM>, the output of the second stage biquadratic filter <NUM> becomes the input to the third stage biquadratic filter <NUM>, and so forth. For each of the four biquadratic filters <NUM>, <NUM>, <NUM>, and <NUM>, the difference equation has the following form: <MAT> where: a<NUM> and a<NUM> are coefficients that determine the positions of the poles, and b<NUM>, b<NUM>, and b<NUM> are coefficients that determine zeros. In one example, the coefficients for each stage are shown in the table below.

<FIG> is a diagram illustrating the frequency response <NUM> of the <NUM>th order elliptic biquadratic band-pass filter <NUM> shown in <FIG>. As shown in <FIG>, the <NUM>th order elliptic biquadratic band-pass filter <NUM> is centered about <NUM>, with a <NUM> dB bandwidth of <NUM>. The <NUM>th order elliptic biquadratic band-pass filter <NUM> removes all integer multiples of <NUM> and <NUM> below <NUM> or above <NUM>. As such, the <NUM>th order elliptic biquadratic band-pass filter <NUM> reduces the noise bandwidth and eliminates all harmonic and inter-harmonic components, thereby producing a pure sinusoidal reference voltage component Vref signal, which is fed to the zero-crossing detector <NUM>.

<FIG> is a diagram illustrating an example interpolation operation <NUM> using the zero-crossing detector <NUM> shown in <FIG>. As shown in <FIG>, a linear interpolation at the zero-crossings of the reference voltage component Vref signal is used to derive a very accurate measure of the cycle period. Two adjacent zero-crossings are detected (step <NUM> shown in <FIG>). In the example shown in <FIG>, there is a zero-crossing <NUM> between the Sample <NUM> and the Sample <NUM>, and there is a zero-crossing <NUM> between the Sample m-<NUM> and the Sample m. The sample counter is initialized to Δn<NUM> and not incremented by one when the zero-crossing <NUM> is detected. At the next zero-crossing <NUM>, the sample counter has increased by m-<NUM> sample counts. Δnm-<NUM> and Δn<NUM> are added to the sample counter (i.e., m-<NUM>) to calculate the cycle period <NUM>. Thus, the cycle period <NUM> in non-integer multiple of samples is in the following form: <MAT> Accordingly, the fundamental frequency FL can be calculated based on the two adjacent zero-crossings (step <NUM> shown in <FIG>). The fundamental frequency FL is calculated as follows: <MAT>.

Once the fundamental frequency FL is detected, the output sampling rate Fs is determined (step <NUM> shown in <FIG>). As explained above, the output sampling rate Fs is frequency-locked to the fundamental frequency FL. In one implementation, the fundamental frequency FL is the average FL over an instantaneous measurement interval (e.g., <NUM> milliseconds). The fundamental frequency FL is dynamically detected by the fundamental frequency detector <NUM>, and using the average FL over an instantaneous measurement interval can cancel out random fluctuations.

In one implementation, the output sampling rate Fs is an integer multiple of the fundamental frequency FL. The output sampling rate Fs is determined according to the following equation: <MAT> where: N is an integer larger than one. In some implementations, N is a power of <NUM> (i.e., <NUM>m). In one example, m = <NUM>, and the output sampling frequency is <NUM>FL.

A single line cycle is often not an integer multiple of samples, but a number of line cycles may be. Thus, in another implementation, an integer number of samples are specified over a specific number of line cycles. In one example, this condition is met in a <NUM> millisecond time span. This is accomplished by first finding a number of line cycles in the <NUM> milliseconds period: NLC = round(<NUM>FL). NLC is a maximum integer number of line cycles in a predetermined time period (e.g., <NUM> milliseconds). The actual delta time is Δt = <MAT>, which resides in the interval between <NUM> milliseconds and <NUM> milliseconds, given that the line frequency is bounded by the interval between <NUM> and <NUM>. In one implementation, the output sampling rate FS can be set according to <MAT>. In one example, m is <NUM>, and the output sampling rate FS is <MAT>. In another example, m is <NUM>, and the output sampling rate FS is <MAT>.

The digital poly-phase signal is then resampled at the output sampling rate Fs (step <NUM> as shown in <FIG>). As shown in <FIG>, the sampling rate converter <NUM> resamples the digital poly-phase signal at the output sampling rate FS, and the resampling ratio R is FS/FADC. The sampling rate converter <NUM> changes the sampling rate of the digital signal while preserving, as closely as possible, the information contained in the digital poly-phase signal.

As explained above, the resampling process may be based on two operations, namely the interpolation operation and the decimation operation. The digital poly-phase signal is first up-sampled by a factor of L. L is an integer greater than one. The up-sampled digital poly-phase signal is then down-sampled by a factor of M. M is chosen according to M = LFADC/FS. Therefore, after the interpolation operation and the decimation operation, the sampling rate of the digital poly-phase signal is the output sampling rate Fs.

In one implementation, the interpolation operation involves up-sampling by inserting L-<NUM> zeros between two adjacent samples in the digital poly-phase signal and filtering out, using an image rejection filter, the images of the signal spectrum at integer multiples of the ADC sampling rate FADC. The images result from the sampling process conducted by the ADC <NUM>. In one implementation, the decimation operation involves applying an anti-aliasing filter to the sample stream to prevent aliasing, followed by selecting every Mth sample. Both the image rejection filter and the anti-aliasing filter are low-pass filters and can be implemented as finite impulse response (FIR) filters. Each of them can be designed at the up-sampling frequency LFADC. In one implementation, they can be combined by convolving the two impulse responses together. In one example, the sampling rate converter <NUM> has one primary <NUM>-tap FIR filter for the interpolation operation and the decimation operation. In one example, the FIR filter used has <NUM> dB of ripple in its passband and contributes virtually no distortion across the spectrum of the digital poly-phase signal. In addition, since the FIR filter (with symmetric kernels) is a linear-phase filter across the spectrum, it attributes no distortion to the phase of the digital poly-phase signal.

As explained above, the up-sampled digital poly-phase signal is then down-sampled by a factor of M. M is chosen according to M = LFADC/FS. In general, M is a floating-point number. Decimation by a non-integer number is challenging because a sample out of the decimator does not necessarily come out at a fixed number of cycles of the ADC clock.

In the process described above, a convolution of the image rejection filter with the up-sampled digital poly-phase signal is needed. However, only a small portion of the convolution is performed on non-zero samples. Due to the nature of the interpolation operation, only one sample out of every L samples is actually multiplied with a filter coefficient. For example, for a <NUM>-tap image rejection filter, <NUM> filter coefficients are multiplied with zeros, and only eight filter coefficients are multiplied with non-zero values. Performing convolutions on mostly zeros can be improved to increase efficiency. Also, the sum of the multiplication results is further convolved with the anti-aliasing filter, and the result is further decimated. In other words, many samples are convolved but eventually thrown away in the subsequent decimation operation.

Therefore, in another implementation, a poly-phase resampler having a poly-phase filter bank is used to address the above-mentioned challenges of decimation by a non-integer number and provides further efficiency improvement. <FIG> is a diagram illustrating an example sampling rate converter <NUM> shown in <FIG>. The sampling rate converter <NUM> includes, among other things, a delay line <NUM>, a poly-phase filter bank <NUM>, and a poly-phase filter bank de-multiplexer <NUM>. The sampling rate converter <NUM> receives the digital poly-phase signal from the ADC <NUM>.

The above-mentioned image rejection filter and the anti-aliasing filter are combined into one filter since they are in cascade. A bank of L sub-filters are created from the original FIR filter. In the example of <NUM>-tap FIR filter, when L is <NUM>, <NUM> sub-filters are created, and each sub-filter has eight taps. In the example shown in <FIG>, the bank of <NUM> sub-filters is designated as the poly-phase filter bank <NUM>. Since interpolation filtering uses every <NUM>nd filter coefficient in the convolution to produce a single sample in the up-sampled sample stream. That is, only eight taps are needed for any sample instance. Thus, the poly-phase filter bank <NUM> is in the following form: <MAT> It should be noted that the original FIR filter is unity gain at the interpolation rate LFADC. The condition for the original FIR filter to be unity gain is defined as: <MAT>. When a sub-filter is applied, it also needs to hold to this condition in order to properly scale the output sample, i.e., to keep the amplitude of the output signal at unity gain. Therefore, each sub-filter hi needs to be normalized by the inverse of the sum of its coefficients as follows: Nk = <MAT>.

Each sub-filter hi, in the poly-phase filter bank <NUM>, is offset in time with respect to the interpolation rate LFADC, by <MAT>, i = <NUM>,. There are L (<NUM> in this example) interpolated samples per ADC sample. Each hi represents the interpolation function for a particular time (also a particular phase) of the interpolated waveform.

The delay line <NUM> includes seven delay line shift register <NUM>. A sample xn is clocked out of the ADC <NUM> and into the delay line <NUM>. A new sample is shifted onto the delay line <NUM> and the oldest sample is shift off. In the example shown in <FIG>, the delay line <NUM> has a constraint length of <NUM>, corresponding to eight taps, though other constraint lengths could be employed in other examples. As such, eight samples xn, xn-<NUM>, xn-<NUM>, xn-<NUM>, xn-<NUM>, xn-<NUM>, and xn-<NUM> are fed to eight multipliers <NUM>, respectively.

The delay line <NUM> is clocked at the ADC sampling rate FADC, and the output commutator <NUM> is clocked at the output sampling rate <MAT>. No part of the sampling rate converter <NUM> is clocked at the interpolated rate of LFADC. In the example shown in <FIG>, it should be noted that the output sampling rate Fs is lower than the ADC sampling rate FADC.

In addition, the decimation phase pn is also clocked with each ADC sample (i.e., at the ADC sampling rate FADC). For every ADC clock cycle, pn is incremented by <NUM> modulo MIL (i.e., the re-sampling factor) using the adder <NUM> and the modulo operator <NUM>, and pn+<NUM> is generated. As explained above, M/L is often a floating-point number. In one example, M/L = FADC/(<NUM>*FL), let FL = <NUM>, FADC = <NUM>, then M/L = <NUM>. Accordingly, pn+<NUM> can be calculated according to: pn+<NUM> = ModM/L (pn+<NUM>) = Mod<NUM> (pn+<NUM>).

Subsequently, pn and pn+<NUM> enter a comparator <NUM>. If pn+<NUM> < pn, the decimation phase has wrapped, and it's time to output a sample (i.e., the switch <NUM> is closed). The switch <NUM> switches at the rate of FADC/(M/L). The decimation phase at this instance is smaller than <NUM>. The decimation phase pn+<NUM> explicitly contains the information on which sub-filter hi is to be selected from the poly-phase filter bank <NUM>. By multiplying pn+<NUM> by L and taking the floor, using the multiplier <NUM> and the floor operator <NUM>, respectively, the sub-filter index hindex is determined.

The sub-filter index hindex is an input into the poly-phase filter bank de-multiplexer <NUM>, which shifts the sub-filter coefficients into the coefficient registers <NUM>. In the example shown in <FIG>, the poly-phase filter de-multiplexer <NUM> has shifted h<NUM>=(B<NUM>, B<NUM>, B<NUM>, B<NUM>, B<NUM>, B<NUM>, B<NUM>, B<NUM>) into the coefficient registers <NUM> in eight taps, respectively, along with the normalizer N<NUM>.

The comparator <NUM> also causes the switch <NUM> to close so that the multiply accumulation is performed on the delay line <NUM> and the coefficient registers <NUM>. The results of eight taps are added by the adders <NUM> before being multiplied by the normalizer N<NUM> to keep the output at unity gain. The falling edge of the current ADC clock opens the switches <NUM> for the multiplier <NUM>, the floor operator <NUM>, and the poly-phase filter bank <NUM>.

The resampled digital poly-phase signal is transformed to a frequency-domain signal using FFT (step <NUM> shown in <FIG>). The FFT bank <NUM> receives and transforms the resampled digital poly-phase signal to a frequency-domain signal using FFT. FFT is an algorithm for computing the N-point DFT with a computational complexity of O(NDlogND), where ND is the data size. In one implementation, the FFT is performed in six channels (i.e., three voltage channels corresponding to three voltage components and three current channels corresponding to three current components) simultaneously. In one implementation, the FFT includes an N-point Discrete Fourier Transform (DFT). In one example, the N-point DFT is a <NUM>-point DFT.

In one implementation, a real FFT algorithm can be employed, where a real time-domain signal {x<NUM>, x<NUM>, x<NUM>,. , xn-<NUM>} of length <NUM>m (in some examples, m = <NUM>, <NUM>, or <NUM>), and is transformed to the frequency domain {X-k/<NUM>, X-k/<NUM>+<NUM>, X-k/<NUM>+<NUM>,. , X<NUM>, X<NUM>,. , Xk/<NUM>-<NUM>} which has the same length as time-domain sequence {x}. The value of each element of {X} is a complex number. In other words, real data goes in and complex data comes out of the real FFT algorithm. The signal x(n) is sampled at the ADC sampling rate FADC, and the time represented by each index n in x(n) is n/FADC. On the other hand, the index n of the sequence{X} represents a set of frequencies, kFADC/<NUM>m. It should be noted that there are negative indices for the frequency domain sequence {X}. These are complex images of the positive frequency axis. For a real FFT algorithm, only half of the data is unique. Therefore, only half of the data is used.

In one example, the output sampling rate FS is <NUM>*FL. If a <NUM>-point real FFT is performed on a time-domain sequence with this output sampling rate Fs, every frequency component of the real FFT is a harmonic of the fundamental frequency FL.

The real FFT algorithm integrates over time, but correlates x(n) during this integration with a particular frequency as follows: <MAT> Conventionally, the output of the FFT is scaled by <NUM>/N, however, the results of the real FFT are split between two images, each with half of the total magnitude. Since the output of the real FFT contains N/<NUM> components, it doesn't produce the redundant image out of efficiency. Therefore, it needs to be scaled by <NUM>/N, to account for the missing half. Also, the magnitudes at each frequency bin are in peak magnitudes. To convert the magnitude of each component to RMS, it is scaled by <MAT>. Therefore, the real FFT scaling used is <MAT>.

The time-domain data out of the ADC <NUM> that has been ordered into a six-dimensional vector (corresponding to six channels) as follows: <MAT> where: uk ≡ (Phase-A voltage, Phase-B voltage, Phase-C voltage), and ik ≡ (Phase-A current, Phase-B current, Phase-C current). The Fourier transform of a buffer of length <NUM>m of ej is as follows: <MAT> This can be shown in the table below as follows:.

In one implementation, these <NUM> Fourier transforms shown in Table <NUM> are performed within high-performance real-time engine <NUM>-bit microcontrollers such as RX71M. It should be understood that this is not intended to be limiting.

Once the frequency-domain signal is obtained, phase angles between the reference voltage component and other components are calculated based on the frequency-domain signal. Various instantaneous measurements made by the electronic energy meter can be derived by the following operation: <MAT> This represents the complex outer product of Ei with its complex conjugate. This outer product yields a <NUM> × <NUM> matrix with elements each having <NUM>m-<NUM> frequency components. This is a symmetric matrix, so half of the components are redundant. Various measurements, including (fundamental) phase angles, made by the electronic energy meter can be derived from this matrix. Phase angles between the reference voltage component (e.g., the phase A line voltage) and other components can be calculated as follows: <MAT>.

The phase angle of the reference voltage component is, therefore, calculated based on the frequency-domain signal (step <NUM> shown in <FIG>). The resampled digital poly-phase signal is then adjusted by compensating the calculated phase angle (step <NUM> shown in <FIG>). The waveform data stream out of the sampling rate converter <NUM> is buffered into a data structure <NUM> that includes <NUM> samples for each channel, as shown in <FIG>. There are six channels, corresponding to three voltage components and three current components, in the example shown in <FIG>. Sample-<NUM> is the oldest, and Sample-<NUM> is the newest sample in time. It is desirable to lock the zero-crossing of the reference voltage component (phase A line voltage in this example) to Sample-<NUM> within this waveform data stream.

The phase lock loop <NUM> is implemented after Sample-<NUM> enters the waveform data stream. In one implementation, the calculated phase angle is converted to a delta sample □n by multiplying the phase angle by <NUM>/<NUM>□□□□At this point, the interpolation sample phase Pn is adjusted by this delta sample according to the following: <MAT> When the delta sample □n ranges from -<NUM> to <NUM>, the interpolation sample phase Pn is adjusted by the calculated delta sample □n; otherwise, the interpolation sample phase Pn is adjusted by one sample instead of the calculated delta sample □n. As such, the adjustment to Pn is by no more than one sample in the positive or negative direction in any event to avoid a huge jump in the waveform.

The adjusted resampled digital poly-phase signal is transformed to an updated frequency-domain signal using FFT (step <NUM> shown in <FIG>). After the adjustment using the calculated phase angle, the zero-crossing of the reference voltage component is phase-locked to a fixed location in the output sampling stream, while all other components are phase-adjusted along with the reference voltage component such that all components are phase-locked together. In one implementation, the phase angles are adjusted for each cycle of the resampled digital poly-phase signal.

The metering measurement calculator <NUM> calculates one or more measurements based on the updated frequency-domain signal (step <NUM> shown in <FIG>). As explained above, various measurements made by the electronic energy meter can be derived from the matrix Mij. Some exemplary measurements made by the electronic energy meter are illustrated below. It should be noted that the calculation of other measurements using the matrix Mij is within the scope of the disclosure.

The DC measurements are bin <NUM> of the FFT set Ej(<NUM>). The DC voltages and currents for phase A, phase B, and phase C are as follows: <MAT>.

The fundamental measurements are all contained within bin <NUM> of the FFT measurement matrix: <MAT>. It should be noted that each of the voltages and currents for phase A, phase B, and phase C has its real component and imaginary component in the following form: <MAT>.

For instance, the RMS squared of the fundamental components of the voltages and currents are calculated according to: <MAT>.

By way of example, the fundamental Watt measurements is computed according to: <MAT>.

In another example, the fundamental reactive power is calculated according to: <MAT>.

Any suitable computing system or group of computing systems can be used for performing the operations described herein. For example, <FIG> is a diagram illustrating an example of the computing system <NUM>.

The depicted example of a computing system <NUM> includes a processor <NUM> communicatively coupled to one or more memory devices <NUM>. The processor <NUM> executes computer-executable program code stored in a memory device <NUM>, accesses information stored in the memory device <NUM>, or both. Examples of the processor <NUM> include a microprocessor, an application-specific integrated circuit ("ASIC"), a field-programmable gate array ("FPGA"), or any other suitable processing device. The processor <NUM> can include any number of processing devices, including a single processing device.

A memory device <NUM> includes any suitable non-transitory computer-readable medium for storing program code <NUM> (e.g., the code used for various operations of the sampling rate converter <NUM>), program data <NUM> (e.g., the types of measurement selected to be calculated by the metering measurement calculator <NUM>), or both. A computer-readable medium can include any electronic, optical, magnetic, or other storage devices capable of providing a processor with computer-readable instructions or other program code. Non-limiting examples of a computer-readable medium include a magnetic disk, a memory chip, a ROM, a RAM, an ASIC, optical storage, magnetic tape or other magnetic storage, or any other medium from which a processing device can read instructions. The instructions may include processor-specific instructions generated by a compiler or an interpreter from code written in any suitable computer-programming language, including, for example, C, C++, C#, Visual Basic, Java, Python, Perl, JavaScript, and ActionScript.

The computing system <NUM> executes program code <NUM> that configures the processor <NUM> to perform one or more of the operations described herein. The program code may be resident in the memory device <NUM> or any suitable computer-readable medium and may be executed by the processor <NUM> or any other suitable processor.

In some implementations, one or more memory devices <NUM> stores program data <NUM> that includes one or more datasets described herein. In some implementations, one or more of data sets, models, and functions are stored in the same memory device (e.g., one of the memory devices <NUM>). In additional or alternative implementations, one or more of the programs, data sets, models, and functions described herein are stored in different memory devices <NUM> accessible via a data network. One or more buses <NUM> are also included in the computing system <NUM>. The bus <NUM> communicatively couples one or more components of a respective one of the computing system <NUM>.

In some implementations, the computing system <NUM> also includes a network interface device <NUM>. The network interface device <NUM> includes any device or group of devices suitable for establishing a wired or wireless data connection to one or more data networks. Non-limiting examples of the network interface device <NUM> include an Ethernet network adapter, a modem, and/or the like. The computing system <NUM> is able to communicate with one or more other computing devices via a data network using the network interface device <NUM>.

The computing system <NUM> may also include a number of external or internal devices, such as an input device <NUM>, a presentation device <NUM>, or other input or output devices. For example, the computing system <NUM> is shown with one or more input/output ("I/O") interfaces <NUM>. An I/O interface <NUM> can receive input from input devices or provide output to output devices. An input device <NUM> can include any device or group of devices suitable for receiving visual, auditory, or other suitable input that controls or affects the operations of the processor <NUM>. Non-limiting examples of the input device <NUM> include a touchscreen, a mouse, a keyboard, a microphone, a separate mobile computing device, etc. A presentation device <NUM> can include any device or group of devices suitable for providing visual, auditory, or other suitable sensory output. Non-limiting examples of the presentation device <NUM> include a touchscreen, a monitor, a speaker, a separate mobile computing device, etc..

Although <FIG> depicts the input device <NUM> and the presentation device <NUM> as being local to the computing device, other implementations are possible. For instance, in some implementations, one or more of the input device <NUM> and the presentation device <NUM> can include a remote client-computing device that communicates with the computing system <NUM> via the network interface device <NUM> using one or more data networks.

The features discussed herein are not limited to any particular hardware architecture or configuration. A computing device can include any suitable arrangement of components that provide a result conditioned on one or more inputs. Suitable computing devices include multipurpose microprocessor-based computer systems accessing stored software (i.e., computer-readable instructions stored on a memory of the computer system) that programs or configures the computing system from a general-purpose computing apparatus to a specialized computing apparatus implementing one or more aspects of the present subject matter. Any suitable programming, scripting, or other type of language or combinations of languages may be used to implement the teachings contained herein in software to be used in programming or configuring a computing device.

Aspects of the methods disclosed herein may be performed in the operation of such computing devices. The order of the blocks presented in the examples above can be varied; for example, blocks can be re-ordered, combined, and/or broken into sub-blocks. Certain blocks or processes can be performed in parallel.

Claim 1:
A method (<NUM>) of processing power signals comprising:
receiving (<NUM>) an analog poly-phase signal associated with power delivered using alternating current, AC, the analog poly-phase signal having at least one current component and at least one voltage component comprising a reference voltage component;
converting (<NUM>), using an analog to digital converter, ADC, the analog poly-phase signal to a digital poly-phase signal sampled at a first sampling rate;
detecting (<NUM>) a fundamental frequency of the analog poly-phase signal based on the digital poly-phase signal;
determining (<NUM>) a second sampling rate, wherein the second sampling rate is based on and tracks the fundamental frequency;
resampling (<NUM>) the digital poly-phase signal at the second sampling rate;
for each cycle of the resampled digital poly-phase signal:
transforming (<NUM>) the resampled digital poly-phase digital signal to a frequency-domain signal using Fast Fourier Transformation, FFT;
calculating (<NUM>) a phase angle of the reference voltage component based on the frequency-domain signal;
adjusting (<NUM>) the resampled digital poly-phase signal by compensating the calculated phase angle; and
transforming (<NUM>) the adjusted resampled digital poly-phase signal to an updated frequency-domain signal using FFT; and
calculating (<NUM>) one or more measurements based on the updated frequency-domain signal.