Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform

Ads

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Comp.DSP | lowpass tap count

There are 29 messages in this thread.

You are currently looking at messages 0 to 10.


lowpass tap count - valtih1978 - 2011-10-24 08:43:00

As opposed to differentiator, which operates locally (computes 
difference between two adjacent samples), integrator averages a huge 
number of samples over its huge time constant. This does not look 
practical. How do you do it?

thanks
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: lowpass tap count - Jerry Avins - 2011-10-24 10:32:00



On 10/24/2011 8:43 AM, valtih1978 wrote:
> As opposed to differentiator, which operates locally (computes
> difference between two adjacent samples), integrator averages a huge
> number of samples over its huge time constant. This does not look
> practical. How do you do it?

First, dispel the misconception that a differentiator necessarily 
operates by taking the difference between adjacent samples. There are 
better ways for many purposes. Numerically integration produces of 
necessity a digital analog of definite integration, i.e., a summation 
over an interval. Overflow can't be guaranteed against without limiting 
the extent of the interval. (Tautology: in practical situations, there 
are ways to deal with this difficulty. That's what makes those 
situations practical.) That said, here's how to integrate:

"integral"=0
For n=[0], to n=[enough]
"integral"="integral"+x[n]

I write "integral" because, as you can see, it is really a sum. Just as 
with differentiation, there are refinements, Simpson's Rule being one of 
them.

As with analog circuits, a leaky integrator is often used. That can be 
implemented by

y[n] = ax[n] - b[y[n-1] where a + b = 1 and both have the same sign.

The convention is that x[n] and y[n] are the input and output 
respectively at t = n.

Jerry
-- 
Engineering is the art of making what you want from things you can get.
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: lowpass tap count - valtih1978 - 2011-10-24 12:04:00

Thank you. This is clear. Yet, I wanted to know about convolution. When 
you need specific response characteristic.

In audio, you may want to have a pole at low frequency, say at 10 Hz (or 
event at zero. why not?). It corresponds to time const of 20pi. The 
transition processes last for 3..5 time constants, which is ≈4/60 sec. 
At the same time, sampling freq is 48kHz. It is 4/60/48k = 2400 samples 
per impulse response. It seems too much for me. Especially because 
high-frequency processes get away with much shorter times/convolutions.

As a beginner, I look at
"How to Obtain Discrete-Time Impulse Response from H(s)"
http://www.google.ee/url?sa=t&rct=j&q=transfer%20function%20impulse%20response&source=web&cd=5&ved=0
CEYQFjAE&url=http%3A%2F%2Fwww.engr.uky.edu%2F~ymzhang%2FAdaptiveSystems%2FInterval%2520HW.doc&ei=mIWlTsGzEc2Uswa
zm5n7Ag&usg=AFQjCNFCHWRk_HC4jpb0BTtqc2jeeXzz6g&cad=rja 


I see that a couple of samples per response is enough to emerge a rough 
result. A couple of discretes per time constant, regardless of the time 
constant duration is ok! I suppose that the impulse response, which 
changes slowly, can be considered a constant over many 48k samples, 
resulting in only few h(t) samples. However, convolution consists of 
both h(t) * f(t). The f(t) samples still arrive at 48 kHz.

I'm asking if there is a way to do the convolution without storing those 
2400 latest samples?

Thanks
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: lowpass tap count - maury - 2011-10-24 12:33:00

On Oct 24, 11:04=C2=A0am, valtih1978 <d...@not.email.me> wrote:
> Thank you. This is clear. Yet, I wanted to know about convolution. When
> you need specific response characteristic.
>
> In audio, you may want to have a pole at low frequency, say at 10 Hz (or
> event at zero. why not?). It corresponds to time const of 20pi. The
> transition processes last for 3..5 time constants, which is =E2=89=884/60=
 sec.
> At the same time, sampling freq is 48kHz. It is 4/60/48k =3D 2400 samples
> per impulse response. It seems too much for me. Especially because
> high-frequency processes get away with much shorter times/convolutions.
>
> As a beginner, I look at
> "How to Obtain Discrete-Time Impulse Response from H(s)"http://www.google=
.ee/url?sa=3Dt&rct=3Dj&q=3Dtransfer%20function%20impulse%2...
>
> I see that a couple of samples per response is enough to emerge a rough
> result. A couple of discretes per time constant, regardless of the time
> constant duration is ok! I suppose that the impulse response, which
> changes slowly, can be considered a constant over many 48k samples,
> resulting in only few h(t) samples. However, convolution consists of
> both h(t) * f(t). The f(t) samples still arrive at 48 kHz.
>
> I'm asking if there is a way to do the convolution without storing those
> 2400 latest samples?
>
> Thanks

Tell us what you are trying to achieve. Jerry showed you how to do it
with 2 y-samples, and 1 x-sample. Then you talk about 2400 samples.
Again, what are you trying to do????
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: lowpass tap count - valtih1978 - 2011-10-24 13:29:00

I try to do a filter in practice. I know the influence of zeros and 
poles on the transfer function. I convert it into impulse response and 
convolve with it. Faced the need for large tap counts at low 
frequencies, I decided to ask if it is ok.


BTW, if you know how to do equalization (combining different amounts of 
frequency bands) I would appreciate.
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: lowpass tap count - Jerry Avins - 2011-10-24 13:41:00

On 10/24/2011 12:04 PM, valtih1978 wrote:
> Thank you. This is clear. Yet, I wanted to know about convolution. When
> you need specific response characteristic.

As you can see, convolution isn't usually a good way to integrate.

> In audio, you may want to have a pole at low frequency, say at 10 Hz (or
> event at zero. why not?). It corresponds to time const of 20pi. The
> transition processes last for 3..5 time constants, which is ≈4/60 sec.
> At the same time, sampling freq is 48kHz. It is 4/60/48k = 2400 samples
> per impulse response. It seems too much for me. Especially because
> high-frequency processes get away with much shorter times/convolutions.

Consider an analog RC high-pass with a 3 dB point at 10 Hz or about 63 
radians/sec. The time constant is about .016 seconds. Let's call the 
impulse response (i.e., the time for the response to an impulse to decay 
to insignificance) 5 time constants. Here, that's .8 seconds.
.8 seconds * 48,000 samples/second comes to 38,400 samples. How did you 
get 2400?

An infinite impulse response structure (IIR) is a relatively inexpensive 
way (measured in resources) to get a long impulse response. (That 
shouldn't be a surprise.)

> As a beginner, I look at
> "How to Obtain Discrete-Time Impulse Response from H(s)"
>
http://www.google.ee/url?sa=t&rct=j&q=transfer%20function%20impulse%20response&source=web&cd=5&ved=0
CEYQFjAE&url=http%3A%2F%2Fwww.engr.uky.edu%2F~ymzhang%2FAdaptiveSystems%2FInterval%2520HW.doc&ei=mIWlTsGzEc2Uswa
zm5n7Ag&usg=AFQjCNFCHWRk_HC4jpb0BTtqc2jeeXzz6g&cad=rja
>
>
> I see that a couple of samples per response is enough to emerge a rough
> result. A couple of discretes per time constant, regardless of the time
> constant duration is ok! I suppose that the impulse response, which
> changes slowly, can be considered a constant over many 48k samples,
> resulting in only few h(t) samples. However, convolution consists of
> both h(t) * f(t). The f(t) samples still arrive at 48 kHz.
>
> I'm asking if there is a way to do the convolution without storing those
> 2400 latest samples?

The delay of a symmetric FIR filter of length N is (N-1)/2. Its impulse 
response is simply N. There is no way to specify an impulse response 
with fewer taps than that. I looked at the material you linked to. I 
don't find in it a way to generate an arbitrary time constant with only 
a couple of samples.

Jerry
-- 
Engineering is the art of making what you want from things you can get.
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: lowpass tap count - valtih1978 - 2011-10-24 14:01:00

 > comes to 38,400 samples. How did you get 2400?

.016*5 = 0.08 rather than 0.8! That is why 10-fold difference. :)


 > I don't find in it a way to generate an arbitrary time constant with 
only a couple of samples.

"3.  How to select T, where T is the sampling period:  approximately 1/5 
to ½  of the dominant time constant. "

This is only 2..5 samples per T.


 > There is no way to specify an impulse response with fewer taps than 
that.

This is the key. Thanks.
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: lowpass tap count - Jerry Avins - 2011-10-24 14:21:00

On 10/24/2011 2:01 PM, valtih1978 wrote:
>  > comes to 38,400 samples. How did you get 2400?
>
> .016*5 = 0.08 rather than 0.8! That is why 10-fold difference. :)

I need to start using a calculator.! (2400 < 3840)

>  > I don't find in it a way to generate an arbitrary time constant with
> only a couple of samples.
>
> "3. How to select T, where T is the sampling period: approximately 1/5
> to ½ of the dominant time constant. "

Ah, but you aren't free to select the sampling frequency. You fixed it 
at 40 KHz.

> This is only 2..5 samples per T.

Yes, plenty for 10 Hz., but you need to handle 20 KHz also if this is 
audio. That is why filters for frequencies very much less than the 
sampling frequency are usually IIR. With higher orders, their responses 
can be quite detailed.

>  > There is no way to specify an impulse response with fewer taps than
> that.
>
> This is the key. Thanks.

You're welcome.

Jerry
-- 
Engineering is the art of making what you want from things you can get.
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: lowpass tap count - valtih1978 - 2011-10-24 15:04:00

 > There is no way to specify an impulse response with fewer taps than 
that.

I have discovered http://www.dspguide.com/CH14.PDF, which says that we 
can always get highpass from lowpass just by flipping convolution 
coefficient signs. (The amount of coefficients in not changed)

The idea is: "run the signal through a low-pass filter, and then 
subtract the filtered signal from the original!"
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: lowpass tap count - HardySpicer - 2011-10-24 15:13:00

On Oct 25, 1:43=A0am, valtih1978 <d...@not.email.me> wrote:
> As opposed to differentiator, which operates locally (computes
> difference between two adjacent samples), integrator averages a huge
> number of samples over its huge time constant. This does not look
> practical. How do you do it?
>
> thanks

A summation can be written recursively. There is a simple proof for
this which I can't be bothered writing but you find the sum with k
terms and then find the sum for k+1. Then write the latter in terms of
the former.
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

| 1 | 2 | 3 | next