From: robert bristow-johnson on
On Mar 15, 5:05 pm, spop...(a)speedymail.org (Steve Pope) wrote:
> robert bristow-johnson  <r...(a)audioimagination.com> wrote:
>
>
> >On Mar 9, 12:37 am, spop...(a)speedymail.org (Steve Pope) wrote:
>
> >> then do linear prediction on the result;
>
> >the resulting *what*?
>
> >> then after some diddling, you have
> >> your bandpass filter coefficients.
>
> >i'm intrigued, but still have nearly no idea of what is happening,
> >mathematically.
>
> So more exactly I did the following:
>
> Parameters are:
>
>      center frequency

i'll call it "w0", it's dimensionless, and it means "radians per
sample".

>      N = window size (I used 2048 samples, for Fc = about Fs/60)
>      0 < alpha < 1 which controls the Q

the relationship between the two is curious.

>
> Procedure is:
>
> (1) Create a sinusoid X(t) that is N samples long at the center
> frequency

{ x[0], x[1], x[2],... x[N-1] }


where x[n] = cos(w0*n + theta)


> (2) Create H(t), a Hamming-windowed version of X

no, we're talking *samples*. ain't no "t", unless there's an Fs=1/T
and i don't think there need be.

so

h[n] = 0.54 - 0.46*sin(2*pi*n/N) for 0 <= n < N


> (3) Create Y(t) = alpha * H(t) + (1-alpha) * X(t)

plus?!

you don't *multiply* the window times the sinusoid?



> (4) Extract LPC coefficents of the desired order from Y

i'm having trouble getting to this point.

can we do this with integer indices and can you verify what your
intent (add or scale) is with the hamming window?

> (no, I did not use the Burg method...).
>
> (5) Take the real part of the LPC coefficeients and use
> them as the filter coefficients of an all-pole filter.

i'm with you here. that's what you do with LPC coefs. and you can
factor it to biquads.

> I'm not sure if this is scientific; there is a little warping
> of the center frequency, and the relationship between alpha
> and Q is something I observed only heuristically.  But it
> did yield useful filters.

still curious. about the add.

r b-j

From: Steve Pope on
robert bristow-johnson <rbj(a)audioimagination.com> wrote:

>On Mar 15, 5:05�pm, spop...(a)speedymail.org (Steve Pope) wrote:

>> Parameters are:
>>
>> � � �center frequency
>> � � �N = window size (I used 2048 samples, for Fc = about Fs/60)
>> � � �0 < alpha < 1 which controls the Q

>> Procedure is:
>>
>> (1) Create a sinusoid X(t) that is N samples long at the center
>> frequency

>> (2) Create H(t), a Hamming-windowed version of X

>no, we're talking *samples*. ain't no "t", unless there's an Fs=1/T
>and i don't think there need be.

Hmm. I can use "t" to index the samples without confusing myself.
(Is this uncommon?)

>> (3) Create Y(t) = alpha * H(t) + (1-alpha) * X(t)

>plus?!

>you don't *multiply* the window times the sinusoid?

In step (2) above I did this multiply to create H(t). In (3) I then
add together (sample-wise) a weighted sum of the Hamming-windowed
sinusoid, and the rectangular-windowed sinusoid.

>> (4) Extract LPC coefficents of the desired order from Y

>i'm having trouble getting to this point.

>can we do this with integer indices and can you verify what your
>intent (add or scale) is with the hamming window?

I hope that's pretty clear. "Hamming windowed sinusoid" is a
pretty unambiguous phrase, I think. In any case, it is a sinusoid
multiplied, sample-by-sample, by a Hamming window.

>> (no, I did not use the Burg method...).

>> (5) Take the real part of the LPC coefficeients and use
>> them as the filter coefficients of an all-pole filter.

>i'm with you here. that's what you do with LPC coefs. and you can
>factor it to biquads.



Steve
From: Rune Allnor on
On 27 Mar, 01:16, spop...(a)speedymail.org (Steve Pope) wrote:
> robert bristow-johnson  <r...(a)audioimagination.com> wrote:

> >no, we're talking *samples*.  ain't no "t", unless there's an Fs=1/T
> >and i don't think there need be.
>
> Hmm.  I can use "t" to index the samples without confusing myself.
> (Is this uncommon?)

You might use whatever nomenclature you like if
all you need is that yourself are not getting confused.
If you want to humor others, you might want to stick
with the usual nomenclature, which is

x[n] - 'n' argument and square brackets for discrete-
time signals
x(t) - 't' argument and parentheses for continuous-
time signals

Rune
From: Nasser M. Abbasi on

"Rune Allnor" <allnor(a)tele.ntnu.no> wrote in message
news:2e56b55f-4c66-489b-ab16-6877966d0894(a)33g2000yqj.googlegroups.com...
On 27 Mar, 01:16, spop...(a)speedymail.org (Steve Pope) wrote:
> robert bristow-johnson <r...(a)audioimagination.com> wrote:

You might use whatever nomenclature you like if
all you need is that yourself are not getting confused.
If you want to humor others, you might want to stick
with the usual nomenclature, which is

x[n] - 'n' argument and square brackets for discrete-
time signals
x(t) - 't' argument and parentheses for continuous-
time signals

Rune"


Yes, good standard notation are _very_ important.

Some notations I like, from our textbook (DSP, oppenheim and Schafer) and
others are:

1. X_a(big omega) for CTFT
2. X(little omega) for DTFT
3. x(t) for time domain signal.
4. x(t) with the little tilde sign over x, to mean periodic time domain
signal.
5. x(n) with tilde sign over x, to mean discrete periodic sequence.

Not all books use x[n] vs x(n), for example, (DSP, oppenheim and Schafer)
and DSP by Proakis and Manlolakis uses x(n), but I like x[n]. I've seen
x_a(t) also used for time domain signal.

I like a book that starts by giving deailed nomenclature, but many books
these days do not do that, and authors seem to make up notations as they go.

There ought to be some big table of notations and definitions, at least for
DSP, that everyone agree on.

--Nasser


From: robert bristow-johnson on

okay, thanks Steve for pointing out my oversight of what you wrote. i
*am* changing the notation a little so i can get what you're saying.

On Mar 15, 5:05 pm, spop...(a)speedymail.org (Steve Pope) wrote:
> robert bristow-johnson  <r...(a)audioimagination.com> wrote:
>
>
>
> >On Mar 9, 12:37 am, spop...(a)speedymail.org (Steve Pope) wrote:
> >> This has nothing to do with filter structures, but recently I've been
> >> looking into ways of synthesizing all-pole bandpass filters that meet
> >> given design constraints.  I'm very sure I'm not breaking new
> >> territory here, OTOH I haven't seen the method I'm using written up
> >> anyway either.  Basically, apply a window to a sinusoid that is the
> >> weighted sum of a Hamming window, and a rectangular window;
>
> >the Hamming is a weight sum of rectangular and Hann.
>
> >> then do linear prediction on the result;
>
> >the resulting *what*?
>
> >> then after some diddling, you have
> >> your bandpass filter coefficients.
>
> >i'm intrigued, but still have nearly no idea of what is happening,
> >mathematically.
>
> So more exactly I did the following:
>
> Parameters are:
>
>      center frequency
>      N = window size (I used 2048 samples, for Fc = about Fs/60)
>      0 < alpha < 1 which controls the Q
>
> Procedure is:
>
> (1) Create a sinusoid x[n] that is N samples long at the center
> frequency

{ x[0], x[1], x[2],... x[N-1] }

where x[n] = cos(w0*n + theta)

w0 is the center frequency.

> (2) Create h[n], a Hamming-windowed version of x[n]

w[n] = 0.54 - 0.46*cos(2*pi*n/N) for 0 <= n < N

h[n] = w[n]*x[n]

> (3) Create y[n] = alpha * h[n] + (1-alpha) * x[n]

y[n] = alpha*h[n] + (1-alpha)*x[n]

= alpha*w[n]*x[n] + (1-alpha)*x[n]

= ( alpha*w[n] + (1-alpha) )*x[n]

= ( 1 + alpha*(w[n] - 1) )*x[n]

= ( 1 - alpha*( 0.46 + 0.46*cos(2*pi*n/N) ) )*x[n]

= ( (1 - alpha*0.46) - alpha*0.46*cos(2*pi*n/N) )*x[n]

looks like another window function. let's see what happens when we
plug in x[n]:

y[n] = ( (1 - alpha*0.46) - alpha*0.46*cos(2*pi*n/N) )*cos(w0*n
+ theta)

= (1 - alpha*0.46)*cos(w0*n + th) - alpha*0.46*cos(2*pi*n/
N)*cos(w0*n + th)

= (1 - alpha*0.46)*cos(w0*n + theta)
- alpha*0.23*cos((w0+2*pi/N)*n + theta)
- alpha*0.23*cos((w0-2*pi/N)*n + theta)

so, it's three separate sinusoids. the two sidebands have equal
amplitude and, depending on alpha, are likely reduced. what should
LPC do with that? i s'pose it will look at it a little like something
more broadbanded and with a resonance at w0. alpha would say
something about the apparent width of the resonance.

> (4) Extract LPC coefficients of the desired order from y[n]

okay. i have an idea. haven't played around with it.

r b-j