Method and system for configuring number of charging piles
By combining queuing theory models and deep learning, the number of charging piles is dynamically adjusted, which solves the problems of low sample efficiency and insufficient real-time performance in the charging pile configuration method, and achieves efficient and flexible configuration of the number of charging piles and stable service performance.
Patent Information
- Application Number
- CN202510973343.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-07-15
AI Technical Summary
The existing charging pile quantity configuration method is inefficient, difficult to meet the real-time requirements of commercial sites, and prone to failure under extreme loads.
A method based on queuing theory model and deep learning is adopted, combined with real-time data to calculate queuing indicators, build a charging pile configuration model, and perform corrections through a dual safety threshold constraint mechanism to dynamically adjust the number of parallel service modules.
The gradient of queuing performance indicators to load parameters can be transmitted, making strategy training more efficient and responsive. It is suitable for intelligent operation and scheduling of large-scale charging networks, and has low-sample learning capabilities and edge deployability.
Smart Images

Figure CN120634176A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of charging pile planning, and in particular to a method and system for configuring the number of charging piles. Background Art
[0002] In recent years, the number of electric vehicles has grown exponentially, and the difference between peak and valley charging demand in urban and highway scenarios has continued to widen. Traditional charging station planning methods often rely on historical traffic flow and empirical coefficients to allocate charging stations at one time. This is difficult to adapt to traffic surges caused by holidays, weather conditions, or unexpected events, resulting in long queues during peak periods and idle equipment during off-peak periods.
[0003] At the same time, with the tightening of carbon trading and demand-based electricity pricing, operators must not only control construction investment but also manage power allocation during operation to reduce peak loads and costs. While there have been recent attempts at dynamic scheduling based on reinforcement learning, these approaches generally treat queuing models as black boxes, learning scaling strategies through trial-and-error. This results in low sample efficiency and struggles to meet the real-time requirements of commercial sites. Furthermore, safety strategies that rely solely on thresholds lack adaptability and are prone to failure under extreme loads. A comprehensive solution combining the precision of queuing theory with the decision-making speed of deep learning is urgently needed. Summary of the Invention
[0004] In view of the above-mentioned problems, the present invention is proposed.
[0005] Therefore, the technical problem solved by the present invention is that the existing method for configuring the number of charging piles has low sample efficiency and is difficult to meet the real-time requirements of commercial sites.
[0006] To solve the above technical problems, the present invention provides the following technical solutions: a method for configuring the number of charging piles, comprising: collecting real-time data from charging stations, calculating a queue indicator under the current configuration based on the real-time data using a queue theory model, encapsulating the queue indicator into a custom operator, and outputting a queue state vector; Construct a charging pile configuration model based on value function, and dynamically determine the number of parallel service modules that need to be adjusted in each control cycle based on the queue state vector; A dual safety threshold constraint mechanism is established to correct the adjustment actions output by the charging pile configuration model and realize the configuration of the number of charging piles.
[0007] As a preferred solution of the method for configuring the number of charging piles described in the present invention, wherein: the real-time data includes charging station operation data, traffic flow data, queue data and environmental data; The charging station operation data includes the start / end timestamp, duration, charging capacity and charging voltage and current curve of each charging pile; The traffic flow data includes vehicle arrival rate, parking time distribution and parking space turnover rate.
[0008] As a preferred solution of the method for configuring the number of charging piles described in the present invention, the queuing theory model includes calculating traffic intensity based on real-time data: ; in, Indicates traffic intensity; represents the vehicle arrival rate; Indicates the number of enabled parallel service modules; Represents the average service rate of a single parallel service module; when When the Erlang-C equation is used to calculate the probability that a vehicle needs to enter the queue , further calculate the queue waiting time: ; in, Indicates the waiting time in queue; represents the probability that a vehicle needs to enter the queue; when When , the charging station is determined to be saturated, the queuing probability is not calculated, and the process goes to the safety coverage branch to determine the number of parallel service modules that need to be opened at one time, which is expressed as: ; in, Indicates the total number of parallel service modules to be enabled in the next cycle; Indicates taking the maximum value; Indicates the minimum number of parallel service modules enabled; Indicates the preset upper limit of safety utilization; Indicates rounding up operation; directly adjust the number of parallel service modules opened to .
[0009] As a preferred solution of the method for configuring the number of charging piles described in the present invention, the queue state vector includes: , average service rate and the number of parallel service modules As key input, the probability that a vehicle needs to enter the queue is calculated based on the Erlang-C equation The partial derivative of the key input, the partial derivative of the vehicle arrival rate is expressed as: ; in, represents the differential symbol; Compile the custom Autograd operator together with the forward formula and partial derivatives of the key input. The forward formula is 、 and The calculation formula of Output queued state vector by tensor concatenation: ; in, represents the queue state vector; Represents the concatenation operator; represents the environmental data vector; Output by custom Autograd operator.
[0010] As a preferred solution of the method for configuring the number of charging piles described in the present invention, the charging pile configuration model includes defining the output action , Indicates whether the next cycle content is turned on or off parallel service modules, according to the Dueling-DQN architecture, Input shared feature extractor Get the hidden vector; The hidden vector is sent to branch one and branch two at the same time. Branch one calculates the state value, and branch two calculates the action advantage. Branch one and branch two are combined. value, and use the mean square TD-error for loss calculation; Output action according to the greedy strategy ,according to Perform dynamic adjustment of the number of parallel service modules.
[0011] As a preferred solution of the method for configuring the number of charging piles described in the present invention, the charging pile configuration model further includes: After adjusting the number of parallel service modules, immediate rewards are obtained according to the reward function, which is expressed as: ; in, Indicates immediate reward; represents the weighted coefficient of waiting cost; The weighting coefficient representing the electricity price cost; The weighted coefficient representing the module switching cost; Indicates time-of-use electricity price; Indicates finding the absolute value; It is not the numerical result of a separate call to the queue waiting time function, but the tensor output from the custom Autograd operator, with full automatic differentiation properties; In the back propagation phase, At the beginning, along the Dueling-DQN architecture, through branches 1, 2 and shared feature extractors, we generate , Contains three channels: ; in, represents the loss function; According to the partial derivative formula in the custom Autograd operator, the error is further transformed into: ; Affecting the weights of the shared feature extractor through the chain rule , obtain the direction of latency degradation when the key input changes within one backpropagation.
[0012] As a preferred solution of the method for configuring the number of charging piles described in the present invention, the dual safety threshold constraint mechanism includes: obtaining the output action Then, the exponentially weighted moving average is used to estimate the arrival rate of the next period ,according to Calculate the lower limit of the number of piles with the average service rate ; in, Indicates the lower limit number of piles; The number of parallel service modules enabled as output by the charging pile configuration model , the theoretical constraint is ,like , then the output action ; like , then the coverage is ; When the traffic intensity is less than the preset minimum traffic intensity, and the output action If it is still negative, it will be overwritten .
[0013] A charging pile quantity configuration system using any of the methods described in the present invention, wherein: a collection module collects real-time data from charging stations, calculates a queue index under the current configuration based on the real-time data using a queue theory model, encapsulates the queue index into a custom operator, and outputs a queue state vector; The scheduling module builds a charging pile configuration model based on the value function and dynamically determines the number of parallel service modules that need to be adjusted in each control cycle based on the queue state vector; The constraint module establishes a dual safety threshold constraint mechanism to correct the adjustment actions output by the charging pile configuration model and realize the configuration of the number of charging piles.
[0014] The present invention has the following beneficial effects: This method constructs a dynamic configuration method for the number of charging piles based on an analytically differentiable queue analyzer and a value-function reinforcement learning network. This method achieves gradient transfer of queue performance indicators to load parameters, making policy training more efficient and responsive. Furthermore, a bidirectional safety guardrail mechanism is implemented to ensure service stability and equipment longevity. This method boasts low-sample learning capabilities, edge deployability, and robustness, making it suitable for intelligent operation and scheduling scenarios in large-scale charging networks. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0016] Figure 1 This is an overall flow chart of a method for configuring the number of charging piles provided by one embodiment of the present invention; Figure 2 A schematic diagram of a custom Autograd operator for a method for configuring the number of charging piles provided in a second embodiment of the present invention. DETAILED DESCRIPTION
[0017] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, the following detailed description of the specific embodiments of the present invention is given in conjunction with the accompanying drawings. It is obvious that the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in this field without creative work should fall within the scope of protection of the present invention.
[0018] Example 1, reference Figure 1 , as an embodiment of the present invention, provides a method for configuring the number of charging piles, including: S1: Collect real-time data from charging stations. Based on the real-time data, use the queuing theory model to calculate the queuing index under the current configuration, encapsulate the queuing index into a custom operator, and output the queuing state vector.
[0019] A distributed data collection architecture based on edge computing gateways is used to monitor various operating and environmental factors of the target charging station and its surroundings in real time, and collect real-time data from the charging station. Specifically, by communicating with the charging pile control unit, the working status of each charging pile, the start and end time of the charging order, the charging duration, the current and voltage curves, and the accumulated charging power data are periodically collected, so that the service rate per unit time and the utilization rate of the current pile group can be accurately derived. In addition, by installing geomagnetic detectors at the entrances and exits of the charging station or using camera license plate recognition technology, the vehicles entering the station are continuously counted, and the vehicle arrival rate and parking behavior data are obtained in real time. At the same time, combined with the ultrasonic or millimeter wave sensors of the parking spaces, the average residence time of vehicles in the station and the parking space turnover status are further estimated.
[0020] To effectively reflect queue conditions, a queue identification algorithm based on intelligent video analysis or a multi-point geomagnetic detection module is introduced to count the number of vehicles waiting in the station's queue lanes, generating continuous queue length data. Furthermore, to integrate the potential impact of external environmental factors on EV charging behavior, a network interface is used to connect to a third-party meteorological service to obtain real-time meteorological data such as temperature, rainfall, and wind speed in the station's area. This data is combined with public event data such as holiday information and local major events to construct an external environmental feature vector. To facilitate subsequent price-responsive dynamic scheduling optimization, the station's grid's time-of-use electricity price curve, demand price tiers, and historical site load curves are incorporated into the data collection system and uniformly stored and synchronized in a time series database at the local edge node. All raw data is statistically analyzed using a sliding window with a fixed period (e.g., every 5 minutes) to form a standardized, time-consistent input feature sequence, providing multidimensional data support for subsequent queue analysis and reinforcement learning decision-making.
[0021] Through the integrated collection and normalized preprocessing of the above-mentioned multi-source data, the present invention can comprehensively capture and predict the core variables closely related to electric vehicle charging demand and queuing risk during the configuration and dynamic scheduling of the number of charging piles, significantly improve the accuracy of characterizing the transient behavior of charging stations, and thus lay a data foundation for achieving optimized pile quantity configuration and real-time control.
[0022] Furthermore, within each control cycle (a 5-minute cycle is used in this embodiment), the vehicle arrival rate, service rate, number of activated service modules, and external environment feature vectors are received in real time, and a queuing performance indicator with gradient information is generated based on this, providing trainable input for the subsequent reinforcement learning decision-making.
[0023] Specifically, traffic intensity is calculated based on real-time data: ; in, Indicates traffic intensity; represents the vehicle arrival rate; Indicates the number of enabled parallel service modules; Indicates the average service rate of a single parallel service module.
[0024] when When the Erlang-C equation is used to calculate the probability that a vehicle needs to enter the queue , expressed as: ; in, represents the probability that a vehicle needs to enter the queue; express The factorial of Represents a virtual sum index; express The factorial of .
[0025] Further calculation of queue waiting time: ; in, Indicates the waiting time in queue; It represents the probability that a vehicle needs to enter the queue.
[0026] when When , the charging station is determined to be saturated, the queuing probability is not calculated, and the process goes to the safety coverage branch to determine the number of parallel service modules that need to be opened at one time, which is expressed as: ; in, Indicates the total number of parallel service modules to be enabled in the next cycle; Indicates taking the maximum value; Indicates the minimum number of parallel service modules enabled; Indicates the preset upper limit of safety utilization; Indicates rounding up operation; directly adjust the number of parallel service modules opened to .
[0027] It should be noted that the actual meaning of the parallel service module is determined according to the specific type of charging pile. Currently, there are usually two forms of power configuration for DC charging equipment: integrated small and medium-power piles and modular high-power piles. For the integrated pile scenario, the parallel service module is the charging gun, which is almost equal to the number of charging piles; for the modular pile scenario, the parallel service module refers to the power module or power module. The total parallel capacity is adjusted by turning on / off the module. Multiple modules can be fed to the same gun in parallel or split to multiple guns, depending on the site's scheduling strategy.
[0028] Similarly, the average service rate is the average service rate of a single parallel service unit (i.e., an independent charging gun or a power module that can be independently switched on and off) during the control cycle, which is equivalent to the number of vehicles that the unit can fully serve per unit time.
[0029] Furthermore, in order to enable the above queuing indicators to be directly optimized in the deep reinforcement learning network, the analytical partial derivatives of the Erlang-C equation are derived, specifically: In the Erlang-C equation, the probability that a vehicle needs to enter the queue is and expected waiting time Only relies on three types of quantities: vehicle arrival rate , average service rate and the number of parallel service modules Although other characteristics (holidays, weather, etc.) affect queues, they are first changed by the prediction network. or , and then indirectly change Therefore, the vehicle arrival rate , average service rate and the number of parallel service modules As key input, the probability that a vehicle needs to enter the queue is calculated based on the Erlang-C equation Partial derivatives with respect to key inputs, including: ; by For example, the partial derivative of vehicle arrival rate is expressed as: ; in, Represents the differential symbol. Similarly, 、 The partial derivative of can also be obtained strictly according to the chain rule, which will not be repeated here.
[0030] Compile the custom Autograd operator together with the forward formula and partial derivatives of the key input. The forward formula is 、 and The calculation formula of .
[0031] The operator outputs during forward propagation Three scalars, and cache the intermediate variables in the context; read the cache in the back propagation phase, and return the result at one time according to the analytical formula The time complexity is O(1). No matter how large the input data is, the execution time of the algorithm (or a certain step of operation) remains within a constant range and does not increase with the change of the input amount. No Monte Carlo sampling or temperature annealing processing is required.
[0032] The original real-time data vector is then concatenated with the key input tensor in the feature dimension, and the queue state vector is output: ; in, represents the queue state vector; Represents the concatenation operator; represents the environmental data vector; Output by the custom Autograd operator, the gradient can flow smoothly back to the Erlang-C equation along the splicing position, thereby affecting Action selection in the next control cycle.
[0033] Through the aforementioned real-time analytical calculation and gradient transfer mechanism, the present invention achieves end-to-end coupling of queuing performance indicators and value-function deep reinforcement learning networks without changing the fundamental Erlang-C theory. Compared to simply adding a waiting penalty to the reward signal, the introduction of analytical gradients significantly improves the policy convergence speed and decision stability. Furthermore, compared to differentiable discrete event simulation methods that require full event simulation and temperature smoothing, the computational complexity of the analytical layer in this embodiment is significantly reduced. When deployed on an Intel NUC i7 edge node, the total forward and reverse time for a single step does not exceed 20ms, meeting the real-time requirements of multi-site parallel operation within a 5-minute control cycle.
[0034] S2: Construct a charging pile configuration model based on the value function, and dynamically determine the number of parallel service modules that need to be adjusted in each control cycle based on the queue state vector.
[0035] Furthermore, a charging pile configuration model based on a value function is constructed, and dynamic scaling control of power modules is achieved through a reinforcement learning decision layer. This decision layer is based on the DuelingDouble-DQN deep Q-learning framework with a dual network advantage-value structure. Differentiable queuing operators are embedded in the network computation graph to achieve analytic gradient coupling between queuing indicators, load parameters, and network weights.
[0036] Specifically, define the output action , Indicates whether the next cycle content is turned on or off Parallel service modules to obtain the queue state vector of the control cycle ,Will Input shared feature extractor The shared feature extractor consists of two fully connected layers with hidden dimensions of 256 and 128, respectively. Both layers use ReLU activation. Layer-Norm and 0.1 dropout are applied after each layer output to mitigate the uneven impact of features of different dimensions on the gradient scale.
[0037] The hidden vector is sent to both branch 1 and branch 2 at the same time, and branch 1 calculates the state value , branch 2 calculates the action advantage , combine branch 1 and branch 2 Value, expressed as: ; in, represents the action-value function; represents the state value function; represents the action advantage function; Indicates the number of elements in the action set; Represents a set of actions; Indicates that the action variable is removed from the action set Take them out in turn. Output actions according to the greedy strategy ,according to Perform dynamic adjustment of the number of parallel service modules.
[0038] Furthermore, according to the output action After adjusting the number of parallel service modules, immediate rewards are obtained according to the reward function, which is expressed as: ; in, Indicates immediate reward; represents the weighted coefficient of waiting cost; The weighting coefficient representing the electricity price cost; The weighted coefficient representing the module switching cost; Indicates time-of-use electricity price; Indicates finding the absolute value; It is not the numerical result of a separate call to the queue waiting time function, but the tensor output from the custom Autograd operator with full automatic differentiation properties.
[0039] The Double-DQN update mechanism is used in the training phase. After each batch of sampling is completed, the target network Compute target value: ; in, Indicates the time difference target value; represents the discount factor; represents the target network; Represents the queue state vector of the next cycle; Indicates that the main network is used The best action selected next; Indicates the main network (currently online network).
[0040] And the mean square TD-error is used as the loss function: ; in, Represents the loss function; updates the main network weights through the AdamW optimizer .
[0041] In the back propagation phase, At the beginning, along the Dueling-DQN architecture, through branches 1, 2 and shared feature extractors, we generate , Contains three channels: ; in, represents the loss function.
[0042] because is the forward output of the Erlang-C equation. According to the partial derivative formula in the custom Autograd operator, the error is further transformed into: ; Therefore, when the loss function includes the reward term When , back propagation will automatically propagate the partial derivative of the loss with respect to the reward through the chain rule to , and further affects the weight of the shared feature extractor , which means that even if the reward function itself does not have The network can also obtain the sensitivity feedback of queuing performance to action selection through the embedded analytical partial derivative information, which is impossible in traditional RL methods based on reward numerical estimation.
[0043] In other words, in the present invention, the reward function It is a function node with a differential path, rather than simply assigning a numerical value. Therefore, a backpropagation bridge from the queue indicator to the input state variable is established between the reward and policy networks, enabling reinforcement learning to more accurately identify whether capacity expansion is effective.
[0044] Compared with the traditional method of using waiting time as a reward value, this invention encapsulates the waiting time indicator into a differentiable operator and establishes: ; The network obtains the sensitivity of the waiting deterioration rate to the load-service parameter in each backpropagation, which significantly reduces the sample complexity. At the same time, this channel does not require additional simulation, and edge inference still maintains O(1) analytical complexity.
[0045] After completing online learning, the main network weights are integer quantized to INT8 format and exported as an inference model. This quantization process does not alter the analytical calculations at the Erlang-C layer, allowing edge nodes to perform forward evaluation of queue indicators using only O(1) floating-point operations, followed by a single quantized matrix multiplication to output the action. On the Jetson Orin Nano platform, end-to-end inference latency was measured at 18ms and power consumption was less than 6W, meeting the real-time requirements of a commercial charging station's 5-minute decision cycle.
[0046] In summary, by embedding the queuing indicator into the DuelingDouble-DQN computation graph and constructing a complete analytical gradient mechanism, the reinforcement learning decision layer of the present invention not only significantly improves the sample efficiency and convergence speed, but also takes into account the inference requirements of low-computing-power edge hardware, and realizes high-precision, low-latency adaptive control of the number of charging pile power modules.
[0047] S3: Establish a dual safety threshold constraint mechanism to correct the adjustment actions output by the charging pile configuration model to achieve the configuration of the number of charging piles.
[0048] Furthermore, to ensure that charging stations maintain established service levels and avoid equipment fatigue under all extreme load conditions, the present invention incorporates an independent dual safety threshold constraint mechanism before reinforcement learning actions are actually delivered to the power module. This mechanism implements deterministic correction of the number of candidate servers output by the DD-DQN and forms a two-way confirmation mechanism with the on-site PLC. Simultaneously, it re-injects historical records of forced overwrites or delayed executions into the experience buffer, thereby reducing the probability of illegal actions during subsequent training of the policy network.
[0049] Specifically, in the Get Output action Then, the exponentially weighted moving average is used to estimate the arrival rate of the next period ,according to Calculate the lower limit of the number of piles with the average service rate ; in, Indicates the lower limit number of piles.
[0050] The number of parallel service modules enabled as output by the charging pile configuration model , the theoretical constraint is ,like , then the output action ;like , then the coverage is .
[0051] When the traffic intensity is less than the preset minimum traffic intensity, and the output action If it is still negative, it will be overwritten In addition, to avoid oscillations at the load edge, each power module must wait at least 15 minutes between two switches; requests that violate this minimum interval are flagged and postponed to the next cycle.
[0052] The number of target servers corrected by the mechanism The system sends the alarm to the PLC within the station via the OPC-UA channel. After the PLC completes the contactor action, it returns a timestamp confirmation frame. If the confirmation frame is not received within 2 seconds, the system immediately enters a fault-downgrade state: all modules remain enabled, the fault code is recorded and logged, and an alarm is triggered, prompting maintenance personnel to check the hardware interlock or communication link.
[0053] This method establishes a differentiable coupling mechanism between the queuing model and the deep reinforcement learning framework. For the first time, it rewrites Erlang-C equations as custom Autograd operators, providing closed-form partial derivatives of waiting probability and waiting time with respect to arrival rate, service rate, and number of servers. This operator is then embedded into the DuelingDouble-DQN computational graph. This allows the queuing performance metric to enter the value network not only as a numerical input but also with its complete gradient, forming an analytical gradient path from loss function to queuing metric to load parameter. This allows the network to accurately perceive the marginal benefit of scaling on waiting time within a single backpropagation, significantly improving sample efficiency.
[0054] This embodiment also provides a charging pile quantity configuration system, including: an acquisition module, which collects real-time data from charging stations, calculates the queue index under the current configuration based on the real-time data using a queuing theory model, encapsulates the queuing index into a custom operator, and outputs a queuing state vector; a scheduling module, which constructs a charging pile configuration model based on a value function, and dynamically determines the number of parallel service modules that need to be adjusted within each control cycle based on the queuing state vector; and a constraint module, which establishes a dual safety threshold constraint mechanism to correct the adjustment actions output by the charging pile configuration model to achieve the configuration of the number of charging piles.
[0055] Example 2, reference Figure 2 , which is an embodiment of the present invention.
[0056] like Figure 2 The following is a diagram of a custom Autograd operator. The real-time data is , the key input is .
[0057] The forward path is represented by a solid line, and the operator uses the Erlang-C formula to calculate the traffic intensity. , waiting probability and expected waiting time , and output the result to the state vector of the network. The difference between this step and the traditional offline call formula is that the operator is embedded in the computational graph, and the forward output is no longer a numerical value, but a complete differentiable tensor: PyTorch will splice them with the subsequent layers of the network in the same computational graph, so any subsequent operations in the network (activation, normalization, linear transformation) can continue to track the gradient.
[0058] The reverse path is represented by the dashed line, when the loss function When back propagation begins, the network first generates The custom operator immediately calls the pre-derived analytical partial derivatives and maps these gradients to The gradients are propagated back to the upstream layer. The analytic gradients are returned at the tensor level, requiring only constant-level computation, resulting in an additional time penalty of less than 10µs on edge hardware. Upon receiving these gradients, the upstream parameter layer (feature extraction network) can immediately adjust its weights, allowing the network to learn to favor output expansion actions when λ increases slightly and waits for a sharp increase.
[0059] By customizing the analytical gradient path of the Autograd operator, the policy network can understand the queue dynamics without having to go through a large number of blind explorations of trial-penalty-correction, thereby significantly improving sample utilization and keeping inference latency minimal.
[0060] If the above functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or the portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.
[0061] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0062] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, and then editing, interpreting, or processing in another suitable manner as necessary, and then storing it in a computer memory.
[0063] It should be understood that various components of the present invention may be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods may be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof may be used: a discrete logic circuit having logic gate circuits for implementing logic functions on data signals, an application-specific integrated circuit having suitable combinational logic gate circuits, a programmable gate array (PGA), a field-programmable gate array (FPGA), etc.
[0064] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for configuring the number of charging piles, characterized in that: include: Collect real-time data from charging stations, use queuing theory models based on this real-time data to calculate the queue index under the current configuration, encapsulate the queue index into a custom operator, and output the queue state vector; Construct a charging pile configuration model based on value function, and dynamically determine the number of parallel service modules that need to be adjusted in each control cycle based on the queue state vector; A dual safety threshold constraint mechanism is established to correct the adjustment actions output by the charging pile configuration model and realize the configuration of the number of charging piles.
2. The method for configuring the number of charging piles according to claim 1, wherein: The real-time data includes charging station operation data, traffic flow data, queue data and environmental data; The charging station operation data includes the start / end timestamp, duration, charging capacity and charging voltage and current curve of each charging pile; The traffic flow data includes vehicle arrival rate, parking time distribution and parking space turnover rate.
3. The method for configuring the number of charging piles according to claim 2, wherein: The queuing theory model includes calculating traffic intensity based on real-time data: ; in, Indicates traffic intensity; represents the vehicle arrival rate; Indicates the number of enabled parallel service modules; Represents the average service rate of a single parallel service module; when When the Erlang-C equation is used to calculate the probability that a vehicle needs to enter the queue , further calculate the queue waiting time: ; in, Indicates the waiting time in queue; represents the probability that a vehicle needs to enter the queue; when When , the charging station is determined to be saturated, the queuing probability is not calculated, and the process goes to the safety coverage branch to determine the number of parallel service modules that need to be opened at one time, which is expressed as: ; in, Indicates the total number of parallel service modules to be enabled in the next cycle; Indicates taking the maximum value; Indicates the minimum number of parallel service modules enabled; Indicates the preset upper limit of safety utilization; Indicates rounding up operation; directly adjust the number of parallel service modules opened to .
4. The method for configuring the number of charging piles according to claim 3, wherein: The queue state vector includes the vehicle arrival rate , average service rate and the number of parallel service modules As key input, the probability that a vehicle needs to enter the queue is calculated based on the Erlang-C equation The partial derivative of the key input, the partial derivative of the vehicle arrival rate is expressed as: ; in, represents the differential symbol; Compile the custom Autograd operator together with the forward formula and partial derivatives of the key input. The forward formula is 、 and The calculation formula of Output queued state vector by tensor concatenation: ; in, represents the queue state vector; Represents the concatenation operator; represents the environmental data vector; Output by custom Autograd operator.
5. The method for configuring the number of charging piles according to claim 4, characterized in that: The charging pile configuration model includes defining output actions , Indicates whether the next cycle content is turned on or off parallel service modules, according to the Dueling-DQN architecture, Input shared feature extractor Get the hidden vector; The hidden vector is sent to branch one and branch two at the same time. Branch one calculates the state value, and branch two calculates the action advantage. Branch one and branch two are combined. value, and use the mean square TD-error for loss calculation; Output action according to the greedy strategy ,according to Perform dynamic adjustment of the number of parallel service modules.
6. The method for configuring the number of charging piles according to claim 5, characterized in that: The charging pile configuration model also includes, according to the output action After adjusting the number of parallel service modules, immediate rewards are obtained according to the reward function, which is expressed as: ; in, Indicates immediate reward; represents the weighted coefficient of waiting cost; The weighting coefficient representing the electricity price cost; The weighted coefficient representing the module switching cost; Indicates time-of-use electricity price; Indicates finding the absolute value; It is not the numerical result of a separate call to the queue waiting time function, but the tensor output from the custom Autograd operator, with full automatic differentiation properties; In the back propagation phase, At the beginning, along the Dueling-DQN architecture, through branches 1, 2 and shared feature extractors, we generate , Contains three channels: ; in, represents the loss function; According to the partial derivative formula in the custom Autograd operator, the error is further transformed into: ; Affecting the weights of the shared feature extractor through the chain rule , obtain the direction of latency degradation when the key input changes within one backpropagation.
7. The method for configuring the number of charging piles according to claim 6, characterized in that: The dual safety threshold constraint mechanism includes: Then, the exponentially weighted moving average is used to estimate the arrival rate of the next period ,according to Calculate the lower limit of the number of piles with the average service rate ; in, Indicates the lower limit number of piles; The number of parallel service modules enabled as output by the charging pile configuration model , the theoretical constraint is ,like , then the output action ; like , then the coverage is ; When the traffic intensity is less than the preset minimum traffic intensity, and the output action If it is still negative, it will be overwritten .
8. A charging pile quantity configuration system, applied to a charging pile quantity configuration method according to any one of claims 1 to 7, characterized in that: include, The acquisition module collects real-time data from charging stations. Based on this real-time data, it uses a queuing theory model to calculate the queuing index under the current configuration, encapsulates the queuing index into a custom operator, and outputs a queuing state vector. The scheduling module builds a charging pile configuration model based on the value function and dynamically determines the number of parallel service modules that need to be adjusted in each control cycle based on the queue state vector; The constraint module establishes a dual safety threshold constraint mechanism to correct the adjustment actions output by the charging pile configuration model and realize the configuration of the number of charging piles.
Citation Information
Patent Citations
Number configuration method and device of charging piles and distribution system of charging piles
CN112200471A
Layout planning method for electric vehicle charging piles in service area
CN118446444A
Energy distribution method for new energy charging station in residential area
CN118607849A
Charging pile management method based on artificial intelligence
CN120003329A