12.07.2015 Views

perf T&F re perf T&F re

perf T&F re perf T&F re

perf T&F re perf T&F re

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

A6-1PPS8 bits of the tuning word. The coarse tune DAC is then set to providethe final tuning voltage. During all subsequent tuning, only the finetune DAC is used over its 16 bit range. If the range is exceeded, thenormalisation procedu<strong>re</strong> is <strong>re</strong>peated.A state machine provides control of locking. After <strong>re</strong>set the lastvalue of the f<strong>re</strong>quency control <strong>re</strong>gister, which has been sto<strong>re</strong>d inEEPROM on a <strong>re</strong>gular basis, is <strong>re</strong>sto<strong>re</strong>d. This will <strong>re</strong>tune the controlledoscillator to very nearly the cor<strong>re</strong>ct f<strong>re</strong>quency. The Kalman update isdisabled and the softwa<strong>re</strong> waits for the following all to occur (state0):a) Rubidium <strong>re</strong>fe<strong>re</strong>nce warm up input to go low or OCXO supplycur<strong>re</strong>nt to drop below a th<strong>re</strong>shold showing the Rubidium/OCXO haswarmed upb) A 1PPS input captu<strong>re</strong> has occu<strong>re</strong>dThe sofwa<strong>re</strong> then <strong>re</strong>quests a <strong>re</strong>set of the internal clock (state 1). Thiswill normally occur on the next 1PPS to be <strong>re</strong>ceived.Once a clock <strong>re</strong>set has occu<strong>re</strong>d, the Kalman filter trackingis started, however f<strong>re</strong>quency cor<strong>re</strong>ctions a<strong>re</strong> not made to thecontrolled oscillator. (state 2) Each captu<strong>re</strong> must be within 50us ofthe first captu<strong>re</strong>, otherwise the <strong>re</strong>set state is <strong>re</strong>ente<strong>re</strong>d. After 100successful captu<strong>re</strong>s, state3 is ente<strong>re</strong>d provided the <strong>perf</strong>ormancemonitor, MEANFREQERROR is below a th<strong>re</strong>shold.falls below a second th<strong>re</strong>shold. At this point the lock indicator isswitched off. (state 4)The following parameters set up the Kalman filter to match thecontrolled oscillator:a) Oscillator noise parameters:S1 variance of random walk FM noiseS2 variance of white FM noiseS3 variance of white phase noiseOC1OC2oscillator tuning constant in fractional f<strong>re</strong>quency/voltmaximum oscillator tuning voltage in volts, assuming 0Vminimumb) 1PPS noise root variance (a function of the GPS <strong>re</strong>ceiver used)R measu<strong>re</strong>ment noise root variance in secondsThese parameters a<strong>re</strong> programmed over the RS232 interface, and a<strong>re</strong>sto<strong>re</strong>d in non volatile memory.The oscillator noise parameters may be obtained from a measu<strong>re</strong>dAllen variance curve using a MathCad modelling program.18The <strong>perf</strong>ormance monitor, MEANFREQERROR is calculated as follows:The mean of the Kalman f<strong>re</strong>quency offset estimate is calculatedby means of a 5th order exponential filter. ( In the p<strong>re</strong> lock statethe mean may not be near zero, ie the<strong>re</strong> may be a constant offsetbetween the controlled oscillator and GPS time)After each iteration of the Kalman filter, the cur<strong>re</strong>nt deviation iscalculated by subtracting the cur<strong>re</strong>nt f<strong>re</strong>quency offset estimate fromthe running mean. This value is squa<strong>re</strong>d, and divided by the p<strong>re</strong>dictedvariance from the error covariance matrix that is maintained by thefilter. This normalises the actual deviation that is seen by the p<strong>re</strong>dicteddeviation from the filter. (The p<strong>re</strong>dicted deviation only depends uponthe system and measu<strong>re</strong>ment noise parameters NOT on the actualbehaviour of the system.)The normalised deviation in then filte<strong>re</strong>d in a 4th order exponentialfilter. During warmup the <strong>perf</strong>ormance measu<strong>re</strong> will be high, indicatingthat the controlled oscillator is still drifting fast, <strong>re</strong>lative to its p<strong>re</strong>dictedsteady state <strong>perf</strong>ormance. When the controlled oscillator is stable, andthe Kalman filter has settled, the <strong>perf</strong>ormance measu<strong>re</strong> will drop belowa th<strong>re</strong>shold. At this point f<strong>re</strong>quency cor<strong>re</strong>ctions will be started. (state 3)In state 3 cor<strong>re</strong>ctions a<strong>re</strong> made to the controlled oscillator. The filterand oscillator will continue to settle, until the <strong>perf</strong>ormance monitorTel +44 (0)1803 862062Fax +44 (0)1803 86796218Technical featu<strong>re</strong>Fig. 1: Noise model of oscillatorto p<strong>re</strong>dict, and the state vectorwould contain the phase offset,f<strong>re</strong>quency offset, and f<strong>re</strong>quencydrift variables. The „state transitionmatrix“ defines the diffe<strong>re</strong>ntial<strong>re</strong>lationship that existsbetween the state variables overone time inc<strong>re</strong>ment. The conceptof a system driven by noiseprocesses is important he<strong>re</strong>. Ifour Rb had absolutely constantdrift, its output phase would beknown for all time once the initialdrift, f<strong>re</strong>quency offset andphase offset had been determined.Data gathe<strong>re</strong>d a yearago would have as much validityas data an hour old. If theKalman filter is given this modelof the Rb, the <strong>re</strong>sults a<strong>re</strong> identicalto the least squa<strong>re</strong>s fit of allthe data. Of course the quadraticleast squa<strong>re</strong>s fit assumesthat the Rb can be modelledby th<strong>re</strong>e constants.A mo<strong>re</strong> <strong>re</strong>alistic physical modelwould allow the drift to vary. Ifthis varied in a deterministic way,we should add a further term towith white phase noise, whiteFM noise, and random walkFM noise due to the single anddouble integration in the model.This is shown in figu<strong>re</strong> 2.The measu<strong>re</strong>ments a<strong>re</strong> also assumedto be contaminated withgaussian white noise. In our casewe only have one measu<strong>re</strong>ment,that is phase offset. We do notknow that the main contributerto measu<strong>re</strong>ment noise, the GPS<strong>re</strong>ceiver, is either white or gaussian.However this is a limitationof the simple Kalman filterthat we intend to use. If wea<strong>re</strong> su<strong>re</strong> of the characteristics ofthe measu<strong>re</strong>ment noise, we caninclude this knowledge by addingmo<strong>re</strong> terms to the state vector.We a<strong>re</strong> then essentially includingthe known aspects ofthe measu<strong>re</strong>ment in the systemmodel.Email sales@quartzlock.comthe Rb , the filter will igno<strong>re</strong> thecor<strong>re</strong>ction, and no extra settlingwww.quartzlock.comtime will be <strong>re</strong>qui<strong>re</strong>d. In effectAs well as the state vector, theKalman filter maintains a matrixthat gives the cur<strong>re</strong>nt variances(mean squa<strong>re</strong> error) of<strong>re</strong>p<strong>re</strong>sents the complete historyof the data), and less to the cur<strong>re</strong>ntmeasu<strong>re</strong>ment. The measu<strong>re</strong>mentvariance, which we haveto tell the filter, also affects the„bandwidth“. If we tell the filterthat the measu<strong>re</strong>ment is noisy, it<strong>re</strong>duces the bandwidth.So far we have conside<strong>re</strong>d theKalman filter as a device foranalysing the incoming data inan optimum way. However weneed to control the Rb oscillator,and <strong>re</strong>duce the f<strong>re</strong>quency offsetto zero. An elementary methodwould be to write periodic cor<strong>re</strong>ctionsto the Rb control DAC,and wait for the Kalman filterto track out the <strong>re</strong>sulting discontinuityin the measu<strong>re</strong>ments.However the<strong>re</strong> is a much betterway. If we adjust the f<strong>re</strong>quencyoffset term in the state vector atthe same time that we cor<strong>re</strong>ctwe a<strong>re</strong> defining the model of theRb to have a f<strong>re</strong>quency disconovershootttrick that cknow thatment disconot knowexample wsignal disapWhen satellthe<strong>re</strong> couldtinuity betwand the locnal clock. Atell the filte<strong>re</strong>ction of thcan tell it tmate of pha<strong>re</strong>liable. Welarge numbterm of thetrix. The fiimum weigments to <strong>re</strong>quickly as pit thinks itscurate, it doweight to thphase measuquency covThe Kalmaahead if meIn this caseand the errowill be updaestimated vdate the f<strong>re</strong>matically. Frcan be madThe error cto <strong>re</strong>flect thin the p<strong>re</strong>diWhen meathe filter wcover and twill start tois always aity of the fan unknowpected on ru<strong>re</strong>ments, t

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!