Fast adjust electrodes

That one weird trick to speed up dynamic simulations

Electrode with electric discharge
Tesla coil with electrical discharge photo by Killian Eon from Pexels

So far, we have only discussed electrostatic fields. However, most instruments that make use of ion optics will also make use of electrodynamic fields. One advantage of electrodynamic fields is that Earnshaw’s theorem doesn’t apply — so stably and statically trapping ions is achievable with electrodes that change voltages, but not with those that remain static.

It is possible to simulate electrodynamic fields just like we have with electrostatic fields. If we know each electrode’s potential at each time point, we can use the finite difference method (FDM) to obtain an overall solution to Laplace’s equation. However, doing this at each time point of a simulation requires an extremely large number of calculations — as solving Laplace’s equation is usually one of the most computationally-intensive steps.

Fortunately there is a better way, with what the SIMION documentation calls “fast adjust” electrodes. The “fast adjust” method makes use of the fact that Laplace’s equation is linear, meaning that the linear combination (i.e., the sum) of sets of solutions for individual electrodes are the solution to the overall field. Stated with less jargon: if we solve an electric field for each individual electrode, we can just add all the individual fields together. To do this, we set all electrodes to 0 V except for the one we are calculating. We then solve for that electrode’s field using the FDM. After we find this solution, we perform the same procedure for all the other electrodes. If we apply this method to the 5×5 array that we previously used, we find the same solution that we previously calculated:

-61 -70 -53 -43 -39
-51 -51 -44 -38 -35
-42 -40 -35 -30 -28
-35 -32 -26 -19 -19
-31 -27 -18 0 -9
+
13 0 25 38 44
26 26 37 45 50
40 43 50 57 60
50 54 63 74 74
56 61 75 100 87
=
-48 -70 -28 -5 5
-25 -25 -8 8 15
-3 3 15 28 33
15 23 38 55 55
25 35 58 100 78

First we set the 100 V electrode to 0 V and solve for the −70 V electrode. Then we set the −70 V electrode to 0 V and solve for the 100 V electrode. When we simply add each grid-unit for these two solutions, we find the same solution that we found previously for this same setup. Furthermore, the linearity of Laplace’s equation means that we can adjust electrode and electric fields by simply multiplying the whole field by a scalar value. So for example, if instead of 100 V on the lower-right electrode in the previous example, we had 50 V, then we could just divide the whole electric field by two (or multiply by 0.5). For example:

13 0 25 38 44
26 26 37 45 50
40 43 50 57 60
50 54 63 74 74
56 61 75 100 87
÷
2
=
7 0 13 19 22
13 13 18 23 25
20 21 25 29 30
25 27 32 37 37
28 31 38 50 43

We could then add the electric field produced from the 50 V electrode to the one produced from the −70 V electrode to find the overall electric field. Simply multiplying or dividing by a scalar and then adding up all the numbers in these two grids is far fewer calculations than repeated application of the FDM.

Waveforms for electrodes

Like my coffee — arbitrary and complex

Because of this fast adjust electrode method, we can solve Laplace’s equation for each electrode before we know or have decided what the voltage of the electrode will be. For instance, we can solve for each electrode using 1 V as a placeholder. If we determine that the electrode is at 100 V, we can just multiply all the points of the electric field by 100. If the electrode changes to 1000 V, then we can either return to the 1 V solution and multiply it by 1000, or multiply the 100 V solution by 10.

This means if we have a “waveform” (i.e., a function or known set of points) that describes the potential of each electrode for the time points of the simulation, we can quickly scale and sum the electrodes. The two most common waveforms that are used, and thus simulated, are simple oscillations (sine waves) and immediate transitions (pulse waves or square waves). Both of these waveforms can be produced in the “Advanced” tab of the Simulation Playground.

Sine waves are often used in charged particle guides or traps. Pulse waves are often used to “pulse” and initiate or temporarily alter charged particle movement. Less commonly, triangular and sawtooth waves may be used for specific applications. For example, sawtooth waves can be used to systematically move and then reset a beam of charged particles — which was useful for older cathode-ray tube devices and is still used for instruments such as scanning electron microscopes.

Hot metal rod

More rarely, ion optics will require complex waveforms. These waveforms can be non-repeating, such as a “chirp” waveforms, or can be repeating, such as a waveform that is the summation of one or more simple waveforms. With “real-world” instruments complex waveforms are usually produced with arbitrary waveform generators. In SIMION, the method of producing such complex waveforms is through the builtin Lua scripting language. The Simulation Playground does not include capabilities for simulating complex waveforms.

Often waveforms will be combined with an “offset”. This simply means that the waveform is applied with a constant voltage added or subtracted. For instance, a sine wave that oscillates from −1 to 1 V may be “offset” by 10 V to instead oscillate from 9 to 11.