2012/12/31

To start 2013

As I've recently said, many projects are open. But the job isn't the only source of projects. It's more the bottleneck of my projects. Often is this job requires too many extra-hours under an uncompensable way: the time dedicated as a workers representative.

It looks far from now, but it's not that far, when we've been having enormous problems in this synchrotron. I remember when the corridors were not save, and at any time you can cross someone that screams you in there. As an example: accusing you of sabotage and in the same conversation telling you that you aren't skilful to do whatever you are being accused, but unknowing about what the hell you are being accused. There were a time that this kind of things have happen once at a month or two.

I remember when a Director interrupt in a workers assembly, screaming and saying that workers doesn't have do decide anything. When two days later, a worker has been fired (technically invited to left the company) being a workers advice. In my opinion this has been the trigger (or at least one of the triggers) of what have happen later on.

Event that the situation scares too much, some of the workers have started to self-organise to change this. We where clear that the things on that institution must change radically. Yes, in my opinion, was the old director who generates the situation of its fall (sorry: ascension to direct a Basque spallation source)

Even that, not all the problems have left this excellence installation. Still too far from being a normal laboratory, there are problems that persist. Hindrances of the past that are a burden in the institution, playing the same roles than with the old director.

We have change the direction but still not the heading. I have hope over 2013 that this institution will follow a good heading.

2012/12/20

fpFCT: simulating the bunch current

fpFCT is an smaller name of the Filling Pattern from Fast Current Transformer. As I've said I didn't know how to simulate the signal that is in coming from the scope, and I found a solution.



This is a reused image of the scope signal from the storage ring FCT and what I found how to simulate using PySignalSimulator is:



There are only 4kpoints instead of the 40k that the scope is giving but it looks quite similar.

But how this has been set up in the PySignalSimulator properties? The initial idea was the amplitude modulation but with this what is represented looks like:

But what if the carrier wave, better than a sinusoid looks like a quadratic waveform. With this I have started to play with harmonics. The formula that likes more to be a carrier has been:

In red is plot the carrier over the modulated signal in blue. The signal that is being modulated has been omitted because is almost a sinusoid.

The formula of the carries is:
With parameters values:
The formula of the modulated signal is:

With a_2 = 1; w_2=0.065. The x_2 is a value that is changing from time to time to introduce a drift in the signal in order to have a "dancing" bunches like in the scope. 

Lets see the result:

2012/12/18

Fast Orbit FeedBack

One of the necessary improvements of Alba is the top up system. With this, the beam accumulated in the storage ring can be restored under a continuous re-injection precisely on the buckets here it bunch is losing charge. Recovering an old snapshot of the machine status:


This is an example where the stored beam had decay from 60mA to a bit more than 30 in around 6 hours (this was a year a go, by now we are having more current and a longer beam live time). This lost of current requires re-injections like what is in the middle of the red plot.

This re-injection, afaik, produces perturbations on the beam orbit that at the end means drifts in the x-ray beam in the beamlines. This re-injection, due to radiation safety reason have to be done with the frontends closed. That is with the beamlines in a standby, without light and waiting  that this re-injection finishes. This re-injection causes an interruption on the experiments, and the longest experiment you can do is the one that can be performed between re-injections. You can imagine the consequences if the most insignificant thing fails in the middle of an experiment.under this conditions.

Well, to make this re-injection possible with the frontends open, the orbit of the beam must be very static. The beam has to be thine characterised and its oscillations below some microns.

How the orbit is corrected? In the sextupoles, there are the coils for each of the poles, but it is also another pair of thinner coils that sets the corrector component. I imagine it like a tiny little bending (they have like 3 orders less of magnitude in terms of current).

Those correctors can change its current very fast for a small modifications. That can be, in the order of the hundreds of miliamps can change it with a 10kHz frequency.

With this, together with a beam position monitoring at this speed, and if you can process all this data, the orbit perturbations can be controlled good enough to allow to re-inject with the necessary safeness to implement the top up system and have the plot of the current as an straight horizontal line (negligible ripple).

Main issue: with in a ring of around 400m of perimeter share between 88 beam position monitors all their sets of data, plus the sniffers we have to take this data to calculate those corrections, and stablish the new setpoints to another 88 corrector power supplies. All this at 10kHz: read, calculate, write: simple operations.

Filling Pattern From Fast Current Transformer

As I explain the a previous post we have a Fast Current Transformer in the storage ring and we are able to see the signal in an oscilloscope. Many years a go I have started a project to have the features of those scopes we have in the control system.

It has been started as a Tango Device server in C++ many years a go, but from a refactoring it have changed to be a python device using PyTango. Also this new release have suffered many changes, specially the one that expands this server to more classes to be able to control, not only scopes, but also Spectrum analysers, Signal generators, and later on Radio frequency generators.

But this device have been more used in this "extensions" than in the original scope class. The Signal generator has been used in the booster tune excitation together with the spectrum analyser in the booster tune measurement (I didn't have time to write about those projects here, I hope soon). This devices works fine and the quality was good enough to change the storage tune measurements to be like the booster ones.

Due to Linac's needs to archive some scope measurements, the scope tango class was improved giving as an output here three posts. This was the real trigger that have launched this device server class.

A few weeks a go, more requests have been receiver about scope acquisition: It has been requested to have available the signal from an FCT in the control system, Also this required to improve the acquisition of the waveform from the scope and after some tries help has been requested to the manufacturer. With this I have reduced the network transition of 40kpoints as 300kB to 80kB or 40kB depending on the float precision. This allows to start polling the scope waveform at 3Hz.

This have boosted the project of the Filling Pattern studies using this FCT signal and a device server is available to perform this calculation. Just now that there is no beam, there is no signal in the FCT, only electronic noise like:


)Instead of the usual signal we have when there is beam:


Like often happens I had to ask what this mean and I had try to explain. But, to test the development of the FCT signal analysis, it's necessary to simulate a bit it. No necessary to have the same signal but I should complain that have to change from time to time to have something alive to be analysed.

The solution is to use a simulator of signals, and the best way is using the incredibly versatile PySignalSimulator device server. Creating a device with one property "DynamicAttributes" with something like:
A1=float(READ and VAR('A1') of WRITE and VAR('A1,VALUE)
This sets an scalar attribute with a float value that than be read or write. Combining this with an attribute that contains an array of elements:
Channel1=[ (sin(VAR('W1')*x)*sin(VAR('W2')*x)) for x in range(4096)]
With those simple lines you can have an spectrum value with a amplitude modulated signal. It's not the same than the beam signal, but it can acts to show how this bunch analyser works.

In the next video, the oscilloscope signal has been simulated using this simulator. You will see it  as the top-right blue plot with an amplitude that oscillates between 0 and a maximum. The variables of the formula that simulates this are below this plot, on the left side.


On the left side of the screen some data are revealed about the cpu, memory, network use and so one. After send the Start() command the image below the plot (on its middle) start to collect each one of the waveforms from above. And already with non complete buffer the data is being processed. On the right of this cyclic buffer image representation, there are the attributes to adjust the algorithm and then the output. The green plot on the top is the filtered output.

Projects cross check

Today, we have a blackout in the Alba's synchrotron. From 8h to 15h we have received a recommendation from the director to avoid to go to the facility before 15h. Some intermediate bosses have tell their workers to not come and what ever they want, others say to work from home, and some of them say they don't expect that us comes after 15h. Ok, this is like an almost free day, as usual in this facility, not using clear works and giving different orders to different workers.

Well, when they do this confusion in diffusion (don't confuse with Shannon's principle) I remember Sun Tzu words: “If words of command are not clear and distinct, if orders are not thoroughly understood, then the general is to blame. But, if orders are clear and the soldiers nevertheless disobey, then it is the fault of their officers.

I'll dedicate the day to a projects cross check to have them reviewed, and I'll share them using this blog channel.

Update: Only the Filling Pattern FCT and something about the FOFB, has been possible to write by now. The new plugin to acquire with the Basler Ace Coloured cameras (by now we are using monochrome Basler Scout models in many of the beam diagnostics stations) and the refactoring of the graphical user interface of the imaging acquisitions, are also very important an big project that we need to proceed with. Also this imaging tools must be integrated with in sardana. With out forget the StateCodeInterpreter project, very necessary to trace back what had happen with a power supply.  Another day it will be explained.
And the things wouldn't finish where, there are also projects that have a title but not yet received the Start() command... (like the linac's control & gui).

2012/12/11

About many recent anonymous comments

This blog has been configured with rights to post comments to anyone (including anonymous users), and without moderation level. Even that, blogger is blocking spam comments and they are mailed to be check if they are "no spam". Those comments include links to webshops and that is why I didn't pass them to publish.

The reason on this post is that, since a month a go I see a "peak" of a few comments referencing the type of topics on this blog. At the beginning I didn't care about this, because I write about what I want to write, tagging with labels that an eventual reader can discriminate about the topics (assuming that someone else is reading this blog).

This is not a business blog at all. As the name says, when it was chosen, the main topics are cryptography and synchrotron things. This has been mentioned in the opening post and a bit later when I have broaden my intentions. But I am human, an alive human, and the things changes. This change can be said that starts with the first post tagged as politics. My live is not only my job, and my interests are far away from "live to work", I am more on the "work to live". Work is a need on this society system. Further than contribute to the community (an ideal view of the work), to work by now is a need to have the minimums to still be in this society. Even if you like or not the current organization, you need it to still be.

What is happening by today, specially in the behaviour where I live (that is what I can see with my eyes) is too bad to still be only post about the initial topics of this blog. The life is much wider than businesses.