Hello, could somebody give me an advice? At the moment I am solving interesting problem. I have been using SW PLL with SOGI circuit to obtain grid frequency since April and I have to say I am very happy, it works very well. Accuracy is two decimal places. But my chief said me last week, we will need to measure some changes (= first derivative, signal trend) of resulting frequency soon. At first I used derivative with filtration from: http://www.wseas.us/e-library/conferences/2007cscc/papers/561-186.pdf, but it works very slowly and the calculated value is unstable - so I had to implement moving average filter to smooth it. And secondly, I tested some methods for numerical derivatives, but without positive result. Did somebody solve something of the sort? Any tricks to improve it? Thanks! P.S.: I am sorry, my English is very bad :-(.

# Derivative of signal

Started by ●June 6, 2013

Posted by ●June 6, 2013

On Thu, 06 Jun 2013 02:11:53 -0500, "Mimar" <94571@dsprelated> wrote:>Hello, > >could somebody give me an advice? At the moment I am solving interesting >problem. I have been using SW PLL with SOGI circuit to obtain grid >frequency since April and I have to say I am very happy, it works very >well. Accuracy is two decimal places. But my chief said me last week, we >will need to measure some changes (= first derivative, signal trend) of >resulting frequency soon. At first I used derivative with filtration from: >http://www.wseas.us/e-library/conferences/2007cscc/papers/561-186.pdf, but >it works very slowly and the calculated value is unstable - so I had to >implement moving average filter to smooth it. And secondly, I tested some >methods for numerical derivatives, but without positive result. Did >somebody solve something of the sort? Any tricks to improve it?Mimar, The calculation of the derivative of a real-world signal is always going to involve a compromise, as you have already seen. The theoretical definition of a derivative is the limit of calculations of rates of change over smaller and smaller intervals of time. In the real world it is not practical to measure changes over arbitrarily short time intervals. The noise (both additive and quantization) become more and more of a factor as the time interval decreases. So practical real-world derivatives must be based on some finite span of time. That is where the compromise comes in. You want to make that time span shorter to make the calculation responsive and quick. But you can't make it too short or else the noise in the signal makes the resulting calculation too noisy. You are doing the right thing in using a moving average. You will just have to find out how much averaging you need to achieve the accuracy you want. There is no magic solution. Robert Scott Hopkins, MN

Posted by ●June 6, 2013

On Thu, 06 Jun 2013 02:11:53 -0500, Mimar wrote:> Hello, > > could somebody give me an advice? At the moment I am solving interesting > problem. I have been using SW PLL with SOGI circuit to obtain grid > frequency since April and I have to say I am very happy, it works very > well. Accuracy is two decimal places. But my chief said me last week, we > will need to measure some changes (= first derivative, signal trend) of > resulting frequency soon. At first I used derivative with filtration > from: > http://www.wseas.us/e-library/conferences/2007cscc/papers/561-186.pdf, > but it works very slowly and the calculated value is unstable - so I had > to implement moving average filter to smooth it. And secondly, I tested > some methods for numerical derivatives, but without positive result. Did > somebody solve something of the sort? Any tricks to improve it? > > Thanks! > > P.S.: I am sorry, my English is very bad :-(.First: Your written English is a lot better than some engineers who are supposedly native English speakers, and it's a lot better than by best 2nd language. So don't apologize. Second: Derivatives, trends, etc., are problematic. Derivatives enhance high frequency content, and thus they enhance noise. Your "it works very slowly and the calculated value is unstable" is symptomatic of this issue. If I were in your shoes the first thing that I would want to do is to take the instantaneous frequency command going to the PLL oscillator and write it out a serial port, preferably every time the loop updated. I'd capture that into a text file then I'd take it back to my nice comfortable desk and I'd work on it there with Scilab or some other good analysis tool. The first thing I'd do is try to get the power spectral density of the signal while the PLL is tracking a known-steady AC wave. This would give me an idea of the measurement noise, which will, in turn, put a lower limit on the best-case "fast and stable" reading that I could expect to get out of the frequency trend (note that in this case "fast" and "stable" are working against each other -- to get fast you need a wider bandwidth, to get stable you need less. "Instantaneous and dead quiet" is impossible unless you can get your measurement noise down). Then I might experiment with various algorithms on that data. This will go a lot quicker than cutting and trying on an embedded app, and if you're careful about how you go about it you'll be able to take whatever result you like and put it into the embedded app. After that I'd consult with my boss to figure out if he can settle for slow and stable, fast and jumpy, or time spent flogging the phase measurement noise down. Third: By definition you're going to end up with a transfer function that (z - 1) in the numerator. Your job is to find the best low-pass filter to follow that (z - 1) term with. Whether it is an IIR filter, a FIR filter, a moving average (which should maybe have the title "Worst FIR Lowpass Ever") or some combination will come out of your experimentation. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com

Posted by ●June 6, 2013

On 6/6/2013 2:11 AM, Mimar wrote:> could somebody give me an advice?Put nonlinear peak-clipping function after the differentiator before averaging. //------------- Q: Why it is impossible to have sex in Red Square in Moscow ? A: Because every bystander idiot would be trying to give his invaluable advice. Vladimir Vassilevsky DSP and Mixed Signal Designs www.abvolt.com

Posted by ●June 6, 2013

On Thu, 06 Jun 2013 14:56:01 -0500, Vladimir Vassilevsky wrote:> On 6/6/2013 2:11 AM, Mimar wrote: > > >> could somebody give me an advice? > > > Put nonlinear peak-clipping function after the differentiator before > averaging.And hope that it actually works. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com

Posted by ●June 6, 2013

On Thursday, June 6, 2013 7:11:53 PM UTC+12, Mimar wrote:> Hello, > > > > could somebody give me an advice? At the moment I am solving interesting > > problem. I have been using SW PLL with SOGI circuit to obtain grid > > frequency since April and I have to say I am very happy, it works very > > well. Accuracy is two decimal places. But my chief said me last week, we > > will need to measure some changes (= first derivative, signal trend) of > > resulting frequency soon. At first I used derivative with filtration from: > > http://www.wseas.us/e-library/conferences/2007cscc/papers/561-186.pdf, but > > it works very slowly and the calculated value is unstable - so I had to > > implement moving average filter to smooth it. And secondly, I tested some > > methods for numerical derivatives, but without positive result. Did > > somebody solve something of the sort? Any tricks to improve it? > > > > Thanks! > > > > P.S.: I am sorry, my English is very bad :-(.You could design a simple control loop with an integrator in the feedback path. This will give you band-limited differentiation ie a slope of 6dB/octave.

Posted by ●June 7, 2013

On 6/6/2013 3:31 PM, Tim Wescott wrote:> On Thu, 06 Jun 2013 14:56:01 -0500, Vladimir Vassilevsky wrote: > >> On 6/6/2013 2:11 AM, Mimar wrote: >> >> >>> could somebody give me an advice? >> >> >> Put nonlinear peak-clipping function after the differentiator before >> averaging. > > And hope that it actually works. >Of course it does. By nature of the problem, power frequency can't change fast. There could be jerks of phase though. BTW, such an old whore like you could suggest something more fun then a page of truisms and bla-bla-bla. VLV

Posted by ●June 7, 2013

On 6/6/2013 4:11 PM, gyansorova@gmail.com wrote:> On Thursday, June 6, 2013 7:11:53 PM UTC+12, Mimar wrote: >> >> could somebody give me an advice? At the moment I am solving >> interesting problem. I have been using SW PLL with SOGI circuit to >> obtain grid frequency> > You could design a simple control loop with an integrator in the > feedback path. This will give you band-limited differentiation ie a > slope of 6dB/octave.Good point. As the OP is using PLL, the output of phase detector is derivative of frequency. VLV

Posted by ●June 8, 2013

On 6/7/2013 12:56 PM, Vladimir Vassilevsky wrote:> On 6/6/2013 4:11 PM, gyansorova@gmail.com wrote: >> On Thursday, June 6, 2013 7:11:53 PM UTC+12, Mimar wrote: >>> >>> could somebody give me an advice? At the moment I am solving >>> interesting problem. I have been using SW PLL with SOGI circuit to >>> obtain grid frequency > > >> >> You could design a simple control loop with an integrator in the >> feedback path. This will give you band-limited differentiation ie a >> slope of 6dB/octave. > > Good point. As the OP is using PLL, the output of phase detector is > derivative of frequency. > > VLVOn 6/7/2013 12:56 PM, Vladimir Vassilevsky wrote: > On 6/6/2013 4:11 PM, gyansorova@gmail.com wrote: >> On Thursday, June 6, 2013 7:11:53 PM UTC+12, Mimar wrote: >>> >>> could somebody give me an advice? At the moment I am solving >>> interesting problem. I have been using SW PLL with SOGI circuit to >>> obtain grid frequency > > >> >> You could design a simple control loop with an integrator in the >> feedback path. This will give you band-limited differentiation ie a >> slope of 6dB/octave. > > Good point. As the OP is using PLL, the output of phase detector is > derivative of frequency. > > VLV It still needs filtering. Digital approximations to derivatives come in many forms. The simplest and most intuitive is simply y[n]=x[n-1]-x[n]. For many applications, y[n]=.5(x[n-2]-2.c[n-1]+x[n]) is better. The cost is an extra clock of latency. Rick Lyons improves on that with two more delay terms and the corresponding extra latency. I'm not certain that I'm at liberty to provide more details. I expect that he will. Jerry -- Engineering is the art of making what you want from things you can get. ����������������������������������������������������������������������� -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������

Posted by ●June 8, 2013

On 6/7/2013 10:21 AM, Vladimir Vassilevsky wrote: > On 6/6/2013 3:31 PM, Tim Wescott wrote: >> On Thu, 06 Jun 2013 14:56:01 -0500, Vladimir Vassilevsky wrote: >> >>> On 6/6/2013 2:11 AM, Mimar wrote: >>> >>> >>>> could somebody give me an advice? >>> >>> >>> Put nonlinear peak-clipping function after the differentiator before >>> averaging. >> >> And hope that it actually works. >> > > Of course it does. By nature of the problem, power frequency can't > change fast. There could be jerks of phase though. > > BTW, such an old whore like you could suggest something more fun then a > page of truisms and bla-bla-bla. Good Lord, Vlad! Some of us get used to your excesses, but you seem to have gotten more extreme during my absence. Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

Posted by ●June 22, 2013

On Thu, 20 Jun 2013 15:53:32 -0700, robert bristow-johnson <rbj@audioimagination.com> wrote: [Snipped by Lyons]>> >> so Rick, is it considered "good" that your differentiator gainstarts to>> dive toward zero after you get to pi/4 (or 1/2 Nyquist)? it seems to me >> that the simple forward difference differentiator does much better in >> that regard.Hi Robert, Well, one characteristic of the forward difference differentiator is that it amplifies high frequency noise. So my differentiator's response goes to zero at Fs/2 to eliminate that characteristic. (Fs is the sample rate in Hz.) I always get confused when people use the term "Nyquist" when referring to frequency. I'm often unsure of what they mean. Above you equate pi/4 to 1/2 Nyquist. It seems to me that pi --> Fs/2, pi/2 --> Fs/4, and pi/4 --> Fs/8.>> >> i am in need of a decent differentiator and when i think of applying the >> bilinear transform (BLT) directly to the problem: >> >> H(z) = 2*(1 - z^-1)/(1 + z^-1) >> >> because of BLT frequency warping, the gain shoots up to +inf at Nyquist >> (small wonder since there is a pole directly on z=-1), which is too much >> correction (the opposite problem of Rick's differentiator).Yep, that transfer function makes for a great oscillator at Fs/2.>>i would >> really like to do this with a first order filter and i think if we can >> just back off on that nasty quasi-stable pole: >> >> H(z) = 2*(1 - z^-1)/(1 - p*z^-1) >> >> we can get something that might work pretty good. pole p would be close >> to -1, but clearly inside the unit circle. >> >> has anyone tried this (the latter transfer function) and what value of p >> had you used? >> >> please get back in a hurry to prevent me from re-inventing the wheel. if >> i end up reinventing the blankity-blank wheel, i'll tell you how round i >> got it to be. >> > >okay, so i got this wheel (actually 2 of them). > >if you use the simple transfer function above (the scaling of 2 doesn't >matter, comes from the BLT), i figgered out that if you want the gain at >Nyquist to be exactly twice the gain at half Nyquist, you want the pole >p to be at p = -0.267949192.For p = -0.267949192 I get: Freq: Gain: Fs/2 5.464 Fs/4 2.732 Fs/8 1.27> >or, if you want the gain at 1/2 Nyquist to be exactly twice the gain at >1/4 Nyquist, then the pole should be p = -0.694566677 .For p = -0.694566677 I get: Freq: Gain: Fs/2 13.1 Fs/4 2.32 Fs/8 0.975>i like the latter one the best. it looks pretty good. > >gee, i wish some bright undergrad EE student that doesn't have anything >to do, if he/she would've done this for us and save me time. it can >still be generalized a little where we can come up for an expression of >p that preserves this double-the-gain-for-doubling-the-frequency >relationship for an arbitrary frequency between 0 and pi/2. it would be >nice if someone might do that and report the results, because i ain't gonna. > >L8r,See Ya, [-Rick-] No. 6: "Where am I?" No. 2: "In the Village." No. 6: "What do you want?" No. 2: "Information." No. 6: "Who are you?" No. 2: "I am the new No. 2." No. 6: "Who is No. 1?" No. 2: "You are No. 6." No. 6: "I am not a number. I am a free man!"

Posted by ●June 20, 2013

On 6/20/13 12:32 PM, robert bristow-johnson wrote:> > okay, so it just happens that now this topic is getting important to me. > > On 6/9/13 12:54 PM, Rick Lyons wrote: >> On Sat, 08 Jun 2013 23:24:01 -0400, Jerry Avins<jya@ieee.org> wrote: >> > ... >>>>> On Thursday, June 6, 2013 7:11:53 PM UTC+12, Mimar wrote: >>>>>> >>>>>> could somebody give me an advice? At the moment I amsolving>>>>>> interesting problem. I have been using SW PLL with SOGIcircuit to>>>>>> obtain grid frequency > ... >>> >>> Digital approximations to derivatives come in many forms. The simplest >>> and most intuitive is simply y[n]=x[n-1]-x[n]. For many applications, >>> y[n]=.5(x[n-2]-2.c[n-1]+x[n]) is better. The cost is an extra clock of >>> latency. Rick Lyons improves on that with two more delay terms and the >>> corresponding extra latency. I'm not certain that I'm at liberty to >>> provide more details. I expect that he will. >>> > ... >> If you're referring to the differentiator that >> I think you are, then it's described in detail >> at: >> >> http://www.dsprelated.com/showarticle/35.php >> > > so Rick, is it considered "good" that your differentiator gain startsto> dive toward zero after you get to pi/4 (or 1/2 Nyquist)? it seems to me > that the simple forward difference differentiator does much better in > that regard. > > i am in need of a decent differentiator and when i think of applying the > bilinear transform (BLT) directly to the problem: > > H(z) = 2*(1 - z^-1)/(1 + z^-1) > > because of BLT frequency warping, the gain shoots up to +inf at Nyquist > (small wonder since there is a pole directly on z=-1), which is too much > correction (the opposite problem of Rick's differentiator). i would > really like to do this with a first order filter and i think if we can > just back off on that nasty quasi-stable pole: > > H(z) = 2*(1 - z^-1)/(1 - p*z^-1) > > we can get something that might work pretty good. pole p would be close > to -1, but clearly inside the unit circle. > > has anyone tried this (the latter transfer function) and what value of p > had you used? > > please get back in a hurry to prevent me from re-inventing the wheel. if > i end up reinventing the blankity-blank wheel, i'll tell you how round i > got it to be. >okay, so i got this wheel (actually 2 of them). if you use the simple transfer function above (the scaling of 2 doesn't matter, comes from the BLT), i figgered out that if you want the gain at Nyquist to be exactly twice the gain at half Nyquist, you want the pole p to be at p = -0.267949192. or, if you want the gain at 1/2 Nyquist to be exactly twice the gain at 1/4 Nyquist, then the pole should be p = -0.694566677 . i like the latter one the best. it looks pretty good. gee, i wish some bright undergrad EE student that doesn't have anything to do, if he/she would've done this for us and save me time. it can still be generalized a little where we can come up for an expression of p that preserves this double-the-gain-for-doubling-the-frequency relationship for an arbitrary frequency between 0 and pi/2. it would be nice if someone might do that and report the results, because i ain't gonna. L8r, -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."

Posted by ●June 20, 2013

okay, so it just happens that now this topic is getting important to me. On 6/9/13 12:54 PM, Rick Lyons wrote:> On Sat, 08 Jun 2013 23:24:01 -0400, Jerry Avins<jya@ieee.org> wrote: >...>>>> On Thursday, June 6, 2013 7:11:53 PM UTC+12, Mimar wrote: >>>>> >>>>> could somebody give me an advice? At the moment I am solving >>>>> interesting problem. I have been using SW PLL with SOGI circuitto>>>>> obtain grid frequency...>> >> Digital approximations to derivatives come in many forms. The simplest >> and most intuitive is simply y[n]=x[n-1]-x[n]. For many applications, >> y[n]=.5(x[n-2]-2.c[n-1]+x[n]) is better. The cost is an extra clock of >> latency. Rick Lyons improves on that with two more delay terms and the >> corresponding extra latency. I'm not certain that I'm at liberty to >> provide more details. I expect that he will. >>...> If you're referring to the differentiator that > I think you are, then it's described in detail > at: > > http://www.dsprelated.com/showarticle/35.php >so Rick, is it considered "good" that your differentiator gain starts to dive toward zero after you get to pi/4 (or 1/2 Nyquist). it seems to me that the simple forward difference differentiator does much better in that regard. i am in need of a decent differentiator and when i think of applying the bilinear transform (BLT) directly to the problem: H(z) = 2*(1 - z^-1) / (1 + z^-1) because of BLT frequency warping, the gain shoots up to +inf at Nyquist (small wonder since there is a pole directly on z=-1), which is too much correction (the opposite problem of Rick's differentiator). i would really like to do this with a first order filter and i think if we can just back off on that nasty quasi-stable pole: H(z) = 2*(1 - z^-1) / (1 + p*z^-1) we can get something that might work pretty good. pole p would be close to -1, but clearly inside the unit circle. has anyone tried this (the latter transfer function) and what value of p had you used? please get back in a hurry to prevent me from re-inventing the wheel. if i end up reinventing the blankity-blank wheel, i'll tell you how round i got it to be. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."

Posted by ●June 15, 2013

On Tue, 11 Jun 2013 17:36:29 +0300, Tauno Voipio <tauno.voipio@notused.fi.invalid> wrote: [Snipped by Lyons]>> >> Hello Miroslav Martisek, >> Please forgive me for my ignorance. >> What do you mean by Bohemia? >> >> In the United States we have Bohemian >> beer. But I confess, I don't know what >> Bohemia or Bohemian means. >> >> [-Rick-] > >Hello Rick, > >Bohemia (German: B�hmenland) is the western part of currentCzech>Republic, the home of world's best beer. > >See: <https://en.wikipedia.org/wiki/Bohemia>Hi Tauno, Thanks for the info. As always, I continue to learn all manner of interesting things from you guys. [-Rick-] No. 6: "Where am I?" No. 2: "In the Village." No. 6: "What do you want?" No. 2: "Information." No. 6: "Who are you?" No. 2: "I am the new No. 2." No. 6: "Who is No. 1?" No. 2: "You are No. 6." No. 6: "I am not a number. I am a free man!"

Posted by ●June 15, 2013

On Tue, 11 Jun 2013 12:38:28 +0000 (UTC), Miroslaw Kwasniak <mirek@infrared.zind.ikem.pwr.wroc.pl> wrote:>Rick Lyons <R.Lyons@_bogus_ieee.org> wrote: >> Please forgive me for my ignorance. >> What do you mean by Bohemia? > >http://en.wikipedia.org/wiki/Bohemia >> >> In the United States we have Bohemian >> beer. But I confess, I don't know what >> Bohemia or Bohemian means. > >http://en.wikipedia.org/wiki/Beer_in_the_Czech_Republic > >;)Hi Miroslaw, That's a neat web site. Thanks. I spent some time in Germany many years ago, and grew to love Pilsner Urquell. As a souvenir I brought a bottle of the "REAL" Budweiser" home with me. [-Rick-] No. 6: "Where am I?" No. 2: "In the Village." No. 6: "What do you want?" No. 2: "Information." No. 6: "Who are you?" No. 2: "I am the new No. 2." No. 6: "Who is No. 1?" No. 2: "You are No. 6." No. 6: "I am not a number. I am a free man!"

Posted by ●June 15, 2013

On Tue, 11 Jun 2013 00:22:12 -0700 (PDT), gyansorova@gmail.com wrote:>> >> Hello Miroslav Martisek, >> Please forgive me for my ignorance. >> What do you mean by Bohemia? >> >> In the United States we have Bohemian >> beer. But I confess, I don't know what >> Bohemia or Bohemian means. >> >> [-Rick-] >>> >A lifestyle, arty type Bohemian existence - from Europe. > >Bohemianism is the practice of an unconventional lifestyle, often >in the company of like-minded people, with few permanent ties, >involving musical, artistic, or literary pursuits. In this context, > Bohemians may be wanderers, adventurers, or vagabonds. >This use of the word bohemian first appeared in the English language >in the nineteenth century[1] to describe the non-traditional lifestyles >of marginalized and impoverished artists, writers, journalists, >musicians, and actors in major European cities.Hi gyansorova, Ah ha. Thanks. Bohemian sounds like a description of Jerry Avins. :-) I'll try to use the word "Bohemian" in a conversation the next time I get a chance. [-Rick-] No. 6: "Where am I?" No. 2: "In the Village." No. 6: "What do you want?" No. 2: "Information." No. 6: "Who are you?" No. 2: "I am the new No. 2." No. 6: "Who is No. 1?" No. 2: "You are No. 6." No. 6: "I am not a number. I am a free man!"

Posted by ●June 12, 2013

>On 11.6.13 8:25 , Rick Lyons wrote: >> On Mon, 10 Jun 2013 07:31:15 -0500, "Mimar"<94571@dsprelated> wrote:>> >>>> On Sat, 08 Jun 2013 23:24:01 -0400, Jerry Avins<jya@ieee.org> wrote:>>>> >>>>> On 6/7/2013 12:56 PM, Vladimir Vassilevsky wrote: >>>>>> On 6/6/2013 4:11 PM, gyansorova@gmail.com wrote: >>>>>>> On Thursday, June 6, 2013 7:11:53 PM UTC+12, Mimarwrote:>>>>>>>> >>>>>>>> could somebody give me an advice? At the moment Iam solving>>>>>>>> interesting problem. I have been using SW PLL withSOGI circuit to>>>>>>>> obtain grid frequency >>>>>> >>>>>> >>>>>>> >>>>>>> You could design a simple control loop with anintegrator in the>>>>>>> feedback path. This will give you band-limiteddifferentiation ie a>>>>>>> slope of 6dB/octave. >>>>>> >>>>>> Good point. As the OP is using PLL, the output of phasedetector is>>>>>> derivative of frequency. >>>>>> >>>>>> VLV >>>>> On 6/7/2013 12:56 PM, Vladimir Vassilevsky wrote: >>>>>> On 6/6/2013 4:11 PM, gyansorova@gmail.com wrote: >>>>>>> On Thursday, June 6, 2013 7:11:53 PM UTC+12, Mimarwrote:>>>>>>>> >>>>>>>> could somebody give me an advice? At the moment Iam solving>>>>>>>> interesting problem. I have been using SW PLL withSOGI circuit to>>>>>>>> obtain grid frequency >>>>>> >>>>>> >>>>>>> >>>>>>> You could design a simple control loop with anintegrator in the>>>>>>> feedback path. This will give you band-limiteddifferentiation ie a>>>>>>> slope of 6dB/octave. >>>>>> >>>>>> Good point. As the OP is using PLL, the output of phasedetector is>>>>>> derivative of frequency. >>>>>> >>>>>> VLV >>>>> >>>>> It still needs filtering. >>>>> >>>>> Digital approximations to derivatives come in many forms. Thesimplest>>>>> and most intuitive is simply y[n]=x[n-1]-x[n]. For manyapplications,>>>>> y[n]=.5(x[n-2]-2.c[n-1]+x[n]) is better. The cost is an extraclock of>>>>> latency. Rick Lyons improves on that with two more delay termsand the>>>>> corresponding extra latency. I'm not certain that I'm atliberty to>>>>> provide more details. I expect that he will. >>>>> >>>>> Jerry >>>> >>>> Hi Jerry, >>>> If you're referring to the differentiator that >>>> I think you are, then it's described in detail >>>> at: >>>> >>>> http://www.dsprelated.com/showarticle/35.php >>>> >>>> See Ya', >>>> [-Rick-] >>>> No. 6: "What do you want?" >>>> No. 2: "Information." >>>> No. 6: "Who are you?" >>>> No. 2: "I am the new No. 2." >>>> No. 6: "Who is No. 1?" >>>> No. 2: "You are No. 6." >>>> No. 6: "I am not a number. I am a free man!" >>>> >>> >>> Hello everybody, >>> >>> I have to say: "Thank you for your advices, some (= everyone :-))of them>>> were very useful for me!" >>> >>> At the moment I am testing differentiator described by Rick Lyons inhis>>> article (http://www.dsprelated.com/showarticle/35.php). It seems, itwill>>> be work as we with my boss want. The output from differentiator isattached>>> to moving average filter (16th order). Resulting value of derivativeis>>> stable now. Super :-). I think, this solution is the best of we could >>> choose. >>> >>> Thanks a lot. >>> >>> Miroslav Martisek, Bohemia >> >> Hello Miroslav Martisek, >> Please forgive me for my ignorance. >> What do you mean by Bohemia? >> >> In the United States we have Bohemian >> beer. But I confess, I don't know what >> Bohemia or Bohemian means. >> >> [-Rick-] > >Hello Rick, > >Bohemia (German: B�hmenland) is the western part of current Czech >Republic, the home of world's best beer. > >See: <https://en.wikipedia.org/wiki/Bohemia> > >-- > >-Tauno > >Hello Rick,Tauno said the truth, Bohemia is really the western part of Czech Republic - country in the middle Europe. Namely, I am living in České Budějovice (= Czech Budweis) now, where you can find the best beer in the world: Budweiser Budvar (NO Anheuser-Busch "Budweiser" :-))). Miroslav>

Posted by ●June 11, 2013

On 11.6.13 8:25 , Rick Lyons wrote:> On Mon, 10 Jun 2013 07:31:15 -0500, "Mimar" <94571@dsprelated>wrote:> >>> On Sat, 08 Jun 2013 23:24:01 -0400, Jerry Avins <jya@ieee.org>wrote:>>> >>>> On 6/7/2013 12:56 PM, Vladimir Vassilevsky wrote: >>>>> On 6/6/2013 4:11 PM, gyansorova@gmail.com wrote: >>>>>> On Thursday, June 6, 2013 7:11:53 PM UTC+12, Mimar wrote: >>>>>>> >>>>>>> could somebody give me an advice? At the moment I amsolving>>>>>>> interesting problem. I have been using SW PLL with SOGIcircuit to>>>>>>> obtain grid frequency >>>>> >>>>> >>>>>> >>>>>> You could design a simple control loop with an integratorin the>>>>>> feedback path. This will give you band-limiteddifferentiation ie a>>>>>> slope of 6dB/octave. >>>>> >>>>> Good point. As the OP is using PLL, the output of phasedetector is>>>>> derivative of frequency. >>>>> >>>>> VLV >>>> On 6/7/2013 12:56 PM, Vladimir Vassilevsky wrote: >>>>> On 6/6/2013 4:11 PM, gyansorova@gmail.com wrote: >>>>>> On Thursday, June 6, 2013 7:11:53 PM UTC+12, Mimar wrote: >>>>>>> >>>>>>> could somebody give me an advice? At the moment I amsolving>>>>>>> interesting problem. I have been using SW PLL with SOGIcircuit to>>>>>>> obtain grid frequency >>>>> >>>>> >>>>>> >>>>>> You could design a simple control loop with an integratorin the>>>>>> feedback path. This will give you band-limiteddifferentiation ie a>>>>>> slope of 6dB/octave. >>>>> >>>>> Good point. As the OP is using PLL, the output of phasedetector is>>>>> derivative of frequency. >>>>> >>>>> VLV >>>> >>>> It still needs filtering. >>>> >>>> Digital approximations to derivatives come in many forms. Thesimplest>>>> and most intuitive is simply y[n]=x[n-1]-x[n]. For manyapplications,>>>> y[n]=.5(x[n-2]-2.c[n-1]+x[n]) is better. The cost is an extra clockof>>>> latency. Rick Lyons improves on that with two more delay terms andthe>>>> corresponding extra latency. I'm not certain that I'm at libertyto>>>> provide more details. I expect that he will. >>>> >>>> Jerry >>> >>> Hi Jerry, >>> If you're referring to the differentiator that >>> I think you are, then it's described in detail >>> at: >>> >>> http://www.dsprelated.com/showarticle/35.php >>> >>> See Ya', >>> [-Rick-] >>> No. 6: "What do you want?" >>> No. 2: "Information." >>> No. 6: "Who are you?" >>> No. 2: "I am the new No. 2." >>> No. 6: "Who is No. 1?" >>> No. 2: "You are No. 6." >>> No. 6: "I am not a number. I am a free man!" >>> >> >> Hello everybody, >> >> I have to say: "Thank you for your advices, some (= everyone :-)) ofthem>> were very useful for me!" >> >> At the moment I am testing differentiator described by Rick Lyons in his >> article (http://www.dsprelated.com/showarticle/35.php). It seems, it will >> be work as we with my boss want. The output from differentiator isattached>> to moving average filter (16th order). Resulting value of derivative is >> stable now. Super :-). I think, this solution is the best of we could >> choose. >> >> Thanks a lot. >> >> Miroslav Martisek, Bohemia > > Hello Miroslav Martisek, > Please forgive me for my ignorance. > What do you mean by Bohemia? > > In the United States we have Bohemian > beer. But I confess, I don't know what > Bohemia or Bohemian means. > > [-Rick-]Hello Rick, Bohemia (German: B�hmenland) is the western part of current Czech Republic, the home of world's best beer. See: <https://en.wikipedia.org/wiki/Bohemia> -- -Tauno

Posted by ●June 11, 2013

Rick Lyons <R.Lyons@_bogus_ieee.org> wrote:> Please forgive me for my ignorance. > What do you mean by Bohemia?http://en.wikipedia.org/wiki/Bohemia> > In the United States we have Bohemian > beer. But I confess, I don't know what > Bohemia or Bohemian means.http://en.wikipedia.org/wiki/Beer_in_the_Czech_Republic ;)

Posted by ●June 11, 2013