Dear Michael,
Recently I'm studying the transverse multi-bunch feedback and is using the script 'TFBFirSetup' from the elegant example 'APS-24Bunch-CBI'. I learned from elegant forum that this script is using T. Nakamura's Time-domain least squire fitting theory to get the N-tap FIR coefficients. However, when I read and tested the script 'TFBFirSetup', I have three questions:
1. Line 70-71 of the script, it defines N-term psik, and to my understanding, the script says psik=2pi*nu*k+dphi, and dphi=psiD-psiP+nu, so
psik = 2*pi*nu*k+nu+psiD-psiP, this is also what I see from the calculation result. Is it reasonable that here is a single 'nu' in 'psik' but not '2*pi*nu' ? I tried to use the script directly to generate the coefficient for my lattice but the result is unstable, then I changed psik to 2*pi*nu*k+2*pi*nu+psiD-psiP and the new coefficients in FIR become stable. So is it a typo in the 'TFBFirSetup' script or did I misunderstood something?
2. From Nakamura's paper, I see him using the BPM data from turn 0 to turn -N to fit a N+1 tap FIR filter. If I understand correctly, the elegant script 'TFBFirSetup' is using the phase advance from turn -1 to -N to fit a N-tap filter. This is seen from psik = 2*pi*nu*(k+1) if my understanding in question 1 is correct. I also tried to use the 0 to -N+1 turn phase advance psik = 2*pi*nu*k to fit the coefficients but the result is unsbale. So is there any convention in elegant, like TFBPICKUP gets the data from the previous turn?
3. In the elegant manual I see it says it requires sum of coefficients ai to be 0 for TFBPICKUP, that's also what it's shown in the warning. But in the example I saw it's always the case that the TFBPICKUP sets only a0=1. And it doesn't cause any problem in my tracking too. So is it okay to just set a0=1 in TFBPICKUP?
Hope I described my questions clearly. Many thanks for your help.
Best regards,
Siwei
TFBFirSetup to get the FIR coefficients in transverse feedback
Moderators: cyao, michael_borland
-
- Posts: 21
- Joined: 27 Jun 2017, 07:28
-
- Posts: 1945
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: TFBFirSetup to get the FIR coefficients in transverse feedback
Siwei,
You are correct that there is a typo in the script related to the computation of dphi. That quantity is the phase advance from the kicker to the pickup, dphi = psiD - psiP, which is nominally zero in this example.
There was another bug in the script when it checked for psiD>psiP instead of psiD>=psiP, which resulted in addition of a phase offset when it should not have been added. I think this may address your other problem. The feedback system in elegant uses turns 0 (present) through -(N-1).
I'm running a test case now. Meanwhile, I've attached a revised version of the script. Thanks for bringing these issues to my attention.
--Michael
You are correct that there is a typo in the script related to the computation of dphi. That quantity is the phase advance from the kicker to the pickup, dphi = psiD - psiP, which is nominally zero in this example.
There was another bug in the script when it checked for psiD>psiP instead of psiD>=psiP, which resulted in addition of a phase offset when it should not have been added. I think this may address your other problem. The feedback system in elegant uses turns 0 (present) through -(N-1).
I'm running a test case now. Meanwhile, I've attached a revised version of the script. Thanks for bringing these issues to my attention.
--Michael
- Attachments
-
- newVersion.zip
- (1.65 KiB) Downloaded 214 times
-
- Posts: 1945
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: TFBFirSetup to get the FIR coefficients in transverse feedback
Here's a version with debugging statements turned off.
--Michael
--Michael
- Attachments
-
- newVersion.zip
- (1.65 KiB) Downloaded 257 times
-
- Posts: 21
- Joined: 27 Jun 2017, 07:28
Re: TFBFirSetup to get the FIR coefficients in transverse feedback
Dear Michael
Many thanks, now I can understand the script and get correspondence with paper.
Best regards,
Siwei
Many thanks, now I can understand the script and get correspondence with paper.
Best regards,
Siwei