Patent Description:
Embodiments not falling within the scope are exemplary. The following discussion is directed to various exemplary embodiments. The exemplary embodiments presented herein, or any elements thereof, may be combined in a variety of ways, i.e., any element from one exemplary embodiment may be used in any other exemplary embodiment, without departing from the scope of the disclosure.

A system, method, and computer-readable medium for determining the flow rate and fluid density in an electrical submersible pump (ESP) and controlling the ESP based on the flow rate and density are disclosed herein. In one implementation, an ESP system includes an ESP, drive circuitry, a current sensor, a voltage sensor, and a processor. The ESP includes an electric motor. The drive circuitry is electrically coupled to the ESP and is configured to provide an electrical signal to power the ESP. The current sensor is configured to measure a current of the electrical signal. The voltage sensor is configured to measure a voltage of the electrical signal. The processor is configured to calculate speed of a shaft of the electric motor based on a frequency, induced by rotation of the motor, detected in the current. The processor is also configured to calculate a density of fluid in the ESP based on the speed. The processor may also be configured to determine a flow rate of the fluid in the ESP based on the speed. The processor may also be configured to determine a value of head based on the speed, and to determine the density based on the value of head. The processor may also be configured to determine a torque in the ESP based on a measured current of the electrical signal, a measured voltage of the electrical signal, a resistance of a conductor that electrically couples the ESP to the drive circuitry, and a resistance of a stator of the ESP. The processor may also be configured to determine the resistance of the conductor as a function of a temperature of the conductor, and determine the resistance of the stator as a function of a temperature of the electric motor.

The ESP system may also include an intake pressure sensor and a discharge pressure sensor. The intake pressure sensor is coupled to the ESP and configured to measure a pressure of the fluid at an intake of the ESP. The discharge pressure sensor is coupled to the ESP and configured to measure a pressure of the fluid at an outlet of the ESP. The processor may also be configured to determine a ratio of pressure-to-torque in the ESP based on the measured a pressure of the fluid at the intake of the ESP, and the measured a pressure of the fluid at the outlet of the ESP. The processor may also be configured to calculate a flow-to-speed ratio based on an efficiency curve for the ESP and the ratio of pressure-to-torque. The processor may also be configured to calculate a value of flow based on the flow-to-speed ratio. The processor may also be configured to reduce the speed of the electric motor responsive to the density being lower than a predetermined threshold value.

In another implementation, a method for controlling an ESP includes generating an electrical drive signal to power the ESP. A current of the electrical drive signal is measured. A voltage of the electrical drive signal is measured. A speed of a shaft of an electric motor of the ESP is calculated based on a frequency, induced by rotation of the motor, detected in the current. A density of fluid in the ESP is calculated based on the speed. The method may also include determining a flow rate of the fluid in the ESP based on the speed. The method may also include determining a value of head based on the speed, and determining the density based on the value of head. The method may also include determining a torque in the ESP based on the measured current, the measured voltage, a resistance of a conductor that electrically couples the ESP to circuitry that generates the electrical drive signal, and a resistance of a stator of the ESP. The method may also include determining the resistance of the conductor as a function of a temperature of the conductor, and determining the resistance of the stator as a function of a temperature of the electric motor. The method may also include measuring a first pressure of the fluid at an intake of the ESP, measuring a second pressure of the fluid at an outlet of the ESP, and determining a ratio of pressure-to-torque in the ESP based on the first pressure, the second pressure and the torque. The method may also include comprising calculating a flow-to-speed ratio based on an efficiency curve for the ESP and the ratio of pressure-to-torque. The method may also include calculating a value of flow based on the flow-to-speed ratio. The method may also include reducing the speed of the electric motor responsive to the density being lower than a predetermined threshold value.

In a further implementation, a non-transitory computer-readable medium is encoded with instructions that are executable by a processor to cause the processor to receive a measurement of a current of an electrical drive signal powering an ESP, and receive a measurement of a voltage of the electrical drive signal. The instructions also cause the processor to calculate a speed of a shaft of an electric motor of the ESP based on a frequency detected in the current. The frequency is induced in the current by rotation of the motor. The instructions further cause the processor to calculate, based on the speed, a density of a fluid in the ESP and a flow rate of the fluid in the ESP. The instructions may also cause the processor to receive a measurement of a current of an electrical drive signal powering an electrical submersible pump (ESP), receive a measurement of a voltage of the electrical drive signal, calculate speed of a shaft of an electric motor of the ESP based on a frequency detected in the current, and calculate, based on the speed, a density of a fluid in the ESP and a flow rate of the fluid in the ESP. The frequency is induced in the current by rotation of the electric motor. The instructions may also cause the processor to calculate a resistance of a conductor that electrically couples the ESP to circuitry that generates the electrical drive signal as a function of a temperature of the conductor, calculate a resistance of a stator of the ESP as a function of a temperature of the electric motor, and calculate a torque in the ESP based on: the measurement of the current, the measurement of the voltage, the resistance of the conductor, and the resistance of the stator. The instructions may also cause the processor to receive a measurement of a pressure of the fluid at an intake of the ESP, receive a measurement of a pressure of the fluid at an outlet of the ESP, and calculate a ratio of the pressure across the ESP to the torque. The instructions may also cause the processor to calculate a flow-to-speed ratio based on an efficiency curve for the ESP and the ratio of the pressure across the ESP to the torque. The instructions may also cause the processor to calculate the flow rate based on the flow-to-speed ratio.

Certain terms have been used throughout this description and claims to refer to particular system components. As one skilled in the art will appreciate, different parties may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not function. In this disclosure and claims, the terms "including" and "comprising" are used in an open-ended fashion, and thus should be interpreted to mean "including, but not limited to. " Also, the term "couple" or "couples" is intended to mean either an indirect or direct connection. Thus, if a first device couples to a second device, that connection may be through a direct connection or through an indirect connection via other devices and connections. The recitation "based on" is intended to mean "based at least in part on. " Therefore, if X is based on Y, X may be a function of Y and any number of other factors.

When producing a reservoir using an electrical submersible pump (ESP) to provide artificial lift, the ESP is typically run as fast as possible to maximize production. However, pump speed should not be high enough to elevate the gas content of the produced fluid by pulling down the intake pressure of the ESP. Moreover, high inhomogeneous gas content increases the risk of gas lock, a condition where the ESP is locally not primed. The ESP system may include sensors for monitoring pump operational parameters and ensuring optimal production. Pump intake pressure and the flow rate of fluid in the ESP are important parameters for understanding how the reservoir responds to production. An ESP may include intake and outlet pressure sensors for monitoring pressure across the pump, but lack a flow sensor. Some production systems may include flow metering at surface. However, measurement of flow at the surface may provide different results from measurement downhole because of differences in the pressure and temperature in the well relative to the surface and storage inside the well.

If gas content and viscosity of the fluid in the ESP is not too high, a flow rate can be estimated based on nominal pump behavior and the measured pressure at the intake and outlet sensors of the ESP. Implementations of the present disclosure estimate the flow rate of fluid in the ESP, and estimate the density of the fluid based on the estimated flow. Implementations of the ESP control system and control method disclosed can apply the flow rate and/or density estimates to manage operation of the ESP.

Estimation of flow and density begin with measurements of pressure across the ESP, an ESP efficiency curve, and a head curve. Given the pressure measurements and a value of torque, the point of operation on the efficiency curve may be determined. With a measurement of the shaft speed of the ESP's motor, implementations determine the flow rate, determine head based on the flow and speed measurements, and determine density based on pressure and head measurements.

Torque and speed are typically not measured in an ESP system. Some methods for estimating ESP speed and torque rely on nominal motor operation curves. Implementations of the present disclosure apply speed and torque estimates based on dynamically acquired voltage and currents measured at the ESP drive equipment on the surface. Non-linearities in the ESP motor create high frequency tones in the phase current spectrum that the system and method disclosed herein apply to provide a precision estimate of motor speed.

The system and method disclosed herein apply known motor stator and cable resistance to determine the electrical actuation torque of the ESP. Based on a motor temperature measurement and the precision speed estimate the internal motor viscous losses are estimated in form of an internal load torque. The torque estimate can be refined based on the temperature of the conductors that connect the ESP to the surface equipment, and with known drive frequency, rotor speed, and drive voltage and currents the motor output torque can be further adjusted for the internal motor core losses.

<FIG> shows a schematic diagram for an example well completion system <NUM> that includes an ESP in accordance with the present disclosure. The well completion system <NUM> includes an ESP <NUM> disposed in a wellbore <NUM>, and drive circuitry <NUM> and processing circuitry <NUM> disposed at the surface. Implementations of the well completion system <NUM> may include various other downhole tools such as packers, by-pass tubing, ESP encapsulation, or other tools. The presently disclosed systems and methods are independent of the completion architecture used in the specific application outside of the use of an ESP. The well associated with the well completion system <NUM> may produce any of a variety of fluids, such as liquid hydrocarbons or water. In the case of an oil well, the ESP <NUM> may be deployed to improve production of hydrocarbons.

The ESP <NUM> includes a motor <NUM> and a pump <NUM>. The motor <NUM> operates to drive the pump <NUM> in order to increase movement of fluid to the surface. The ESP <NUM> further includes an intake pressure sensor <NUM>, this may be an integral part of the ESP <NUM> or be a separate device. The intake pressure sensor <NUM> may be a part of a multisensory unit that includes a variety of sensors. The intake pressure sensor <NUM> measures the pressure upstream of the ESP <NUM>. The ESP <NUM> further includes a discharge pressure sensor <NUM>, which may be an integral part of the ESP <NUM>, or may be a separate device. The discharge pressure sensor <NUM> measures the pressure downstream of the ESP <NUM>. In some implementations of the well completion system <NUM>, temperature sensors (not shown) are included in the ESP <NUM> or as part of a multisensory unit. The temperature sensors measure the temperature of the fluid at an intake of the ESP and also measure the temperature of the motor <NUM>.

The motor <NUM> of the ESP <NUM> receives electrical drive signals from the drive circuitry <NUM>, which is typically located at the surface. The drive circuitry <NUM> controls the power to the motor <NUM>, which is provided by a generator or utility connection (not shown). In the implementation of the well completion system <NUM> shown in <FIG>, the drive circuitry <NUM> is a variable speed driver. The drive circuitry <NUM> provides drive signals to the ESP <NUM> through an electrical conductor <NUM>. The drive circuitry <NUM> is either connected to or includes a variety of sensors for monitoring the electrical signal provided to the ESP <NUM>. In some implementations, the drive circuitry <NUM> includes a voltage sensor <NUM>, a current sensor <NUM>, and a frequency sensor <NUM>. The voltage sensor <NUM> acquires samples of the voltage of the drive signals provided via the electrical conductor <NUM>, and digitizes the voltage samples. Similarly, the current sensor <NUM> acquires samples representative of the current of the drive signals provided via the electrical conductor <NUM>, and digitizes the current samples. The frequency sensor <NUM> measures the frequency of the drive signals provided to the ESP <NUM>. The sample rate implemented by the voltage sensor <NUM>, the current sensor <NUM>, and/or the frequency sensor <NUM> may vary based on the frequencies of the signals to be digitized. In some implementations of the well completion system <NUM>, the voltage sensor <NUM>, the current sensor <NUM>, and/or the frequency sensor <NUM> may be separate from the drive circuitry <NUM>. In some implementations of the well completion system <NUM>, the drive signals provided to the ESP <NUM> are multi-phase (e.g., three-phase), and the voltage sensor <NUM> and the current sensor <NUM> measure the voltage and current of each phase. The drive circuitry <NUM>, or other circuitry associated with the voltage sensor <NUM> and the current sensor <NUM> may include sampling circuitry, and one or more analog-to-digital converter with sufficient resolution and digitization speed to capture a highest frequency of interest in the voltage and current signals being digitized.

The drive circuitry <NUM> provides measurements of voltage, current, and/or frequency of the drive signal to the processing circuitry <NUM> for further processing. The processing circuitry <NUM> is also communicatively connected to the intake pressure sensor <NUM> and to the discharge pressure sensor <NUM>. The processing circuitry <NUM> receives measurements of intake pressure from the intake pressure sensor <NUM> and receives measurements of discharge pressure from discharge pressure sensor <NUM>. While in some embodiments, the processing circuitry <NUM> may receive measurements (intake pressure, discharge pressure, voltage, current, and/or frequency) in real-time or near real-time, in some implementations, the processing circuitry <NUM> may receive at least some measurements after a time delay.

The processing circuitry <NUM> includes a processor <NUM> that is communicatively connected to a computer-readable medium <NUM> programmed with instructions that upon execution by the processor <NUM> causes the processor <NUM> to perform the functions disclosed herein. The processor <NUM> may be a general-purpose microprocessor, a digital signal processor, a microcontroller, or other circuitry that can execute instructions to perform the functions disclosed herein. The computer-readable medium <NUM> may be a memory such as a volatile or non-volatile memory, magnetic storage, optical storage, etc..

The processing circuitry <NUM> further comprises a computer readable medium that operates as a database <NUM>. The processor <NUM> stores the data received and calculated by the processor <NUM> in the database <NUM>. The processor <NUM> can control a graphical display <NUM> (e.g., a visual display device), for example, to present a graph of the log of calculated values and, for example, a graph that presents a qualitative analysis of a flow rate and/or density of fluid in the ESP <NUM>. In various implementations of the processing circuitry <NUM>, the processor <NUM> is located at the well site or a remote location. For example, in some implementations, the processor <NUM> is not integrated with the processing circuitry <NUM>, but is rather connected locally by a wired or wireless data connection. In such implementations, the processor <NUM> may be a computer that establishes a data connection with the processing circuitry <NUM>. The computer may include the computer-readable medium <NUM> and database <NUM>. In an alternative implementation, the processing circuitry <NUM> transmits the measured values to a remote computer or server through a wired, wireless, or satellite data connection. In these implementations, the processor <NUM> and computer-readable medium <NUM> and database <NUM> are located remotely from the processing circuitry <NUM>.

The processing circuitry <NUM> also provides control signals <NUM> to the drive circuitry <NUM>. The control signals <NUM> may cause the drive circuitry <NUM> to change the voltage, current, and/or frequency of the drive signals provided to the ESP <NUM> by the drive circuitry <NUM>. The processing circuitry <NUM> may compute the flow rate and density of the fluid in the ESP <NUM> based on the voltage measurements, current measurements, pressure measurements, temperature measurements, etc., and cause the drive circuitry <NUM> to change the drive signals responsive to the values of flow rate and/or density. For example, if the value of fluid density calculated by the processing circuitry <NUM> indicates that the gas content of the fluid is excessive (i.e., the density is below a predetermined threshold), then the processing circuitry <NUM> may cause the drive circuitry <NUM> to reduce the speed of the motor <NUM> to increase the intake pressure of the ESP <NUM> and decrease the gas content of the fluid in the ESP <NUM>.

<FIG> shows a flow diagram for a method <NUM> for determining flow rate and density of fluid in the ESP <NUM> in accordance with the present disclosure. Though depicted sequentially as a matter of convenience, at least some of the actions shown can be performed in a different order and/or performed in parallel. Additionally, some implementations may perform only some of the actions shown. At least some operations of the method <NUM> may be performed by the well completion system <NUM>. Instructions stored in the computer-readable medium <NUM> may be executed by the processor <NUM> to perform operations of the method <NUM>.

In the method <NUM>, the determination of flow and density is based on the affinity law. At high Reynolds numbers (> 10e+<NUM>) and with a homogeneous fluid it can be assumed that the efficiency of the ESP <NUM> is constant for a given flow-to-speed ratio, i.e., the changes in flow rate and shaft speed are linear dependent. Pump efficiency is calculated from the ratio of hydraulic output power given by pressure times flow to mechanical input power given by torque times speed. The pump efficiency is typically specified at a nominal speed. Pump efficiency may be expressed as a function of flow-to-speed ratio: <MAT> where:.

Head is defined as the equivalent height corresponding to hydrostatic pressure. The affinity law states that the head is a function of flow and proportional to the square of the shaft speed, i.e., for known flow and shaft speed head is clearly defined. Head may be expressed as: <MAT> where:
g is the gravity constant.

Typically head dependency on flow is specified as a function of flow at a given nominal reference speed h(Q, ω = const). With known flow and speed the head curve is used to calculate head.

The head and efficiency curves are based on the pump design. With multiple stacked pump stages the nominal efficiency curve stays the same, but head rises proportional to the number of stages. With manufacturing variability, the real pump curves differ from the design curve. With cumulative operation time, pump efficiency and head may be reduced depending on the operating environment.

Using pressure measurements received from the intake pressure sensor <NUM> and the discharge pressure sensor <NUM>, and computed speed and torque, implementations of the well completion system <NUM> use the pump efficiency and head curves to determine flow and density.

The manufacturing test results for a pump can be used to characterize the pump in its initial state by the pump curves. Any additional operation under steady state controlled conditions, that include flow measurements, can be used to recalibrate the pump curves. Typically, the efficiency and head curves at nominal speed are represented as polynomials from a curve fit of the design or manufacturing results. For simpler processing, an additional polynomial k(y) is derived from the efficiency curve that allows the well completion system <NUM> to directly calculate flow from torque and pressure.

In block <NUM>, the intake pressure sensor <NUM> measures the pressure of the fluid at the intake of the ESP <NUM>, and transmits the pressure measurement to the processing circuitry <NUM>. Similarly, the discharge pressure sensor <NUM> measures the pressure of the fluid at the outlet of the ESP <NUM> and transmits the pressure measurement to the processing circuitry <NUM>. In some implementations of the <NUM>, temperature sensors in the ESP <NUM> measure the temperature of the fluid, the motor <NUM>, and/or other downhole components, and transmit the measured temperature values to the processing circuitry <NUM>.

In block <NUM>, the voltage sensor <NUM> samples the voltage of the drive signals provided to the ESP <NUM> by the drive circuitry <NUM>, digitizes the sampled voltage, and transfers the digitized voltage value to the processing circuitry <NUM>. Similarly, the current sensor <NUM> samples the current of the drive signals provided to the ESP <NUM> by the drive circuitry <NUM>, digitizes the sampled current, and transfers the digitized current value to the processing circuitry <NUM>. The rate of sampling and digitization of the voltage and current are sufficient to capture a highest frequency of interest in the voltage and/or current. A temperature sensor at the surface may also measure the temperature at the wellhead and provide the measured temperature to the processing circuitry <NUM>.

In block <NUM>, the processing circuitry <NUM> computes motor speed. <FIG> shows an example processing flow for computing shaft speed of the motor <NUM>. The various parameters shown in <FIG> are as follows:.

A fast Fourier transform, or other frequency domain transform, is applied to the current measurements received from the drive circuitry <NUM>. Cross-correlation is applied to search for a best match to predetermined harmonics of the drive frequency in the frequency domain current measurements. The best match corresponds to the rotor bar frequency, and division by the number of rotor bars in the motor <NUM> produces the shaft frequency of the motor <NUM>.

Returning now to <FIG>, in block <NUM>, the processing circuitry <NUM> computes the torque applied in the ESP <NUM>. <FIG> shows an example processing flow for computing torque in the well completion system <NUM>. The various parameters shown in <FIG> are as follows:.

Given temperature measurements, including temperature of the motor <NUM>, downhole fluid temperature, and wellhead temperature, and a measurement of the current flowing in the electrical conductor <NUM>, the processing circuitry <NUM> computes temperature values for the electrical conductor <NUM> and the motor <NUM> based on the temperature measurements and a model for heat transfer as a function of fluid. The processing circuitry <NUM> uses the computed temperatures of the electrical conductor <NUM> and the motor <NUM> to determine the resistance of the stator of the motor <NUM> and the resistance of the electrical conductor <NUM> based on a model of the resistance of the electrical conductor <NUM> and the motor <NUM> at room temperature. The processing circuitry <NUM> applies the resistances of the electrical conductor <NUM> and motor <NUM> with voltage and current measurements to compute a flux vector (Ψ). Flux may be computed as an integral over time of measured voltage less drops across the electrical conductor <NUM> and the stator of the motor <NUM>, or other methods. The processing circuitry <NUM> computes torque of the ESP <NUM> as the vector product of flux and measured current. In some implementations, the measured current is adjusted for core loss prior to the torque computation. The computed torque may be further adjusted for mechanical losses, such as friction and viscous drag, to produce an output torque value for the ESP <NUM>.

The processing circuitry <NUM> computes a differential pressure to torque ratio based on the pressure values measured by the intake pressure sensor <NUM> and the discharge pressure sensor <NUM> of the ESP <NUM> and the computed output torque value. The differential pressure to torque ratio is expressed as: <MAT> where:.

Returning to <FIG>, in block <NUM>, the processing circuitry <NUM> computes a flow-to-speed ratio based on the efficiency pressure values measured by the intake pressure sensor <NUM> and the discharge pressure sensor <NUM> of the ESP <NUM> and the computed output torque value. The flow/speed ratio is expressed as: <MAT> where:.

In block <NUM>, the processing circuitry <NUM> computes the flow rate in the ESP <NUM> based on the flow-to-speed ratio and the shaft speed determined in block <NUM>. Applying the affinity law, the flow rate is expressed as: <MAT>.

<FIG> shows an example processing flow for computing flow rate and density in accordance with the present disclosure. In <FIG>: <MAT> <MAT> <MAT> h(x) is the head curve at reference speed; <MAT> η(x) is the efficiency curve; and <MAT>.

Pressure measurements from block <NUM>, torque from block <NUM>, and speed from block <NUM> are provided as inputs to the computation of <FIG>. The pressure-to-torque ratio as computed in block <NUM> is applied to an efficiency curve k(y) for the ESP <NUM>. The pressure-to-torque ratio defines the slope of a line that intersects the efficiency curve to identify the value of the flow-to-speed ratio. <FIG> shows an example graph of pump efficiency versus flow-to-speed ratio for an example of the ESP <NUM>. <FIG> shows the intersection of a pump efficiency curve of with a pressure-to-torque ratio line for an example of the ESP <NUM>. With the following substitutions: <MAT> <MAT> <MAT> the point of operation of the ESP <NUM> is determined by the intersection of the flow-to-speed ratio and the efficiency curve. In this representation, the factor y is represented by the pressure-to-torque ratio. The abscissa coordinate of the intersection represents the flow-to-speed ratio. The flow rate may be determined by multiplying the flow-to-speed ratio by the speed determined in block <NUM>, or, in case of a normalized representation to nominal speed, by the speed ratio of the nominal speed.

The intersection of the pressure-to-torque line with the polynomial representing the efficiency curve may be identified in various ways. For example, iteration may be applied to identify the point of intersection. However, some implementations of the processing circuitry <NUM> may apply more direct methods. <MAT> <MAT>.

The inverse dependency x = k(y) = g-<NUM>(y) of variable x can be derived directly from a polynomial curve fit. If more calibration points are used than the chosen order of the polynomial there is a small side effect. The points in the efficiency curve at low speed get more weight in the cost function. This can be overcome by using a curve fit on the efficiency curve first and then determining the inverse dependency g-<NUM>(y) through interpolation from a table. Another solution is to convert the table back through polynomial curve fit.

Polynomial: x = k(y) = a<NUM> + a<NUM>y + a<NUM>y<NUM>.

Referring again to <FIG>, in block <NUM>, the processing circuitry <NUM> computes head based on the flow-to-speed ratio computed in block <NUM> and the speed computed in block <NUM>. In <FIG>, computation of head begins with multiplying the flow-to-speed ratio and a head calibration curve (h(x)) to produce a normalized version of the head (Hn). The calibration head curve polynomial may be computed as: <MAT>.

Thus, with known density ρ and gravity constant g, head h(xc) can be calculated for each calibration point xc. Since head is proportional to the square of the speed, the calibration points are normalized to the square of the speed. The polynomial h(x) can be derived by fitting the coordinated Hn (xc), xc.

Polynomial: h(y) = b<NUM> +b<NUM>x+b<NUM>x<NUM>.

The affinity law is applied to the normalized head to determine a final value of head based on the speed determined in block <NUM> relative the speed of the ESP <NUM> in the manufacturing reference curve. Head is expressed as: <MAT>.

Referring again to <FIG>, in block <NUM>, the processing circuitry <NUM> computes density based on the head computed in block <NUM>. Density is expressed as: <MAT>.

As shown in <FIG>, the final value of head, pressure determined in block <NUM>, and the gravity constant are applied to compute the density of the fluid in the ESP <NUM>.

The processing circuitry <NUM> may change the speed of the ESP <NUM> responsive to the value of the flow and/or the value of density.

Table <NUM> below shows an example of calibration measurements produced at manufacturing test and used to generate an efficiency curve.

Table <NUM> below shows an example of application of calibration data.

Claim 1:
An electrical submersible pump system, comprising:
an electrical submersible pump (ESP) (<NUM>) comprising an electric motor (<NUM>);
drive circuitry (<NUM>) electrically coupled to the ESP and configured to provide an electrical signal to power the ESP;
a current sensor (<NUM>) configured to measure a current of the electrical signal;
a voltage sensor (<NUM>) configured to measure a voltage of the electrical signal; and
a processor (<NUM>) configured to:
calculate speed of a shaft of the electric motor based on a frequency induced by rotation of the electric motor detected in the current;
calculate a density of a fluid in the ESP based on the speed;
the electrical submersible pump being characterized in that the processor is further configured to reduce the speed of the electric motor responsive to the density being lower than a predetermined threshold value.