DSPRelated.com
Forums

DDS algorithm frecuency....

Started by EA7FNJ May 13, 2005
Hi guys.

I'n trying to make a DDS algorithm and it's like this the main idea:

- Sin(a[1+n])= sin(a)�cos(na) + cos(a)�sin(na)
- Cos(a[1+n])= cos(a)�cos(na) - sin(a)�sin(na)

So, Sin(1�)=0.017452 and Cos(1�)=0.999848. Make the algorithm but the
question is: What is the frecuency of it? DAC's Sample frecuency? Always
the n between 0-89, 0=< n =<89. I hope to be in the good way.
		
This message was sent using the Comp.DSP web interface on
www.DSPRelated.com
in article YO-dndAxfbI-WxnfRVn-qw@giganews.com, EA7FNJ at esp7xx@yahoo.es
wrote on 05/13/2005 11:24:

> I'n trying to make a DDS algorithm and it's like this the main idea: > > - Sin(a[1+n])= sin(a)&#4294967295;cos(na) + cos(a)&#4294967295;sin(na) > - Cos(a[1+n])= cos(a)&#4294967295;cos(na) - sin(a)&#4294967295;sin(na) > > So, Sin(1&#4294967295;)=0.017452 and Cos(1&#4294967295;)=0.999848. Make the algorithm but the > question is: What is the frecuency of it? DAC's Sample frecuency?
no, it's Fs/360. "&#4294967295;" means "degree of angle" correct?
> Always > the n between 0-89, 0=< n =<89. I hope to be in the good way.
what you wanna make sure of is that the squares of sin(a) and cos(a) add to very slightly greater than one (by the way you round them). and that your sin() and cos() output is clipped at +1 and -1. if all you need is a single sin() or cos() wave, there are simpler methods, but if you need quadrature sin() and cos(), this is a good way to do it. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
>in article YO-dndAxfbI-WxnfRVn-qw@giganews.com, EA7FNJ at esp7xx@yahoo.es >wrote on 05/13/2005 11:24: > >> I'n trying to make a DDS algorithm and it's like this the main idea: >> >> - Sin(a[1+n])= sin(a)&#4294967295;cos(na) + cos(a)&#4294967295;sin(na) >> - Cos(a[1+n])= cos(a)&#4294967295;cos(na) - sin(a)&#4294967295;sin(na) >> >> So, Sin(1&#4294967295;)=0.017452 and Cos(1&#4294967295;)=0.999848. Make the algorithm but the >> question is: What is the frecuency of it? DAC's Sample frecuency? > >no, it's Fs/360. "&#4294967295;" means "degree of angle" correct? > >> Always >> the n between 0-89, 0=< n =<89. I hope to be in the good way. > >what you wanna make sure of is that the squares of sin(a) and cos(a) add
to
>very slightly greater than one (by the way you round them). and that
your
>sin() and cos() output is clipped at +1 and -1. > >if all you need is a single sin() or cos() wave, there are simpler
methods,
>but if you need quadrature sin() and cos(), this is a good way to do it. > >-- > >r b-j rbj@audioimagination.com > >"Imagination is more important than knowledge." > > >
Well I need de the sin & cosine to make a little USB modulator, so I need quadrature sin() and cos(), the Hilbert I get from a MATLAB function becase maybe I'll do a Half-complex USB modulator. This message was sent using the Comp.DSP web interface on www.DSPRelated.com
>in article YO-dndAxfbI-WxnfRVn-qw@giganews.com, EA7FNJ at esp7xx@yahoo.es >wrote on 05/13/2005 11:24: > >> I'n trying to make a DDS algorithm and it's like this the main idea: >> >> - Sin(a[1+n])= sin(a)&#4294967295;cos(na) + cos(a)&#4294967295;sin(na) >> - Cos(a[1+n])= cos(a)&#4294967295;cos(na) - sin(a)&#4294967295;sin(na) >> >> So, Sin(1&#4294967295;)=0.017452 and Cos(1&#4294967295;)=0.999848. Make the algorithm but the >> question is: What is the frecuency of it? DAC's Sample frecuency? > >no, it's Fs/360. "&#4294967295;" means "degree of angle" correct? > >> Always >> the n between 0-89, 0=< n =<89. I hope to be in the good way. > >what you wanna make sure of is that the squares of sin(a) and cos(a) add
to
>very slightly greater than one (by the way you round them). and that
your
>sin() and cos() output is clipped at +1 and -1. > >if all you need is a single sin() or cos() wave, there are simpler
methods,
>but if you need quadrature sin() and cos(), this is a good way to do it. > >-- > >r b-j rbj@audioimagination.com > >"Imagination is more important than knowledge." > > >
Well I need de the sin & cosine to make a little USB modulator, so I need quadrature sin() and cos(), the Hilbert I get from a MATLAB function becase maybe I'll do a Half-complex USB modulator. This message was sent using the Comp.DSP web interface on www.DSPRelated.com
>> what you wanna make sure of is that the squares of sin(a) and cos(a) add to >> very slightly greater than one (by the way you round them). and that your >> sin() and cos() output is clipped at +1 and -1. >> >> if all you need is a single sin() or cos() wave, there are simpler methods, >> but if you need quadrature sin() and cos(), this is a good way to do it.
in article H9idnYIyQokYRhnfRVn-rQ@giganews.com, EA7FNJ at esp7xx@yahoo.es wrote on 05/13/2005 12:53:
> Well I need de the sin & cosine to make a little USB modulator, so I need > quadrature sin() and cos(), the Hilbert I get from a MATLAB function > becase maybe I'll do a Half-complex USB modulator.
but, ultimately, you want to do this within a computer chip or DSP, correct? (you're doing the Hilbert transform within the DSP, not with MATLAB, correct? if so, what DSP?) anyway, i think i understand what you are trying to do (35 years ago i was a radio ham also) and i think your approach is good. in the audio world, i would call your application a "frequency shifter". you *will* need to design the impulse response for a Hilbert transformer to do this. remember to round sin(a) and cos(a) *up* in magnitude so that the amplitude of the output of this quadrature oscillator does not decay with time. and you need to clip the output so that it doesn't increase in time either. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
> >>> what you wanna make sure of is that the squares of sin(a) and cos(a)
add to
>>> very slightly greater than one (by the way you round them). and that
your
>>> sin() and cos() output is clipped at +1 and -1. >>> >>> if all you need is a single sin() or cos() wave, there are simpler
methods,
>>> but if you need quadrature sin() and cos(), this is a good way to do
it.
> >in article H9idnYIyQokYRhnfRVn-rQ@giganews.com, EA7FNJ at
esp7xx@yahoo.es
>wrote on 05/13/2005 12:53: > >> Well I need de the sin & cosine to make a little USB modulator, so I
need
>> quadrature sin() and cos(), the Hilbert I get from a MATLAB function >> becase maybe I'll do a Half-complex USB modulator. > >but, ultimately, you want to do this within a computer chip or DSP,
correct?
>(you're doing the Hilbert transform within the DSP, not with MATLAB, >correct? if so, what DSP?) anyway, i think i understand what you are >trying to do (35 years ago i was a radio ham also) and i think your
approach
>is good. in the audio world, i would call your application a "frequency >shifter". you *will* need to design the impulse response for a Hilbert >transformer to do this. > >remember to round sin(a) and cos(a) *up* in magnitude so that the
amplitude
>of the output of this quadrature oscillator does not decay with time.
and
>you need to clip the output so that it doesn't increase in time either. > >-- > >r b-j rbj@audioimagination.com > >"Imagination is more important than knowledge." > > >
Well, be a ham it's forerver, hihihih... well, it's a little experiment, I try to make a USB modulator with a TMS320C30. So, with MATLAB I get the Hilbert coeficc and I put in the DSP, andith the quadrature oscillator make the USB output. So, if the DDS is Fs/360, I think I'll have 16KHz/360 = 44.4Hz to mix with the audio input. It doesn't matter because it's for a experiment. If I would like to increase the output, after I'll have to make a Interpolation filter up to the desire frecuency. Also I'm a Telecommunication engineering student and this is for a last job of a class that I hace about DSPs. So: 1- With MATLAB, I get my Hilbert coeffic. 2- Make the quadrature oscillator. 3- and Have a little of good luck... or are there any simple way to make the hilbert filter? This message was sent using the Comp.DSP web interface on www.DSPRelated.com
"EA7FNJ" <esp7xx@yahoo.es> wrote in message 
news:YO-dndAxfbI-WxnfRVn-qw@giganews.com...
> > Hi guys. > > I'n trying to make a DDS algorithm and it's like this the main idea: > > - Sin(a[1+n])= sin(a)&#4294967295;cos(na) + cos(a)&#4294967295;sin(na) > - Cos(a[1+n])= cos(a)&#4294967295;cos(na) - sin(a)&#4294967295;sin(na) > > So, Sin(1&#4294967295;)=0.017452 and Cos(1&#4294967295;)=0.999848. Make the algorithm but the > question is: What is the frecuency of it? DAC's Sample frecuency? Always > the n between 0-89, 0=< n =<89. I hope to be in the good way. > > This message was sent using the Comp.DSP web interface on > www.DSPRelated.com
Try the following: http://personal.atl.bellsouth.net/p/h/physics/2nd_osc_paper.pdf and http://personal.atl.bellsouth.net/p/h/physics/1st_osc_paper.pdf IHTH, Clay
> >"EA7FNJ" <esp7xx@yahoo.es> wrote in message >news:YO-dndAxfbI-WxnfRVn-qw@giganews.com... >> >> Hi guys. >> >> I'n trying to make a DDS algorithm and it's like this the main idea: >> >> - Sin(a[1+n])= sin(a)&#4294967295;cos(na) + cos(a)&#4294967295;sin(na) >> - Cos(a[1+n])= cos(a)&#4294967295;cos(na) - sin(a)&#4294967295;sin(na) >> >> So, Sin(1&#4294967295;)=0.017452 and Cos(1&#4294967295;)=0.999848. Make the algorithm but the >> question is: What is the frecuency of it? DAC's Sample frecuency?
Always
>> the n between 0-89, 0=< n =<89. I hope to be in the good way. >> >> This message was sent using the Comp.DSP web interface on >> www.DSPRelated.com > > > >Try the following: > >http://personal.atl.bellsouth.net/p/h/physics/2nd_osc_paper.pdf > >and > >http://personal.atl.bellsouth.net/p/h/physics/1st_osc_paper.pdf > > > >IHTH, > >Clay > > > > >
Hi, I have seen both papers, so I can generate a sine and cosine wave of any frecuencies from DSP. My main idea is to make a quadrature oscillator in a dsPIC or ADSP2184, so if I can do by [(2&#4294967295;pi&#4294967295;F)/fs], what is the maximum frecuency? I'm a little lost with it This message was sent using the Comp.DSP web interface on www.DSPRelated.com
>> > > Hi, I have seen both papers, so I can generate a sine and cosine wave of > any frecuencies from DSP. My main idea is to make a quadrature oscillator > in a dsPIC or ADSP2184, so if I can do by [(2&#4294967295;pi&#4294967295;F)/fs], what is the > maximum frecuency? > > I'm a little lost with it >
Hello, You can pretty much go up to one half of the sampling rate. The practical issues come into play when you decide to convert the digital signal into an analog one. You may wish to keep the osc's freq. less than something like 40 to 45% of the sampling rate. Are you going to modulate the oscillator? If you are, then make sure you allow spectral room for the sidebands. Have fun. Clay
> >>> >> >> Hi, I have seen both papers, so I can generate a sine and cosine wave
of
>> any frecuencies from DSP. My main idea is to make a quadrature
oscillator
>> in a dsPIC or ADSP2184, so if I can do by [(2&#4294967295;pi&#4294967295;F)/fs], what is the >> maximum frecuency? >> >> I'm a little lost with it >> > >Hello, > >You can pretty much go up to one half of the sampling rate. The practical
>issues come into play when you decide to convert the digital signal into
an
>analog one. You may wish to keep the osc's freq. less than something like
40
>to 45% of the sampling rate. Are you going to modulate the oscillator? If
>you are, then make sure you allow spectral room for the sidebands. > >Have fun. >Clay > > >
Yes, the ide is to make a USB modulator. I know how to make the Hilbert filter, and others elements, but the quadrature oscllator is a little dificult or I think it is dificult. So, to generate a cosine and sine waves about 12, 15, or 20 KHz. This is I would like to make. This message was sent using the Comp.DSP web interface on www.DSPRelated.com