DSPRelated.com
Forums

Brute-force NCO?

Started by Ian McBride July 8, 2003
Dirk Bell wrote:

> > Is this last comment an afterthought, or have you had the necessity to > do this? It seems like the cost of ensuring the "smooth transitions" > would effectively be a modulation distortion. Off the top of my head, > I don't have a feel for which would be worse under what conditions.
Too much audio thinking that's all. I think it would be a distortion for the fm, and not a good idea at all!! OOps. Patience, persistence, truth, Dr. mike -- Mike Rosing www.beastrider.com BeastRider, LLC SHARC debug tools
I want to generate FM in a system with a floating point DSP and a good deal
of spare RAM  I am not signal-processing savvy.  I am wondering if I can
just generate an n-entry sine table with one floating point sine value for
each input value (multiples of 2-pi/n), and another m-entry step angle table
that converts each baseband sample into a step angle, and a floating point
phase accumulator.  I know I'll need to interpolate as the floating point
phase value will always fall between the sine table entries, and I guess
I'll have to figure that out too.  If my output sample rate is about 20x my
baseband rate, will this work?  Or are there spurious problems laying in
wait for me?  Is there something I need to do to twiddle the amplitude
during frequency changes to keep the power constant?

Thanks for any help.


I want to generate FM in a system with a floating point DSP and a good deal
of spare RAM  I am not signal-processing savvy.  I am wondering if I can
just generate an n-entry sine table with one floating point sine value for
each input value (multiples of 2-pi/n), and another m-entry step angle table
that converts each baseband sample into a step angle, and a floating point
phase accumulator.  I know I'll need to interpolate as the floating point
phase value will always fall between the sine table entries, and I guess
I'll have to figure that out too.  If my output sample rate is about 20x my
baseband rate, will this work?  Or are there spurious problems laying in
wait for me?  Is there something I need to do to twiddle the amplitude
during frequency changes to keep the power constant?

Thanks for any help.


Hello Ian,

Try a tunable recursive oscillator.

See http://personal.atl.bellsouth.net/p/h/physics/oscpaper.pdf

Clay



"Ian McBride" <ianmcbride2003@yahoo.com> wrote in message
news:befv54$72o$1@slb2.atl.mindspring.net...
> I want to generate FM in a system with a floating point DSP and a good
deal
> of spare RAM I am not signal-processing savvy. I am wondering if I can > just generate an n-entry sine table with one floating point sine value for > each input value (multiples of 2-pi/n), and another m-entry step angle
table
> that converts each baseband sample into a step angle, and a floating point > phase accumulator. I know I'll need to interpolate as the floating point > phase value will always fall between the sine table entries, and I guess > I'll have to figure that out too. If my output sample rate is about 20x
my
> baseband rate, will this work? Or are there spurious problems laying in > wait for me? Is there something I need to do to twiddle the amplitude > during frequency changes to keep the power constant? > > Thanks for any help. > >
Mike Rosing <rosing@neurophys.wisc.edu> wrote in message 

<snipped>
> > For smooth transistions, only change frequency when the carrier is at a > min or max in the cycle. However, if you are 20 times the baseband, I don't > think you have to worry about it really. > > Should be a piece of cake :-) > > Patience, persistence, truth, > Dr. mike
Mike, Is this last comment an afterthought, or have you had the necessity to do this? It seems like the cost of ensuring the "smooth transitions" would effectively be a modulation distortion. Off the top of my head, I don't have a feel for which would be worse under what conditions. Dirk Dirk A. Bell DSP Consultant
Ian,

This method works. However it will certainly produce some spurious
emissions. That may or may not be a problem depending on your
application. If you can tell me the numbers and what you are trying to
accomplish, I can give you better advice.

Vladimir Vassilevsky, Ph.D.

DSP and Mixed Signal Design Consultant

http://www.abvolt.com

  

Ian McBride wrote:
> > I want to generate FM in a system with a floating point DSP and a good deal > of spare RAM I am not signal-processing savvy. I am wondering if I can > just generate an n-entry sine table with one floating point sine value for > each input value (multiples of 2-pi/n), and another m-entry step angle table > that converts each baseband sample into a step angle, and a floating point > phase accumulator. I know I'll need to interpolate as the floating point > phase value will always fall between the sine table entries, and I guess > I'll have to figure that out too. If my output sample rate is about 20x my > baseband rate, will this work? Or are there spurious problems laying in > wait for me? Is there something I need to do to twiddle the amplitude > during frequency changes to keep the power constant? > > Thanks for any help.
"Vladimir Vassilevsky" <vlv@abvolt.com> wrote in message
news:3F0CD5A7.E2923B7E@abvolt.com...
> Ian, > > This method works. However it will certainly produce some spurious > emissions. That may or may not be a problem depending on your > application. If you can tell me the numbers and what you are trying to > accomplish, I can give you better advice. > > Vladimir Vassilevsky, Ph.D. > > DSP and Mixed Signal Design Consultant > > http://www.abvolt.com >
Thanks, Vladimir. I want to use an old DSP board (SHARC) to modulate fm and fsk at "baseband" and then mix these up to an RF frequency with a modulator. Actually, I think what I need to do is create 2 sinewaves 90-degrees apart and use a quadrature mixer. but from an earlier post, it sounds like I can just create a 65536-entry "cosine" table (16-bits each) and use cos[phase] and cos[phase-16384], where "phase" is the upper 16 bits of the phase accumulator. My channel is 12.5kHz wide, and my input is bandlimited audio at 8,000 samples per second. I think I need to "interpolate" these (don't know how to do that either) and then each "interpolated sample" winds up being the next step angle. The output of my NCO to the D/A is 96,000 samples per second, because the board I have just happens to be set up to do that. Ultimately, i'd like to transmit data (gmsk and FSK), but right now, i'm just messing around. Your comments are interesting, where do the spurious emissions come from? Is there any filtering to be done to get rid of them?
On Wed, 09 Jul 2003 16:09:53 -0700, Dirk Bell wrote:
> It seems like the cost of ensuring the "smooth transitions" > would effectively be a modulation distortion. Off the top of my head, > I don't have a feel for which would be worse under what conditions.
I think this is where a simulation would be best. On the one hand, the number of continuous derivatives is directly related to the power spectrum shape. If m is the smallest order non-continuous derivative of the phase function, the the spectrum is G(f) ~= (f-fc)^(-2m-1) so smooth phase transitions are vital in tightly packed multicarrier systems. On the other hand, I'm not what effect the process Dr. Mike described would have. -- Matthew Donadio (m.p.donadio@ieee.org)
"Matthew Donadio" <m.p.donadio@ieee.org> wrote
> > On the one hand, the number of continuous derivatives is directly related > to the power spectrum shape. If m is the smallest order non-continuous > derivative of the phase function, the the spectrum is > > G(f) ~= (f-fc)^(-2m-1)
Well, that one sailed just over my head but got my attention anyway. G(f) is the power at frequency f? It's the difference between f and the carrier center raised to -2m-1? Does this mean that the bigger the discontinuity is, the more "spread out" is the power? If my input is 8khz audio samples, and I interpolate it to 96khz samples, and then run these through a pre-modulation filter, and then use the filtered samples to select the step angle in a NCO running at 96khz, and then lowpass filter the output of the D/A, are there still really discontinuities? Thanks for your patience!
On Thu, 10 Jul 2003 22:33:53 -0400, Ian McBride wrote:
> "Matthew Donadio" <m.p.donadio@ieee.org> wrote >> On the one hand, the number of continuous derivatives is directly related >> to the power spectrum shape. If m is the smallest order non-continuous >> derivative of the phase function, the the spectrum is >> >> G(f) ~= (f-fc)^(-2m-1) > > Well, that one sailed just over my head but got my attention anyway. G(f) > is the power at frequency f? It's the difference between f and the carrier > center raised to -2m-1?
Technically, G(f) is called the power spectal density, which is defined to be the Fourier transform of the autocorrelation function. Practically, it can be thought of the power at a particular frequency for a random input to the modulator.
> Does this mean that the bigger the discontinuity > is, the more "spread out" is the power?
Not really. It has to do with the height of the sidelobes, which come into play in multicarrier systems, and meeting spectral masks for regulatory purposes. For example, wideband OQPSK has a non-continuous phase function. MSK has a continious phase function, but the first derivative is non-contonuous. So, the first sidelobe for MSK is lower than the one for OQPSK. Hence, there is less ACI for MSK. There are some whacky CPM schemes that have one or more continuous derivatives, so these have even lower sidelobes.
> If my input is 8khz audio samples, and I interpolate it to 96khz samples, > and then run these through a pre-modulation filter, and then use the > filtered samples to select the step angle in a NCO running at 96khz, and > then lowpass filter the output of the D/A, are there still really > discontinuities?
Depending on the pre-modulation filter, you will probably have discontinuities in the derivatives, which is what matters for the PSD shape. -- Matthew Donadio (m.p.donadio@ieee.org)