Reply by Rick Lyons July 3, 20052005-07-03
On Sat, 02 Jul 2005 03:48:14 GMT, Al Clark <dsp@danvillesignal.com>
wrote:

  (snipped)
>> >> >> Then, perhaps you should provide the original poster with some >> references that will help him get started. >> >> >> > >A very good discussion on hilbert transforms is in Rick Lyons' book: >Understanding Digital Signal Processing (Second Edition). It is often >available at the local Barnes & Noble or Borders as well as Amazon. > > >-- >Al Clark
Hi Al, Thanks for the plug. If Giuseppe actually buys a copy of my book, I'll send him the errata. Take care Al, [-Rick-]
Reply by Jerry Avins July 2, 20052005-07-02
john wrote:
>>There is no possibility of a real-time RMS reading. >> >>Jerry > > > It depends of the definition of real-time. If the output is permitted > to lag the input, then my defintion of real-time is satisfied. If the > output is not permitted to lag the input, then no sampled data system > is real-time, and for that matter neither is my Fluke true RMS > voltmeter.
Thanks for the correction. I wrote "real time" when I should have written "instantaneous". Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by john July 2, 20052005-07-02
> > There is no possibility of a real-time RMS reading. > > Jerry
It depends of the definition of real-time. If the output is permitted to lag the input, then my defintion of real-time is satisfied. If the output is not permitted to lag the input, then no sampled data system is real-time, and for that matter neither is my Fluke true RMS voltmeter. John
Reply by Giuseppe Sbarra July 2, 20052005-07-02
"Giuseppe Sbarra" <giuseppe_sbarra@tin.it> ha scritto nel messaggio
news:q9exe.101452$75.4536009@news4.tin.it...
> Hi, > I'm an hold analog engineer , actually developing a DSP based application > and I need to change of 90 degrees the phase of a signal on the range of > 50 - 250 Hz aving the system a 200uSec sampling rate. > I have considered the Hilbert FIR filter but for the moment I cannot get
it
> to work not even reducing the sampling rate. > In particular I nedd to phase shift by 90 degrees a signal (voltage)
respect
> to another (current) in order to calculate the instantaneous REACTIVE
power
> by a simple multiplication. > > Any suggestion would be very appreciated. > Thanks everybody >
Hi everybody thanks to the support I received by the NG I have been able to discover a very stupid bug on my implementation, all I need now is the coefficients for a say 67 order Hilbert, cause my tool just reach 35, or some reference to a free tool on the net for the job. Thank you very much again. Giuseppe
Reply by Giuseppe Sbarra July 2, 20052005-07-02
snip ..
> > Hi Erik, > > I already tried this with a number of delay equal to half the order of
the
> > filter, > > is this right? > > With a Hilbert transformer of an odd number of taps, the delay needed > for alignment is available at the middle tap. But I have to remind you > again: there is no such thing as instantaneous reactive power. > Instantaneous quantities don't have phase. > > You can maintain a running sum of products accumulated for the past > period; they will be watts ans VARs. The instantaneous numbers are > meaningless until integrated. > > Jerry > -- > Engineering is the art of making what you want from things you can get. > &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Right, I meant instantaneous product, I have a filter to average the reactive power. Thank Giuseppe
Reply by Jerry Avins July 2, 20052005-07-02
Giuseppe Sbarra wrote:
> "Erik de Castro Lopo" <nospam@mega-nerd.com> ha scritto nel messaggio > news:42C5BF76.D080A3E2@mega-nerd.com... > >>Giuseppe Sbarra wrote: >> >>>Hi, >>>I'm an hold analog engineer , actually developing a DSP based > > application > >>>and I need to change of 90 degrees the phase of a signal on the range of >>>50 - 250 Hz aving the system a 200uSec sampling rate. >>>I have considered the Hilbert FIR filter but for the moment I cannot get > > it > >>>to work not even reducing the sampling rate. >>>In particular I nedd to phase shift by 90 degrees a signal (voltage) > > respect > >>>to another (current) in order to calculate the instantaneous REACTIVE > > power > >>>by a simple multiplication. >> >>If you are using an FIR hilbert transform, you need to remember that >>there is a transport delay in the FIR filter and you need to delay >>the unfiltered version as well. >> >>Erik >>-- > > Hi Erik, > I already tried this with a number of delay equal to half the order of the > filter, > is this right?
With a Hilbert transformer of an odd number of taps, the delay needed for alignment is available at the middle tap. But I have to remind you again: there is no such thing as instantaneous reactive power. Instantaneous quantities don't have phase. You can maintain a running sum of products accumulated for the past period; they will be watts ans VARs. The instantaneous numbers are meaningless until integrated. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Giuseppe Sbarra July 2, 20052005-07-02
"Erik de Castro Lopo" <nospam@mega-nerd.com> ha scritto nel messaggio
news:42C5BF76.D080A3E2@mega-nerd.com...
> Giuseppe Sbarra wrote: > > > > Hi, > > I'm an hold analog engineer , actually developing a DSP based
application
> > and I need to change of 90 degrees the phase of a signal on the range of > > 50 - 250 Hz aving the system a 200uSec sampling rate. > > I have considered the Hilbert FIR filter but for the moment I cannot get
it
> > to work not even reducing the sampling rate. > > In particular I nedd to phase shift by 90 degrees a signal (voltage)
respect
> > to another (current) in order to calculate the instantaneous REACTIVE
power
> > by a simple multiplication. > > If you are using an FIR hilbert transform, you need to remember that > there is a transport delay in the FIR filter and you need to delay > the unfiltered version as well. > > Erik > --
Hi Erik, I already tried this with a number of delay equal to half the order of the filter, is this right? Thank you Giuseppe
Reply by Jerry Avins July 2, 20052005-07-02
.TheGhost wrote:
> Al Clark <dsp@danvillesignal.com> wrote in > news:Xns9686E7F923399aclarkdanvillesignal@66.133.129.71: > > >>".TheGhost" <theghost@google.com> wrote in >>news:rBmxe.28618$1C7.21284@fe12.news.easynews.com: >> >> >>>Jerry Avins <jya@ieee.org> wrote in >>>news:lMWdnZN04tN6e1jfRVn-2Q@rcn.net: >>> >>> >>>>TheGhost. wrote: >>>> >>>>>"Giuseppe Sbarra" <giuseppe_sbarra@tin.it> wrote in >>>>>news:q9exe.101452$75.4536009@news4.tin.it: >>>>> >>>>> >>>>> >>>>>>Hi, >>>>>>I'm an hold analog engineer , actually developing a DSP based >>>>>>application and I need to change of 90 degrees the phase of a signal >>>>>>on the range of 50 - 250 Hz aving the system a 200uSec sampling >>>>>>rate. I have considered the Hilbert FIR filter but for the moment I >>>>>>cannot get it to work not even reducing the sampling rate. >>>>>>In particular I nedd to phase shift by 90 degrees a signal (voltage) >>>>>>respect to another (current) in order to calculate the instantaneous >>>>>>REACTIVE power by a simple multiplication. >>>>>> >>>>>>Any suggestion would be very appreciated. >>>>>>Thanks everybody >>>>>> >>>>> >>>>> >>>>>Wideband 90-degree phase shift networks are used in the phasing >>>>>method of single sideband generation. The network consists of two >>>>>sets of cascaded second-order all-pass sections which maintain a 90 >>>>>degree phase difference to within a specified accuracy over a >>>>>specified bandwidth. An introduction to the design of analog >>>>>90-degree phase shift networks can be found at: >>>>>http://home.att.net/~wa1sov/technical/allpass/allpass.html Once you >>>>>have the pole-zero locations, you should be able to implement the >>>>>filter digitally. >>>> >>>>There are better ways to design a digital all-pass filter pair to >>>>achieve relative quadrature. The best you can do analog over a >>>>decade is about half a degree. With a digital pair you do better than >>>>that over a wider band. >>>> >>>>Jerry >>> >>> >>>Then, perhaps you should provide the original poster with some >>>references that will help him get started. >>> >>> >>> >> >>A very good discussion on hilbert transforms is in Rick Lyons' book: >>Understanding Digital Signal Processing (Second Edition). It is often >>available at the local Barnes & Noble or Borders as well as Amazon. > > > Doesn't the implementation of a Hilbert transform typically involve an FFT > and require a time-domain window? If so, it does not provide an accurate > real-time output such as that obtained by direct digital and/or analog > real-time filtering?
There is no possibility of a real-time RMS reading. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Jerry Avins July 2, 20052005-07-02
Tim Wescott wrote:
> TheGhost. wrote: > >> Tim Wescott <tim@seemywebsite.com> wrote in >> news:11cbep3v3id1d9@corp.supernews.com: >> >>> Pierre de Vos wrote: >>> >>> >>>> "Tim Wescott" <tim@seemywebsite.com> wrote in message >>>> news:11cath1cpvl3i29@corp.supernews.com... >>>> >>>> >>>>> Giuseppe Sbarra wrote: >>>>> >>>>> >>>>> >>>>>> Hi, >>>>>> I'm an hold analog engineer , actually developing a DSP based >>>>>> application and I need to change of 90 degrees the phase of a signal >>>>>> on the range of 50 - 250 Hz aving the system a 200uSec sampling >>>>>> rate. I have considered the Hilbert FIR filter but for the moment I >>>>>> cannot get it >>>>>> to work not even reducing the sampling rate. >>>>>> In particular I nedd to phase shift by 90 degrees a signal (voltage) >>>>>> respect >>>>>> to another (current) in order to calculate the instantaneous >>>>>> REACTIVE power >>>>>> by a simple multiplication. >>>>>> >>>>>> Any suggestion would be very appreciated. >>>>>> Thanks everybody >>>>>> >>>>>> >>>>> >>>>> I'm not sure why your hilbert transform wouldn't be working so I >>>>> can't comment on it. >>>>> >>>>> On the other hand, if you were to compute the RMS value of the >>>>> voltage and current and compute the mean power then the reactive >>>>> "power" should be >>>>> Vrms * Irms - real power. >>>>> >>>>> That's how I'd do it. >>>>> >>>> >>>> Surely that is'nt true >>>> >>>> V*I=S=sqrt(P^2 +Q^2) >>>> so >>>> reactive power = Q = sqrt(S^2 - P^2) >>>> >>> >>> Well, I'll be dipped in shaving cream. Thank you for finding my >>> error. >>> It's still an easier calculation than the Hilbert Transform, though. >>> >>> ------------------------------------------- >>> Tim Wescott >>> Wescott Design Services >>> http://www.wescottdesign.com >> >> >> >> >> You also missed the stipulation that a calculation of instantaneous >> power was required. >> > Reactive power cannot be truely instantaneous since it involves current > flowing when voltage is zero and visa-versa, AND a hilbert transform > does a healthy amount of time-domain smearing. > > For the measurement to have any meaning, whether done by Hilbert > transform or my suggested method, there will have to be either real or > implicit averaging done. > > But you are correct, and the OP needs to think about what he really meant.
Instantaneous power can be positive or negative, but it is always real. It is the product of instantaneous voltage and instantaneous current; both real. "Instantaneous reactive power" is not defined, nor is RMS power. Real and reactive power are quantities obtained by averaging over complete cycles of the fundamental. Neither instantaneous voltages nor currents are associated with a phase. Consider: i_C (current through a capacitor) = C*dv/dt Let v = sin(wt); then i = C*cos(wt) By definition, Z = v/i For a capacitor, Z = sin(wt)/c*cos(wt) = tan(wt)/C Ignore the distinction between RMS and instantaneous quantities only at peril. Z doesn't equal v/i. It equals V/I. I should have picked this up sooner. Sorry! Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Al Clark July 2, 20052005-07-02
".TheGhost" <theghost@sbcglobal.net> wrote in
news:qeoxe.26918$4g1.25678@fe11.news.easynews.com: 

> Al Clark <dsp@danvillesignal.com> wrote in > news:Xns9686E7F923399aclarkdanvillesignal@66.133.129.71: > >> ".TheGhost" <theghost@google.com> wrote in >> news:rBmxe.28618$1C7.21284@fe12.news.easynews.com: >> >>> Jerry Avins <jya@ieee.org> wrote in >>> news:lMWdnZN04tN6e1jfRVn-2Q@rcn.net: >>> >>>> TheGhost. wrote: >>>>> "Giuseppe Sbarra" <giuseppe_sbarra@tin.it> wrote in >>>>> news:q9exe.101452$75.4536009@news4.tin.it: >>>>> >>>>> >>>>>>Hi, >>>>>>I'm an hold analog engineer , actually developing a DSP based >>>>>>application and I need to change of 90 degrees the phase of a >>>>>>signal on the range of 50 - 250 Hz aving the system a 200uSec >>>>>>sampling rate. I have considered the Hilbert FIR filter but for >>>>>>the moment I cannot get it to work not even reducing the sampling >>>>>>rate. In particular I nedd to phase shift by 90 degrees a signal >>>>>>(voltage) respect to another (current) in order to calculate the >>>>>>instantaneous REACTIVE power by a simple multiplication. >>>>>> >>>>>>Any suggestion would be very appreciated. >>>>>>Thanks everybody >>>>>> >>>>> >>>>> >>>>> Wideband 90-degree phase shift networks are used in the phasing >>>>> method of single sideband generation. The network consists of two >>>>> sets of cascaded second-order all-pass sections which maintain a >>>>> 90 degree phase difference to within a specified accuracy over a >>>>> specified bandwidth. An introduction to the design of analog >>>>> 90-degree phase shift networks can be found at: >>>>> http://home.att.net/~wa1sov/technical/allpass/allpass.html Once >>>>> you have the pole-zero locations, you should be able to implement >>>>> the filter digitally. >>>> >>>> There are better ways to design a digital all-pass filter pair to >>>> achieve relative quadrature. The best you can do analog over a >>>> decade is about half a degree. With a digital pair you do better >>>> than that over a wider band. >>>> >>>> Jerry >>> >>> >>> Then, perhaps you should provide the original poster with some >>> references that will help him get started. >>> >>> >>> >> >> A very good discussion on hilbert transforms is in Rick Lyons' book: >> Understanding Digital Signal Processing (Second Edition). It is often >> available at the local Barnes & Noble or Borders as well as Amazon. > > Doesn't the implementation of a Hilbert transform typically involve an > FFT and require a time-domain window? If so, it does not provide an > accurate real-time output such as that obtained by direct digital > and/or analog real-time filtering? > > >
No, it is usually done with an antisymetric FIR. It is convenient to use an odd length FIR for this purpose so that the real part can be obtained by a grabbing the middle tap of the FIR delay line. You are certainly correct in that an FFT can be used for this purpose. It just is usually way more complicated than necessary. The catch to the FIR method is that the imaginary part is constructed by a bandpass filter. You want the signal of interest to be in the passband. This means that the length needs to be long if the desired signal is either near DC or near f/2. This makes intuitive sense if you consider the required length of a filter to delay DC by 90 degrees. If I remember the details of the orginal post, the length of the FIR filter for this application should be fairly small provided that fs is not too high. -- Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com