Oil field well site direct current micro-grid control system and control method of energy storage current converter of oil field well site direct current micro-grid control system
By employing dual closed-loop constant voltage control (outer voltage loop and inner current loop) and adaptive regulation of the VDCM module in the DC microgrid of the oilfield well site, the problem of transient and oscillating DC bus voltage caused by load disturbance was solved, achieving rapid voltage recovery and improved system stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-04-21
AI Technical Summary
The strong disturbance of the load in the DC microgrid of the oilfield well site causes transients and oscillations in the DC bus voltage, and traditional control methods cannot effectively maintain voltage stability.
A dual closed-loop constant voltage control system with an outer voltage loop and an inner current loop is adopted. Combined with the VDCM module for adaptive regulation of inertia and damping, the system achieves rapid recovery of DC bus voltage and suppression of voltage spikes through adaptive adjustment of rotational inertia and damping coefficient, combined with operating condition sensing and pump group start-stop prediction compensation.
It achieves rapid recovery of DC bus voltage, suppresses voltage spikes, improves system robustness, and balances energy storage life with grid connection protection.
Smart Images

Figure CN121906382A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of DC microgrids, specifically relating to a DC microgrid control system for oilfield well sites and a control method for its energy storage converter. Background Technology
[0002] In recent years, the use of DC microgrids for distributed photovoltaic, energy storage, and electric pumping / water injection loads in oilfield well sites has gradually increased. Oilfield well sites often operate in isolation or with weak interconnection, and their load characteristics are highly volatile (periodically starting and stopping pumping units, water injection pumps, and switching production equipment, etc.), requiring high power supply reliability. Traditional dual-closed-loop constant voltage control or droop control cannot provide sufficient grid inertia and damping. When faced with rapid power surges, the DC bus voltage is prone to large transients and oscillations, leading to protection actions and equipment shutdowns.
[0003] Existing technologies propose a technique to improve DC bus stability by incorporating a Virtual Direct Current Motor (VDCM) into the controller of the converter in an energy storage system to simulate the inertia and damping of the virtual main current motor. However, due to the excessive load disturbance in the DC microgrid of oilfield well sites, this method cannot effectively maintain DC bus voltage stability in the oilfield DC microgrid and still leads to transients and oscillations in the DC bus voltage. Summary of the Invention
[0004] The purpose of this invention is to provide a control system for a DC microgrid in an oilfield well site and a control method for its energy storage converter, so as to solve the problem of transient and oscillating DC bus voltage caused by strong load disturbances in the oilfield DC microgrid.
[0005] To solve the above technical problems, the present invention provides a control method for an energy storage converter in an oilfield well site DC microgrid. The energy storage converter adopts a dual closed-loop constant voltage control with an outer voltage loop and an inner current loop. A VDCM module is connected in series between the current reference value inputs of the outer voltage loop and the inner current loop. The rotational inertia in the VDCM module is adaptively adjusted based on the system state variables of the oilfield well site DC microgrid.
[0006] The system state variables include: bus voltage change rate and load start signal;
[0007] Correspondingly, the adaptive control of rotational inertia includes: increasing rotational inertia when the bus voltage change rate exceeds the set change rate threshold or when the load start signal is a high-power load start signal.
[0008] Furthermore, the system state variables also include the energy storage system's state of charge (SOC).
[0009] When the energy storage system is discharging, the larger the SOC, the greater the moment of inertia. When the SOC is below the warning lower limit, the moment of inertia rapidly approaches 0 as the SOC decreases. When the energy storage system is charging, the larger the SOC, the smaller the moment of inertia. When the SOC is above the warning upper limit, the moment of inertia rapidly approaches 0 as the SOC increases.
[0010] Furthermore, the mathematical expression for adaptive control of rotational inertia is as follows:
[0011]
[0012] In the formula, J(t) is the moment of inertia at time t. base k is the fundamental rotational inertia of the system during steady-state operation. p β is the gain coefficient for the voltage change rate, used to respond to sudden disturbances; β is the power coefficient, used to respond to large-amplitude disturbances amplified nonlinearly; J step When a large load start signal S is received load The preset large inertia value superimposed over time; S load This is the high-load start signal; its value is 1 when a high-load starts and 0 when a high-load does not start; K soc K is a correction factor based on the SOC of the energy storage system. Under the discharge state of the energy storage system, the larger the SOC, the better. soc The larger the value of K, the lower the warning threshold when the SOC is below the warning limit. As the SOC decreases, K... soc When the SOC rapidly approaches 0, the larger the SOC of the energy storage system during charging, the better. soc The smaller the value, the more important it is to consider the relationship between K and the SOC. When SOC exceeds the warning limit, as SOC increases, K... soc It rapidly approaches 0.
[0013] Furthermore, the control method also includes adaptive adjustment of the damping coefficient; correspondingly, the adaptive adjustment of the damping coefficient in the VDCM module includes: the larger the bus voltage deviation damping coefficient, the greater the adaptive adjustment of the damping coefficient. The mathematical expression for this adaptive adjustment is:
[0014]
[0015] In the formula, D base k is the basic damping coefficient for stable system operation. d Δu is the dynamic adjustment coefficient, and Δu is the DC bus voltage deviation.
[0016] Furthermore, K under the discharge state of the energy storage system soc The mathematical expression is as follows:
[0017]
[0018] In the formula, α is the slope adjustment coefficient; SOC minThis is the lower limit for SOC warning;
[0019] K in the charging state of the energy storage system soc The mathematical expression is as follows:
[0020]
[0021] In the formula, SOC max This is the upper limit for SOC warning.
[0022] This invention is an improved invention, and its beneficial effects are as follows: The energy storage converter control method of the oilfield well site DC microgrid of this invention adds a VDCM module to the outer loop of the energy storage interface converter, and combines inertial / damping adjustment based on operating conditions, pump group start-stop prediction compensation and protection linkage to achieve rapid recovery of DC bus voltage, suppress voltage spikes, improve system robustness, and take into account energy storage life and grid connection protection coordination.
[0023] To solve the above-mentioned technical problems, the present invention also provides an oilfield well site DC microgrid control system. The control system adopts a dual closed-loop constant voltage control of the energy storage system with an outer voltage loop and an inner current loop. A VDCM module is connected in series between the current reference value inputs of the outer voltage loop and the inner current loop. The rotational inertia in the VDCM module is adaptively adjusted based on the system state variables of the oilfield DC microgrid.
[0024] The system state variables include: bus voltage change rate and load start signal;
[0025] Correspondingly, the adaptive control of rotational inertia includes: increasing rotational inertia when the bus voltage change rate exceeds the set change rate threshold or when the load start signal is a high-power load start signal.
[0026] Furthermore, the system state variables also include the energy storage system's state of charge (SOC).
[0027] When the energy storage system is discharging, the larger the SOC, the greater the moment of inertia. When the SOC is below the warning lower limit, the moment of inertia rapidly approaches 0 as the SOC decreases. When the energy storage system is charging, the larger the SOC, the smaller the moment of inertia. When the SOC is above the warning upper limit, the moment of inertia rapidly approaches 0 as the SOC increases.
[0028] Furthermore, the mathematical expression for adaptive control of rotational inertia is as follows:
[0029]
[0030] In the formula, J(t) is the moment of inertia at time t. base k is the fundamental rotational inertia of the system during steady-state operation. pβ is the gain coefficient for the voltage change rate, used to respond to sudden disturbances; β is the power coefficient, used to respond to large-amplitude disturbances amplified nonlinearly; J step When a large load start signal S is received load The preset large inertia value superimposed over time; S load This is the high-load start signal; its value is 1 when a high-load starts and 0 when a high-load does not start; K soc K is a correction factor based on the SOC of the energy storage system. Under the discharge state of the energy storage system, the larger the SOC, the better. soc The larger the value of K, the lower the warning threshold when the SOC is below the warning limit. As the SOC decreases, K... soc When the SOC rapidly approaches 0, the larger the SOC of the energy storage system during charging, the better. soc The smaller the value, the more important it is to consider the relationship between K and the SOC. When SOC exceeds the warning limit, as SOC increases, K... soc It rapidly approaches 0.
[0031] Furthermore, the control method also includes adaptive adjustment of the damping coefficient; correspondingly, the adaptive adjustment of the damping coefficient in the VDCM module includes: the larger the bus voltage deviation damping coefficient, the greater the adaptive adjustment of the damping coefficient. The mathematical expression for this adaptive adjustment is:
[0032]
[0033] In the formula, D base k is the basic damping coefficient for stable system operation. d Δu is the dynamic adjustment coefficient, and Δu is the DC bus voltage deviation.
[0034] Furthermore, K under the discharge state of the energy storage system soc The mathematical expression is as follows:
[0035]
[0036] In the formula, α is the slope adjustment coefficient; SOC min This is the lower limit for SOC warning;
[0037] K in the charging state of the energy storage system soc The mathematical expression is as follows:
[0038]
[0039] In the formula, SOC max This is the upper limit for SOC warning.
[0040] This invention is an improved invention, and its beneficial effects are the same as those of the energy storage converter control method of the well site DC microgrid of this invention. Attached Figure Description
[0041] Figure 1This is a topology diagram of the DC microgrid system for oilfield well sites according to the present invention;
[0042] Figure 2 This is a structural diagram of the DC-DC converter in the energy storage system of the present invention;
[0043] Figure 3 This is a control block diagram of the dual closed-loop constant voltage control with added VDCM module of the present invention;
[0044] Figure 4 This is a virtual DC motor model diagram of the VDCM module of the present invention. Detailed Implementation
[0045] The energy storage converter control method of the DC microgrid in the oilfield well site of this invention adds a VDCM module to the outer loop of the energy storage interface converter, and combines inertial / damping adjustment based on operating conditions, pump group start-stop prediction compensation and protection linkage to achieve rapid recovery of DC bus voltage, suppress voltage spikes, improve system robustness, and take into account the coordination of energy storage life and grid connection protection.
[0046] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings.
[0047] System Implementation Method:
[0048] The present invention provides a topology for a DC microgrid system for oilfield well sites, as follows: Figure 1 As shown, it includes photovoltaics, energy storage, an oil pumping unit, and an electric heater. The structural diagram of the DC-DC converter in the energy storage system is shown below. Figure 2 As shown.
[0049] This invention discloses a DC microgrid control system for oilfield well sites. This control system employs a dual closed-loop constant voltage control system for the energy storage system, consisting of an outer voltage loop and an inner current loop. A VDCM module is connected in series between the current reference values input to the outer voltage loop and the inner current loop. The rotational inertia in the VDCM module is adaptively adjusted based on the system state variables of the oilfield DC microgrid. The specific control method is as follows:
[0050] like Figure 3 As shown, the energy storage converter of this invention employs dual closed-loop constant voltage control (outer voltage loop + inner current loop), and adds a VDCM (virtual DC motor control) module between the outer voltage loop and the current reference. The input to the outer voltage loop is the measured value U of the DC bus voltage. dc and voltage reference value U ref Through a voltage PI controller (PI u Then, the current ΔI that needs to be compensated is obtained, and then multiplied by the voltage reference value U. ref The required power ΔP is obtained, and then divided by the rated angular velocity ω0 to obtain the torque deviation. The input is fed into the VDCM module, where the virtual armature motor E output by the VDCM is converted into a current reference through mapping, and then the actual control of the energy storage converter is achieved through the inner current loop (PI) and PWM.
[0051] The VDCM module is based on the mechanical motion equations and armature circuit equations of a DC motor, forming a virtual inertia and damping element, which can be expressed mathematically as follows:
[0052]
[0053] In the formula, J is the moment of inertia, ω is the actual angular velocity, ω0 is the rated angular velocity, and T... m T is the mechanical torque. e Let be the electromagnetic torque, and D be the damping coefficient.
[0054] Virtual DC motor model such as Figure 4 As shown, the armature circuit electromotive force balance equation is: Where U0 is the terminal output voltage, E is the armature induced electromotive force, and R... a I is the armature equivalent resistance. a Armature current;
[0055] Armature induced electromotive force equation: C T Φ is the torque coefficient, and Φ is the flux per pole.
[0056] The VDCM module outputs the virtual motor armature current I. a After mapping, the current reference value I is obtained. ref .
[0057] PI controller in the inner current loop ( Figure 3 China PI i The mathematical model for ) is as follows:
[0058]
[0059] In the formula, kp and ki are the proportional coefficient and integral coefficient of the PI controller, respectively.
[0060] To adapt to oilfield operating conditions, this invention proposes an adaptive adjustment method for the moment of inertia J and the damping coefficient D, as detailed below:
[0061] Adaptive adjustment strategy for rotational inertia J:
[0062] The moment of inertia J characterizes the system's ability to resist voltage changes. It should maintain a small fundamental moment of inertia J during steady-state operation. base To improve the system's ability to quickly adjust to minor fluctuations and reduce unnecessary power tripping during load surges (voltage surges): when the bus voltage change rate is detected. When the threshold is exceeded or a high-power load (such as a water pump group) start signal is received, J is rapidly increased, and energy is released / absorbed by the energy storage to "support" the bus voltage, simulating the large flywheel effect.
[0063] Meanwhile, to prevent overcharging or over-discharging of the energy storage system, the moment of inertia J should also be related to the system's state of charge (SOC). The higher the SOC, the more J is forcibly reduced when the SOC is too low (discharge direction) or too high (charging direction) and approaches its limit. Specifically: in the discharging state, when the SOC is below the warning lower limit, the moment of inertia rapidly approaches 0 as the SOC decreases; in the charging state, when the SOC is above the warning upper limit, the moment of inertia rapidly approaches 0 as the SOC increases. This protects the energy storage battery from overcharging and over-discharging by sacrificing some bus voltage stability.
[0064] Based on the above adaptive adjustment strategy, the adaptive control method for the moment of inertia J in this embodiment includes the following steps:
[0065] Step 1: Real-time acquisition of DC bus voltage u dc The system monitors the battery's state of charge (SOC), the energy storage output current (iout), and receives load start / stop prediction signals (S) from the upper-level energy management system (EMS) or the local controller. load (S) load =1 indicates that a high-power load is about to start, S load =0 indicates no action.
[0066] Step 2: Calculate the DC bus voltage change rate:
[0067]
[0068] In the formula, T s The sampling period is t, where t is time. Let be the DC bus voltage at the k-th sampling point. It represents the DC bus voltage at the (k-1)th sampling point.
[0069] Step 3: Construct the SOC correction factor K soc .
[0070] When the energy storage system is in a discharging state, the SOC correction factor K soc It should satisfy: K soc The SOC correction factor increases with increasing SOC, reaching approximately 1 when SOC is sufficient, and rapidly decaying to 0 when SOC falls below the warning threshold. In this embodiment, the SOC correction factor K is based on the Logistic function to construct a smooth constraint curve. soc The specific mathematical expression is as follows:
[0071]
[0072] In the formula, α is the slope adjustment coefficient, with a value ranging from 10 to 50; SOC min The lower limit for SOC warning is set to 20% in this implementation.
[0073] When the energy storage system is in the charging state, the SOC correction factor K soc It should satisfy: K soc The SOC correction factor decreases as the SOC increases, approximately equal to 1 when the SOC is low, and rapidly decays to 0 when the SOC exceeds the warning limit. In this embodiment, the SOC correction factor K is based on the Logistic function to construct a smooth constraint curve. soc The specific mathematical expression is as follows:
[0074]
[0075] In the formula, α is the slope adjustment coefficient, with a value ranging from 10 to 50; SOC max The upper limit for SOC warning is set to 80% in this implementation.
[0076] Step 4: Based on the DC bus voltage change rate and SOC correction factor K soc We construct an adaptive rotational inertia J(t).
[0077] The moment of inertia J is composed of the fundamental component J base It consists of dynamic response components and feedforward prediction components, and is subject to K soc The constraints, in this implementation, are expressed mathematically as follows:
[0078]
[0079] In the formula, J(t) is the moment of inertia at time t. base The fundamental inertia for the system during steady-state operation; k p β is the gain coefficient for the voltage change rate, used to respond to sudden disturbances; β is the power coefficient (usually taken as 1.0-1.5), used for nonlinear amplification of inertia when dealing with large disturbances; J step When the pump group start signal S is received load The preset large inertia value superimposed over time; S load It is a Boolean value or a step signal, which is set 100ms-500ms before the load is predicted to start, and the duration is determined by the load characteristics.
[0080] When a load start / stop command is detected or a high-impact scenario is predicted before a short-term high-power impact (such as the simultaneous start-up of a group of pumping units), the equivalent inertia is dynamically increased to enhance the buffering capacity.
[0081] Adaptive adjustment strategy for damping coefficient D:
[0082] The damping coefficient D is used to accelerate the convergence speed, and therefore its value is related to the voltage deviation. When the voltage deviates significantly from the rated value, D is increased to provide a stronger correction effect and accelerate the voltage recovery to steady state; when the voltage is close to the rated value, D is decreased to reduce the steady-state error. Based on this, the adaptive control method of the damping coefficient D in this embodiment is as follows:
[0083] Step 1: Calculate the DC bus voltage deviation:
[0084]
[0085] In the formula, Δu is the DC bus voltage deviation.
[0086] Step 2: Construct the adaptive damping coefficient D(t)
[0087] The mathematical expression for the adaptive damping coefficient in this embodiment is as follows:
[0088]
[0089] In the formula, D base Based on damping, k d This is a dynamic adjustment coefficient, with a value ranging from 1 to 50. This formula ensures that the further the bus voltage deviates from the reference value, the stronger the damping effect, forcing the voltage to return to its normal value. The damping coefficient D can be adjusted online according to the system's damping requirements and steady-state response speed, prioritizing phase angle margin and amplitude margin. d It is a dynamic adjustment coefficient for adjusting phase margin and gain margin. Phase margin is positively correlated with damping ratio. Generally speaking, the larger the damping coefficient D, the larger the system's damping ratio, the smaller the system's overshoot, and the larger the phase margin (the more stable the system).
[0090] too small k d (e.g., < 0.1) will result in a less obvious adaptive effect; an excessively large k d (e.g., > 100) may cause excessive damping changes, making the system sluggish during the recovery process.
[0091] Method implementation:
[0092] The specific principles and steps of the energy storage converter control method for the DC microgrid in the oilfield well site of the present invention have been described in detail in the system implementation method, and will not be repeated in this implementation method.
[0093] In summary, the oilfield well site DC microgrid control system and its energy storage converter control method of the present invention, by adding a VDCM module to the outer loop of the energy storage interface converter, combined with inertial / damping adjustment based on operating conditions, pump group start-stop prediction compensation and protection linkage, achieves rapid recovery of DC bus voltage, suppresses voltage spikes, improves system robustness, and takes into account energy storage life and grid connection protection coordination.
Claims
1. A control method for an energy storage converter in a DC microgrid at an oilfield well site, wherein the energy storage converter adopts a dual closed-loop constant voltage control with an outer voltage loop and an inner current loop, and a VDCM module is connected in series between the current reference value inputs of the outer voltage loop and the inner current loop, characterized in that, The moment of inertia in the VDCM module is adaptively controlled based on the system state variables of the oilfield's frequent DC microgrid. The system state variables include: bus voltage change rate and load start signal; Correspondingly, the adaptive control of rotational inertia includes: increasing rotational inertia when the bus voltage change rate exceeds the set change rate threshold or when the load start signal is a high-power load start signal.
2. The energy storage converter control method for the DC microgrid in an oilfield well site according to claim 1, characterized in that, The system state variables also include the energy storage system SOC; When the energy storage system is discharging, the larger the SOC, the greater the moment of inertia. When the SOC is below the warning lower limit, the moment of inertia rapidly approaches 0 as the SOC decreases. When the energy storage system is charging, the larger the SOC, the smaller the moment of inertia. When the SOC is above the warning upper limit, the moment of inertia rapidly approaches 0 as the SOC increases.
3. The energy storage converter control method for the DC microgrid in an oilfield well site according to claim 1 or 2, characterized in that, The mathematical expression for adaptive control of rotational inertia is as follows: ; In the formula, J(t) is the moment of inertia at time t. base k is the fundamental rotational inertia of the system during steady-state operation. p β is the gain coefficient for the voltage change rate, used to respond to sudden disturbances; β is the power coefficient, used to respond to large-amplitude disturbances amplified nonlinearly; J step When a large load start signal S is received load The preset large inertia value superimposed over time; S load This is the high-load start signal; its value is 1 when a high load starts and 0 when a high load does not start; K soc K is a correction factor based on the SOC of the energy storage system. Under the discharge state of the energy storage system, the larger the SOC, the better. soc The larger the value of K, the lower the warning threshold when the SOC is below the warning limit. As the SOC decreases, K... soc When the SOC rapidly approaches 0, the larger the SOC of the energy storage system during charging, the better. soc The smaller the value, the more important it is to consider the relationship between K and the SOC. When SOC exceeds the warning limit, as SOC increases, K... soc It rapidly approaches 0.
4. The energy storage converter control method for the DC microgrid in an oilfield well site according to claim 1, characterized in that, The control method also includes adaptive adjustment of the damping coefficient. The rule for adaptive adjustment is that the larger the bus voltage deviation, the larger the damping coefficient. Its mathematical expression is: ; In the formula, D base k is the basic damping coefficient for stable system operation. d Δu is the dynamic adjustment coefficient, and Δu is the DC bus voltage deviation.
5. The energy storage converter control method for the DC microgrid in an oilfield well site according to claim 3, characterized in that, K under the discharge state of the energy storage system soc The mathematical expression is as follows: ; In the formula, α is the slope adjustment coefficient; SOC min This is the lower limit for SOC warning; K in the charging state of the energy storage system soc The mathematical expression is as follows: ; In the formula, SOC max This is the upper limit for SOC warning.
6. A DC microgrid control system for an oilfield well site, wherein the control system employs dual closed-loop constant voltage control of the energy storage system, consisting of an outer voltage loop and an inner current loop, and a VDCM module is connected in series between the current reference value inputs of the outer voltage loop and the inner current loop, characterized in that... The moment of inertia in the VDCM module is adaptively controlled based on the system state variables of the oilfield's frequent DC microgrid. The system state variables include: bus voltage change rate and load start signal; Correspondingly, the adaptive control of rotational inertia includes: increasing rotational inertia when the bus voltage change rate exceeds the set change rate threshold or when the load start signal is a high-power load start signal.
7. The oilfield well site DC microgrid control system according to claim 6, characterized in that, The system state variables also include the energy storage system SOC; When the energy storage system is discharging, the larger the SOC, the greater the moment of inertia. When the SOC is below the warning lower limit, the moment of inertia rapidly approaches 0 as the SOC decreases. When the energy storage system is charging, the larger the SOC, the smaller the moment of inertia. When the SOC is above the warning upper limit, the moment of inertia rapidly approaches 0 as the SOC increases.
8. The oilfield well site DC microgrid control system according to claim 6 or 7, characterized in that, The mathematical expression for adaptive control of rotational inertia is as follows: ; In the formula, J(t) is the moment of inertia at time t. base k is the fundamental rotational inertia of the system during steady-state operation. p β is the gain coefficient for the voltage change rate, used to respond to sudden disturbances; β is the power coefficient, used to respond to large-amplitude disturbances amplified nonlinearly; J step When a large load start signal S is received load The preset large inertia value superimposed over time; S load This is the high-load start signal; its value is 1 when a high load starts and 0 when a high load does not start; K soc K is a correction factor based on the SOC of the energy storage system. Under the discharge state of the energy storage system, the larger the SOC, the better. soc The larger the value of K, the lower the warning threshold when the SOC is below the warning limit. As the SOC decreases, K... soc When the SOC rapidly approaches 0, the larger the SOC of the energy storage system during charging, the better. soc The smaller the value, the more important it is to consider the relationship between K and the SOC. When SOC exceeds the warning limit, as SOC increases, K... soc It rapidly approaches 0.
9. The oilfield well site DC microgrid control system according to claim 6, characterized in that, The control system is also configured to adaptively adjust the damping coefficient. The rule for adaptive adjustment is that the larger the bus voltage deviation, the larger the damping coefficient. Its mathematical expression is: ; In the formula, D base k is the basic damping coefficient for stable system operation. d Δu is the dynamic adjustment coefficient, and Δu is the DC bus voltage deviation.
10. The oilfield well site DC microgrid control system according to claim 8, characterized in that, K under the discharge state of the energy storage system soc The mathematical expression is as follows: ; In the formula, α is the slope adjustment coefficient; SOC min This is the lower limit for SOC warning; K in the charging state of the energy storage system soc The mathematical expression is as follows: ; In the formula, SOC max This is the upper limit for SOC warning.