Author Topic: An advanced question - sampling an oscillator's signal for analysis  (Read 54488 times)

0 Members and 1 Guest are viewing this topic.

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3476
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #100 on: June 16, 2018, 12:06:25 pm »
I fixed the npl link.  Sorry about that.

Using the analytic signal  (aka I/Q) is the  way to go.  And very easy to implement.  A Tayloe detector is an obvious choice and will allow using a sound card for the ADC step.  Input to the Tayloe mixer is the signal of interest and a square wave clock at 4x the frequency.  Output is  I & Q streams at baseband.  Because the mixer harmonics are so far above the baseband, it's easy to suppress them.

http://www.wparc.us/presentations/SDR-2-19-2013/Tayloe_mixer_x3a.pdf

Or you could opt for an HPAK E4406A which provides I/Q complex plane displays.  They're relatively cheap. 

http://literature.cdn.keysight.com/litweb/pdf/E4406-90304.pdf

Look at the polar I/Q displays (e.g. p 122).  However,  you can do the same thing with any scope in XY mode and any quadrature mixer that produces I/Q output.

A probability density plot of the I/Q plane collected using a DSO with deep memory would probably give you the information you're seeking.

 

Offline dnessettTopic starter

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #101 on: June 16, 2018, 04:46:15 pm »
If one gets good time domain data, one can do essentially the same analysis numerically: start with a Hilbert transformation of some kind to get phase data. This can include a mixing step (I/Q like) to also go to a lower frequency domain - this is the kind of easy way to do the Hilbert transformation. So one will get phase and amplitude data an a somewhat slower time scale, which is usually sufficient and a nice reduction in data rate, without loosing significant information.

A simple way to obtain fractional frequency data is to count the number of zero-crossings in an averaging interval measured by a reference clock. This is one technique used early in measuring oscillator stability and it is the first thing I plan to do. However, thinking about this last night has raised some issues that I think may prevent the use of this data to determine phase noise. Since some reading this thread are not familiar with stochastic processes, I am going to do this slowly with some tutorial information. Those familiar with stochastic process can skip over the next 5 paragraphs.

Restating the basic equation for a real oscillator:

v(t) = [V0 + e(t)] * cos[w0*t + phi(t)]

Both e(t) and phi(t) are stochastic processes (see this post). Assume for the moment that these are stationary processes (if not, things get worse) and concentrate on phi(t). The mathematical framework for stochastic processes presumes that for any constant value of t, say t=ti, phi() is a random variable. Its pdf has moments, such as its mean and variance. In order to estimate these (we are speaking about phi(t=ti) here), you would have to sample the random variable several times and compute the estimate according to its defintion. For example, to compute the mean of phi(t=ti), you would sample it N times, summing the values and dividing by N.

But, that isn't possibile in reality. You can only sample this random variable once, since it only is accessible at t=ti. To sample it more than once, you would have to travel to N parallel universes in which the random variable exists and obtain N samples that way (something that is obviously impossible according to currently validated physical theories). The standard terminology for the moments of phi(t=ti) is its ensemble moments (e.g., ensemble mean, ensemble variance).

Instead of sampling the same random variable over and over again, you can sample phi(t) at different times, e.g., sample phi(t=ti), then phi(t=ti+1), .... If you obtain N such samples you can treat them as if they came from the same random variable and compute moments. So, you can compute the mean by adding the values returned and dividing by N. These moments are called time moments (e.g., time mean, time variance).

But, what can you do with these moments? It turns out if the stochastic process is ergodic, then the time moments equal the ensemble moments. All ergodic processes are stationary, but not all stationary processes are ergodic. So, in order to use this technique to estimate ensemble moments, you have to show the stochastic process is ergodic.

OK, enough tutorial material. The first question is: do practical oscillators represent erodic processes? I have seen it stated in several places that their associated processes are stationary, but I have not seen anywhere that they are ergodic.

The second question centers on the relationship between instantaneous frequency and instantaneous phase, f(t)=d/dt[phi(t)]. What does this mean when phi(t=ti) is a random variable? Not clear. In order to compute the derivative, you have to take the limit as h->0 of [phi(t+h)-phi(t)]/h. But this usually presumes phi(t) is a continuous function in the vincinity of t. Random variables are not functions in this sense. They return different values each time they are "accessed", so I don't know how to compute this derivative.

The third question relates to the averaging of (corrected 6-16-18) instantaneous frequency during the zero-crossing counting process. The result is an average of the instantaneous frequency over the averaging interval. I don't know how to use this to get the average phase angle during the same interval. Someone more knowledgable (corrected 6-16-18) than I will have to provide an argument (either for or against) that the derivative of a random variable average equals the average of the random variable derivative (what ever that means). Specifically, (using <> to indicate the mean of a random variable): d/dt[<phi(t)>] = <d/dt[phi(t)]> = <f(t)>.

The fourth question is, even if the last equation is true, how is phi(t) obtained? Normally, you would integrate d/dt[<phi(t)>] to get <phi(t)>. But, d/dt[<phi(t)>] = <f(t)> is a single number, not a function or even a set of values that you can sum to derive an estimate of the integral.

In summary, it seems to me you can't derive the average phase angle over a sample interval when you have measured the average frequency over that same interval. However, I would be happy to be disabused of this opinion.
« Last Edit: June 17, 2018, 12:23:11 am by dnessett »
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14078
  • Country: de
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #102 on: June 16, 2018, 05:16:58 pm »
Calculating the derivative is a linear operation. So one can interchange the averaging and derivative.  So  d/dt[<phi(t)>] = <d/dt[phi(t)]> = <f(t)> should be OK.

If phi(t) is a random variable this means, there is a kind of random part added (that is at least the easiest assumption - a factor does not make much sense with a phase angle) to it. However in close to reality model the random part can not be arbitrary but would be assumed to be a well behaved function too, so there can be derivative of the random part too.  So one it likely in a case where e(t) and the similar random phase error will not the pure white noise, and thus no independent numbers for different times.

Anyway the phase is not sampled at infinite fine time steps, but at a much slower sampling rate. So the process is more like a discrete time series more than a continuous stochastic process.
 

Offline JohnnyMalaria

  • Super Contributor
  • ***
  • Posts: 1154
  • Country: us
    • Enlighten Scientific LLC
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #103 on: June 16, 2018, 06:05:09 pm »
If the period of the phase noise is sufficiently "stable" over a 100+ periods of the oscillator (or less if other random noise is sufficiently small) and you obtain the IQ pair from multiplication then you can use can construct the phase structure function. It will tell you the mean amplitude of the phase oscillation and its frequency.

Miller et al, J. Coll. Int. Sci., 143(2), May 1991, Pages 532-554

« Last Edit: June 16, 2018, 06:09:21 pm by JohnnyMalaria »
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3476
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #104 on: June 16, 2018, 06:30:06 pm »
Quote
The first question is: do practical oscillators represent erodic processes? I have seen it stated in several places that their associated processes are stationary, but I have not seen anywhere that they are ergodic.

In general, oscillators are not ergodic.  They *are* if and only if they are constant amplitude.  c.f. Bendat & Piersol example 5.11 pp 144-145 3rd ed.

Quote
The second question centers on the relationship between instantaneous frequency and instantaneous phase, f(t)=d/dt[phi(t)]. What does this mean when phi(t=ti) is a random variable? Not clear. In order to compute the derivative, you have to take the limit as h->0 of [phi(t+h)-phi(t)]/h. But this usually presumes phi(t) is a continuous function in the vicinity of t. Random variables are not functions in this sense. They return different values each time they are "accessed", so I don't know how to compute this derivative.

Random processes are continuous except perhaps for some pathological examples.

"the periods of the communications engineer are always more or less periods, never precise periods and therefor have absolutely continuous spectra"  c.f. "Extrapolation, Interpolation and Smoothing of Stationary Time Series", N. Wiener,  p 59.  This appeared in public in 1949, but was written in 1941 and is famously known as "the yellow peril" because of the density of mathematical exposition and the yellow covers to denote that it was classified.


I'm still pondering question 3.

Quote

The fourth question is, even if the last equation is true, how is phi(t) obtained?

Consider a perfect sine wave in analytic form in the I/Q plane.  This traces a circle.  The instantaneous phase error is the deviation of the physical trace from circularity.

c.f. "The Fourier Transform and Its Applications",  R. Bracewell, 2nd ed 1978,  pp 267-272

Edit:  [deleted]

Edit 2:  c.f. https://www.markimicrowave.com/blog/top-7-ways-to-create-a-quadrature-90-phase-shift/

Edit 3:  Brain fart correction.  Two sine waves at 90 degrees form a circle.

Edit 4:  Cyclostationarity can be evaluated by examining the PDF of the sine wave and itself shifted 45 degrees.

In sum, the best way to evaluate the short to medium term behavior of an oscillator appears to be with a pair of delay lines cut to 45 and 90 degrees of 10 MHz using a DSO to acquire data and then render the data as a probability density function over different time intervals.
« Last Edit: June 16, 2018, 07:41:11 pm by rhb »
 

Offline dnessettTopic starter

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #105 on: June 16, 2018, 08:49:03 pm »
The phase noise measurement described in the NIST link is using a mixer and reference signal of some kind to convert the signal, before sending it the the spectrum analyzer. If done in a way to mainly get the quadrature signal, the signal is rather insensitive to AM and mainly reflects phase modulation / phase noise.

Having the mixer part before the analysis helps in that the part behind the mixer can be considerably lower frequency and thus less critical with respect to sampling frequency stability. If one gets good time domain data, one can do essentially the same analysis numerically: start with a Hilbert transformation of some kind to get phase data. This can include a mixing step (I/Q like) to also go to a lower frequency domain - this is the kind of easy way to do the Hilbert transformation. So one will get phase and amplitude data an a somewhat slower time scale, which is usually sufficient and a nice reduction in data rate, without loosing significant information.

Originally I thought it would be simple to count zero-crossings for a 10 MHz signal using an Arduino Uno clone. However, I didn't spend enough time thinking it through. My plan was to generate an interrupt on the Arduino each time the signal crossed-zero in a positive direction. However, the Arduino Uno has only a 20 MIPS processor, which means between two positive zero-crossings it could only execute 2 instructions. Obviously, this is insufficient to service the interrupt train that would be generated by my simple design. So, now I have to enhance the simple design I envisioned with an 8-bit counter (to increase the interrupt servicing period from 100 ns to 25.6 us), a 4x frequency multiplier (to generate the clock required to dump the processor into a register for later reading by the Arduino), logic to dump the counter without interrupting the zero-crossing processing, logic to allow the Arduino to command the device to dump the counter, read the dump register, etc. This will be fun project, but it will take some time.

Before getting deeply into Allan Variance, I bought an evaluation board for a AD8302, which compares two signals and returns the phase difference between them encoded as a voltage between 0 and 1.8v. It is sitting on my workbench. Perhaps I will start playing with it while I design the zero-crossing logic in order to get a feel for the phase noise side of the problem.
« Last Edit: June 16, 2018, 08:52:04 pm by dnessett »
 

Offline dnessettTopic starter

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #106 on: June 16, 2018, 09:37:04 pm »

In general, oscillators are not ergodic.  They *are* if and only if they are constant amplitude.  c.f. Bendat & Piersol example 5.11 pp 144-145 3rd ed.


If oscillators are not ergodic, then how is it valid to characterize them with time moments such as the Allan Variance?

Random processes are continuous except perhaps for some pathological examples.

I just looked at Wikipedia's article on continuous stochastic processes (I know - Wikipedia isn't normative. But it generally provides the correct idea about a subject, unless its politics). There are several definitions of stochastic process continuity, all of which utilize the notion of "continuity in probability". This is not the sort of continuity that is used when defining a derivative such as d/dt[phi(t)].

It seems that the calculus of stochastic processes is very different than the normal calculus, utilizing something called the Ito Stochastic Integral. I think it would be very dangerous to suppose the ideas of normal calculus transparently transfer to this new type of calculus.
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3476
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #107 on: June 16, 2018, 10:55:30 pm »
If over a sampling period, the variation is rapid and random, then *over a period at least as long* it may be considered ergodic.   One can, however, get into trouble if the sampling interval is correlated with the amplitude variations.  That's why I have repeatedly suggested sampling randomly.

I'm not a time nut.  I am a general data analyst which is rather broader.  I have never had justification for digging into the details of Allan variance.  I have less than a metrology lab technician knowledge of the subject.  And no real inclination to go farther in that direction at present.   The transfer functions of AVAR, MVAR and TVAR, make clear what those do to allow making an assumption of ergodicity.  This is why they implement bandpass filters over the frequency spectrum for which that is not applicable.  There are better methods, but they were to compute intensive to employ when Allan derived his metric. It continues in use because it serves horological purposes as is generally well understood in that community.

Reality is continuous above the quantum level.  I was taught everything in the context of a Wiener process.  The rest is just mathematicians trying to clean up the theoretical details to match experience.  In practice I have never encountered an instance where ordinary calculus was not sufficient.  Yes, it is true that the conditions of ordinary calculus may not be met, but it doesn't matter.  So far as I can see, all the exotic integrals are of necessity backward compatible with the traditional integral of Newton and Liebniz.  At a quantum level I suspect that it gets a bit tricky in places.

FWIW I have a book which consists entirely of theorems related to the Fourier transform.  Almost always they do not matter.  But sometimes they do, and for that reason, I have the book on my shelf.  I can't actually recall ever using but once.  As I recall it did not help.  My problem was the result of failing to recognize that the discrete Fourier transform is defined over the semi-closed interval [a,b).  I was being OCD and performing arbitrary resampling via FFT and encountered  a phase error I could not understand.  It was a *very* long couple of weeks figuring that out and fix my code.  I have subsequently examined a number of texts in that regard, and cannot recall any that mentions it directly.  It is implied by the periodic nature of the discrete transform.  If the interval were not semi-closed, an end value would repeat once a cycle.

I've attached the reference from B & P.
 
The following users thanked this post: dnessett

Offline dnessettTopic starter

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #108 on: June 17, 2018, 12:15:21 am »
I've attached the reference from B & P.

Thanks for the B & P extract. I should receive my copy sometime this week.
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3476
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #109 on: June 17, 2018, 02:53:23 am »
I'm afraid you have made me rather unhappy.  As a consequence of this thread I set up my Keysight 33622A and 3104T to plot Lissajous figures. Along the way I discovered some rather mind boggling faults with the 3104T, such as not being able to set cursors except by using the touch screen arrows and waiting while the cursor crawls across the screen a pixel at a time or direct entry of the cursor location.  If I knew that I wouldn't need the cursor!

The 33622A claims a <1 pS jitter for square waves, but with CH1 & 2 coupled and producing a 20 MHz sine wave, there is a 1.2 degree phase offset and the narrowest line I can get on the screen looks as if it were drawn with a magic marker.   At 10 MHz the phase offset is 0.7 degrees.  I plan to have a conversation or two with Keysight on Monday. 
 

Offline dnessettTopic starter

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #110 on: June 17, 2018, 04:14:32 am »
Not being an expert in stochastic theory, I could not figure out how to define the derivative of a stachostic process. After poking around a bit, I found this defintion (see here, slide 7):

Suppose <[(phi(t+h)-phi(t)/h)-phi'(t)]2> -> 0 when h->0, , where <> is the expected value of the complicated stochastic process [(phi(t+h)-phi(t)/h)-phi'(t)]2. Then the stochastic process phi'(t) is said to be the derivative of phi(t).

Note the significant differences between this definition and the definition from the traditional calculus. Two features stand out: 1) first the difference between (phi(t+h)-phi(t)/h) and phi'(t) is squared, and 2) instead of the expression (phi(t+h)-phi(t)/h) converging to phi'(t) as h -> 0, the expected value (first order moment) of the (corrected 6-17-18) squared difference goes to zero.

Applying this to the equation d/dt[phi(t)] = f(t), where phi(t) is the instantaneous phase angle and f(t) is the instantaneous frequency, it must be the case that:

<[(phi(t+h)-phi(t)/h)-f(t)]2> -> 0 when h->0

However, there is nothing in this definition that suggests how to compute phi(t) given f(t). As far as I know (and I freely admit my knowledge of this topic is rudimentary), there are no differentiation rules like d/dt[sin(t)] = cos(t). So, even if f(t) was known exactly for all values t, there would be no obvious way to integrate f(t) to derive phi(t).

More prominently, if I have an estimate of the averaged instantaneous frequency over some averaging interval, this definition doesn't provide a way to integrate f(t) to get phi(t). The basic problem is I have <f(t)> over the averaging interval, not f(t).
« Last Edit: June 17, 2018, 06:25:11 pm by dnessett »
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3476
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #111 on: June 17, 2018, 06:38:18 pm »
Quantum mechanics was developed by physicists, not mathematicians.  The physicists used the mathematical tools with which they were familiar.  I'm certain some recognized that they were violating the requisites of traditional mathematics, but physical experiment proved that doing so was valid.  This forced the mathematicians to develop the theory to match reality.

It took about 100 years to develop mathematically rigorous proof of the Fourier transform. They managed Heaviside operational mathematics a bit quicker;  it only took about 40-50 years to dot all the i's and cross all the t's for that.

This has proven to be a very interesting thread, especially having disposed of Allan variances from the discussion.  The ideal solution to the measurement of phase noise is an analog correlator, but that is at best awkward as it requires a large number of delay lines.

My intuition leads me to expect that there exists a sampling technique which will solve the problem, but  a proper statement still eludes me.  I can merely note that the interchange of order of addition is a very powerful tool.
 

Offline dnessettTopic starter

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #112 on: June 17, 2018, 07:26:27 pm »
If over a sampling period, the variation is rapid and random, then *over a period at least as long* it may be considered ergodic.   One can, however, get into trouble if the sampling interval is correlated with the amplitude variations.  That's why I have repeatedly suggested sampling randomly.

To understand what your saying I need to make sure we are using the same terminology. From what I have read the sampling process for oscillators is driven by 3 variables, tau, T and N. tau is the averaging period for a single datum. So, for example, if I count zero-crossings for 1 second and divide that count by the oscillator nominal frequency, I get a fractional frequency datum. T is the time between the start of one averaging period and the next. If the next averaging interval does not start immediately after the present one, then there is dead time in the sampling process and the duration of that dead time is T-tau. Finally, the signal is sampled N times to get the data for analysis. N*T is the sampling interval.

So, when you say "the sampling interval is correlated with the amplitude variations" do you mean the averaging interval, the T interval or the sampling interval as specified in the previous paragraph?

In any case, I want to restate in more detail your comment to ensure I understand it correctly. Basically, if the average/sample interval (whichever is the correct one) is "short enough" so that variations are approximately random, then people assume the underlying process is ergodic. Is this correct? How do you determine what interval is "short enough"? Are there tests that might be applied to sample data that indicated whether the variations of import are random enough?

Once you have indicated which interval you mean by "sampling period", would you elaborate your recommendation to "sampling randomly"? How randomly? Should I introduce dead time into the sampling process (note, this is generally disparaged by what I have read so far) and if so, how would you characterize the length of the dead time? Also, would this tactic apply to both frequency measurements and phase angle measurements?

In practice I have never encountered an instance where ordinary calculus was not sufficient.  Yes, it is true that the conditions of ordinary calculus may not be met, but it doesn't matter.  So far as I can see, all the exotic integrals are of necessity backward compatible with the traditional integral of Newton and Liebniz.

OK. But, we are dealing with random variables, not deterministic functions, so the traditional calculus doesn't really make any sense. That said, after reading more about stochastic derivatives, this stuff gets real complicated real fast, so I don't think I am interested in going down that route. I think the equation d/dt[phi(t)] = f(t) is valid (using normal calculus) when phi() and f() are deterministic functions. However, I am now convinced that it makes no sense when d/dt represents a stochastic derivative. Perhaps there is a way of translating the deterministic differential equation into a stochastic differential equation, but I think continuing to explore this avenue of investigation would take too much time and effort. From a measurement point of view, I will just measure both and not try to convert frequency data into phase noise data.
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6146
  • Country: ro
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #113 on: June 17, 2018, 09:00:11 pm »
Judging by the radar problem and the time sampling/counting approach mentioned before, I think you need to lookup the random walk problem, like in: We have 10MHz osc with its (white) phase noise, and want to know the random distribution of the 10th's million rising edge.

How would it be the 10th million rising edge probability distributed around the ideal 1 second mark?

Is this what you are looking for?

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3476
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #114 on: June 17, 2018, 09:58:21 pm »
This is one of those things which is a lot easier to discuss in the office drawing on the white board.

You wrote "short" for where I wrote "long".

Let's take a concrete example using thermal noise and current noise in a resistor produced by a 60 Hz AC current.  We shall assume the resistor is at ambient temperature before the current is applied.

The  current noise will rise and fall exactly in phase with the current.  The thermal noise will will increase and decrease at the same frequency, but with a lag related to the magnitude of the current and the thermal mass of the resistor.  The thermal noise will also show an increase related to the ratio of the heating and the radiation and conduction fluxes.

If we sample the noise at regular intervals of say 600 samples per second,  the series will *not* be ergodic.  The amplitude of the noise will rise and fall at 120 Hz and in addition there will be a lower frequency component related to the change in thermal noise as the device warms up.  Once the resistor reaches a thermal  equilibrium state, there will be a constant level of thermal noise upon which is an additive 120 Hz current noise.  If we take an ensemble average at the zero crossings, it will *not* be the same as an ensemble average taken at the peak.  It will be stationary, but not ergodic.

However, if we calculate the mean and deviation over many cycles, then we will obtain the same result when we compare an ensemble and a single record.  The requirement is that the contribution from any fraction of a cycle in the be small relative to the variance of the noise.

Or put differently, if we use a small ensemble and compare the result to a time series of similar length the data will not be ergodic.  But if we take a large ensemble of millions of instances all of random phase and compare that to a time series of equivalent length they will be ergodic.

I'd supply an example using Octave at this point but I'd have to start up a VM and remember how to use it.  In the last 5-10 years it has become less Octave like and more MATLAB like.  The syntax changes are small and subtle, hence quite frustrating when encountered.  Moreover, it's a tool I rarely use now.  But create a sinusoid and a Gaussian random process and analyze the product of the two.  That's the current noise term in the preceding exposition.  Examine the Fourier transform of the full series.  Then compute mean and variance for windows of increasing length starting with 3 samples.  The mean and variance of the short consecutive windows will vary over time.  As the windows get longer, the variance of the mean and variance will decrease and will reach a constant value. 

I just took a look at B & P to see if I could find a succinct quote, but it's rather densely mathematical.  Your questions are treated in exquisite detail in some of the best mathematical prose I have ever read.  While it will be tempting to just dive in,  read the part of particular interest and go on, I urge you to take the time to give the entire text a quick read.  Don't labor over it or work problems.  Just read it through.  If you have questions post or send me a PM.  I feel confident that you will discover by the end that most of the book is quite familiar and that the only real difference between what you know already and "stochastic" processes is lexical.

Returning to the question of how to characterize a set of precision oscillators, how to determine which is "best" and what the proper criteria for "best" is for a frequency reference is quite interesting.  My adventures in the mathematics of sparse L1 pursuits taught me a number of new stratagems for solving problems using sampled data.

I've attached a few more pages from B & P which should keep you entertained for at least a day or two. It's the part on derivatives and level crossings.  I've not read it thoroughly, especially the zero crossing part.  I took two semesters of integral transforms under Bill Guy and one semester of linear systems under Clark Wilson at Austin before I ever encountered B & P, so I've never actually read it straight through.  It simply superceded several other texts I had been using.  I never took courses in either linear algebra nor probability, so I had to learn those on my own.
 

Offline dnessettTopic starter

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #115 on: June 17, 2018, 11:00:10 pm »
Judging by the radar problem and the time sampling/counting approach mentioned before, I think you need to lookup the random walk problem, like in: We have 10MHz osc with its (white) phase noise, and want to know the random distribution of the 10th's million rising edge.

How would it be the 10th million rising edge probability distributed around the ideal 1 second mark?

Is this what you are looking for?

This may sound a little (or very) stupid, but I don't know what I am looking for. Or to be more precise, I am looking for guidance from those who use oscillators in applications to specify the characterizing parameters that are important to them. If I am going to spend a good deal of time and effort analyzing some oscillators, the last thing I want to hear when I publish the results is: "who cares about the parameters you measured. You should have measured these things."

I have thought of another application, the engineers of which might be interested in the stability of a component oscillator. Frequency hopping spread spectrum radios need to control the power emitted in bands not occupied by their frequency channels. This is likely true for direct sequence spread spectrum as well, but it is obvious for frequency hopping. Leaking signal power into bands outside their assigned channels both reduces their efficiency and increases the potential for interference.

If they use a base oscillator to drive frequency synthesizing modules to generate the channel frequencies, it would seem to me they would be interested in how clean is its output in regard to phase noise and frequency fluctuations. So, for any out there who have designed spread spectrum radios (or those who are familiar with this technology), what oscillator parameters are important when considering the selection of such an oscillator?
 

Online DimitriP

  • Super Contributor
  • ***
  • Posts: 1288
  • Country: us
  • "Best practices" are best not practiced.© Dimitri
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #116 on: June 18, 2018, 09:56:47 am »
Quote
what oscillator parameters are important when considering the selection of such an oscillator?
You might just have to contact the guy at match.com. They claim to be experts at doing this exact thing.

To asnwer your question:  Best stability and phase noise for a given working voltage and power consumption in a size that fits and doesn't cost an arm a a leg. Depending on what you are building and who is paying for it.
   If three 100  Ohm resistors are connected in parallel, and in series with a 200 Ohm resistor, how many resistors do you have? 
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3476
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #117 on: June 18, 2018, 01:27:11 pm »
Quote

Restating the basic equation for a real oscillator:

v(t) = [V0 + e(t)] * cos[w0*t + phi(t)]

There are 4 unknowns in this equation.  If one compares the voltages of 8 oscillators in a pair wise fashion for all 32  permutations one has an even determined system of equations.  I *think* that by counting the number of times each permutation exists at random times over periods of several cycles one can solve for all the variables without having to assume the availability of a perfect reference.

The random sampling is important as it precludes aliasing taking place.  Mathematically this is rather exotic, at least for me,  so there may be complications I've not spotted yet.  It would be *very* interesting to know if there is anything in the professional literature related to this.  I only became aware of the anti-aliasing properties of random sampling recently.  In many applications one still needs a precise reference clock to record the time of the samples.  But in this case, I think simply counting states will suffice.
 

Offline dnessettTopic starter

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #118 on: June 18, 2018, 04:05:47 pm »
Quote

Restating the basic equation for a real oscillator:

v(t) = [V0 + e(t)] * cos[w0*t + phi(t)]

There are 4 unknowns in this equation.  If one compares the voltages of 8 oscillators in a pair wise fashion for all 32  permutations one has an even determined system of equations.  I *think* that by counting the number of times each permutation exists at random times over periods of several cycles one can solve for all the variables without having to assume the availability of a perfect reference.

The random sampling is important as it precludes aliasing taking place.  Mathematically this is rather exotic, at least for me,  so there may be complications I've not spotted yet.  It would be *very* interesting to know if there is anything in the professional literature related to this.  I only became aware of the anti-aliasing properties of random sampling recently.  In many applications one still needs a precise reference clock to record the time of the samples.  But in this case, I think simply counting states will suffice.

See A method for estimating the frequency stability of an individual oscillator. This technique uses triads, not pairs. It is the basis for the so-called "three corned hat" oscillator stability measurement technique described in section 10.14 of The Handbook of Frequency Stability Analysis put out by NIST.
 

Offline dnessettTopic starter

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #119 on: June 18, 2018, 11:01:03 pm »
I decided to get some experience measuring phase delay between two oscillator signals. The oscillators I chose were my FEI FE-5650 and Rigol DG1022 set to 10 MHz. I connected these two oscillators to the AD8302 evaluation board I purchased and looked at the VPHS signal it generates. This output ranges from 0 to 1.8V and is interpreted as follows: 1) phase difference of 180 degrees - 30 mV; 2) phase difference of +/- 90 degrees - 900 mV; 3) phase difference of 0 degrees - 1.8V. VPHS tracks the phase differences with an advertised bandwidth of 30 MHz.

I am posting these results in this thread because they relate to the questions I have been asking. However, I would understand if some felt this is off-topic (the thread started out as an advanced question related to cyclostationarty - asking questions about measurement techniques and results isn't implied by that subject. I will move it to new thread if people want me to.)

Figure 1 shows an oscilloscope trace of the raw VPHS signal. There is a prominent crossing point at ~900 mv, which suggests the two signals are frequently in quadrature alignment. However, there is also a lot of fuzz in the envelope between 0 and 1.8V, so it is hard to tell how much time is spent in this state.

Figure 1 -

Figure 2 shows the signal over a ~25 us interval. If you look closely there are prominent crossings about 1/4 from the left of the trace and about 7/8 from the right of the trace. These appear to be the regular appearance of the quadrature alignment points shown in detail in Figure 1.

Figure 2 -

Figure 3 shows the same signal with cursor measurement data. The time difference between the two quadrature points is ~16.2 us, which corresponds to ~61.7 KHz. The voltage difference between top and bottom is 1.95V, which seems reasonable assuming some overshoot due to impedance mismatching between the coax and the input to the AD8302 (coax is terminated by 50 Ohms and AD8302 inputs are roughly 3 Kohms input impedance).

Figure 3 -

Figure 4 shows the power spectrum of the VPHS signal. I have a SIGLENT 3021X with its input connected to a 10 dB pad. Furthermore, I was using a high impedance scope probe to tap the VPHS output and the SIGLENT input impedance is 50 Ohm, so the dBm values are not faithful. The important informaton from the SA plot is the shape of the spectrum and the fact that it reaches the noise floor at around (corrected later:) 80 Hz. (added 6-19-18) I disconnected the scope probe from the SA and discovered that the spectrum remained unchanged. So, figure 4 seems to display an a SA noise floor plot for frequencies between 0-100 Hz. In my enthusiasm I forgot that the SIGLENT is speced for frequencies between 9 KHz and 2.1GHZ. It isn't intended for frequencies in the audio and sub-audio range. I'll leave the image as a reminder that one shouldn't get all excited and forget to do basic things, such as checking the noise floor of a SA or using it for purposes for which it was not designed.

Figure 4 -

So, why am I posting these results - easy, to get some input on interpreting them. It isn't clear why the two oscillators would have a prominent quadrature alignment at 61.7 KHz. I looked at the phase difference power spectrum out to 100 KHz and found nothing prominent at 61.7 KHz or at any other frequency greater than (corrected later:) 80 Hz.

I am not sure whether it is valid to use results such as these to compute a phase noise plot. Eventually, when it arrives, I will have a GPS disciplined reference clock to use as the standard against which to analyze the other oscillators (using the Rubidium now is just a way to get some experience, it is not what will be used when I start characterizing the oscillators in earnest). So, I don't expect to produce a valid phase noise plot from this data. However, I would be interested in ideas suggesting how to turn the power spectrum of the phase difference signal into a phase noise plot, if that makes sense.

I was hoping to develop the procedure I will eventually use to produce phase noise plots by playing around in this way. (NB: I plan on using the VPHS signal as the input to an Arduino analog pin and then using the onboard Arduino ADC to convert the signal level to digital data. The internal ADC can produce data at about a 10 KHz rate. In this way I will have a digital record of the VPHS signal that I can use for analysis.).

Any constructive comments are welcome.

Added later: I had an epiphany about the 61.7 KHz signal embedded within the phase difference data. When I bought the FEI FE-5650, I built an enclosure for it, with leds indicating power and oscillator lock. I couldn't get the oscillator to lock, so I contacted the vendor from whom I bought the device. After a bit of back and forth, I finally noticed a 60 KHz pulse train superimposed on the power supply voltage coming from the cheap power brick I had bought. I put an appropriate bypass capacitor on it and the FEI FE-5650 successfully locked. My guess is that while the bypass decreased the  amplitude of the power supply ripple, it did not eliminate it completely, and somehow it is leaking into the phase difference data.

Here is a nice example how oscillator implementation can create problems when using them in applications.
« Last Edit: June 19, 2018, 10:44:42 pm by dnessett »
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3476
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #120 on: June 19, 2018, 12:25:46 am »
For a sanity check, put a scope in XY mode and display the Lissajous figure.  I was doing that at 10 MHz  with an 8648C with the OXCO option and a 33622A yesterday.  Also measure both frequencies with the same counter.

As for the paper you referenced earlier, that only addresses FM noise.  It's using the Allan variance, so low frequency phase noise is being excluded by design.

I don't think one can say that an oscillator is *best* without stating an application.
 

Offline dnessettTopic starter

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #121 on: June 19, 2018, 12:44:49 am »
For a sanity check, put a scope in XY mode and display the Lissajous figure.  I was doing that at 10 MHz  with an 8648C with the OXCO option and a 33622A yesterday.  Also measure both frequencies with the same counter.

I tried this, but the Lissajous figure wouldn't slow to a point that it was recognizable.

I don't think one can say that an oscillator is *best* without stating an application.

No argument from me. However, it should be possible to come up with a list of characteristics (e.g., phase noise, some measure of short term stability (not Allan Variance), ...) that when measured would provide the necessary information for an application engineer to choose one.
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3476
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #122 on: June 19, 2018, 02:05:22 am »
For a sanity check, put a scope in XY mode and display the Lissajous figure.  I was doing that at 10 MHz  with an 8648C with the OXCO option and a 33622A yesterday.  Also measure both frequencies with the same counter.

I tried this, but the Lissajous figure wouldn't slow to a point that it was recognizable.

That *should*  have told you something.  It took a lot of fiddling with the frequency of the 33622A to get a slowly (360 degrees in 5-20 seconds)  Lissajous figure.  It proved very difficult to get the frequencies matched, but I did not resort to warming up the counter and using that to set them both.  I'll try that next time.
 

Offline tomato

  • Regular Contributor
  • *
  • Posts: 206
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #123 on: June 19, 2018, 02:06:01 am »
I decided to get some experience measuring phase delay between two oscillator signals. The oscillators I chose were my FEI FE-5650 and Rigol DG1022 set to 10 MHz. I connected these two oscillators to the AD8302 evaluation board I purchased and looked at the VPHS signal it generates. This output ranges from 0 to 1.8V and is interpreted as follows: 1) phase difference of 180 degrees - 30 mV; 2) phase difference of +/- 90 degrees - 900 mV; 3) phase difference of 0 degrees - 1.8V. VPHS tracks the phase differences with an advertised bandwidth of 30 MHz...

The method you're experimenting with will rarely produce useful results with low performance oscillators unless they are phase locked together (or frequency divided) so they do not slip cycles.
 

Offline dnessettTopic starter

  • Regular Contributor
  • *
  • Posts: 242
  • Country: us
Re: An advanced question - sampling an oscillator's signal for analysis
« Reply #124 on: June 19, 2018, 02:34:56 am »
To asnwer your question:  Best stability and phase noise for a given working voltage and power consumption in a size that fits and doesn't cost an arm a a leg. Depending on what you are building and who is paying for it.

Best stability measured by what metric?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf