2011/09/04

Cycling magnets

Since I've been in charge of the control of the power supplies of Alba synchrotron, I have discover many new things. After more than four years an absolute new world is in front of me.


One special thing that we do with the magnets is to cycle them. But what does this mean?


The magnet hysteresis is the reason of this procedure: the magnetic field produced by an electromagnet is function of the current applied by the power converter, but it has a path dependency. Or is not the same to arrive to one position if you come from different places. Also it have dependency on the length of the magnet but this is constant, at least in our ones.


From a very simplistic view, what I understand about this is a graphic like:


Where to arrive to one position on the green line, for example 0.95T you have to set a current of  480A (assuming a magnet of 1m to simplify, and all the numbers are my inventions). But depending from where you arrive to this current you will be on one of the black lines. Then you will have a magnetic field between 0.89T and 0.98T, but not exactly what you want.


The solution is to cycle the magnet, this means, from the current where you know the green line for the magnetic field you want do a procedure to the maximum current to the minimum and to the maximum again to run in the red line. Do it again and you will be in the green line to finally go the the setpoint and you have the expected magnetic filed.


The procedure it's easy: setpoint-max-min-max-min-max-setpoint. But how to make this automatic?


Cycling of all the storage ring magnets (with the new approach)


The first approach we did was using the Sardana Control User Environment. A very abstract view of a magnets can be like a motor: you have many positions not in distance unit (meters, millimeters  microns,...) , but in current unit (Amperes) of the electromagnet.


This has been working well for a long time. The users can do this procedure in a automatic way, but the read back of the power converters some times is a bad player.


The approach using a macro have some implications and a collateral damage. A macro is launched and the MacroServer is the device in charge to run this together. All the magnets selected by the user have a controller in a Pool of motors, and the MacroServer is able to coordinate motors from many different Pools. This pool motor controller is the one who bridges the communication to the power a supply device server offering a interface to the upper layers.


The issues appears when the device of the power converter shows glitch on the current read back. Is not a thing that changes the magnetic field, but is a thing that changes the state of the device to moving. The controller is propagating this to the pool.


If due to any casual planet alignment the pool receives the move command, during a glitch it trigger an exception because it can not distinguish the glitch to a real movement commanded from somewhere else. This has a very small probability, but if you add enough magnets this can happen more often. And if you add that when this happens, the cycling of all the other magnets is cancelled the cycling would be restarted and is possible that next time another magnet has a glitch.


How this can be fix? Who has the responsible to cycle the magnets in the old solution? The macro. But it has some problems with the bad guys of the magnets. Even if we mask this glitch behavior (thing that we did), the main design issue is that a problem of one participant, disturbs all the others. Sardana needs this feature because it is a feature need for coordinated movements.


The new approach:
Each magnet  is responsible of itself.


Further than coordinate the cycling, why not make each magnet (the tango device of the power supply) responsible of itself cycling?


Introducing a command to the device we have what was the macro in side of this power converter control. A problem in one magnet will only affect this magnet. All the others will continue their procedures. If the operator saw something in one of the magnets can abort the cycling of this one, letting the others cycling.


In the second image of this post, of a taurustrend, with the cycling of the storage ring magnets is possible to see that the quadrupoles and sextupoles are independent to the bending. They have a smaller current range for cycling, and they finish early. Even more, if you look the quadrupoles and sextupoles, they are accumulating a shift during this cycle, and the ones with a smaller range finishes a bit early that the others.


Cycling the booster to storage transferline
More evident can be in the booster to storage transferline. The correctors, with a range of [-5A,5A] finishes about a minute before than the other big magnets. And between the other big magnets, here they have different currents and show this shifting better.


The result on the real hardware test of last Friday was succeed (also testing many abort cases) for Hazemeyer storage ring power supplies and for the Bruker linac to booster and booster to storage transferlines power supplies.


As far as I know, we reduce a procedure that can take very long by hand to a 4 minutes automatic process. That is an example of what the controls section tries to do: make scientist "lives" easier to allow them to focus in what they like, do research, do science.


Update 20110907: As usual, asking you get more info. Why this cycling procedure is working? It's not, like I said a max-min iteration: it's a sinusoidal function approach. Due to the ramp (speed of the current motion in Amperes per second) and the acceleration and deceleration close to the setpoint this procedure does somenthing quite similar to a sinusoidal function and give this property to fix the hysteresis.

2011/09/03

Brookhaven National Laboratory: NSLS

This summer in Alba we have received a visit of a scientist of the NSLS-II, and he did a seminar about this machine under construction.

They have a background on synchrotrons. The have a machine close to the 30th anniversary, the NSLS-I. It is one of the firsts 2nd generation synchrotrons, and it have to very different submachines the VUV (with the 30th aniversary in 2012), and the Xray (30 years in 2014).

NSLS-I layout

The seminar was about the their new beamlines in the NSLS-II project, but reading about this machine with two storages rings opens my curiosity.

The machine status gui must have some peculiarities; or to have some of this guis. From the point of view that can be saw as one machine, there is one machine status.


Different beam energies, different accumulated currents and different live times. Very different behaviors of this to storage rings. The availability of the beam for x-ray ring is longer than 10 hours but the refilling time looks to be about an hour, then this seems to be a limit for a time resolution experiment. The ring for vuv have much smaller live time, 3 hour, but the refilling looks fast.

From my poor acknowledge (almost null) it's weird that the vuv, with more current have an easier refilling. Probably more boosted beams are need to accumulate, but it's a less energetic beam.

Living the commissioning of Alba, I don't wanna imagine how can be a commissioning of a booster with different rampings of the magnets depending on the destination storage ring. Also the radio frequency must be different. It looks to be like two completely different commissionings for the same booster.

2011/09/02

Spanish constitution

This august, and in a urgent way, spanish parliament has started a modification of the Spanish constitution. Like al the laws they can be changed, but the answer to any request to modify this constitution has been always "NO".


Spain is a monarchy. During the lasts years we have had the discussion in the media and between the politicians and the pro-monoarchy  about the convenience to modify this constitution for better equality of generate. What that means?


From the child of the king of Spain, the women can only inherit if no men has born. Than means if they have 7 child and the 7th is a boy, the previous 6 women will not be queen (even if they are better or not).


But after a long time says that is not easy to modify the constitution, because this request 2/3 of the parliament and a dissolution of it self after the modification and a referendum... This time the modification can be done without the plebs referendum and very very fast: in less than a month...


The issue of this modification is more than what the media-news says. Is not only a thing of the top on the debt, is not the issue of not ask the "demos" of this "democracy", in my opinion is the introduction of a sentence: "135.3 (...)y su pago gozará de prioridad absoluta.(...)" (and its payment will have absolute priority).


I'm not an economist, but more than a modification to avoid a too big debt, it's a modification to avoid to follow the way of Iceland. I think that because also "135.4 Los límites de déficit estructural y de volumen de deuda pública sólo podrán superarse en caso de catástrofes naturales, recesión económica o situaciones de emergencia extraordinaria que escapen al control del Estado (...)" (this debt limits can be exceeded in some cases, one is an economic crisis, like we have now). This don't fix the current "problem" of the debt, because there is an exception for a case like where we are. One of the things that fixes is to make unconstitutional the Iceland solution.


Update: It looks like the Iceland solution have had better results than Ireland's. Just the countries who follows the rules of the IMF, the ECB and the rest of experts, are still in crisis with out symptoms of recovery.