Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20764 Discussions

Division Approximation In Fm Demodulator

Altera_Forum
Honored Contributor II
2,886 Views

i am a post-graduate student at the university of ioannina greece "physics department". my thesis subject has to do about an implement of sdr receiver and demodulation of fm signal. i already have implement the ddc part in an fpga with my i and q signals in two complement's integer format (the same format used by the adc) but i have problem with the demodulation and especially with division.i use a digital phase discriminator algorithm witch produce an output following the next equation (i*dq – qdi)/(i^2 + q^2).i can compute the numerator and the denominator but the problem is with division. i can use a divisor but the result from this division is just a quotient and a remainder, this wont give the desired output in a fixed scale capable to be processed properly by a dac.is there any possible way to implement a divisor with a fixed range quotient in regard with the remainder.in other words is it possible to produce an approximated quotient from the division of two complement format signals. with only the knowledge of the first quotient and the remainder, and if that is possible what is the form of the output?any answer guidance proposed bibliography or links will be very helpful. (http://www.fpga4fun.com/forum/viewtopic.php?t=1669&start=0&postdays=0&postorder=asc&highlight=)

0 Kudos
23 Replies
Altera_Forum
Honored Contributor II
385 Views

Hi Xristos, 

 

That is the claim and depends on how much other spaghetti is there in the chip. The best way is to try and design your multipliers(12 bit wide) and compile then quartus will tell you the fmax value achieved.
0 Kudos
Altera_Forum
Honored Contributor II
385 Views

Actually the Cordic Atan function isn't that complicated. It's just add/subtract and a few precalculated constants. After just 8 iterations, you're within 1° but even more important, you don't need to divide Q/I or normalize the amplitude. Feed the raw I and Q samples into the algorithm and get phase out the other side. 

Then just do the dO/dt to convert to FM. 

 

Given I and Q, to calculate phase in degrees, first we need to account for the quadrant the signal is in. 

I[0] = (I<0) ? ( (Q<0) ? -Q : Q) : I; 

Q[0] = (I<0) ? ( (Q<0) ? I : -I) : Q; 

Phase[0] = (I<0) ? ( (Q<0) ? -90 : 90) : 0 

 

Now iterate the following three lines till you're happy with the resolution 

for (n=1; n<sufficient_iterations; n++) { 

I[n] = I[n-1] + Sign(Q[n-1]) * Q[n-1]/(2^(n-2) ); // Sign(n) = ±1, Div by 2^n is a shift right. 

Q[n] = Q[n-1] - Sign(Q[n-1]) * I[n-1]/(2^(n-2) ); 

Phase[n] = Phase[n-1] + Sign(Q[n-1]) * Atan(1/(2^(n-2)))*180/pi; // The Atan is usually a constant in a look up table. 

 

Note, I translated this from a mathCad routine I have, so the C code might be off a bit. 

 

This will get you back to my original post which, by the way, is the basis for the radio I designed in 1990 that Nasa has been using since then to retrieve the instrumentation data from the space shuttles.
0 Kudos
Altera_Forum
Honored Contributor II
385 Views

Actually if we clip in someway the variations of amplitude noise in our incoming signal so it has a constant amplitude then its for sure true that the algorithm I*dQ-Q*dI will work right.....if anyone has an idea on how can we achieve this before or after the ADC.....

0 Kudos
Reply