Reply by Symon July 29, 20032003-07-29
Depends on where your noise energy is. Low frequency noise is not good
for an integrator. For example, if DC offset counts as noise, the
integrator is not gonna be happy...  I'd rather have a zero at z=1
than a pole!!
Mind you, after reading on, I see the sine came from bandpass
filtering a square wave. If the bandpass filter is at the fundemental
frequency of the square wave, then the integrator could be best. Make
it a little leaky tho! Pole at z=0.9999!

Jerry Avins <jya@ieee.org> wrote in message news:<3F25C72C.E3FB6B22@ieee.org>...
> Eric Jacobsen wrote: > > > > > > Or take the derivative... > > Too noisy. Integrate and invert. > > Jerry
Reply by Jon Harris July 29, 20032003-07-29
I was using the SHARC, so it's really not bad at since it has an instruction
called RSQRTS.  It generates a seed to for 1/sqrt(x) that can be used to
calculate it rapidly using a successive approximation method.  You can get
an excellent approximation in 9 cycles and an exact value in 13.

Also, as I mentioned, I wasn't implementing a signal generator.  I only need
to perform the calculation occasionally so speed isn't that critical.

"Jaime Andres Aranguren Cardona" <jaime.aranguren@ieee.org> wrote in message
news:14a86f87.0307291215.81ed005@posting.google.com...
> "Jon Harris" <jon_harrisTIGER@hotmail.com> wrote in message
news:<3f245a33$1_4@newsfeed>...
> > I had to do this recently and, for my application, using the common
identity
> > cos = sqrt(1-sin^2) worked for me. It wasn't a signal generator, I just > > needed a single value and in only 2 quadrants, so this technique might
not
> > be appropriate for you. > > What about the price of the sqrt calculations??? > > JaaC > > > > > "praveen" <praveenkumar1979@rediffmail.com> wrote in message > > news:ff8a3afb.0307280251.3d106579@posting.google.com... > > > Hello, > > > I want to generate cosine signal from the sine signal avaiable. > > > What all different techniques by which i can do it???? > > > Hilbert transform????how to do this using hilbert transform. > > > Any reference or suggestion will be great.... > > > This sin and cos is for Iq demodulation > > > I will be first testing it on matlab and then on DSP > > > waiting for reply > > > with regards > > > praveen
Reply by Jaime Andres Aranguren Cardona July 29, 20032003-07-29
"Jon Harris" <jon_harrisTIGER@hotmail.com> wrote in message news:<3f245a33$1_4@newsfeed>...
> I had to do this recently and, for my application, using the common identity > cos = sqrt(1-sin^2) worked for me. It wasn't a signal generator, I just > needed a single value and in only 2 quadrants, so this technique might not > be appropriate for you.
What about the price of the sqrt calculations??? JaaC
> > "praveen" <praveenkumar1979@rediffmail.com> wrote in message > news:ff8a3afb.0307280251.3d106579@posting.google.com... > > Hello, > > I want to generate cosine signal from the sine signal avaiable. > > What all different techniques by which i can do it???? > > Hilbert transform????how to do this using hilbert transform. > > Any reference or suggestion will be great.... > > This sin and cos is for Iq demodulation > > I will be first testing it on matlab and then on DSP > > waiting for reply > > with regards > > praveen
Reply by Dirk Bell July 29, 20032003-07-29
A two-level discrete-time square wave signal  is not properly sampled.  You
may also end up with aliased components in the passband of your passband
filter. BEWARE!

Dirk

Dirk A. Bell
DSP Consultant (ISO work to do)


"praveen" <praveenkumar1979@rediffmail.com> wrote in message
news:ff8a3afb.0307290315.268e436c@posting.google.com...
> Hello, > I am getting the sine sine after bandpassing the square signal > > > waiting for eply > parveen
Reply by Jerry Avins July 29, 20032003-07-29
praveen wrote:
> > Hello, > I am getting the sine sine after bandpassing the square signal > > waiting for eply > parveen
The first question that comes to mind is, "Why?", but never mind that. (There are simple oscillators that generate simultaneous sine and cosine. Look for some on http://www.dspguru.com ) Either delay your sine -- that requires as long a circular buffer as the lookup table you would need to generate it -- or integrate it, which may require some scaling, but uses much less memory. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by praveen July 29, 20032003-07-29
Hello, 
I am getting the sine sine after bandpassing the square signal


waiting for eply
parveen
Reply by Jerry Avins July 28, 20032003-07-28
Eric Jacobsen wrote:
> > On Mon, 28 Jul 2003 08:16:12 -0400, Julius Kusuma <kusuma@mit.edu> > wrote: > > > > >On 28 Jul 2003, praveen wrote: > > > >> Hello, > >> I want to generate cosine signal from the sine signal avaiable. > >> What all different techniques by which i can do it???? > >> Hilbert transform????how to do this using hilbert transform. > >> Any reference or suggestion will be great.... > >> This sin and cos is for Iq demodulation > >> I will be first testing it on matlab and then on DSP > >> waiting for reply > >> with regards > >> praveen > >> > > > >just delay it by -pi/2. > > Or take the derivative...
Too noisy. Integrate and invert. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Jon Harris July 28, 20032003-07-28
I had to do this recently and, for my application, using the common identity
cos = sqrt(1-sin^2) worked for me.  It wasn't a signal generator, I just
needed a single value and in only 2 quadrants, so this technique might not
be appropriate for you.

"praveen" <praveenkumar1979@rediffmail.com> wrote in message
news:ff8a3afb.0307280251.3d106579@posting.google.com...
> Hello, > I want to generate cosine signal from the sine signal avaiable. > What all different techniques by which i can do it???? > Hilbert transform????how to do this using hilbert transform. > Any reference or suggestion will be great.... > This sin and cos is for Iq demodulation > I will be first testing it on matlab and then on DSP > waiting for reply > with regards > praveen
Reply by Fred Marshall July 28, 20032003-07-28
"Julius Kusuma" <kusuma@mit.edu> wrote in message
news:Pine.GSO.4.33L.0307280815410.13823-100000@magic-pi-ball.mit.edu...
> > On 28 Jul 2003, praveen wrote: > > > Hello, > > I want to generate cosine signal from the sine signal avaiable. > > What all different techniques by which i can do it???? > > Hilbert transform????how to do this using hilbert transform. > > Any reference or suggestion will be great.... > > This sin and cos is for Iq demodulation > > I will be first testing it on matlab and then on DSP > > waiting for reply > > with regards > > praveen > > > > just delay it by -pi/2. >
Praveen, You say "generate" but not in what context. First, assuming that it is a constant sinusoid then: If it's a software functional generator then as Julius suggests: cos(x)=sin(x+pi/2) If it's a table lookup: cos(n)=sin(n+k) where k is a number of samples equivalent to pi/2 If it's an input then delay by 3*pi/2 = -pi/2 If it's not a constant sinusoid, then you may indeed want to use a Hilbert transformer / filter to get wider band results. Fred
Reply by Dirk Bell July 28, 20032003-07-28
praveenkumar1979@rediffmail.com (praveen) wrote in message news:<ff8a3afb.0307280251.3d106579@posting.google.com>...
> Hello, > I want to generate cosine signal from the sine signal avaiable. > What all different techniques by which i can do it???? > Hilbert transform????how to do this using hilbert transform. > Any reference or suggestion will be great.... > This sin and cos is for Iq demodulation > I will be first testing it on matlab and then on DSP > waiting for reply > with regards > praveen
How is the cosine signal generated/stored? What frequency resolution is required? What kind of signals (general type) are you planning to I/Q demod (AM, FM, SSB, ISB, ...)? Dirk Dirk A. Bell DSP Consultant