Reply by Eric Jacobsen May 16, 20132013-05-16
On Wed, 15 May 2013 11:40:39 -0500, Greg Berchin
<gjberchin@chatter.net.invalid> wrote:

>Actually I was overly conservative in my example. A complex >baseband signal sampled at 11025 Hz could have a bandwidth of >20000 Hz, instead of the 10000 Hz in my example. Either that, or >the 10000 Hz bandwidth complex baseband signal could be sampled at >5512.5 Hz. > >Greg
With some slight adjustments you can do the usual mix from fs/4 to baseband and get 2:1 decimation at the same time essentially for free. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
Reply by Tauno Voipio May 15, 20132013-05-15
On 15.5.13 6:22 , robert bristow-johnson wrote:
> On May 15, 8:21 am, Dave <dspg...@netscape.net> wrote: >> On May 14, 2:43 pm, "dszabo" <62466@dsprelated> wrote: >> >>>> Hi all >>>> I have a FIR decimation code, which is meant to decimate audio from 44100 >>>> Hz to 11025. >>>> My problem is the output is complex, but I need to get this data back to >>>> real number, as the complex >>>> don't mean nothing to me. How do I do it? >> >>> Nothing about a decimation filter requires the output to be complex. If >>> you can figure out why the author made the decision to make it complex, >>> then conversion back to real data will reveal itself. >> >> The data is mixed to shift the center frequency. This disturbs the >> symmetry of real signals. The input into the low-pass filter is >> complex and therefore the output of the filter is then complex. >> >> This is just an alternative way of obtaining complex envelope instead >> of using Hilbert transforms. >> > > gotta have really sharp filters to do that. back in my ham radio days > (the 1970s), we didn't have hilbert transformers and we needed very > sharp IF filters (they were electro-mechanical crystal-lattice > filters). > > r b-j >
Or ... We did, but they were not too good. Google e.g. for Barker & Williamson 2Q4. -- Tauno Voipio, OH2UG (since early 1960's)
Reply by Tim Wescott May 15, 20132013-05-15
On Tue, 14 May 2013 16:03:00 -0500, joaoneves wrote:

>>Purely a guess. >> >>If you are looking for an event like a lightning strike, you might want >>to > look for a rapid change in the magnitude of the analytic signal, in > which case you need a complex signal. >> >> >>Bob >> >> >> > It works, but it's not time accurated. I want to apply a method on some > historical data recorded using this filter. This new method would > require resample to 44100 Hz and calculations in the frequency domain.
We'd need to see how the sampling itself is done. From the comments the filters themselves are bandpass filters that both provide anti-aliasing and phase shifting; presumably that data is then sampled into quadrature data and stored or transmitted. Do you have pairs stored at the 11025 rate, or are your pairs stored at 5512.5Hz (for an overall rate of 11025)? Again from the comments the anti-aliasing is sufficient, so the original _filtered_ signal can be recovered, but it'll still be subject to the band-pass filtering. If that'll work with your frequency-domain method then you should be OK. You should, in fact, be able to to write your frequency-domain method to use the complex data -- but I can understand not wanting to do so if you're not familiar with DSP. You'll lose a bit of accuracy to numerical issues with a two-step method, but you'll gain a lot in clarity. -- 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
Reply by Greg Berchin May 15, 20132013-05-15
Actually I was overly conservative in my example. A complex
baseband signal sampled at 11025 Hz could have a bandwidth of
20000 Hz, instead of the 10000 Hz in my example. Either that, or
the 10000 Hz bandwidth complex baseband signal could be sampled at
5512.5 Hz.

Greg
Reply by Vladimir Vassilevsky May 15, 20132013-05-15
On 5/15/2013 11:09 AM, Greg Berchin wrote:

> For example, suppose that a real signal has bandwidth from > 10000 Hz to 20000 Hz, sampled at 44100 Hz. One could center the > passband on DC (baseband) with a complex bandshift, at which point > it would have bandwidth from -5000 Hz to +5000 Hz. One could then > decimate to 11025 Hz (with appropriate filtering).
From efficiency standpoint, it could be better to filter/decimate real signal first, then derotate to DC. Vladimir Vassilevsky DSP and Mixed Signal Designs www.abvolt.com
Reply by Greg Berchin May 15, 20132013-05-15
On Wed, 15 May 2013 05:21:37 -0700 (PDT), Dave
<dspguy2@netscape.net> wrote:

>This is just an alternative way of obtaining complex envelope instead >of using Hilbert transforms.
Not necessarily. Back in my SONAR days, we would baseband bandpass signals like this in order to reduce the data rate. For example, suppose that a real signal has bandwidth from 10000 Hz to 20000 Hz, sampled at 44100 Hz. One could center the passband on DC (baseband) with a complex bandshift, at which point it would have bandwidth from -5000 Hz to +5000 Hz. One could then decimate to 11025 Hz (with appropriate filtering). The steps can be combined into a single filter, which is apparently what the OP has encountered. The resulting complex-sampled 11025 Hz signal would have half the data rate of the original real-sampled 44100 Hz signal. The way to resample the complex 11025 Hz signal back to a real 44100 Hz signal is to first resample both the real and the imaginary parts, using a REAL filter, to 44100 Hz, and then to complex bandshift the baseband signal so that it spans the original 10000 Hz to 20000 Hz. Greg
Reply by dszabo May 15, 20132013-05-15
>On May 14, 2:43=A0pm, "dszabo" <62466@dsprelated> wrote: >> >Hi all >> >I have a FIR decimation code, which is meant to decimate audio from
4410=
>0 >> >Hz to 11025. >> >My problem is the output is complex, but I need to get this data back
to
>> >real number, as the complex >> >don't mean nothing to me. How do I do it? >> >> Nothing about a decimation filter requires the output to be complex.
=A0I=
>f >> you can figure out why the author made the decision to make it complex, >> then conversion back to real data will reveal itself. > >The data is mixed to shift the center frequency. This disturbs the >symmetry of real signals. The input into the low-pass filter is >complex and therefore the output of the filter is then complex. > >This is just an alternative way of obtaining complex envelope instead >of using Hilbert transforms. > >Dave >
I guess my confusion lies in the choice to use a complex lowpass filter rather than a real one. It seems like an odd choice for a decimation filter to intentionally have an asymetrical frequency response.
Reply by robert bristow-johnson May 15, 20132013-05-15
On May 15, 8:21&#4294967295;am, Dave <dspg...@netscape.net> wrote:
> On May 14, 2:43&#4294967295;pm, "dszabo" <62466@dsprelated> wrote: > > > >Hi all > > >I have a FIR decimation code, which is meant to decimate audio from 44100 > > >Hz to 11025. > > >My problem is the output is complex, but I need to get this data back to > > >real number, as the complex > > >don't mean nothing to me. How do I do it? > > > Nothing about a decimation filter requires the output to be complex. &#4294967295;If > > you can figure out why the author made the decision to make it complex, > > then conversion back to real data will reveal itself. > > The data is mixed to shift the center frequency. This disturbs the > symmetry of real signals. The input into the low-pass filter is > complex and therefore the output of the filter is then complex. > > This is just an alternative way of obtaining complex envelope instead > of using Hilbert transforms. >
gotta have really sharp filters to do that. back in my ham radio days (the 1970s), we didn't have hilbert transformers and we needed very sharp IF filters (they were electro-mechanical crystal-lattice filters). r b-j
Reply by Dave May 15, 20132013-05-15
On May 14, 2:43&#4294967295;pm, "dszabo" <62466@dsprelated> wrote:
> >Hi all > >I have a FIR decimation code, which is meant to decimate audio from 44100 > >Hz to 11025. > >My problem is the output is complex, but I need to get this data back to > >real number, as the complex > >don't mean nothing to me. How do I do it? > > Nothing about a decimation filter requires the output to be complex. &#4294967295;If > you can figure out why the author made the decision to make it complex, > then conversion back to real data will reveal itself.
The data is mixed to shift the center frequency. This disturbs the symmetry of real signals. The input into the low-pass filter is complex and therefore the output of the filter is then complex. This is just an alternative way of obtaining complex envelope instead of using Hilbert transforms. Dave
Reply by May 14, 20132013-05-14
Do you mean that the data you have is already filtered and decimated, and you want to re-sample to get back up to 44.1khz? If so, you will not recover the original bandwidth. Maybe your new frequency-domain algorithm will have an easier time of estimating time-of-arrival or direction at the higher sample rate, but fundamentally you have lost information that you can't get back.

Bob