Function Coding in a Device for Optimizing the Injection Moment in a Betatron
Abstract Generated abstract
This paper addresses the coding of functions in a specialized digital device for optimizing the electron injection moment in a betatron. It argues for a tabular representation of the functions defining the injection phase, rather than analytical computation, because the required memory is modest and the method reduces hardware complexity and computation time under strong interference conditions. The discussion develops scale-factor selection, binary word length, phase-range shifting, and table construction for the injection-voltage and magnetic-field functions, using the B-30 betatron as an example. The resulting approach uses ten-bit binary fractional coding in permanent memory, with a stated function-representation error of about 0.5 by 10 to the minus 3.
Full Text
CODING OF FUNCTIONS IN A DEVICE FOR OPTIMIZING THE INJECTION MOMENT IN A BETATRON
V. L. Ryabukhin
(Presented by the Scientific Seminar on Computer Engineering)
The optimal value of the injection moment \(t\) of electrons in a betatron is determined as [1]
\[ t=f(U)\cdot f(H), \tag{1} \]
where
\[ f(U)=\sqrt{U}\,(U+1.02), \tag{2} \]
\[ f(H)=\frac{10^4}{3z_{\varphi 0}H}, \tag{3} \]
\(U\) is the injection voltage in megavolts; \(H\) is the magnetic-field strength of the betatron on the equilibrium orbit of radius \(r_0\); \(\omega\) is the frequency of the voltage feeding the electromagnet.
Solution of expression (1) can be carried out by a computing device of analog, digital, or digital-analog type; accordingly, the final result is obtained in continuous or discrete form, i.e., in the form of a voltage or a digital binary code. This result is then converted into a time interval, the beginning of which is set by the pulse of the zero-magnetic-field sensor, while the end of the time interval determines the moment at which the injection pulse is generated.
In the developed device for optimizing the phase of electron injection in a betatron [2], the value of the injection phase is obtained in digital code. This code is converted into a time interval by a “number—time” converter, which is a high-speed counter into which the value \(t\) in complementary code is entered before the start of operation.
The use of a binary counter as a time-setting device leads to the need to code functions (2) and (3) in such a way that the result of solving expression (1) corresponds to the true value of the injection phase. It is desirable to represent the values of the functions so that the device remains operable over the required range of variation of the input variables when used with betatrons of different designs.
When solving problems on a digital computer, the values of functions are found by the machine itself. For this purpose, analytical and tabular methods of representing functions are used in it. The most widespread are analytical methods of representing functions based on the use of power series, continued fractions, etc. How-
the use of analytical methods for representing functions in a specialized computing device is expedient, since in this case the hardware costs increase sharply, and the operating speed and reliability of the device decrease.
With the tabular method of representing functions, the values of the functions at fixed values of the argument are recorded in the machine’s storage device. To determine the values of functions with a high degree of accuracy in this way, the step between the values of the argument (the table nodes) must be sufficiently small. Therefore, a large amount of storage is required, which is a drawback of the tabular method of representing functions. Taking into account that the storage capacity needed for storing the values of the functions \(f(U)\) and \(f(H)\) is not large (256 ten-digit binary numbers), the device considered in [2] adopted the tabular method of representing functions. In addition to saving equipment, this method made it possible to reduce the time of the computational operations performed in the arithmetic unit of the machine. Reducing the time of computational operations is an important factor for ensuring reliable operation of the device under conditions of powerful interference from the injection circuits and accelerator displacement.
In specialized computing machines, numbers are represented by codes less than unity. Such a system of representing codes has an advantage when performing multiplication (it is not necessary to store all the digits of the product), and the control system is also considerably simplified. Since in real problems numbers are usually greater than unity, solving problems on such machines requires the introduction of a special technique called the method of scale factors.
This method consists in the fact that, instead of the quantities themselves, the calculations everywhere contain these quantities divided by scale factors \(M\). The scale factors must be chosen in such a way that all initial quantities and all numbers formed during operation of the machine are less than unity. After the scale factors have been chosen, the initial data of the problem are divided by their scale factors and the resulting numbers are entered into the machine. The selection of scale factors and, consequently, the compilation of the tables recorded in the memory of the machine is, in most cases, a complex and responsible task in the development of specialized computing devices. The maximum values of the input variables \(U_{\max}\), \(H_{\max}\), as well as their range of variation, are taken as initial data. Since the variations in the line frequency are insignificant, the value \(\omega = \mathrm{const}\) may be adopted and denoted by
\[ \frac{10^4}{3z_0\omega}=\kappa_1. \tag{4} \]
For a given range of variation of the injection voltage
\[ \alpha=\frac{U_{\min}}{U_{\max}}, \tag{5} \]
and of the magnetic-field intensity
\[ \beta=\frac{H_{\min}}{H_{\max}}, \tag{6} \]
one can find the limiting values of the injection phase as
\[ t_{\max}=\frac{\kappa_1\sqrt{U_{\max}(U_{\max}+1.02)}}{\beta H_{\max}}, \tag{7} \]
\[ t_{\min}=\frac{k_1\sqrt{\alpha U_{\max}(\alpha U_{\max}+1.02)}}{H_{\max}} . \tag{8} \]
Thus, for the B-30 betatron at \(U_{\max}=50\ \mathrm{kV}\), \(H_{\max}=5400\ \mathrm{Oe}\) and \(\alpha-\beta-0.75\), the injection phase can take values from \(15.9\ \mu\mathrm{s}\) to \(24.9\ \mu\mathrm{s}\).
The number of binary digits \(n\) required to represent the found range of phases is determined, for a known value of \(t_{\max}\), from the required accuracy \(\tau\) in setting the time interval. For a known \(\tau\) (usually \(\tau=0.05 \div 0.25\ \mu\mathrm{s}\)),
\[ n=\frac{\ln(N_{\max}+1)}{\ln 2}, \tag{9} \]
where \(N_{\max}\) is the maximum number corresponding to \(t_{\max}\), and
\[ N_{\max}=\frac{t_{\max}}{\tau}. \tag{10} \]
The obtained value of \(n\) is rounded up to the nearest larger number. Thus, for the B-30 betatron, at \(\tau=0.1\ \mu\mathrm{s}\) and \(N_{\max}=249\), the required number of digits is \(n=8\). The use of a tabular method for representing functions is associated with the need to replace the storage matrices when the initial data are changed, which is its substantial drawback. Analysis of the dependences (2) and (3) shows that the functions have a smooth character of variation, and when the input variables differ from the calculated ones by 20–30%, the original tables can in most cases be used in the device. The necessary shift of the injection-phase range can be carried out in two ways. In the first case, it is necessary, in accordance with the change in the limiting value \(t_{\max}\), to make the corresponding change in the generator frequency in the “number–time” converter. The disadvantage of this method is determined by the need to use a series of quartz resonators. In addition, when the generator frequency is reduced, the error in representing the time interval \(\tau\) may become inadmissible.
In the second method, used in the developed device, the frequency of the setting generator remains unchanged, \(\tau=0.1\ \mu\mathrm{s}\), but, taking into account the possible range of injection phases, the number of binary digits for representing numbers is increased to \(n=10\). In this case the maximum possible value of the injection phase \(T\) is determined as \(T=\tau(2^n-1)\), and the current value of the injection phase is
\[ t=k_0\cdot f(U)\cdot f(H), \tag{12} \]
where \(k_0=k_1k_2\),
\(k_2\) is a coefficient taking into account the degree of shift of the injection-phase range.
To determine the scale coefficients used in compiling the tables, it is necessary to find the maximum value of the functions
\[ f(U)_{\max}=\sqrt{U_{\max}(U_{\max}+1.02)} \tag{13} \]
and
\[ f(H)_{\max}=\frac{1}{\beta H_{\max}}=\frac{1}{H_{\min}} \tag{14} \]
and to put into correspondence with them the maximum ten-bit binary fractional number \(0.1111111111\), corresponding to the decimal number \(1-2^{-n}=0.9996\), i.e., the binary number must be normalized and maximal. Therefore one can write that
\[ f(U)_{\max}=0.9996M_1, \tag{15} \]
whence
\[ M_1=\frac{f(U)_{\max}}{0.9996}. \tag{16} \]
The values of the input variables are represented in binary code, which, for \(n=10\) and \(\alpha=\beta=0.75\), can take the value \(j=0 \div 255\). Then the final expression for finding the values of \(f(U)\) is determined as
\[ A_j=\frac{f_j(U)}{M_1} = \frac{ \sqrt{(U_{\max}-\Delta_U N_i)(U_{\max}-\Delta_U\cdot N_j)+1.02} }{M_1}, \tag{17} \]
where \(\Delta_U\) is the quantization step of \(U\).
The expression for coding the function \(f(H)\) is found analogously and has the form
\[ B_j=\frac{1}{M_2(H_{\max}-\Delta_H N_j)}. \tag{18} \]
The value of the scale factor \(\kappa_0\) is determined from (7) and (11) as
\[ \kappa_0=\frac{t_{\max}}{T}. \tag{19} \]
The computed values \(A_j\), \(B_j\), \(\kappa_0\) are converted to the binary number system and entered into a permanent memory device.
The error in representing the function values is determined as
\[ 2^{-n}\geq \delta > 0.5\cdot 2^{-n} \tag{20} \]
and, with ten binary digits, is determined as \(\delta \simeq 0.5\cdot 10^{-3}\).
REFERENCES
-
V. M. Razin, V. L. Ryabukhin. On the development of a computing device for regulating the betatron injection phase. Tomsk, Tomsk State University Press, Izv. TPI, vol. 184, 1969.
-
V. M. Razin, V. L. Ryabukhin. A computing device for regulating the betatron injection phase. Tomsk, Tomsk State University Press, Izv. TPI, vol. 184, 1969.