Hi Robert, Yes, I need to do ASRC, and the challenge is how to estimate the drift and correct it.
As I mentioned in the earlier attached figure, DSP is slave and tuner chip feeds the baseband samples and is the master. Now the question is where to do the timestamping for correctly estimate the drift. The system is an embedded platform having a tuner chip and DSP chip, both have independent oscillators ( Xtal) for providing the clock. So my question is how to timestamp the audio data. After channel decoder the compressed audio will have variable decoding times based on audio content. So this is not a good place to timestamp as it is very jittery. Suppose every digital radio transmission frame duration T seconds corresponds to T seconds of audio, can I timestamp the baseband RF IQ samples when it arrives at the DSP ? After demodulation and audio decoder calculate the max delay it can have for worst case scenarios, and add that as target delay before playing out. Then while playing out each audio period read the current time, the difference of current time - ( RF packet arrival time + Target Delay) should be ideally zero, if audio plays out at the same rate as transmission of audio,. -ben ________________________________ From: music-dsp-boun...@music.columbia.edu <music-dsp-boun...@music.columbia.edu> on behalf of robert bristow-johnson <r...@audioimagination.com> Sent: Monday, February 5, 2018 1:01 PM To: music-dsp@music.columbia.edu Subject: Re: [music-dsp] Clock drift and compensation Ben, can you confirm that what you want to do is Asynchronous Sample Rate Conversion (ASRC)? this is what Steffan is talking about and what it looked like you were looking for in your first post. If ASRC is what you wanna do, that is a combination of the SRC task (like what is done to a sound file when you change the sample rate of it) and servo systems like you get in control theory, like what is done in a phase-lock loop (like hurrying up or slowing down based on the delay). If you wanna write your own code to do this, it's about those two general DSP and digital control problems. you will need to be able to read a fast system clock (like what profilers read) to do this really well. r b-j On 1/28/18 1:16 PM, STEFFAN DIEDRICHSEN wrote: > Actually, there are SRC chips available from Texas Instruments, just > take look at their website. They don’t cost too much and are found in > countless digital mixing consoles. > > Best, > > Steffan > > Von meinem iPhone gesendet > > > > Von meinem iPhone gesendet > Am 28.01.2018 um 17:19 schrieb Benny Alexandar <ben.a...@outlook.com > <mailto:ben.a...@outlook.com>>: > >> Hi GM, >> >> >> HT -> Atan2 -> differenciate -> unwrap >> Could you please explain how to find the drift using HT, >> >> HT -> gives real(I) & imaginary (Q) components of real signal >> Atan2 -> the phase of an I Q signal >> diff-> gives what ? >> unwrap ? >> >> -ben >> >> >> ------------------------------------------------------------------------ >> *From:* music-dsp-boun...@music.columbia.edu >> <mailto:music-dsp-boun...@music.columbia.edu> >> <music-dsp-boun...@music.columbia.edu >> <mailto:music-dsp-boun...@music.columbia.edu>> on behalf of gm >> <g...@voxangelica.net <mailto:g...@voxangelica.net>> >> *Sent:* Saturday, January 27, 2018 5:20 PM >> *To:* music-dsp@music.columbia.edu <mailto:music-dsp@music.columbia.edu> >> *Subject:* Re: [music-dsp] Clock drift and compensation >> >> I don't understand your project at all so not sure if this is helpful, >> probably not, >> but you can calculate the drift or instantanous frequency of a sine wave >> on a per sample basis >> using a Hilbert transform >> HT -> Atan2 -> differenciate -> unwrap >> _______________________________________________ >> dupswapdrop: music-dsp mailing list >> music-dsp@music.columbia.edu <mailto:music-dsp@music.columbia.edu> >> https://lists.columbia.edu/mailman/listinfo/music-dsp >> >> _______________________________________________ >> dupswapdrop: music-dsp mailing list >> music-dsp@music.columbia.edu <mailto:music-dsp@music.columbia.edu> >> https://lists.columbia.edu/mailman/listinfo/music-dsp > > > _______________________________________________ > dupswapdrop: music-dsp mailing list > music-dsp@music.columbia.edu > https://lists.columbia.edu/mailman/listinfo/music-dsp -- r b-j r...@audioimagination.com "Imagination is more important than knowledge." _______________________________________________ dupswapdrop: music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp
_______________________________________________ dupswapdrop: music-dsp mailing list music-dsp@music.columbia.edu https://lists.columbia.edu/mailman/listinfo/music-dsp