
There are 17 messages in this thread.
You are currently looking at messages 10 to 17.
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______________________________
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______________________________
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______________________________
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______________________________
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-]______________________________
>>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______________________________
>> 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______________________________