|
>-----Original
Message-----
>From: Rud Merriam <[EMAIL PROTECTED]> >To: Undisclosed-Recipient:@one.surfree.co.uk; <Undisclosed-Recipient:@one.surfree.co.uk;> >Date: 2006/01/27 11:16 >Subject: [soft_radio] RF Digital Protocol Education > >I want to experiment with digital protocols in
ham radio by starting with the PC soundcard. I understand some of the basics
like filters and FFT. I even have some of >them working in code (C++).
==========================================================
FFTs and similar are not suitable for narrow
sgift FSK wher ethe spectra of each tone keyed on-off overlap
eachother.
I relayed your question to a 'guru' of DSP and
data demodulation, Charles G4GUO. His response was :
"--------------------------
mix IQ down to baseband, filter, take the arctan
of the result, subtract from the previous result to get the phase change, watch
for +/- pi transitions
here is some code I have used (this was for 300 baud FSK, but I have used it for 1200 and 9600 as well as plain old FM audio demod). Anything prefixed with m_ is a global variable (actually it is a member variable in C++ speak). float CFsk::discriminate( float real, float imag ) { float change,phase; // discriminator phase = atan2( imag, real ); change = phase - m_old_phase; m_old_phase = phase; if( fabs( change ) > M_PI ) { if(change > 0 ) change -= (float)T_PI; else change += (float)T_PI; } return change; } void CFsk::demodulate_high_baud_samples( float
*in, unsigned int length )
{ unsigned int
i;
float real,imag,delta; m_mag = 0; m_out_length = 0; delta = m_mid_delta; for( i = 0; i < length; i++ ) { // // Mix to base band // real = cos(m_mid_acc)*in[i]; imag = -sin(m_mid_acc)*in[i]; real = matched_filter( mfb[0], hi300, real, HI300LEN ); imag = matched_filter( mfb[1], hi300, imag, HI300LEN ); m_out_mem[m_out_length++] = discriminate( real, imag ); // // Update the accumulators // m_mid_acc += delta; if( m_mid_acc >= T_PI ) m_mid_acc -= (float)T_PI; } } --------------"
Hope that helps - Andy
G4JNT
YAHOO! GROUPS LINKS
|
- [soft_radio] RF Digital Protocol Education Rud Merriam
- Re: [soft_radio] RF Digital Protocol Education Andy
