Downhole neutron generators and methods to auto tune downhole neutron generators

Downhole neutron generators, downhole logging tools that utilize neutron generators, and methods to auto tune downhole neutron generators are disclosed. While a neutron generator is deployed in a borehole of a wellbore, the method includes determining whether an oscillation cycle of an ion beam current generated by the neutron generator is stable. After a determination that the oscillation cycle of the ion beam current is stable, the method includes determining proportional, integral, and derivative parameters of a proportional-integral-derivative controller that is operable to adjust an amount of power supplied to generate ions. The method further includes adjusting a replenish voltage of a replenish power supply of the neutron generator based on the proportional, integral, and derivative parameters.

BACKGROUND

The present disclosure relates generally to downhole neutron generators, downhole logging tools that utilize neutron generators, and methods to auto tune downhole neutron generators.

Oil and gas companies often utilize different logging techniques to obtain a record of petrophysical properties of a formation, such as, but not limited to, formation resistivity, formation anisotropy, dip angle of formation bed, radioactivity of the formation, formation density, formation porosity, acoustic properties of the formation, and formation pressure properties as well as other properties of the formation (collectively referred to as “formation properties”). For example, in wireline logging, a logging tool is attached to a wireline and is lowered into a borehole. The logging tool contains various sensor components used to obtain the formation properties. Data corresponding to the measurements may be recorded in real time mode or in memory mode.

Some logging tools utilize neutron generators to generate neutrons that interact with the surrounding formation and utilize sensors to detect resulting signals indicative of the formation properties of the surrounding formation. Neutron generators are sometimes tuned in a laboratory environment to generate desirable reactions based on predicted downhole environments. More particularly, parameters of certain controllers of a neutron generator, such as proportional, integral, and derivative parameters of a proportional-integral-derivative (PID) controller, which is utilized by the neutron generator to adjust the amount of power supplied to initiate a desirable reaction, are predetermined and set before deployment of the neutron generator. However, actual downhole environments often vary, as such, the predetermined parameters may not generate desirable reactions in the actual downhole environment. Further, the downhole environment may change after deployment of the neutron generator. As such, even if the neutron generator is tuned for deployment in the downhole environment, a change in the downhole environment may cause the downhole generator to no longer generate reactions suitable in the new downhole environment.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

The present disclosure relates to downhole neutron generators, downhole logging tools that utilize neutron generators, and methods to auto tune downhole neutron generators. In some embodiments, a downhole neutron generator includes a gas reservoir, a reservoir control supply, an ion source, an ion acceleration tube, a target foil, and a power supply that is electrically coupled to the target foil. As referred to herein, a reservoir is an element or component that releases ionizable gas when the reservoir is heated to a threshold temperature. In some embodiments, the reservoir contains a filament (e.g., a tungsten filament) having a coat of material (e.g., zirconium) that releases hydrogen isotopes when the filament is heated, where the amount of hydrogen isotopes released over a unit of time (e.g., second, millisecond, or another unit of time) is based on the temperature of the filament. The downhole generator also includes a reservoir control supply that is electrically coupled to the filament and operable to supply a range of voltages to initiate neutron generation. As referred to herein, a reservoir control supply is any power supply that is electrically coupled to the reservoir (e.g., filament) and operable to supply a range of voltages to heat up the reservoir to a range of temperatures to release a desirable amount of hydrogen isotopes. In some embodiments, a neutron generation process is controlled by regulating the voltage of the reservoir control supply.

After the hydrogen isotopes are released, the ion source is actuated to ionize the hydrogen isotopes. A power supply that is electrically connected to the target foil applies an ion beam current to the target foil to generate an electric field in and around the acceleration tube. The generated electric field causes the ions to accelerate through the acceleration tube into the target foil to generate neutrons used for well logging.

The neutron generator also includes one or more processors that control the amount of voltage supplied by the reservoir control supply while the ion beam current is stabilizing. As referred to herein, the ion beam current is stable if the ion beam current oscillates between a desired measurement of current plus a buffer amount (hereafter referred to as the “first value”) and a desired measurement of current minus the buffer amount (hereafter referred to as the “second value”) for a threshold number of oscillations (e.g., 2 oscillations, 10 oscillations, or another number of oscillations). Additional descriptions of operations performed by the one or more processors to control the voltage supplied to the reservoir control supply until the ion beam current has a stable oscillation cycle are provided in the paragraphs below and are illustrated in at leastFIGS. 3A and 3B.

After the ion beam current has a stable oscillation cycle, the one or more processors determine the difference between the desired measurement of the ion beam current and the actual measurement of the ion beam current (the foregoing difference is hereafter referred to as the “current error”). The one or more processors also determine proportional, integral, and derivative parameters of a proportional-integral-derivative (PID) controller. As referred to herein, the PID controller is a logic and/or physical component of the downhole neutron generator that adjusts the amount of power supplied to generate ions. In some embodiments, the PID controller is a logical component of the one or more processors. The one or more processors then determine a manipulated variable, which is equal to a value of a new voltage of the reservoir control supply, based on the current error value and the proportional, integral, and derivative parameters. The one or more processors then adjust the voltage of the reservoir control supply to equal to the manipulated variable to generate a stable and desired amount of neutrons for well logging. Additional details of the downhole neutron generators and downhole logging tools that utilize neutron generators are provided in the paragraphs below.

Now turning to the figures,FIG. 1Aillustrates a schematic view of a wireline logging environment100in which a downhole neutron generator124is deployed on a wireline119in a wellbore106. Additional discussions of various components of downhole neutron generator124are provided in the paragraphs below and are illustrated in at leastFIGS. 2A and 2B.

In the embodiment ofFIG. 1A, a well having wellbore106extends from a surface108of the well102to or through a subterranean formation112. A casing116is deployed along wellbore106to insulate downhole tools and strings deployed in casing116, to provide a path for hydrocarbon resources flowing from subterranean formation112, to prevent cave-ins, and/or to prevent contamination of subterranean formation112. Casing116is normally surrounded by a cement sheath128, which is deposited in an annulus between the casing116and wellbore106to fixedly secure casing116to the wellbore106and to form a barrier that isolates casing116. Although not depicted, there may be layers of casing concentrically placed in wellbore106, each having a layer of cement or the like deposited thereabout.

A vehicle180carrying controller184and wireline119is positioned proximate to the well102. Wireline119, along with downhole neutron generator124and a logging tool125are lowered through the blowout preventer103into the well102. Data indicative of measurements obtained by logging tool125may be transmitted via wireline119or via another telemetry system to surface108for processing by controller184or by another electronic device operable to process data obtained by logging tool125. Controller184may include any electronic and/or optoelectronic device operable to receive data and/or process data indicative of one or more formation properties to determine the formation properties. In the embodiment ofFIG. 1A, controller184is stored on vehicle180. In some embodiments, controller184may also be housed in a temporary and/or permanent facility (not shown) proximate to the well102. In other embodiments, the controller184may also be deployed at a remote location relative to the well102. Additional operations of controller184are provided in the paragraphs below. In some embodiments, controller184includes a storage medium containing instructions for auto tuning downhole neutron generator124and for determining proportional, integral, and derivate parameters of a PID controller of downhole neutron generator124. In one or more of such embodiments, controller184, after determining the proportional, integral, and derivate parameters of the PID controller, transmits the determined values of the proportional, integral, and derivate parameters via telemetry downhole to downhole neutron generator124. Additional descriptions of operations performed to generate determining proportional, integral parameters and to auto tune downhole neutron generator124are provided in the paragraphs below.

FIG. 1Bis a schematic, side view of a logging while drilling (LWD) environment150in which downhole neutron generator124ofFIG. 1Ais deployed in wellbore106to detect leaks long wellbore106. In the embodiment ofFIG. 1B, a hook138, cable142, traveling block (not shown), and hoist (not shown) are provided to lower a tool string120down the wellbore106or to lift the tool string120up from wellbore106. Tool string120may be a drill string or another type of tool string operable to deploy downhole neutron generator124. At wellhead136, an inlet conduit152is coupled to a fluid source (not shown) to provide fluids, such as drilling fluids, downhole. Tool string120has an internal annulus that provides a fluid flow path from surface108down to drill bit126. Tool string120is coupled to downhole neutron generator124and logging tool125. The fluids travel down tool string120and exit tool string120at drill bit126. The fluids flow back towards surface108through a wellbore annulus148and exit the wellbore annulus148via an outlet conduit164where the fluids are captured in a container140.

Once downhole neutron generator124is lowered to a desired location, the voltage of the reservoir control supply is adjusted until the ion beam current has a stable oscillation cycle. After the ion beam current has a stable oscillation cycle, downhole neutron generator124determines the current error value, and the proportional, integral, and derivative parameters. Downhole neutron generator124then determines a manipulated variable based on the error value and the proportional, integral, and derivative parameters, and adjusts the voltage of the reservoir control supply to equal the manipulated variable to generate a stable and desired amount of neutrons for well logging. Additional operations performed by downhole neutron generator124are provided in the paragraphs below and are illustrated in at leastFIGS. 2A-2B and 3A-3B.

After adjusting the voltage of the reservoir control supply to initiate fusion reactions suitable for the downhole environment, downhole neutron generator124generates neutrons used for well logging. In the illustrated embodiments ofFIGS. 1A and 1B, the generated neutrons traverse surrounding subterranean formation112. In the illustrated embodiments ofFIGS. 1A and 1B, logging tool125is operable to measure return signals indicative of the formation properties. In some embodiments, data indicative of the measured formation properties is stored in a local storage medium that is deployed at a downhole location proximate to downhole neutron generator124. In other embodiments, the data is transmitted along wireline119ofFIG. 1Auphole, where the data is analyzed by controller184. AlthoughFIGS. 1A and 1Billustrate downhole neutron generator124deployed in two exemplary environments, downhole neutron generator124may be deployed in various drilling, completion, and production environments. Further, although theFIGS. 1A and 1Billustrate downhole neutron generator124as a component of logging tool125, in some embodiments, downhole neutron generator124and logging tool125are separate devices.

FIG. 2Aillustrates a block view of downhole neutron generator124ofFIG. 1Abefore an oscillation cycle of an ion beam current generated by downhole neutron generator124ofFIG. 1Ais stabilized. In the illustrated embodiment ofFIG. 2A, downhole neutron generator124includes a neutron generator tube210and a processor216.

Neutron generator tube210includes a gas reservoir211having a filament215, an ion source212, an acceleration tube213, and a target foil214. Filament215is coated with a material (e.g., zirconium) that releases hydrogen isotopes when heated to a threshold temperature. Further, filament215is electrically coupled to a reservoir control supply228that provides a range of voltages to gas reservoir211and filament215to control the amount of hydrogen isotopes released by reservoir211/filament215. Ion source212is electrically coupled to an ion power supply227, and when actuated, ionizes hydrogen isotopes released by gas reservoir211/filament215. Target foil214is deposited proximate an end of acceleration tube213, and is electrically coupled to a power supply226, which generates an electric field in and around acceleration tube213. The generated electric field accelerates ions through acceleration tube213into target foil214to initiate fusion reactions and generation of neutrons. An ammeter229measures the ion beam current through a resistor225to determine the value of the ion beam current and whether the oscillations of the ion beam current is stable.

Components within dashed lines of processor216illustrate logical components of processor216. In the illustrated embodiment ofFIG. 2A, processor216includes a PID controller230, a digital filter231, an auto-tuning controller232, and an error controller234. Digital filter231filters noise and other undesirable components of the measurement of the ion beam current made by ammeter229. Auto-tuning controller232adjusts the voltage of reservoir control supply228until the ion beam current has a stabile oscillation. In one or more embodiments, auto-tuning controller232utilizes relay feedback tests of the ion bream current between a desired current plus hysteresis (buffer current) and the desired current minus the buffer current to obtain the critical gain and critical frequency of downhole neutron generator124in the deployed environment. In some embodiments, the buffer current has a predetermined value. In some embodiments, the value of the buffer current is based on the amount of noise experienced by downhole neutron generator124or the amount of noise in the environment which downhole neutron generator124is deployed in. In one or more of such embodiments, the value of the buffer current is greater than the root-mean-square value of the system noise (experienced by downhole neutron generator124) to provide a sufficient signal to noise ratio. In one or more embodiments, the system noise is predetermined or dynamically measured while downhole neutron generator124is deployed.

Processor216then calculates proportional, integral, and derivative parameters based on the determined critical gain and the critical frequency. Additional descriptions and illustrations of operations performed by auto-tuning controller232and processor216to determine proportional, integral, and derivative parameters, and to adjust the voltage of reservoir supply controller are provided in the paragraphs below and are illustrated inFIGS. 3A and 3B. Error controller234is operable of calculating the current error. PID controller230is a control loop feedback mechanism that utilizes three control parameters of proportional, integral, and derivative to apply an accurate and responsive correction to the voltage of the reservoir control supply to control the ion beam current.

In the illustrated embodiment ofFIG. 2A, relays222and223connect auto-tuning controller232to reservoir control supply228and digital filter231, respectfully. While relay222connects auto-tuning controller232to reservoir control supply228, voltage of reservoir control supply228is controlled by auto-tuning controller232. Moreover, measurements of the ion beam current made by ammeter229bypass PID controller230and the error controller234, and are sent directly to auto-tuning controller232. Auto-tuning controller232adjusts the voltage of reservoir control supply228between a predetermined bias plus a delta and the predetermined bias minus a delta, where delta is the amplitude of the voltage of reservoir control supply228.

FIG. 2Billustrates a block view of downhole neutron generator124ofFIG. 1Aafter an oscillation cycle of an ion beam current generated by downhole neutron generator124FIG. 1Ais stabilized. Relay222connects reservoir control supply228to PID controller230, and relay223connects digital filter231to error controller234. In the illustrated embodiment ofFIG. 2B, the voltage of reservoir control supply228is controlled by PID controller230. Further, the ion beam current through resister225is measured by ammeter229and is provided to error controller234to determine the error current.

Processor216determines the critical gain of the ion beam current, where the critical gain is determined by solving the following:

Ku=4*Δπ*α2-ϵ2EQ.⁢1
where Kuis the critical gain, Δ is the amplitude of the voltage of reservoir control supply228, α is the amplitude of the ion current beam, and ε is the buffer current. In some embodiments, processor216applies the Zigler-Nichols close-loop method to determine P, I, and D parameters by solving the following:
Kp=0.6*KuEQ. 2
Ti=0.5*PuEQ. 3
Td=0.125*PuEQ. 4
where Kpis the proportional parameter, Tiis the interval parameter, and Tdis the derivative parameter, and Puis the critical period of the ion beam. In some embodiments, the criterial period Puis determined from oscillation data obtained during auto-tuning.

Processor216, after determining the proportional, integral, and derivative parameters of PID controller230, determines a value of the reservoir control supply228to generate the desired amount of neutron in the downhole environment by solving:

MV=Kp*e⁡(t)+Ki*∫0t⁢e⁡(t′)*dt′+kd*de⁡(t)dtEQ.⁢5
where MV is the value of the reservoir control supply228, e(t) is the current error, Kpis the proportional parameter, Kiis the interval parameter, and Kdis the derivative parameter. PID controller230, then sets the voltage of reservoir control supply228to the determined value of MV. In some embodiments, PID controller230solves EQ. 5 to determine the value of MV and automatically adjusts the voltage of reservoir control supply228to match the determined value of MV. In some embodiments, ammeter229periodically or continuously measures the ion beam current during the neutron generation process and periodically or continuously provides the measured ion beam current to error controller234. In one or more of such embodiments, error controller234determines the current error and provides the determined current error to PID controller230. PID controller230then recalculates MV based on the updated value of the current error and adjusts the voltage of reservoir control supply228to match the recalculated value of MV.

In some embodiments, where the downhole environment the downhole neutron generator124is deployed in changes, or after a threshold period of time, downhole neutron generator124performs another auto-tuning operation described and illustrated inFIGS. 2A and 3A or 3Band recalculates proportional, integral, and derivative parameters. In some embodiments, certain components of downhole neutron generator124are deployed on surface108. In one or more embodiments, auto-tuning controller232is deployed on surface108and is communicatively connected to PID controller230via telemetry, such as wireline119ofFIG. 1A. AlthoughFIGS. 2A and 2Billustrate multiple logical components of processor216, in some embodiments, a single logical component performs the operations described herein to determine the current error, auto-tune the voltage of reservoir control supply228, determine proportional, integral, and derivate parameters, and/or filter noise associated with the ion beam current. In some embodiments, one or more logical components shown inFIGS. 2A and 2Bare also physical components. In one or more of such embodiments digital filter231is physical band pass filter component of downhole neutron generator124. Further, althoughFIGS. 2A and 2Billustrate reservoir control supply228, ion power supply227, and power supply226as separate power supplies, in some embodiments, a single power supply or a different number of power supplies are electrically coupled to reservoir211/filament215, ion source212, and target foil214ofFIGS. 2A and 2B.

FIG. 3Aillustrates a flow chart of a process300to determine proportion, integral, and derivative parameters of the PID controller of downhole neutron generator124ofFIG. 1A. Although operations in the process300are shown in a particular sequence, certain operations may be performed in different sequences or at the same time where feasible. Further, although the operations in the process300are described to be performed by processor216ofFIG. 2A, the operations may also be performed by other processors of other downhole or surface-based tools or devices. At block S302, processor216sets an initial voltage of the reservoir control supply to be a predetermined bias plus a delta. At block S304, processor216measures the value of the ion beam current. At block S306, processor216determines whether the ion beam current is greater than a desired current plus a buffer (first value). At block S308, if processor216determines that the value of the ion beam current is not greater than the first value, processor216maintains the voltage of the reservoir control supply at the predetermined bias plus delta. The process then returns to block S304. Alternatively, if at block S306, processor216determines that the value of the ion beam current is greater than the first value, then the process proceeds to block S310.

At block S310, processor216ofFIG. 2Asets the voltage of the reservoir control supply to the predetermined bias minus delta. At block S312, processor216measures (or determines) the value of the ion beam current. At block S314, processor216determines if the ion beam current is less than the value of the desired current minus the buffer (second value). At block S316, processor216, in response to determining that the ion beam current is not less than the second value, maintains the voltage of the reservoir control supply at the predetermined bias minus delta. The process then proceeds to block S312. Alternatively, if processor216at block S314determines that the ion beam current is less than the second value, the process proceeds to block S318.

At block S318, processor216ofFIG. 2Adetermines if the ion beam has oscillated between the first value and the second value for the threshold number of oscillation cycles. If processor216determines that the ion beam has not oscillated between the first value and the second value for the threshold number of oscillation cycles, the process returns to block S302. Alternatively, if processor216, at block S318determines that the ion beam has oscillated between the first value and the second value for the threshold number of times, the process proceeds to block S320. At block S320, processor216determines proportion, integral, and derivative parameters of the proportional-integral-derivative controller of downhole neutron generator214ofFIG. 1A.

FIG. 3Billustrates a flow chart of another process350to determine proportion, integral, and derivative parameters of the PID controller of downhole neutron generator124ofFIG. 1A. Although operations in the process350are shown in a particular sequence, certain operations may be performed in different sequences or at the same time where feasible. Further, although the operations in the process350are described to be performed by processor216ofFIG. 2A, the operations may also be performed by other processors of other downhole or surface-based tools or devices. At block S352, processor216sets an initial voltage of the reservoir control supply to be a predetermined bias minus a delta. At block S354, processor216measures the value of the ion beam current. At block S356, processor216determines whether the ion beam current is less than the second value. At block S358, if processor216determines that the value of the ion beam current is not less than the second value, processor216maintains the voltage of the reservoir control supply at the predetermined bias minus delta. The process then returns to block S354. Alternatively, if at block S356, processor216determines that the value of the ion beam current is less than the second value, then the process proceeds to block S360.

At block S360, processor216ofFIG. 2Asets the voltage of the reservoir control supply to the predetermined bias plus delta. At block S362, processor216measures (or determines) the value of the ion beam current. At block S364, processor216determines if the ion beam current is greater than the first value. At block S366, processor216, in response to determining that the ion beam current is not greater than the first value, maintains the voltage of the reservoir control supply at the predetermined bias plus delta. The process then proceeds to block S362. Alternatively, if processor216at block S364determines that the ion beam current is greater than the first value, the process proceeds to block S368.

At block S368, processor216ofFIG. 2Adetermines if the ion beam has oscillated between the first value and the second value for the threshold number of oscillation cycles. If processor216determines that the ion beam has not oscillated between the first value and the second value for the threshold number of oscillation cycles, the process returns to block S352. Alternatively, if processor216, at block S368determines that the ion beam has oscillated between the first value and the second value for the threshold number of times, the process proceeds to block S370. At block S370, processor216determines proportion, integral, and derivative parameters of the proportional-integral-derivative controller of downhole neutron generator214ofFIG. 1A.

FIG. 4illustrates a flow chart of a process400to auto tune a neutron generator. Although operations in the process400are shown in a particular sequence, certain operations may be performed in different sequences or at the same time where feasible. Further, although the operations in the process400are described to be performed by downhole neutron generator124ofFIG. 1A, the operations may also be performed by other embodiments of a downhole neutron generator described herein.

At block S402, downhole neutron generator124determines whether an oscillation cycle of an ion beam current generated by downhole neutron generator124is stable. In the embodiments ofFIGS. 2A and 2B, ammeter229measures the ion beam current through resister225. In some embodiments, downhole neutron generator124filters the measured ion beam to remove noise components (e.g., system noise or noise from the surrounding environment). In the embodiments illustrated inFIGS. 2A and 2B, unwanted noise is filtered by digital filter231. In some embodiments, the voltage of a power supply that is coupled to a reservoir/filament (e.g., reservoir211/filament215ofFIGS. 2A and 2B) is adjusted to control the ion beam current. In the embodiment ofFIG. 2A, auto-tuning controller232initially adjusts the voltage of reservoir control supply228to control the ion beam current until the ion beam current has a stable oscillation cycle.FIGS. 3A and 3B, for example illustrate two processes300and350for determining whether the oscillation cycle of the ion beam current generated by downhole neutron generator124is stable.

At block S404, if downhole neutron generator124determines that the oscillation cycle of the ion beam current is not yet stable, the process returns to block S402. Alternatively, if downhole neutron generator determines at block S404that the oscillation cycle of the ion beam current is stable, then the process proceeds to block S406. At block S406, downhole neutron generator124, after determining that the ion beam current is stable, determines proportion, integral, and derivative parameters of the proportional-integral-derivative controller of downhole neutron generator124. At block S408, downhole neutron generator124adjusts a voltage of the reservoir control supply based on the determined proportional, integral, and derivative parameters. In some embodiments, downhole neutron generator124solves equations 1-5 provided herein to determine the voltage of the reservoir control supply that would generate a desirable amount of neutrons for well logging as well as other types of operations performed by tool125ofFIG. 1A.

The above-disclosed embodiments have been presented for purposes of illustration and to enable one of ordinary skill in the art to practice the disclosure, but the disclosure is not intended to be exhaustive or limited to the forms disclosed. Many insubstantial modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the disclosure. For instance, although the flowcharts depict a serial process, some of the steps/processes may be performed in parallel or out of sequence, or combined into a single step/process. The scope of the claims is intended to broadly cover the disclosed embodiments and any such modification. Further, the following clauses represent additional embodiments of the disclosure and should be considered within the scope of the disclosure:

Clause 1, a method to auto tune a downhole neutron generator, the method comprising: while a downhole neutron generator is deployed in a borehole of a wellbore, determining whether an oscillation cycle of an ion beam current generated by the downhole neutron generator is stable; after a determination that the oscillation cycle of the ion beam current is stable, determining proportional, integral, and derivative parameters of a proportional-integral-derivative controller that is operable to adjust an amount of power supplied to generate ions; and adjusting a voltage of a reservoir control supply of the downhole neutron generator based on the proportional, integral, and derivative parameters.

Clause 2, the method of clause 1, further comprising: periodically measuring the ion beam current, wherein determining whether the ion beam current has a stable oscillation cycle further comprises determining whether the ion beam current oscillates between a first value and a second value for a threshold number of oscillation cycles.

Clause 3, the method of clause 2, wherein the first value is equal to a value of a desired current plus a buffer, and the second value is equal to the value of the desired current minus the buffer.

Clause 4, the method of clause 3, wherein for each oscillation cycle of the threshold number of oscillation cycles, determining whether the ion beam current oscillates between the first value and the second value comprises setting an initial value of the voltage of the reservoir control supply to a predetermined bias plus a delta; while the value of the voltage is set at the predetermined bias plus delta: periodically determining if a value of the ion beam current is greater than the first value; in response to a determination that the value of the ion beam current is not greater than the first value, maintaining the value of the voltage at the predetermined bias plus delta; and in response to a determination that the value of the ion beam current is greater than the first value, setting the value of the voltage to the predetermined bias minus delta; and while the value of the voltage is set at the predetermined bias minus delta: periodically determining if the value of the ion beam current is less than the second value; and in response to a determination that the value of the ion beam current is not less than the second value, maintaining the value of the voltage at the predetermined bias minus delta; and in response to a determination that the value of the ion beam current is less than the second value and the ion beam current has not oscillated between the first value and the second value for the threshold number of oscillation cycles, setting the value of the voltage to the predetermined bias plus delta.

Clause 5, the method of clause 4, wherein while the value of the voltage is set at the predetermined bias minus delta, the method further comprises in response to a determination that the value of the ion beam current is less than the second value and the ion beam current has oscillated between the first value and the second value for the threshold number of oscillation cycles, determining the proportional, integral, and derivative parameters of a proportional-integral-derivative controller.

Clause 6, the method of any of clauses 1-5, further comprising configuring the proportional-integral-derivative controller based on the determined proportional, integral, and derivative parameters, wherein adjusting the voltage comprises utilizing the configured proportional-integral-derivative controller to adjust the voltage.

Clause 7, the method of any of clauses 1-6, wherein after determining that the oscillation cycle of the ion beam current is stable, the method further comprises calculating a difference between a desired current value and a measured value of the ion beam current; and adjusting the voltage based on the difference between the desired current value and the measured value of the ion beam current.

Clause 8, the method of any of clauses 1-7, wherein adjusting the voltage comprises: determining a variable, wherein a value of the variable is equal to

Clause 9, the method of any of clauses 1-8, further comprising filtering out a noise component of the ion beam current.

Clause 10, a downhole neutron generator comprising: a downhole neutron generator tube comprising: a gas reservoir that releases hydrogen isotopes when the gas reservoir is heated; an ion source for ionizing the hydrogen isotopes; a target foil; an acceleration tube for accelerating ions of the hydrogen isotopes, wherein neutrons are generated when ions of the hydrogen isotopes are accelerated through the acceleration tube, and into the target foil; a reservoir control supply electrically connected to the filament and operable to supply a range of voltages to the filament to initiate neutron generation; and a processor operable to: adjust a voltage of the reservoir control supply until an ion beam current of the downhole neutron generator has a stable oscillation cycle; and after the ion beam current has a stable oscillation cycle, the processor is further operable to: determine proportional, integral, and derivative parameters of a proportional-integral-derivative controller that is operable to adjust an amount of power supplied to generate ions; and adjust the voltage of the reservoir control supply based on the proportional, integral, and derivative parameters.

Clause 11, the downhole neutron generator of clause 10, wherein the processor is further operable to: periodically measure the ion beam current; and determine whether the ion beam current oscillates between a first value and a second value for a threshold number of oscillation cycles, wherein the ion beam current has a stable oscillation cycle if the ion beam current oscillates between a first value and a second value for the threshold number of oscillation cycles.

Clause 12, the downhole neutron generator of clause 11, wherein the first value is equal to a value of a desired current plus a buffer, and the second value is equal to the value of the desired current minus the buffer.

Clause 13, the downhole neutron generator of clause 12, wherein for each oscillation cycle of the threshold number of oscillation cycles, the processor performs the following operations to determine whether the ion beam current oscillates between the first value and the second value: set an initial value of the voltage of the reservoir control supply to a predetermined bias plus a delta; while the value of the voltage is set at the predetermined bias plus delta: periodically determine if a value of the ion beam current is greater than the first value; in response to a determination that the value of the ion beam current is not greater than the first value, maintaining the value of the voltage at the predetermined bias plus delta; and in response to a determination that the value of the ion beam current is greater than the first value, set the value of the voltage to the predetermined bias minus delta; and while the value of the voltage is set at the predetermined bias minus delta: periodically determine if the value of the ion beam current is less than the second value; in response to a determination that the value of the ion beam current is not less than the second value, maintain the value of the voltage at the predetermined bias minus delta; and in response to a determination that the value of the ion beam current is less than the second value and the ion beam current has not oscillated between the first value and the second value for the threshold number of oscillation cycles, set the value of the voltage to the predetermined bias plus delta.

Clause 14, the downhole neutron generator of clause 13, wherein in response to a determination that the value of the ion beam current is less than the second value and the ion beam current has oscillated between the first value and the second value for the threshold number of oscillation cycles, the processor is further operable to determine the proportional, integral, and derivative parameters of a proportional-integral-derivative controller.

Clause 15, the downhole neutron generator of any of clauses 10-14, wherein the processor is further operable to: configure the proportional-integral-derivative controller based on the determined proportional, integral, and derivative parameters; and utilize the configured proportional-integral-derivative controller to adjust the voltage.

Clause 16, the downhole neutron generator of any of clauses 10-15, wherein after the ion beam current having a stable oscillation cycle is flowing through the filament, the processor is further operable to: calculate a difference between a desired current value and a measured value of the ion beam current; and adjust the voltage based on the difference between the desired current value and the measured value of the ion beam current.

Clause 17, the downhole neutron generator of claim16, wherein the processor is further operable to: determine a variable, wherein a value of the variable is equal to

Clause 18, a downhole logging tool, comprising: a downhole neutron generator operable to transmit neutrons into a downhole formation to investigate the downhole formation, the downhole neutron generator comprising: a filament having a coating that releases hydrogen isotopes when the filament is heated; a reservoir control supply electrically connected to the filament and operable to supply a range of voltages to the filament to initiate neutron generation; and a processor operable to: adjust a voltage of the reservoir control supply until an ion beam current of the downhole neutron generator has a stable oscillation cycle; after the ion beam current has a stable oscillation cycle, the processor is further operable to determine proportional, integral, and derivative parameters of a proportional-integral-derivative controller that is operable to adjust an amount of power supplied to generate ions; and adjust the voltage of the reservoir control supply based on the proportional, integral, and derivative parameters.

Clause 19, the downhole logging tool of clause 18, wherein the processor is further operable to: periodically measure the ion beam current; and determine whether the ion beam current oscillates between a first value and a second value for a threshold number of oscillation cycles, wherein the ion beam current has a stable oscillation cycle if the ion beam current oscillates between a first value and a second value for the threshold number of oscillation cycles, and wherein the first value is equal to a value of a desired current plus a buffer and the second value is equal to the value of the desired current minus the buffer.

Clause 20, the downhole logging tool of clause 19, wherein for each oscillation cycle of the threshold number of oscillation cycles, the processor performs the following operations to determine whether the ion beam current oscillates between the first value and the second value: set an initial value of the voltage of the reservoir control supply to a predetermined bias plus a delta; while the value of the voltage is set at the predetermined bias plus delta: periodically determine if a value of the ion beam current is greater than the first value; in response to a determination that the value of the ion beam current is not greater than the first value, maintaining the value of the voltage at the predetermined bias plus delta; and in response to a determination that the value of the ion beam current is greater than the first value, set the value of the voltage to the predetermined bias minus delta; while the value of the voltage is set at the predetermined bias minus delta: periodically determine if the value of the ion beam current is less than the second value; in response to a determination that the value of the ion beam current is not less than the second value, maintain the value of the voltage at the predetermined bias minus delta; and in response to a determination that the value of the ion beam current is less than the second value and the ion beam current has not oscillated between the first value and the second value for the threshold number of oscillation cycles, set the value of the voltage to be the predetermined bias plus delta.

Unless otherwise specified, any use of any form of the terms “connect,” “engage,” “couple,” “attach,” or any other term describing an interaction between elements in the foregoing disclosure is not meant to limit the interaction to direct interaction between the elements and may also include indirect interaction between the elements described. As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. Unless otherwise indicated, as used throughout this document, “or” does not require mutual exclusivity. It will be further understood that the terms “comprise” and/or “comprising,” when used in this specification and/or the claims, specify the presence of stated features, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and/or groups thereof. In addition, the steps and components described in the above embodiments and figures are merely illustrative and do not imply that any particular step or component is a requirement of a claimed embodiment.

It should be apparent from the foregoing that embodiments of an invention having significant advantages have been provided. While the embodiments are shown in only a few forms, the embodiments are not limited but are susceptible to various changes and modifications without departing from the spirit thereof.