-- MichaelReese - 17 Feb 2022

Measurement of Ring RF DDS Frequency

Frequency of the Ring-RF

The B2B -PM nodes already measure the RF frequency and phase in realtime to control the kicker magnets. This is done in the embedded LM32 processor. If the same ECA events are analyzed on the host system, a more elaborate analysis is possible because the host system has floating point numbers and more computing power.

Measurement procedure

On B2B -PM nodes, during the flat-top of the RF, three bursts of input events are generated. The input is driven with a signal directly driven by the RF. The events represent the zero-crossings of the RF signal. Splitting the events into different bursts allows to maesure the frequency more precise (long leaver) without overloding the ECA with too many events.

The program determines the frequency by
  • assigning a period-number N_i to each event at time T_i
  • doing a linear regression to the set of (N_i,T_i) points

The two events (N_1, T_1) and (N_2,T_2) are taken to make an initial linear regression. For all other events, the best fit to all previous points is used to calculate the period number N_i from the time T_i. The period number is rounded to the nearest integer. The predicted error of the linear regression can be used to reject outliers (this can happen when a transition is caused by opening or closing the input-gate, these events do not correspond to zero-crossings of the RF signal).

Results

After analysing all events from all bursts, the following is calculated and published as a DIM service:

struct Results {
   double nuSet;      // the frequency set by the control system (in Hz)
   double nuMean;     // mean value of the measurement (in Hz)
   double nuDiff;     // difference between set and measured frequency (in Hz)
   double nuErr;      // 1-sigma standard deviation of the measurement (in Hz)
   double nuRedChi2;  // reduced chi^2 of the measurement (shold be around 1, 
                           //  values <0.5 or >2 indicate that something was wrong)
   double nuSlope;    // if more than one burst of events was detected, the 
                           //  frequency is measured for each burst and a linear fit 
                           //  is done. This is the slope of that fit (in kHz/s)
   double nuSlopeErr; // The 1-sigma error of the frequency slope (in kHz/s)
   int    nBurst;     // the number of bursts used in the analysis
   int    nEedge;     // the number of events used in the analysis
   int    nOutlier;   // the number of rejected events (because the value was 
                           // outside the error bars of the linear regression of the 
                           // previous values)
};

The Results struct is published as a DIM service under the name b2b_<instance>_<ring>-other-rf_sid<SID>_ext
  • <instance> is either pro or int
  • <ring> is either sis18, esr, or cy
  • <SID> is the sequency id (0...15) in which the RF-ramp was running

The DIM server name is b2b_<instance>_<ring>-rf-freq
Topic revision: r2 - 19 Apr 2022, DietrichBeck
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback