On 18 Aug, 13:06, amcneilly <amcnei...@gmail.com> wrote:
> On Aug 17, 5:22=A0pm, julius <juli...@gmail.com> wrote:
>
>
>
>
>
> > On Aug 16, 1:30 pm,amcneilly<amcnei...@gmail.com> wrote:
>
> > > I am new to DSP and i have the following problem
>
> > > I need to detect a 20khz pulse for a sonic ranging application using =
a
> > > PC. I can detect reasonably well the 20khz signal by measuring the RM=
S
> > > of the signal from the microphone then filtering the input using a
> > > high pass filter or goertzel calculation and take a RMS calculation o=
f
> > > the filtered signal. If the RMS is over a threshold value then the
> > > signal has been detected.
>
> > > The problem is that i cannot get a decent resolution. If i process th=
e
> > > signal in >=3D 64 samples chunks my signal detection works but i requ=
ire
> > > 11 samples resolution and this results in poor accuracy.
>
> > > Does anyone have any advice on a detection algorithm that would work
> > > on ~11 sample chunks?
>
> > This problem sounds like a homework problem. =A0If it is not, then you
> > made too many assumptions too soon. =A0Let us start from the very
> > beginning again: =A0what resources do you have and what do you want
> > to do? =A0How did it come to be that you have a 20 kHz pulse? =A0Did yo=
u
> > choose this?
>
> > Julius
>
> My resources, desktop computer, speaker and microphone. i am trying to
> build a crude sonic ranging system.
I assume your 'desktop computer' is a PC or something
similar?
If so, you have made the implicit assumption that the
synchronization between transmit and recieve modes will
not be a probleml i.e. that it takes a negligable amount
of time from you finish sending the pulse and to your
reciever is up and running.
Be aware that OSes like Windows have a lot of tasks
running at any one time, so there might be a delay
between the time you have finished sending and till
the reciever has been initialized.
Synchronization might be a problem, depending on
what kinds of accuracies you are looking for.
> My transmitter is a speaker with a frequency range of up to 22 khz. I
> selected 20Khz because i figured that it would have the least
> interference from the other available frequencies and is inaudible.
You don't want a signal with no interference, you want
a signal that you can extract even in the presence of
interference.
As you have been told several times, this is a standard
problem in radar and sonar contexts. Check out the literature
on pulse shaping and matched filters.
Rune
Reply by julius●August 18, 20092009-08-18
On Aug 18, 7:06=A0am, amcneilly <amcnei...@gmail.com> wrote:
> On Aug 17, 5:22=A0pm, julius <juli...@gmail.com> wrote:
>
>
>
> > On Aug 16, 1:30 pm,amcneilly<amcnei...@gmail.com> wrote:
>
> > > I am new to DSP and i have the following problem
>
> > > I need to detect a 20khz pulse for a sonic ranging application using =
a
> > > PC. I can detect reasonably well the 20khz signal by measuring the RM=
S
> > > of the signal from the microphone then filtering the input using a
> > > high pass filter or goertzel calculation and take a RMS calculation o=
f
> > > the filtered signal. If the RMS is over a threshold value then the
> > > signal has been detected.
>
> > > The problem is that i cannot get a decent resolution. If i process th=
e
> > > signal in >=3D 64 samples chunks my signal detection works but i requ=
ire
> > > 11 samples resolution and this results in poor accuracy.
>
> > > Does anyone have any advice on a detection algorithm that would work
> > > on ~11 sample chunks?
>
> > This problem sounds like a homework problem. =A0If it is not, then you
> > made too many assumptions too soon. =A0Let us start from the very
> > beginning again: =A0what resources do you have and what do you want
> > to do? =A0How did it come to be that you have a 20 kHz pulse? =A0Did yo=
u
> > choose this?
>
> > Julius
>
> My resources, desktop computer, speaker and microphone. i am trying to
> build a crude sonic ranging system.
>
> My transmitter is a speaker with a frequency range of up to 22 khz. I
> selected 20Khz because i figured that it would have the least
> interference from the other available frequencies and is inaudible.
In the presence of white noise, the optimal signal delay estimator is
a cross-correlator, followed by a peak-finder. So this should be the
"signal matching" solution that you are looking for. However, your
received signal may be subjected to frequency-selective distortion,
and you may have to account for that. But in the simplest model
under which the signal just gets reflected back at you, the solution
is simple.
Now you are left with the problem of choosing what signal to send.
One of the factors is what others have mentioned: time-frequency
ambiguity or profile. Look this up, and think again what this means
in terms of the signal that you have selected (hint: your signal
choice sucks).
Once you learn that, then figure out what kind of noise you have,
and optimize your signal parameter.
Basically, all signs point towards some sort of wideband signal,
such as chirp, or spread-spectrum, or something. But you decided
yourself to choose a narrowband signal.
Good luck.
Julius
Reply by amcneilly●August 18, 20092009-08-18
On Aug 17, 5:22=A0pm, julius <juli...@gmail.com> wrote:
> On Aug 16, 1:30 pm,amcneilly<amcnei...@gmail.com> wrote:
>
> > I am new to DSP and i have the following problem
>
> > I need to detect a 20khz pulse for a sonic ranging application using a
> > PC. I can detect reasonably well the 20khz signal by measuring the RMS
> > of the signal from the microphone then filtering the input using a
> > high pass filter or goertzel calculation and take a RMS calculation of
> > the filtered signal. If the RMS is over a threshold value then the
> > signal has been detected.
>
> > The problem is that i cannot get a decent resolution. If i process the
> > signal in >=3D 64 samples chunks my signal detection works but i requir=
e
> > 11 samples resolution and this results in poor accuracy.
>
> > Does anyone have any advice on a detection algorithm that would work
> > on ~11 sample chunks?
>
> This problem sounds like a homework problem. =A0If it is not, then you
> made too many assumptions too soon. =A0Let us start from the very
> beginning again: =A0what resources do you have and what do you want
> to do? =A0How did it come to be that you have a 20 kHz pulse? =A0Did you
> choose this?
>
> Julius
My resources, desktop computer, speaker and microphone. i am trying to
build a crude sonic ranging system.
My transmitter is a speaker with a frequency range of up to 22 khz. I
selected 20Khz because i figured that it would have the least
interference from the other available frequencies and is inaudible.
Reply by Manny●August 18, 20092009-08-18
On Aug 16, 11:00�pm, Vladimir Vassilevsky <nos...@nowhere.com> wrote:
> Randy Yates wrote:
> > Vladimir Vassilevsky <nos...@nowhere.com> writes:
>
> >>1. Record the signal at the known distance for using it as an etalon.
>
> > Hey Vlad, "etalon" is not in my dictionary - what is it?
>
> This is not the ethanol :-)
>
> Etalon (latin) = standard, norm, gauge, reference.
>
> VLV
We - the vulgar folks - dub this template :).
-Manny
Reply by julius●August 17, 20092009-08-17
On Aug 16, 1:30 pm, amcneilly <amcnei...@gmail.com> wrote:
> I am new to DSP and i have the following problem
>
> I need to detect a 20khz pulse for a sonic ranging application using a
> PC. I can detect reasonably well the 20khz signal by measuring the RMS
> of the signal from the microphone then filtering the input using a
> high pass filter or goertzel calculation and take a RMS calculation of
> the filtered signal. If the RMS is over a threshold value then the
> signal has been detected.
>
> The problem is that i cannot get a decent resolution. If i process the
> signal in >= 64 samples chunks my signal detection works but i require
> 11 samples resolution and this results in poor accuracy.
>
> Does anyone have any advice on a detection algorithm that would work
> on ~11 sample chunks?
This problem sounds like a homework problem. If it is not, then you
made too many assumptions too soon. Let us start from the very
beginning again: what resources do you have and what do you want
to do? How did it come to be that you have a 20 kHz pulse? Did you
choose this?
Julius
Reply by Clay●August 17, 20092009-08-17
On Aug 16, 5:43�pm, Randy Yates <ya...@ieee.org> wrote:
> Vladimir Vassilevsky <nos...@nowhere.com> writes:
> > 1. Record the signal at the known distance for using it as an etalon.
>
> Hey Vlad, "etalon" is not in my dictionary - what is it?
> --
> Randy Yates � � � � � � � � � � �% "...the answer lies within your soul
> Digital Signal Labs � � � � � � �% � � � 'cause no one knows which side
> mailto://ya...@ieee.org � � � � �% � � � � � � � � � the coin will fall."http://www.digitalsignallabs.com% �'Big Wheels', *Out of the Blue*, ELO
Hello Randy,
Vlad gave a use with which I was not familiar. It is commonly used in
reference to lasers. Recall a common design for a laser is a resonant
(Fabry-Perot) cavity formed by two reflectors with an amplyfing medium
in between the two reflectors. With some types of lasers the lasing
medium has enough gain so that the laser will create multiple
frequencies at once. So to fix this, an etalon is made out of a chunk
of glass with two parallel faces and then is placed into the resonant
cavity. Thus you are placing two resonators in series - one has a very
narrow response and the other is not so narrow. The etalon may be
rotated slightly to fine tune the frequency of operation. The
responses of the cavity and of the etalon are essentially comb filter
like (albeit with sharper tines) and the lasing material's response is
essentially gaussian above a lasing threshold.
The need for the etalon stems from a high power laser needing a lot of
lasing medium thus the reflectors that encompass the medium end up
being so widely spaced as to make the resonant cavity's nodes so
closely spaced that the natural line width of the lasing material
spans multiple modes. The etalon is used to remove the extra modes of
oscillation.
Clay
Reply by Jerry Avins●August 17, 20092009-08-17
Randy Yates wrote:
> Vladimir Vassilevsky <nospam@nowhere.com> writes:
>
>> 1. Record the signal at the known distance for using it as an etalon.
>
> Hey Vlad, "etalon" is not in my dictionary - what is it?
Search for etalon in http://science.jrank.org/pages/3633/Interferometry.html
Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
Reply by Jerry Avins●August 17, 20092009-08-17
Jmcneilly wrote:
> I am new to DSP and i have the following problem
>
> I need to detect a 20khz pulse for a sonic ranging application using a
> PC. I can detect reasonably well the 20khz signal by measuring the RMS
> of the signal from the microphone then filtering the input using a
> high pass filter or goertzel calculation and take a RMS calculation of
> the filtered signal. If the RMS is over a threshold value then the
> signal has been detected.
>
> The problem is that i cannot get a decent resolution. If i process the
> signal in >= 64 samples chunks my signal detection works but i require
> 11 samples resolution and this results in poor accuracy.
>
> Does anyone have any advice on a detection algorithm that would work
> on ~11 sample chunks?
As far as I know, you still haven't told us the sampling frequency.
Since your tone is at 20 KHz and you use a sound card, I assume it to be
44.1 KHz. 11 samples cover about 2.5 ms. or about 5 cycles. Detecting
that reliably is a very tall order.
Why did you start a new thread? Perhaps you didn't like the answers you
were getting in the old one?
Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
Reply by Richard Dobson●August 17, 20092009-08-17
Peter K. wrote:
> On 16 Aug, 18:00, Vladimir Vassilevsky <nos...@nowhere.com> wrote:
>
>> Etalon (latin) = standard, norm, gauge, reference.
>>
>
Curiously apposite in the end;
We might start here
http://encyclopedia.thefreedictionary.com/etalon
go on to here,
http://encarta.msn.com/dictionary_1861609247/etalon.html
And then find a Basque proverb:
"L'�talon ne sent pas les coups de pieds de la jument"
= "The stallion does not feel the kicks of the mare"
Which is quite funny - a word connoting a "standard" (of measurement)
that is impressively insensitive!
Richard Dobson
Reply by Peter K.●August 16, 20092009-08-16
On 16 Aug, 18:00, Vladimir Vassilevsky <nos...@nowhere.com> wrote:
>
> Etalon (latin) = standard, norm, gauge, reference.
>