Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform

Sponsor

New DaVinci Video Processor: DM3730 offers Soc 720d video encoding and decoding.

Start innovating today!

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Comp.DSP | Quadrature Oscillator Question

There are 17 messages in this thread.

You are currently looking at messages 10 to 17.


Re: Quadrature Oscillator Question - Andor - 2007-08-21 12:13:00

Tim Wescott wrote:
> mnentwig wrote:
...
> > If so, the cycle length is simply fs/ft. If ft is an irrational number, it
> > will "never" complete a whole cycle.
..
>
> Where machine precision comes in is that if the _effective_ fs/ft isn't
> a rational number _after_ you've taken rounding into account, then your
> oscillator won't repeat on exact cycle boundaries.

Rounding fs/ft to machine precision will always make it a rational
number. Irrational numbers cannot be represented in any floating-point
format system that I know of.

Regards,
Andor

______________________________
DSPRelated.com's 50,000th member announced! Details Here.

Re: Quadrature Oscillator Question - Tim Wescott - 2007-08-21 12:40:00



Andor wrote:
> Tim Wescott wrote:
> ...
>> So your matrix is
>>
>>     [ 0  -1 ]
>> A = [       ]
>>     [ 1   0 ]
>>
>> this has eigenvalues of 1, -1, ...
> 
> Almost. Rotating those values by pi/2 gives the true eigenvalues :-).
> 
> Regards,
> Andor
> 
@#$%!

-- 

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
______________________________
DSPRelated.com's 50,000th member announced! Details Here.

Re: Quadrature Oscillator Question - Tim Wescott - 2007-08-21 19:32:00

On Tue, 21 Aug 2007 09:13:49 -0700, Andor wrote:

> Tim Wescott wrote:
>> mnentwig wrote:
> ...
>> > If so, the cycle length is simply fs/ft. If ft is an irrational number, it
>> > will "never" complete a whole cycle.
> ..
>>
>> Where machine precision comes in is that if the _effective_ fs/ft isn't
>> a rational number _after_ you've taken rounding into account, then your
>> oscillator won't repeat on exact cycle boundaries.
> 
> Rounding fs/ft to machine precision will always make it a rational
> number. Irrational numbers cannot be represented in any floating-point
> format system that I know of.
> 
> Regards,
> Andor

The effective angular rotation is the arc tangent of the achievable gains,
which are, as you point out, rational ratios.  The arc tangent of a
rational number is not, however, in general, rational.

-- 
Tim Wescott
Control systems and communications consulting
http://www.wescottdesign.com

Need to learn how to apply control theory in your embedded system?
"Applied Control Theory for Embedded Systems" by Tim Wescott
Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
______________________________
DSPRelated.com's 50,000th member announced! Details Here.

Re: Quadrature Oscillator Question - Tim Wescott - 2007-08-21 19:33:00

On Tue, 21 Aug 2007 10:37:11 -0500, murthy_nssr wrote:

>>mnentwig wrote:
>>> Hello,
>>> 
>>>> Yi[n] = Yi[n-1]*cos(x)-Yq[n-1]*sin(x)
>>>> Yq[n] = Yi[n-1]*sin(x)+Yq[n-1]*cos(x)
>>> 
>>>> x = 2*pi*ft/fs, fs=8000 and ft=2000
>>>> oscillator is completing one period for n=226
>>> 
>>> Isn't that a simple rotating phasor? With the given numbers, 
>>> x = 2*pi*2000/8000=pi/2
>>> 
>>> Therefore I would expect a full cycle every four samples.
>>
>>I would too -- and this may not be the best way to implement a 
>>quadrature oscillator if _all_ you want is output at fs/2.
>>> 
>>> If so, the cycle length is simply fs/ft. If ft is an irrational number,
> 
> it
>>> will "never" complete a whole cycle.
>>> 
>>> I haven't simulated or read the reference. But I've got a feeling that
>>> machine precision could have an impact, since sin/cos(x) appear to the
> 
> nth
>>> power after n samples.
>>> 
>>Where machine precision comes in is that if the _effective_ fs/ft isn't 
>>a rational number _after_ you've taken rounding into account, then your 
>>oscillator won't repeat on exact cycle boundaries.  Worse, depending on 
>>your rounding the oscillations could either build, remain steady, or die
> 
> 
>>off -- you really want them to remain steady, or you want them to have a
> 
> 
>>slight tendency to build that you counteract with a nonlinearity to keep
> 
> 
>>the amplitude constant without much harmonic generation.
>>
>>There must be literature on how to make this happen; I just know that 
>>you need to watch out for it.
>>
>>-- 
>>
>>Tim Wescott
>>Wescott Design Services
>>http://www.wescottdesign.com
>>
>>Do you need to implement control loops in software?
>>"Applied Control Theory for Embedded Systems" gives you just what it
> 
> says.
>>See details at http://www.wescottdesign.com/actfes/actfes.html
> 
> 
> Information is available on the amplitude variations of this oscillator in
> 
> the same reference I mentioned. I am using the AGC method suggested the
> 
> paper by Turner.
> 
> So, isn't there a way i can use this oscillator and capture a cycle of it
> 
> for my I/Q reference?
> 
> If this is not a good way to implement a quadrature oscillator till fs/2,
> 
> can you please suggest something else which stands for my problem.
> 
> Thanks in advance.
> Murthy.

Yes, you could do that, but why?  If you just want to capture a vector of
I and Q values, why not just make up a sine table of the correct length and
play it back?

-- 
Tim Wescott
Control systems and communications consulting
http://www.wescottdesign.com

Need to learn how to apply control theory in your embedded system?
"Applied Control Theory for Embedded Systems" by Tim Wescott
Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
______________________________
DSPRelated.com's 50,000th member announced! Details Here.

Re: Quadrature Oscillator Question - Rick Lyons - 2007-08-21 21:20:00

On Tue, 21 Aug 2007 09:43:37 -0500, Tim Wescott <t...@seemywebsite.com>
wrote:

  (snipped)
>
>Were I doing this task, I'd control the amplitude of my oscillator output.
>I'd probably read Clay's paper, then either shamelessly copy what he's
>done, or use his thoughts as a springboard for my own implementation --
>but I'd do it.
>
>-- 
>Tim Wescott

Hi,
  Yep.   And, of course, giving full acknowledgement 
to Mr. Clay Turner

[-Rick-]

______________________________
DSPRelated.com's 50,000th member announced! Details Here.

Re: Quadrature Oscillator Question - Detlef _A - 2007-08-22 08:31:00

>>mnentwig wrote:
>>> Hello,
>>> 
>>>> Yi[n] = Yi[n-1]*cos(x)-Yq[n-1]*sin(x)
>>>> Yq[n] = Yi[n-1]*sin(x)+Yq[n-1]*cos(x)
>>> 

>Thanks in advance.
>Murthy.
>

Rotation of pi/2 is that simple: 

Yi[n] = -Yq[n-1]
Yq[n] =  Yi[n-1]


>>It is a rotating phasor. With the given numbers
>>x = 1.57080, where pi=3.1415926,
>>Hence sin(x)=0.02741
>>cos(x)=0.999624

Yes, sin(pi/2)=0.02741, but only if you interpret the pi/2 as degrees. You
should doublecheck the radiant/degrees settings of your pocket calculator

Cheers
Detlef




______________________________
DSPRelated.com's 50,000th member announced! Details Here.

Re: Quadrature Oscillator Question - mnentwig - 2007-08-22 10:02:00

>> So, isn't there a way i can use this oscillator and capture a cycle of
it
for my I/Q reference?

Wait a minute... 
Is it only about generating the LO waveform, for use in a wavetable
lookup?
That's straightforward, I put the equations here:

http://www.elisanet.fi/mnentwig/webroot/IQ_LO/


-Markus
______________________________
DSPRelated.com's 50,000th member announced! Details Here.

previous | 1 | 2