Reply by JuBe July 7, 20082008-07-07
On Jul 4, 12:30 pm, "novatron1_2" <novatron...@hotmail.com> wrote:
> I'm trying to separate a data signal of ~800Hz from a carrier wave which is > ~2000Hz. As both frequencies vary slightly over time I was hoping to use > envelope detection to strip off the carrier, my sample rate is 22560. > > I've read about taking the Hilbert transform of the input signal and then > squaring this and adding it to the square of the input signal, before > finally taking a square root of the result to find the envelope. > > i.e envelope = sqr(( Hilbert_transfrom* > Hilbert_transfrom)+(org_sig*org_sig)) > > I'm writing the software in Visual Basic 6.0, but I'm really struggling to > convert the Hilbert transform from pure mathematics into code. > > I would appreciate it if someone could possible help me in writing the > code. > > Stuart
Hi You can do many things to compute Hilbert transform. the simplest is to use a FFT (you should find good libraries for Visual Basic) with an analytic signal "signal + 0i" and in the F space setting zeros from -pi to 0 and do again a FFT to the time domain, then you should have a Hilbert Transform. Juan
Reply by Jerry Avins July 4, 20082008-07-04
Randy Yates wrote:
> "novatron1_2" <novatron1_2@hotmail.com> writes: > >> I'm trying to separate a data signal of ~800Hz from a carrier wave which is >> ~2000Hz. As both frequencies vary slightly over time I was hoping to use >> envelope detection to strip off the carrier, my sample rate is 22560. >> >> I've read about taking the Hilbert transform of the input signal and then >> squaring this and adding it to the square of the input signal, before >> finally taking a square root of the result to find the envelope. >> >> i.e envelope = sqr(( Hilbert_transfrom* >> Hilbert_transfrom)+(org_sig*org_sig)) >> >> I'm writing the software in Visual Basic 6.0, but I'm really struggling to >> convert the Hilbert transform from pure mathematics into code. >> >> I would appreciate it if someone could possible help me in writing the >> code. >> >> Stuart > > Stuart, > > What type of modulation is being used?
When you answer Randy's question, we can get down to helping you demodulate the signal. If it is AM, we can show you how to implement a Hilbert transformer and discuss other approaches. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Jerry Avins July 4, 20082008-07-04
Rune Allnor wrote:
> On 4 Jul, 16:03, Jerry Avins <j...@ieee.org> wrote: >> Rune Allnor wrote: >>> On 4 Jul, 13:30, "novatron1_2" <novatron...@hotmail.com> wrote: >>>> I'm trying to separate a data signal of ~800Hz from a carrier wave which is >>>> ~2000Hz. As both frequencies vary slightly over time I was hoping to use >>>> envelope detection to strip off the carrier, my sample rate is 22560. >>> That's a novel way of doing things? What's wrong with an >>> off-the-shelf lowpass filter? >> Maybe he needs to demodulate an AM signal and doesn't appreciate the >> difference between demodulation and separation. > > Well, 'separation' is hardly a well-defined technical term. > Maybe the OP meant demodulation; I certainly interpreted > this as a filter problem.
He made he first part seem like one, but he mentioned "carrier" and "envelope", and described an AM demodulation technique. I at first mistook his carrier frequency to be 8000 KHz. At the actual frequencies and with that sample rate, peak detection won't work for AM, so he does need the quadrature signal. Of course, unless the modulation percentage is very high or the signal is already sampled, a diode and capacitor would do the task. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Rune Allnor July 4, 20082008-07-04
On 4 Jul, 16:03, Jerry Avins <j...@ieee.org> wrote:
> Rune Allnor wrote: > > On 4 Jul, 13:30, "novatron1_2" <novatron...@hotmail.com> wrote: > >> I'm trying to separate a data signal of ~800Hz from a carrier wave which is > >> ~2000Hz. &#4294967295;As both frequencies vary slightly over time I was hoping to use > >> envelope detection to strip off the carrier, my sample rate is 22560. > > > That's a novel way of doing things? What's wrong with an > > off-the-shelf lowpass filter? > > Maybe he needs to demodulate an AM signal and doesn't appreciate the > difference between demodulation and separation.
Well, 'separation' is hardly a well-defined technical term. Maybe the OP meant demodulation; I certainly interpreted this as a filter problem. Rune
Reply by Jerry Avins July 4, 20082008-07-04
novatron1_2 wrote:
>> On 4 Jul, 13:30, "novatron1_2" <novatron...@hotmail.com> wrote: >>> I'm trying to separate a data signal of ~800Hz from a carrier wave > which = >> is >>> ~2000Hz. =A0As both frequencies vary slightly over time I was hoping to > u= >> se >>> envelope detection to strip off the carrier, my sample rate is 22560. >> That's a novel way of doing things? What's wrong with an >> off-the-shelf lowpass filter? >> >> Rune >> > > Thanks for the reply, do you just mean use a LP filter with a cut off > below the carrier?
If it really is a carrier, then a low-pass won't work. So which is it: a 2MHz carrier with with an 800Hz impressed (how: AM? FM? other?) on it, or separate 2MHz and 800Hz signals that coexist? If you have a modulated carrier, you need to know the type of modulation in order to demodulate it. The method you described works for AM. There is a simpler way -- peak detection -- if the sample rate is high enough. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Jerry Avins July 4, 20082008-07-04
Rune Allnor wrote:
> On 4 Jul, 13:30, "novatron1_2" <novatron...@hotmail.com> wrote: >> I'm trying to separate a data signal of ~800Hz from a carrier wave which is >> ~2000Hz. As both frequencies vary slightly over time I was hoping to use >> envelope detection to strip off the carrier, my sample rate is 22560. > > That's a novel way of doing things? What's wrong with an > off-the-shelf lowpass filter?
Maybe he needs to demodulate an AM signal and doesn't appreciate the difference between demodulation and separation. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Rune Allnor July 4, 20082008-07-04
On 4 Jul, 14:56, "novatron1_2" <novatron...@hotmail.com> wrote:
> >On 4 Jul, 13:30, "novatron1_2" <novatron...@hotmail.com> wrote: > >> I'm trying to separate a data signal of ~800Hz from a carrier wave > which = > >is > >> ~2000Hz. =A0As both frequencies vary slightly over time I was hoping to > u= > >se > >> envelope detection to strip off the carrier, my sample rate is 22560. > > >That's a novel way of doing things? What's wrong with an > >off-the-shelf lowpass filter? > > >Rune > > Thanks for the reply, do you just mean use a LP filter with a cut off > below the carrier?
Yes, but a bit more then that: - Passband corner above the highest fequency of the data signal - Stopband corner below the carrier The assumption is, of course, that the upper end of the data spectrum does not extend as far as the carrier. Rune
Reply by Randy Yates July 4, 20082008-07-04
"novatron1_2" <novatron1_2@hotmail.com> writes:

> I'm trying to separate a data signal of ~800Hz from a carrier wave which is > ~2000Hz. As both frequencies vary slightly over time I was hoping to use > envelope detection to strip off the carrier, my sample rate is 22560. > > I've read about taking the Hilbert transform of the input signal and then > squaring this and adding it to the square of the input signal, before > finally taking a square root of the result to find the envelope. > > i.e envelope = sqr(( Hilbert_transfrom* > Hilbert_transfrom)+(org_sig*org_sig)) > > I'm writing the software in Visual Basic 6.0, but I'm really struggling to > convert the Hilbert transform from pure mathematics into code. > > I would appreciate it if someone could possible help me in writing the > code. > > Stuart
Stuart, What type of modulation is being used? -- % Randy Yates % "I met someone who looks alot like you, %% Fuquay-Varina, NC % she does the things you do, %%% 919-577-9882 % but she is an IBM." %%%% <yates@ieee.org> % 'Yours Truly, 2095', *Time*, ELO http://www.digitalsignallabs.com
Reply by novatron1_2 July 4, 20082008-07-04
>On 4 Jul, 13:30, "novatron1_2" <novatron...@hotmail.com> wrote: >> I'm trying to separate a data signal of ~800Hz from a carrier wave
which =
>is >> ~2000Hz. =A0As both frequencies vary slightly over time I was hoping to
u=
>se >> envelope detection to strip off the carrier, my sample rate is 22560. > >That's a novel way of doing things? What's wrong with an >off-the-shelf lowpass filter? > >Rune >
Thanks for the reply, do you just mean use a LP filter with a cut off below the carrier?
Reply by novatron1_2 July 4, 20082008-07-04
>On 4 Jul, 13:30, "novatron1_2" <novatron...@hotmail.com> wrote: >> I'm trying to separate a data signal of ~800Hz from a carrier wave
which =
>is >> ~2000Hz. =A0As both frequencies vary slightly over time I was hoping to
u=
>se >> envelope detection to strip off the carrier, my sample rate is 22560. > >That's a novel way of doing things? What's wrong with an >off-the-shelf lowpass filter? > >Rune >
Thanks for the reply, do you just mean use a LP filter with a cut off below the carrier?