> Real signals are noisy, and differentiators emphasize high-frequency
> noise. Even most analog "differentiators" are rolled off at high
> frequencies. Digital differentiators with an odd number of taps roll off
> properly. If you have time to waste, you can use a 5-tap differentiator,
> but more than that brings only diminishing returns as you try to reach
> Fs/4. Rick Lyons published an easily computed 5-tap differentiator. Ask
> him or Google for it.
>
> If you explain what you want the differentiator to do, we might be able
> to help you.
Thanks for the suggestion. I am looking through it.
Kumar
Reply by Kumar Appaiah●March 3, 20072007-03-03
On Mar 4, 6:59 am, Jerry Avins wrote:
> I don't know anything about Jakes code. What about it gives it
> particular importance? If it some sort of assignment?
No, but it is a free implementation which has readable code, and I can
correlate the information with Oppenheim and Schafer.
Finally, I have got things working. I took the version of the code
available with GNU Octave forge, and set a high grid density, and
added instrumentation to their code to see how it works. In GNU
Octave, you can get a decent differentiator with:
remez(31, [0 1], [0 pi], 4096, 'differentiator')
Hilbert transformers also seem all right with this.
Thanks for the responses.
Kumar
Reply by Jerry Avins●March 3, 20072007-03-03
Kumar Appaiah wrote:
> On Mar 4, 2:11 am, wrote:
>> The magnitude response of an ideal Hilbert transformer is the same as
>> the magnitude response of a wire, ignoring delay. Kumar writes that he's
>> content to ignore phase. So what does he want? A pure delay? How long?
>> That's what I have trouble with.
>
> You are correct, and I realize that I should have worded my question a
> bit more carefully. I apologize for my carelessness.
>
> OK, but still, my question remains this: whether someone has managed
> to design a Hilbert transformer and/or a differentiator successfully
> with Jake's code or GNU Octave? I have tried to debug it, but I can't
> seem to find where the mistake lies, or what I'm doing wrong.
>
>> FIR impulse responses get very long when significant frequencies are
>> very small fractions of (or come very close to) Fs/2, whatever they're
>> intended for. HTs are no different.
>
> I really don't care about the length now. As long as I get something
> close to +90 and -90 degrees of phase shift in most parts of the -pi
> to pi interval with gain close to 1 (magnitude), I am happy. All I
> want to know is "the right way" to use Jake's code for this purpose,
> as it doesn't seem to be doing the same thing Matlab is doing.
I don't know anything about Jakes code. What about it gives it
particular importance? If it some sort of assignment?
Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply by Jerry Avins●March 3, 20072007-03-03
Kumar Appaiah wrote:
> On Mar 4, 1:06 am, John_W_Her...@yahoo.com (John Herman) wrote:
>> From the original code
>>
>>> C
>>> C THE FOLLOWING INPUT DATA SPECIFIES A LENGTH 32 FULLBAND
>>> C DIFFERENTIATOR WITH SLOPE 1 AND WEIGHTING OF 1/F.
>>> C THE GRID DENSITY WILL BE SET TO 20.
>>> C 32,2,1,20
>>> C 0,0.5
>>> C 1.0
>>> C 1.0
>
> Ah, but that's from Parks and McClellan's original Fortran code. I
> was, in particular, interested in Jake Janovetz's code, with which I
> am having problems..
>
> Thanks for the suggestion anyway. I notice that the only case where I
> get a linear slope differentiator is if I have the filter length N =
> 2. Whenever I make N even 4, it goes up, falls to zero, and then goes
> up again at pi.
Let me give you some unsolicited information about digital differentiators.
For most purposes, they don't work worth a dam at frequencies above Fs/6.
For most purposes, the derivative is wanted at a time that corresponds
to a sample of the undifferentiated signal, as in the expression
IQ' + QI'
or in a feedback loop. That makes differentiators with integer delay
most convenient, which in turn implies an odd number of taps, which in
turn implies a zero of response at Fs/2.
Some differentiators are used to stabilize closed loops. Long FIRS that
approximate a differentiator well have long delays and are wholly
unsuitable for stabilizing feedback loops. Most practitioners seem to
feel that [-1 0 +1] is the best compromise, even though control systems
should be sampled much above 2Fmax.
Real signals are noisy, and differentiators emphasize high-frequency
noise. Even most analog "differentiators" are rolled off at high
frequencies. Digital differentiators with an odd number of taps roll off
properly. If you have time to waste, you can use a 5-tap differentiator,
but more than that brings only diminishing returns as you try to reach
Fs/4. Rick Lyons published an easily computed 5-tap differentiator. Ask
him or Google for it.
If you explain what you want the differentiator to do, we might be able
to help you.
Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply by Kumar Appaiah●March 3, 20072007-03-03
On Mar 4, 2:11 am, wrote:
> The magnitude response of an ideal Hilbert transformer is the same as
> the magnitude response of a wire, ignoring delay. Kumar writes that he's
> content to ignore phase. So what does he want? A pure delay? How long?
> That's what I have trouble with.
You are correct, and I realize that I should have worded my question a
bit more carefully. I apologize for my carelessness.
OK, but still, my question remains this: whether someone has managed
to design a Hilbert transformer and/or a differentiator successfully
with Jake's code or GNU Octave? I have tried to debug it, but I can't
seem to find where the mistake lies, or what I'm doing wrong.
> FIR impulse responses get very long when significant frequencies are
> very small fractions of (or come very close to) Fs/2, whatever they're
> intended for. HTs are no different.
I really don't care about the length now. As long as I get something
close to +90 and -90 degrees of phase shift in most parts of the -pi
to pi interval with gain close to 1 (magnitude), I am happy. All I
want to know is "the right way" to use Jake's code for this purpose,
as it doesn't seem to be doing the same thing Matlab is doing.
Thanks.
Kumar
Reply by Kumar Appaiah●March 3, 20072007-03-03
On Mar 4, 1:06 am, John_W_Her...@yahoo.com (John Herman) wrote:
> From the original code
>
> >C
> >C THE FOLLOWING INPUT DATA SPECIFIES A LENGTH 32 FULLBAND
> >C DIFFERENTIATOR WITH SLOPE 1 AND WEIGHTING OF 1/F.
> >C THE GRID DENSITY WILL BE SET TO 20.
> >C 32,2,1,20
> >C 0,0.5
> >C 1.0
> >C 1.0
Ah, but that's from Parks and McClellan's original Fortran code. I
was, in particular, interested in Jake Janovetz's code, with which I
am having problems..
Thanks for the suggestion anyway. I notice that the only case where I
get a linear slope differentiator is if I have the filter length N =
2. Whenever I make N even 4, it goes up, falls to zero, and then goes
up again at pi.
Kumar
Reply by Jerry Avins●March 3, 20072007-03-03
Rune Allnor wrote:
> On 3 Mar, 21:36, Jerry Avins <j...@ieee.org> wrote:
...
>> I still have a
>> problem with "the magnitude response of a Hilbert transformer".
>
> Why? I can't remember reading in any of your posts, or anybody
> else's, for that matter, that there are any problems with FIR
> filters,
> be it filters designed by wind methods or by the Remez method.
The magnitude response of an ideal Hilbert transformer is the same as
the magnitude response of a wire, ignoring delay. Kumar writes that he's
content to ignore phase. So what does he want? A pure delay? How long?
That's what I have trouble with.
> As you know, the "usual" FIR filters are approximations to the
> ideal filter. No big deal, right, Gibbs phenomena and all?
>
> The HT is the same thing: The ideal is unit magnitudes with
> +/- 90 degree phase lags for negative and positive frequencies,
> except for discontinuities at w = 0 and w = Fs/2. I can't see why
> those should be any big deals; they are discontiuities just like the
> cut-off frequencies in the "usual" FIR filters, albeit at conspicuous
> locations.
FIR impulse responses get very long when significant frequencies are
very small fractions of (or come very close to) Fs/2, whatever they're
intended for. HTs are no different.
Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply by Rune Allnor●March 3, 20072007-03-03
On 3 Mar, 21:36, Jerry Avins <j...@ieee.org> wrote:
> Rune Allnor wrote:
> > On 3 Mar, 21:12, Jerry Avins <j...@ieee.org> wrote:
> >> I asked Kumar (indirectly,
> >> with snideness that we share) the duration of a quarter cycle of DC.
>
> > The question is irrelevant. Since the OP asked for a differentiator,
> > the frequency resonse of the desired filter is proportional to
> > frequency, w.
>
> > So I'll turn the question right back at you: Why are the
> > technicalities
> > of what happens at DC at all relevant?
>
> Kumar asked for a differentiator and HT.
OK, I didn't catch hat first tie around.
> I misread his clause "except
> near DC" and took it to include DC, so I got derailed. I still have a
> problem with "the magnitude response of a Hilbert transformer".
Why? I can't remember reading in any of your posts, or anybody
else's, for that matter, that there are any problems with FIR
filters,
be it filters designed by wind methods or by the Remez method.
As you know, the "usual" FIR filters are approximations to the
ideal filter. No big deal, right, Gibbs phenomena and all?
The HT is the same thing: The ideal is unit magnitudes with
+/- 90 degree phase lags for negative and positive frequencies,
except for discontinuities at w = 0 and w = Fs/2. I can't see why
those should be any big deals; they are discontiuities just like the
cut-off frequencies in the "usual" FIR filters, albeit at conspicuous
locations.
Rune
Reply by Jerry Avins●March 3, 20072007-03-03
Rune Allnor wrote:
> On 3 Mar, 21:12, Jerry Avins <j...@ieee.org> wrote:
>> I asked Kumar (indirectly,
>> with snideness that we share) the duration of a quarter cycle of DC.
>
> The question is irrelevant. Since the OP asked for a differentiator,
> the frequency resonse of the desired filter is proportional to
> frequency, w.
>
> So I'll turn the question right back at you: Why are the
> technicalities
> of what happens at DC at all relevant?
Kumar asked for a differentiator and HT. I misread his clause "except
near DC" and took it to include DC, so I got derailed. I still have a
problem with "the magnitude response of a Hilbert transformer". That's a
NOP.
Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply by Rune Allnor●March 3, 20072007-03-03
On 3 Mar, 21:12, Jerry Avins <j...@ieee.org> wrote:
> I asked Kumar (indirectly,
> with snideness that we share) the duration of a quarter cycle of DC.
The question is irrelevant. Since the OP asked for a differentiator,
the frequency resonse of the desired filter is proportional to
frequency, w.
So I'll turn the question right back at you: Why are the
technicalities
of what happens at DC at all relevant?
Rune