Reply by Rick Lyons October 27, 20102010-10-27
On Fri, 22 Oct 2010 22:12:13 -0500, Vladimir Vassilevsky
<nospam@nowhere.com> wrote:

      [Snipped by Lyons]
> >There is a paradox which I can't understand: despite of the miracles of >Google and Wikipedia, and public libraries with so many good books, why >there are so many clueless folks around? > >VLV
Hi Vladimir, IF DSP were easy, they'd call it a sport. See Ya', [-Rick-]
Reply by Vladimir Vassilevsky October 23, 20102010-10-23

Randy Yates wrote:

> Tim Wescott <tim@seemywebsite.com> writes: > >>[...] >>You're only 100% competent if you're not pushing yourself. > > > On that we can agree on! Confidence is a sign of lingering too > long in your comfort zone.
//-------- "A man goes to knowledge as he goes to war: wide-awake, with fear, with respect, and with absolute assurance. Going to knowledge or going to war in any other manner is a mistake, and whoever makes it might never live to regret it." Carlos Castaneda //-------- VLV
Reply by Randy Yates October 23, 20102010-10-23
Tim Wescott <tim@seemywebsite.com> writes:
> [...] > You're only 100% competent if you're not pushing yourself.
On that we can agree on! Confidence is a sign of lingering too long in your comfort zone. -- Randy Yates % "Rollin' and riding and slippin' and Digital Signal Labs % sliding, it's magic." mailto://yates@ieee.org % http://www.digitalsignallabs.com % 'Living' Thing', *A New World Record*, ELO
Reply by Tim Wescott October 23, 20102010-10-23
On 10/22/2010 08:12 PM, Vladimir Vassilevsky wrote:
> > > Tim Wescott wrote: > >> On 10/22/2010 10:40 AM, Vladimir Vassilevsky wrote: >> >>> >>> >>> Tim Wescott wrote: >>> >>>> On 10/22/2010 09:38 AM, Vladimir Vassilevsky wrote: >>> >>> >>>> > FM at 4.8kHz ? A 8 bit microcontroller would do. >>> >>> >>>> Good point -- I should have _thought_ about what the frequency >>>> implied. And if an 8-bit micro will do, then one can easily do this >>>> with floating point in a DSP. >>> >>> >>> No. A 8-bit microcontroller would do in the floating point. >> >> >> I didn't say it wouldn't, although it'd have to be a new one: >> shoe-horning it into the 0.5MIPS machines that were available when I >> graduated would be a challenge. > > When you graduated, you accomplished what you needed with that 0.5 MIPS > 6811 thing that you had. Nobody thought it could be possible. > Nowadays a moron with dual core Pentium don't have enough brains to do > some basic processing at 4.8kHz. > >> Trying to do the job using the FFT, as the OP proposed, may bring it >> out of the 8-bit class and firmly into DSP territory, however. > > That could be 8-bit deal also as it doesn't have to chase the real time. > >> The OP's post has "senior project" written all over it, in which case >> one of his customer (i.e. advisor) requirements could well be "use >> this here eval board". > > There is a paradox which I can't understand: despite of the miracles of > Google and Wikipedia, and public libraries with so many good books, why > there are so many clueless folks around?
I remember being markedly clueless when I was young, and often when I venture into areas that I've never been, or haven't been for a while, I find that I'm still clueless (or at least suffering from hypoclueness). You're only 100% competent if you're not pushing yourself. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by Vladimir Vassilevsky October 23, 20102010-10-23

Tim Wescott wrote:

> On 10/22/2010 10:40 AM, Vladimir Vassilevsky wrote: > >> >> >> Tim Wescott wrote: >> >>> On 10/22/2010 09:38 AM, Vladimir Vassilevsky wrote: >> >> >>> > FM at 4.8kHz ? A 8 bit microcontroller would do. >> >> >>> Good point -- I should have _thought_ about what the frequency >>> implied. And if an 8-bit micro will do, then one can easily do this >>> with floating point in a DSP. >> >> >> No. A 8-bit microcontroller would do in the floating point. > > > I didn't say it wouldn't, although it'd have to be a new one: > shoe-horning it into the 0.5MIPS machines that were available when I > graduated would be a challenge.
When you graduated, you accomplished what you needed with that 0.5 MIPS 6811 thing that you had. Nobody thought it could be possible. Nowadays a moron with dual core Pentium don't have enough brains to do some basic processing at 4.8kHz.
> Trying to do the job using the FFT, as the OP proposed, may bring it out > of the 8-bit class and firmly into DSP territory, however.
That could be 8-bit deal also as it doesn't have to chase the real time.
> The OP's post has "senior project" written all over it, in which case > one of his customer (i.e. advisor) requirements could well be "use this > here eval board".
There is a paradox which I can't understand: despite of the miracles of Google and Wikipedia, and public libraries with so many good books, why there are so many clueless folks around? VLV
Reply by Tim Wescott October 22, 20102010-10-22
On 10/22/2010 10:40 AM, Vladimir Vassilevsky wrote:
> > > Tim Wescott wrote: > >> On 10/22/2010 09:38 AM, Vladimir Vassilevsky wrote: > >> > FM at 4.8kHz ? A 8 bit microcontroller would do. > >> Good point -- I should have _thought_ about what the frequency >> implied. And if an 8-bit micro will do, then one can easily do this >> with floating point in a DSP. > > No. A 8-bit microcontroller would do in the floating point.
I didn't say it wouldn't, although it'd have to be a new one: shoe-horning it into the 0.5MIPS machines that were available when I graduated would be a challenge. Trying to do the job using the FFT, as the OP proposed, may bring it out of the 8-bit class and firmly into DSP territory, however. The OP's post has "senior project" written all over it, in which case one of his customer (i.e. advisor) requirements could well be "use this here eval board". -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by Vladimir Vassilevsky October 22, 20102010-10-22

Tim Wescott wrote:

> On 10/22/2010 09:38 AM, Vladimir Vassilevsky wrote:
> > FM at 4.8kHz ? A 8 bit microcontroller would do.
> Good point -- I should have _thought_ about what the frequency implied. > And if an 8-bit micro will do, then one can easily do this with > floating point in a DSP.
No. A 8-bit microcontroller would do in the floating point. VLV
Reply by Tim Wescott October 22, 20102010-10-22
On 10/22/2010 09:38 AM, Vladimir Vassilevsky wrote:
(top post fixed)
> > > Tim Wescott wrote: > >> On 10/22/2010 07:36 AM, Chris87 wrote: >> >>> Good morning, >>> >>> as part of a masters project I'm currently working on I need to >>> extract the >>> doppler shift from a digital signal in a DSP. >>> >>> So far I'm successfully sampling the signal, which is centered at >>> 4.88kHz >>> with a Doppler shift of about +/- 1.5kHz. >>> >>> Previously I extracted the Doppler Shift using Matlab's "demod" function >>> (FM demodulation) which worked quite well. I now implemented a >>> quadrature >>> mixer and mixed demodulator as described in [1, p57ff] however I >>> can't get >>> the FM demodulation to work, my outputs just settle at -4001 (Q15) or >>> -0.1221 (decimal). The DSP I'm using is fixed point only, so I can't >>> go the >>> "easier" route of implementing this is floating point algebra. >>> >>> Now instead of spending a lot of time trying to analyse where I'm going >>> wrong I was wondering what other, possibly easier, methods of simply >>> extracting the Doppler shift you'd suggest ? >>> >>> I though about doing an FFT on the data and extracting the Doppler shift >>> from the FFT. Is this sensible in any way? I'm only interested in >>> "Doppler >>> shift vs time" for this application. >>> >>> I'd be really grateful for any pointers towards a simple >>> implementation of >>> extracting the Doppler shift. >>> >>> Thanks >>> >>> Chris >>> >>> [1] >>> http://www.medialab.ch/archiv/pdf_studien_diplomarbeiten/da01/da2001-089_FmDemodulator.pdf >>> >> >> >> Proposing to do this with an FFT is akin to saying that your bicycle >> tire is flat, so you want to get a semi truck and trailer to get from >> your dorm to class. Yes, you can do that, but fixing the problem with >> what you have is probably easier. >> >> I'd suggest that you start by writing your own FM demodulator in >> Matlab, using floating point. Use it instead of "demod". This will >> make sure you know how to make the algorithm itself work. >> >> Save a copy of that away in case you need it later, then modify your >> working copy to do the same thing in fixed point, in a way that >> simulates the action of the data type that you're using on your DSP. >> >> Once you're sure that works, then translate that algorithm to the DSP. >> Because you already know the algorithm works, you only have to worry >> about coding errors. >>
> > FM at 4.8kHz ? A 8 bit microcontroller would do. > > VLV > Good point -- I should have _thought_ about what the frequency implied. And if an 8-bit micro will do, then one can easily do this with floating point in a DSP. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
Reply by Vladimir Vassilevsky October 22, 20102010-10-22
FM at 4.8kHz ? A 8 bit microcontroller would do.

VLV



Tim Wescott wrote:

> On 10/22/2010 07:36 AM, Chris87 wrote: > >> Good morning, >> >> as part of a masters project I'm currently working on I need to >> extract the >> doppler shift from a digital signal in a DSP. >> >> So far I'm successfully sampling the signal, which is centered at 4.88kHz >> with a Doppler shift of about +/- 1.5kHz. >> >> Previously I extracted the Doppler Shift using Matlab's "demod" function >> (FM demodulation) which worked quite well. I now implemented a quadrature >> mixer and mixed demodulator as described in [1, p57ff] however I can't >> get >> the FM demodulation to work, my outputs just settle at -4001 (Q15) or >> -0.1221 (decimal). The DSP I'm using is fixed point only, so I can't >> go the >> "easier" route of implementing this is floating point algebra. >> >> Now instead of spending a lot of time trying to analyse where I'm going >> wrong I was wondering what other, possibly easier, methods of simply >> extracting the Doppler shift you'd suggest ? >> >> I though about doing an FFT on the data and extracting the Doppler shift >> from the FFT. Is this sensible in any way? I'm only interested in >> "Doppler >> shift vs time" for this application. >> >> I'd be really grateful for any pointers towards a simple >> implementation of >> extracting the Doppler shift. >> >> Thanks >> >> Chris >> >> [1] >> http://www.medialab.ch/archiv/pdf_studien_diplomarbeiten/da01/da2001-089_FmDemodulator.pdf >> > > > Proposing to do this with an FFT is akin to saying that your bicycle > tire is flat, so you want to get a semi truck and trailer to get from > your dorm to class. Yes, you can do that, but fixing the problem with > what you have is probably easier. > > I'd suggest that you start by writing your own FM demodulator in Matlab, > using floating point. Use it instead of "demod". This will make sure > you know how to make the algorithm itself work. > > Save a copy of that away in case you need it later, then modify your > working copy to do the same thing in fixed point, in a way that > simulates the action of the data type that you're using on your DSP. > > Once you're sure that works, then translate that algorithm to the DSP. > Because you already know the algorithm works, you only have to worry > about coding errors. >
Reply by Tim Wescott October 22, 20102010-10-22
On 10/22/2010 08:57 AM, Brian wrote:
> I didn't read the reference so I don't know if this will help. But if > you sum your I and Q channels over some period, and then take > arctan(Q_sum/I_sum) it will produce the average difference in phase of > the sampled signal (-pi/2,pi/2) and the reference signal during that > period. Take the derivative of the phase values over the integration > period and you will get the doppler shift. The integration period will > determine the maximum doppler shift you can detect. From memory I > think it's 1/2T, where T is the integration period.
In skimming the reference I found a number of different ways to do this. I'm not sure if yours was included, but most of the other popular ways were. I think the OP's biggest problem is just getting it implemented in fixed point. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html