# Presentation: 004629

## Consolidating Fit for Corrector Optimization

- Alexey  Burov
- Alexander Valishev

- RR Talk Sep 19 2007

## Currents in correctors

- Distribution of the horizontal and vertical corrector currents (*n* = 104)

## Differential Trajectory

- Trajectory (x and y) vs bpm number (there is a correlation...(?))

## The problem to solve

- To make this trajectory less dependent of power supplies, it would be good to substitute kicks of most heavy working correctors by proper moved nearby magnets.
- A simple way to do that – just pick 10-20 correctors with highest current, and substitute them by nearby magnet moves. Every move takes ~ 1.5 hr (Cons).
- This simple solution is not the best one: the given trajectory might be better fitted by another set of correctors.
- Thus, the problem is: for a given number of correctors, find which of the entire set have to preferred, find their currents, and express them in terms of the offsets of the nearby magnets.

## Least Squares

- Trajectory, generated by a single corrector is given by the optical response matrix **M**, known from the optical measurements and analysis:
- For a given set of correctors fitting given differential trajectory  *X *, the currents (= angles) are found by the least squares:
- This yields

*A* - acceptance

## Infinite number of combinations

- What correctors have to be chosen? For any limited number of correctors, the number of combinations easily becomes astronomical:
- For, instance, to find the best 10 correctors from 100, there are
-      combinations – as many as stars in the Universe...
- The simple-mind enumeration of possibilities does not work for
- Then, how to find best set of   *k*   correctors?

## Building up the list

- 	The method I am suggesting for that is based on a heuristic idea
- Let it be assume, that we may use only one corrector, *k* = 1. Then it is easy – the formulae on p.5 give the answer for every specific corrector to try, and the one giving the best fit has to be taken. For the horizontal direction, it gives H332 with 0.58 mrad =>5A.
- Thus, H332 trajectory has a lot of similarity with our goal trajectory to fit. So, for   *k *= 2 , it is reasonable to assume that the best set is H332 and one more yet unknown. For that unknown, we have just *n*-1 = 103 possibilities, and it is not hard to find the best one. The answer is H316, and the currents are now

- H332 => 3.1 A
- H316 => 2.6 A

- Note that the first corrector H332 has different currents for *k  *= 1 and *k* = 2.

## How many correctors to include?

- This method is applied then for *k* = 3 and so on. The more correctors are used, the better is the fit. The goal functions vs number of included correctors are in figs below.

- Red – the goal functions, blue – fits with a power = -5/4 .
- Using 7 correctors for both directions, the goal is reduced 10 times for the horizontal,
- and even more for the vertical, making them ~identical.

## Methodical vs naïve fit

- Comparison of the proposed method (red) and a naïve choice (blue).
- The later is defined as a choice of correctors with highest angles at the goal trajectory.

## Some resulted A and mm

- Results for 6 and 7 correctors: top: horizontal, bottom: vertical.

## Trajectory fits

- Top - horizontal, bottom – vertical.
- Red – the trajectory, blue – 1 corr fit, green – 5 corr fit.

## Conclusions

- A method of consolidating fit is developed. This method is an alternative to SVD fit, which have an opposite goal: to distribute the fit over the basis as even as possible.
- The method is applied to the RR, the results are obtained.
- The quadratic goal function drops with the number of correctors as
- After consolidating fit is applied for 5-7 moves, the remaining error can be fitted by all the correctors using standard SVD.