## rf feedback in rfmode element

Moderators: cyao, michael_borland

li.chao
Posts: 30
Joined: 18 Aug 2021, 08:59

### rf feedback in rfmode element

Dear Michael

In the past days, I spent some time to go back to the papers on the low level rf control and cavity state-space theory. Now I think I get a better understanding on your IPAC15 paper about rf-feedback in rfmode element.

Still, I would like to discuss a little bit to make sure my understanding is correct. I summarize my understanding in short:

1. The cavity voltage error \vec{V_{err}}=\vec{Vc} -\vec{V_{ref}} and generator current \vec{Ig} are sampled at the time n{T_rf}, n is integer number.
2. Amplitude IIR filter take the previous Abs{V_{err}} and Abs{\vec{Ig}} as input and generate the \delta{Abs{\vec{Ig}}} as output
3. Phase IIR filter takes the previous Arg{V_{err}} and Arg{\vec{Ig}} as input and generate the \delta{Arg{\vec{Ig}}} as output
4. \delta{\vec{Ig}} + \vec{Ig} is applied as the updated generated current to get the cavity voltage with feedback by the state-space equation.

Please let me know if my understanding is appropriate or not.

However, there is two things I still did not get clearly, hope you can help me to cover that,
The first one:
In step 2, amplitude filter translates the Abs{V_{err}} signal into Abs{\vec{Ig}}, which indicates that the amplitude filter coefficient b_i/a_0 with unit the same as 1/Z, where Z is impedance. In step 3, the phase filter translates the Arg{V_{err}} to Arg{\vec{Ig}}, which indicates the amplitude filter coefficient b_i/a_0 is dimensionless, is it?

The second one:
How should I set the gain info in the rf feedback? The filter gives an output value which is related to \delta{\vec{Ig}} to be update. Physically, how large the \delta{\vec{Ig}} should be? There should be another parameter as a gain factor to specify to connect the filter output and generator current to be modified \delta{\vec{Ig}, is it?

yours Chao

michael_borland
Posts: 1831
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

### Re: rf feedback in rfmode element

Chao,

Your understanding of the basic process is correct.

The filter coefficients are dimensionless. For the voltage feedback, the voltage error is multiplied by 2(1+beta)/Ra to convert it to a current error.

There is no separate gain control. The filter coefficients determine the gain. The manual page for RFMODE gives an example of filter coefficients for a low-pass filter with a specified gain. That might provide more insight.

It is hard to specify how large the gain can be in general. The two things to watch for are instability and excessive peak generator voltage (corresponding to excessive peak rf power). RFMODE allows introduction of noise into the receiver and generator, to try to model real-world conditions; these can affect the maximum stable gain.

--Michael

li.chao
Posts: 30
Joined: 18 Aug 2021, 08:59

### Re: rf feedback in rfmode element

Dear Michael

Great thanks. It gives me really a better feeling about the modelling of the cavity feedbacks.
There is another thing about the cavity feedback. I found that in the filter file AmpFeedbakcFilters.sdds

It includes two pages and each page representing one digital filter. As written in the mannul
"Each file can consist of up to four pages, with each page representing one filter in a parallel filter bank formed from all pages. The output of the four stages is added to obtain the control signal."

I would like to make sure the simulation process. Here is my understanding is as below.
With the sampled cavity voltage x[n] and generator current y[n],
for filter 1, it calculates
y[n] = \sum a_i y_{i-1} + \sum b_i y_{i-1}, and
the output of the first filter is noted as \delta Ig_1

The same as the first filter, the second filter also generate output as \delta Ig_2.
The final amplitude needs to be adjusted is \delta Ig = \delta Ig_1 + \delta Ig_1.

Is my understanding correct?

yours Chao

michael_borland
Posts: 1831
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

### Re: rf feedback in rfmode element

Chao,

y[n] = \sum a_i y_{i-1} + \sum b_i y_{i-1}
should be
y[n] = -\sum a_i y_{i-1} + \sum b_i x_{i-1}

--Michael

li.chao
Posts: 30
Joined: 18 Aug 2021, 08:59

### Re: rf feedback in rfmode element

Dear Michael,

Great thanks, I do have a better understanding the cavity feedback model in elegant.
I have one other question about the impedance beam can sample when the feedback comes into the system, because of that both the transient beam loading effect and the longitudinal both instability are related to that.

Assuming, I have a right cavity feedback filters in both amplitude and phase direction, how can I get the effective impedance value beam can sample?

For example, with a direct feedback system, if the transfer function of the loop gain G(s) is given, the transfer function of the closed loop can be expressed as
Z_{eff}(s) = Z(s)/(1+G(s)Z(s))
in Laplace s space. Then I can got the closed loop impedance Z_{eff}(s), which can be applied further for coupled bunch instability growth rate estimation further.

Then, with the cavity feedback model in rfmode element, how can I get the effective impedance when the amplitude and phase filters are taken into account.

yours Chao

michael_borland
Posts: 1831
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

### Re: rf feedback in rfmode element

Chao,

This is outside my expertise, but I understand that there are various methods to transform a digital filter into an analog equivalent and vice-versa. In our 2015 IPAC paper on rf feedback, my colleague Tim Berenc recommends using a bilinear transform. The reference is to M. Santina et al. W. S. Levine, ed.,The Control Handbook,2nd Edition. CRC Press (2011). Perhaps that's a good place to start.

--Michael