Current control method and control device based on heating of charging gun
By monitoring and dynamically adjusting the temperature and current of the charging gun in real time, and using PID adjustment formulas and neural network models, the impact of external temperature fluctuations on the temperature and current stability of the charging gun is solved, achieving a more efficient and safe charging process.
Patent Information
- Application Number
- CN202411796058.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-09
AI Technical Summary
When the external temperature fluctuates greatly, the existing dynamic current limiting scheme causes frequent fluctuations in the charging gun temperature, affecting the stability of the charging current, and thus affecting the charging efficiency of new energy vehicle batteries and the service life of the charging module.
The current control method based on charging gun heating is adopted to calculate the heat transfer coefficient by monitoring the gun head temperature and ambient temperature in real time, and combining the resistance temperature polynomial fitting formula and convection heat dissipation formula to calculate the equilibrium current. At the same time, the PID adjustment formula and neural network model are used to dynamically adjust the charging current to ensure that it operates within the safe temperature range.
It effectively balances the stability of the charging gun temperature and charging current, avoids safety hazards caused by excessive temperature, improves charging efficiency, and extends the service life of the charging module.
Smart Images

Figure CN119239378B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of charging piles, and in particular to a current control method and control device based on heating of a charging gun. Background Art
[0002] With the rapid development of the electric vehicle industry, the market demand for electric vehicles has increased year by year. Charging piles, as the core supporting facilities of electric vehicles, have become one of the focuses of industry technology development. Charging piles usually include control modules, power modules, and charging guns that are in direct contact with electric vehicles. As the physical connector between the charging pile and the electric vehicle, the charging gun plays an important role in power transmission. Its performance and stability are directly related to charging efficiency and safety.
[0003] During the charging process, the temperature of the charging gun will gradually increase due to the resistance heating caused by current transmission. The temperature increase has a significant impact on the stability of the charging current. If the charging gun is overheated, it will not only cause the aging of the charging cable and interface, but may also cause safety hazards, such as damage to the charging gun or even fire. Therefore, in actual applications, in order to prevent the charging gun from malfunctioning due to overheating, dynamic current limiting is usually adopted. By monitoring the temperature of the charging gun in real time, the charging current is dynamically adjusted to keep its operating temperature within a safe range.
[0004] However, the existing dynamic current limiting scheme shows great limitations when the external temperature fluctuates greatly. Due to the instability of the external temperature, the temperature of the charging gun will fluctuate frequently, resulting in rapid changes in the maximum charging current under dynamic current limiting. This rapid fluctuation of current will not only affect the charging efficiency of new energy vehicle batteries, but may also have adverse effects on its charging module, and in severe cases even shorten the service life of the charging module. Summary of the invention
[0005] In order to effectively balance the stability of the charging gun temperature and the charging current when the external temperature fluctuates, the present application provides a current control method and a control device based on the heating of the charging gun.
[0006] In the first aspect, the present application provides a current control method based on heating of a charging gun, which adopts the following technical solution:
[0007] A current control method based on heating of a charging gun comprises the following steps:
[0008] S1. Obtain the gun tip temperature and the ambient temperature based on a preset sampling frequency to match the heat transfer coefficient in the corresponding convection heat dissipation formula;
[0009] S2. Calculate the gun tip resistance corresponding to the gun tip temperature based on the resistance-temperature polynomial fitting formula;
[0010] S3. According to a preset calculation frequency, the gun tip temperature, ambient temperature, heat transfer coefficient and gun tip resistance are input into a convection heat dissipation formula to calculate a balanced current, wherein the preset calculation frequency is equal to the preset sampling frequency;
[0011] S4. Obtain the parameters of the PID adjustment formula based on the gun tip temperature, external temperature, external humidity, and resistance value, and obtain the charging current adjustment value based on the PID adjustment formula;
[0012] S5. Continuously execute S1-S4 in a loop, and adjust the current charging current of the charging gun based on the charging current adjustment value.
[0013] Optionally, S3 includes the following steps:
[0014] S31. Determine a sampling step The tip temperature and ambient temperature before and after the sampling step are respectively and ;
[0015] S32. Calculate the temperature difference of each sampling , and smooth calculation is performed based on the temperature difference under continuous sampling; = gun tip temperature - ambient temperature;
[0016] S33. Input the temperature sequence after smoothing calculation into the convection heat dissipation formula to calculate the balanced current; wherein, the convection heat dissipation formula of the charging gun in the heating state is: , I is the gun tip current, R is the gun tip resistance, is the sampling step length, is the heat transfer coefficient, A is the heat exchanger surface area of the charging gun, c is the average specific heat capacity of the charging gun, and m is the mass of the heating part of the charging gun; the convective heat dissipation formula of the charging gun in the state of heat dissipation equilibrium is: .
[0017] Optionally, the S32 includes the following steps:
[0018] S321. Set the first set of data as the estimated value of the initial temperature difference , and set the initial error covariance =1.0;
[0019] S322. Define process noise covariance Q and measurement noise covariance R;
[0020] S323. Use the estimated value of the previous moment to predict the current state , and calculate the error covariance of the predicted state , where the state transfer matrix F is a matrix used to describe how the system state evolves over time, F=1; is the predicted state at time k obtained based on the state update at time k-1. The predicted error covariance will increase due to the process noise covariance Q; is the prediction error covariance of the data at time k based on time k-1, is the updated error covariance at time k;
[0021] S324. Calculate Kalman gain ;
[0022] S325. Make corrections based on the current temperature measurement value and the predicted state to update the state , represents the estimated value at time k after combining the measurement update, is the current temperature measurement value, To adjust for the contribution of bias to the estimate;
[0023] S326. Update the error covariance to reflect the new state uncertainty, , where the observation matrix H takes 1:
[0024] S327. Update the status and error covariance As the initial value of the next moment, steps S323-S326 are repeated to process all subsequent sampling points.
[0025] Optionally, S4 includes the following steps:
[0026] S41. Obtain the gun tip temperature, external temperature, external humidity, and resistance value, and combine them as input features;
[0027] S42. Input the input features into the pre-trained neural network model, wherein the neural network model is trained based on different pre-acquired gun tip temperatures, external temperatures, external humidity, and resistance values as input features, and three calibrated control parameters corresponding to the input features, wherein the PID adjustment formula is: , the three control parameters are proportional gain parameter , integral gain parameters and the differential gain parameter , is the difference between the balanced current and the actual current, To adjust the current;
[0028] S43. Substitute the parameters of the PID adjustment formula output by the neural network model into the PID adjustment formula to calculate the charging current adjustment value.
[0029] Optionally, the training step of the pre-trained neural network model in S42 includes:
[0030] S421. Conduct a charging gun heating simulation experiment, combine and run simulation data for different gun tip temperatures, external temperatures, external humidity, and resistance values, and record the temperature response curve of the system;
[0031] S422. Record the tracking of the target temperature by the system under different PID control parameter combinations; the evaluation indicators of the tracking include the rise time , Overshoot , Steady-state error and adjustment time ;
[0032] S423. Use the optimization algorithm to automatically adjust the PID control parameters and re-run the experiment to minimize the steady-state error and overshoot while controlling the rise time and the settling time; where the optimization objective function is , is the weight coefficient, reflecting the priority of different performance indicators;
[0033] S424. Construct a relationship table or training data set between input parameters and PID control parameters;
[0034] S425. Use the collected data to train the neural network model and map the input parameters to the optimal PID parameters.
[0035] Optionally, S2 includes the following steps:
[0036] S21. Obtain the charging gun model, and obtain the resistance temperature polynomial fitting formula according to the charging gun model; wherein the polynomial fitting formula is , where R(t) is the resistance value at temperature t; t is the temperature, is the resistance value when the temperature is 0°C, A and B are constants;
[0037] S22. Input the gun tip temperature into the resistance temperature polynomial fitting formula to calculate the gun tip resistance.
[0038] In the second aspect, the present application provides a current control device based on heating of a charging gun, which adopts the following technical solution:
[0039] A current control device based on heating of a charging gun, comprising:
[0040] The data sampling and coefficient matching module is used to obtain the gun tip temperature and the ambient temperature based on the preset sampling frequency to match the heat transfer coefficient in the corresponding convection heat dissipation formula;
[0041] A resistance calculation module, used to calculate the gun tip resistance corresponding to the gun tip temperature based on a resistance-temperature polynomial fitting formula;
[0042] A balanced current calculation module, used to input the gun tip temperature, ambient temperature, heat transfer coefficient and gun tip resistance into a convection heat dissipation formula according to a preset calculation frequency to calculate the balanced current, wherein the preset calculation frequency is equal to the preset sampling frequency;
[0043] The current adjustment value acquisition module is used to obtain the parameters of the PID adjustment formula based on the gun tip temperature, the external temperature, the external humidity, and the resistance value, and obtain the charging current adjustment value based on the PID adjustment formula;
[0044] The circulation module is used to control the continuous circulation operation of the data sampling and coefficient matching module, the resistance calculation module, the balance current calculation module and the current adjustment value acquisition module, and adjust the current charging current of the charging gun based on the charging current adjustment value.
[0045] In a third aspect, the present application provides a computer device, which adopts the following technical solution:
[0046] A computer device comprising:
[0047] one or more processors;
[0048] Memory;
[0049] one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to:
[0050] The above-mentioned current control method based on heating of the charging gun is executed.
[0051] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution:
[0052] A computer-readable storage medium stores a computer program that can be loaded by a processor and execute the above method.
[0053] The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement:
[0054] Such as the current control method based on the heating of the charging gun mentioned above.
[0055] In summary, the present application includes at least one of the following beneficial technical effects:
[0056] 1. Through real-time monitoring data, the charging current can be adjusted dynamically to avoid safety hazards caused by excessive temperature (such as overheating or damage to the gun head). The calculation of the balance current is based on the convection heat dissipation formula and actual working conditions, which effectively ensures that the charging gun operates within a safe temperature range.
[0057] 2. Through the neural network model, the nonlinear mapping relationship between input features (such as gun tip temperature, external temperature, humidity, resistance value) and the optimal PID parameters is learned and deployed, realizing the intelligent adjustment of charging current, making the charging current adjustment more accurate and efficient, and reducing frequent overshoot or oscillation. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 A schematic diagram of an application environment of a current control method based on heating of a charging gun according to an embodiment of the present invention is shown.
[0059] Figure 2 A flow chart of a current control method based on heating of a charging gun according to an embodiment of the present invention is shown.
[0060] Figure 3 A schematic diagram of a current control device based on heating of a charging gun according to an embodiment of the present invention is shown.
[0061] Figure 4 A schematic diagram of a computer device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0062] Embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings.
[0063] In the description of this specification, the description with reference to the terms "certain embodiments", "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0064] The present application embodiment discloses a current control method based on heating of a charging gun, referring to Figure 1 and Figure 2 The method includes the following steps S1-S5.
[0065] S1. Obtain the gun tip temperature and ambient temperature based on the preset sampling frequency to match the heat transfer coefficient in the corresponding convection heat dissipation formula.
[0066] In this step, the temperature of the charging gun tip is obtained through real-time sampling. and ambient temperature , which is the heat transfer coefficient calculated by the convection heat dissipation formula Provide necessary data.
[0067] Specifically, the sampling frequency refers to the frequency at which the system obtains data regularly. The preset sampling frequency is a fixed time interval set according to the temperature rise rate, temperature change rate and control accuracy requirements of the charging gun, such as once per second. It refers to the surface temperature of the heating part of the charging gun, which directly reflects the resistance heating effect generated when the current passes through the gun head. It refers to the temperature of the environment where the charging gun is located, which affects the heat dissipation capacity of the charging gun. A lower ambient temperature is usually conducive to improving the heat dissipation effect. The heat transfer coefficient is a parameter that describes the heat transfer capacity per unit area per unit time. The heat transfer coefficient used in the formula is mainly used to describe the convection heat transfer performance between the charging gun surface and the air.
[0068] It is important to note that the heat transfer coefficient is usually not constant and is affected by many factors. In natural convection (or free convection), temperature difference is the main factor driving the movement of the fluid. The temperature difference not only affects the movement of the fluid, but also affects the thermal conductivity of the object. Generally, the thermal conductivity increases with the increase of temperature. For example, the thermal conductivity of air increases at high temperatures, which will also indirectly affect the overall heat transfer coefficient.
[0069] Specifically, in a certain embodiment, S1 includes the following steps S11-S14.
[0070] S11. Determine the preset sampling frequency and start the sampling timer.
[0071] S12. Get the current gun tip temperature through the sensor and ambient temperature .
[0072] S13. Preprocess the collected temperature data and filter out noise.
[0073] In this step, the temperature data is preprocessed to eliminate obviously erroneous data in the collected data to eliminate the interference of environmental noise. For example, statistical outlier detection is used to filter out noise, and the threshold range is set by calculating the mean and standard deviation, and the points exceeding the range are regarded as abnormal data, which can be replaced by the mean or interpolation. It should be noted that the temperature data measured here is the original data. Only by measuring this part of the original data can the gun tip resistance and the matching heat transfer coefficient be accurately calculated. If the temperature data is processed by the mean filtering or sliding window method in this step, the gun tip resistance and the heat transfer coefficient calculated later will not strictly correspond to the actual values.
[0074] S14. Calculate or look up the table to obtain the heat transfer coefficient using the gun tip temperature and ambient temperature.
[0075] According to the heat transfer coefficient table calibrated by matching the gun tip temperature and the ambient temperature, the corresponding value can be quickly found.
[0076] S2. Calculate the gun tip resistance corresponding to the gun tip temperature based on the resistance-temperature polynomial fitting formula.
[0077] In this step, the corresponding resistance value is calculated according to the temperature of the gun tip, providing accurate resistance information and providing data for subsequent heat dissipation calculations and balanced current calculations.
[0078] Of course, in this step, the gun tip resistance can also be obtained by looking up a table, but since the resistance function can be well fitted, the resistance-temperature polynomial fitting formula is preferably used here to calculate the gun tip resistance.
[0079] Specifically, in a certain embodiment, S2 includes the following steps S21-S22.
[0080] S21. Obtain the charging gun model, and obtain the resistance temperature polynomial fitting formula according to the charging gun model; wherein the polynomial fitting formula is , where R(t) is the resistance value at temperature t; t is the temperature, It is the resistance value when the temperature is 0℃, and A and B are constants.
[0081] The polynomial fitting formula describes the relationship between the resistance value R(t) and the temperature t, usually in the form of a quadratic polynomial. The surface temperature of the gun tip is measured by the temperature sensor, which reflects the heating state when the current passes through the charging gun. Different models of charging guns only need to change the parameters in the fitting formula. ,A,B, it can be adapted.
[0082] S22. Input the gun tip temperature into the resistance temperature polynomial fitting formula to calculate the gun tip resistance.
[0083] S3. According to a preset calculation frequency, the gun tip temperature, ambient temperature, heat transfer coefficient and gun tip resistance are input into a convection heat dissipation formula to calculate a balanced current, wherein the preset calculation frequency is equal to the preset sampling frequency;
[0084] In this step, based on the sampled temperature data (gun tip temperature and ambient temperature), the calculated heat transfer coefficient and resistance value, the convection heat dissipation formula is used to calculate the balance current of the charging gun under heat dissipation balance conditions.
[0085] Specifically, in a certain embodiment, S3 includes the following steps S31-S33.
[0086] S31. Determine a sampling step The tip temperature and ambient temperature before and after the sampling step are respectively and .
[0087] Sampling step Indicates the sampling time interval, for example , that is, sampling once per second.
[0088] S32. Calculate the temperature difference of each sampling , and smooth calculation is performed based on the temperature difference under continuous sampling; = Gun tip temperature - ambient temperature.
[0089] In order to make the temperature difference It can have obvious monotonicity in a smaller time window, so the temperature difference is calculated smoothly here. In fact, in actual charging scenarios, sudden changes in ambient temperature are usually caused by some special reasons, such as the sensor area being heated by reflected light, and the sensor area being cooled due to strong winds temporarily blowing rain to the sensor area, which temporarily affects the work of the sensor. This cannot be handled by the previous statistical filtering method. The rapidly changing ambient measurement temperature will cause the temperature difference to change suddenly, causing the parameters in the subsequent PID adjustment formula to change rapidly, resulting in rapid changes in the balanced current. Therefore, the old data is used here to predict the new data, and then the optimal estimate is calculated based on the measured value and the predicted value. The method of dynamically removing noise can effectively reduce the impact of environmental factors.
[0090] Specifically, in a certain embodiment, S32 includes the following steps S321-S327.
[0091] S321. Set the first set of data as the estimated value of the initial temperature difference , and set the initial error covariance =1.0.
[0092] Estimated temperature difference It is the system's initial guess of the temperature difference, usually obtained from the first set of measurement data or preset values. is the initial value of the error covariance, reflecting the uncertainty of the initial estimate.
[0093] S322. Define process noise covariance Q and measurement noise covariance R.
[0094] The process noise covariance Q describes the error of the system's internal dynamic model. A larger Q value indicates a higher system model uncertainty. The measurement noise covariance describes the noise level in the temperature difference measurement. A larger R value indicates that the measurement data contains more noise. The settings of Q and R are usually based on statistical analysis of actual data. Specifically, Q can be estimated from the temperature difference change rate in the experiment, and R can be determined from the accuracy calibration data of the temperature sensor.
[0095] S323. Use the estimated value of the previous moment to predict the current state , and calculate the error covariance of the predicted state , where the state transfer matrix F is a matrix used to describe how the system state evolves over time, F=1, and the predicted error covariance will increase due to the process noise covariance Q.
[0096] It should be noted here that k represents the current moment, k-1 represents the previous moment, and k+1 represents the next moment (predicting the future state).
[0097] If the two time tags of the predicted state are called the first time tag A and the second time tag B, then A represents the state at the current moment. For example, when A is k, it represents the state at time k. B represents the data at which moment the prediction or update is based. For example, when B is k-1, it means that the prediction at time A is based on the data at time k-1.
[0098] For further example, The subscript k|k-1 represents the predicted state at time k, which is obtained based on the state update at time k-1. represents the estimated value at time k after combining the measurement update. That is, the subscript k|k-1 represents the predicted state, while k|k represents the final state after the update.
[0099] : The prediction error covariance of the data at time k based on time k-1. : Update error covariance at time k.
[0100] In calculating the error covariance of the predicted state, the state transfer matrix is used to describe how the system state evolves over time. In the embodiment of the present application, the state transfer matrix is set to 1. This is because the temperature difference changes slowly with the time step, and the predicted value of the temperature difference at the next moment can be approximately equal to the estimated value at the previous moment.
[0101] S324. Calculate Kalman gain .
[0102] In the calculation process of Kalman gain, the value of the observation matrix is 1, which means that the measurement value directly corresponds to the state variable.
[0103] S325. Make corrections based on the current temperature measurement value and the predicted state to update the state , That is, it represents the estimated value at the time k after combining the measurement update, and in this embodiment, it is the smoothed estimated value of the temperature difference at the current time; is the current temperature measurement value, To adjust for the contribution of bias to the estimate.
[0104] S326. Update the error covariance to reflect the new state uncertainty, Here, the observation matrix H still takes 1, indicating that the measured value directly corresponds to the state variable, then .
[0105] S327. Update the status and error covariance As the initial value of the next moment, steps S323-S326 are repeated to process all subsequent sampling points.
[0106] In summary, in this step, the current estimated value and error covariance are used as the initial state of the next moment and enter the recursive calculation, which improves the real-time performance and dynamic adaptability of the filtering.
[0107] S33. Input the temperature sequence after smoothing calculation into the convection heat dissipation formula to calculate the balanced current; wherein, the convection heat dissipation formula of the charging gun in the heating state is: , I is the gun tip current, R is the gun tip resistance, is the sampling step length, is the heat transfer coefficient, A is the heat exchanger surface area of the charging gun, c is the average specific heat capacity of the charging gun, and m is the mass of the heating part of the charging gun; the convective heat dissipation formula of the charging gun in the state of heat dissipation equilibrium is: .
[0108] In this step, the temperature difference sequence after smoothing calculation represents the temperature difference data processed by the smoothing algorithm, which represents the stable difference between the temperature of the gun tip and the ambient temperature, reducing noise interference. The difference between the formulas in the two states of heating and heat dissipation balance takes into account the influence of temperature change and stable heat dissipation of the charging gun respectively.
[0109] In the heating state, the convection heat dissipation formula is: . The energy generated by convection heat dissipation, The balance current value is the maximum safe current that the charging gun can maintain under the condition of heat dissipation balance. It can be calculated by the heat dissipation formula. or .
[0110] S4. Obtain parameters of the PID adjustment formula based on the gun tip temperature, external temperature, external humidity, and resistance value, and obtain the charging current adjustment value based on the PID adjustment formula.
[0111] In this step, the parameters of the PID controller are dynamically adjusted according to the four input characteristics of the gun tip temperature, the outside temperature, the outside humidity and the resistance value. , , ), and calculate the charging current adjustment value based on the PID regulation formula.
[0112] The PID adjustment formula is: ,in To control the output (charging current adjustment value), it is used to change the actual charging current of the charging gun to make it consistent with the balancing current. is the current error (the difference between the balanced current and the actual current). Changes in PID parameters will affect the way the system responds to the set value. For example, when the PID controller parameters ( , , ) changes, the system may reach the set point faster or slower, or have varying degrees of overshoot or oscillation when reaching the set point.
[0113] Specifically, in a certain embodiment, S4 includes the following steps S41-S43.
[0114] S41. Obtain the gun tip temperature, external temperature, external humidity, and resistance value, and combine them as input features.
[0115] Specifically, the temperature sensor is used to measure the temperature of the gun tip. and outside temperature , use humidity sensor to measure external humidity , calculate the current gun tip resistance R according to the resistance temperature polynomial fitting formula, and then combine the above parameters into the input feature vector .
[0116] S42. Input the input features into the pre-trained neural network model, wherein the neural network model is trained based on different pre-acquired gun tip temperatures, external temperatures, external humidity, and resistance values as input features, and three calibrated control parameters corresponding to the input features, wherein the PID adjustment formula is: , the three control parameters are proportional gain parameter , integral gain parameters and the differential gain parameter , is the difference between the balanced current and the actual current, To adjust the current.
[0117] In this step, the input feature x is input into the pre-trained neural network model to dynamically calculate the optimal PID controller parameters ( , , ).
[0118] Specifically, in one embodiment, the training steps of the pre-trained neural network model in S42 include S421-S425.
[0119] S421. Conduct a charging gun heating simulation experiment, combine and run simulation data for different gun tip temperatures, external temperatures, external humidity, and resistance values, and record the temperature response curve of the system.
[0120] In this step, experimental design methods (such as orthogonal design or Latin hypercube sampling) are used to generate parameter combinations to ensure that all possible operating conditions are covered. For each set of parameter combinations, the simulation model is run to record the temperature change response of the charging gun over time. The data generated by the simulation covers different input parameter combinations and enriches the sample space of the training data. It should be noted that the simulation results need to be compared with the actual measurement data (such as the temperature response recorded in the laboratory) and the simulation error (such as the mean square error or maximum deviation) needs to be evaluated to see if it is within an acceptable range.
[0121] S422. Record the tracking of the target temperature by the system under different PID control parameter combinations; the evaluation indicators of the tracking include the rise time , Overshoot , Steady-state error and adjustment time .
[0122] The dynamic response behavior of the system at a given target temperature, including the heating rate, stability, and oscillation characteristics. Here, the rise time is the time required for the system to reach 90% of the target value from the initial value. The overshoot is the maximum excess of the system when it reaches the target value, expressed as a percentage. The steady-state error is the error between the actual temperature and the target temperature when the system reaches steady state. The adjustment time is the time required for the system to reach the target value and remain within ±2% of the target value.
[0123] S423. Use the optimization algorithm to automatically adjust the PID control parameters and re-run the experiment to minimize the steady-state error and overshoot while controlling the rise time and the settling time; where the optimization objective function is , is the weight coefficient, reflecting the priority of different performance indicators.
[0124] In different embodiments, genetic algorithm, particle swarm optimization or grid search can be used to optimize PID control parameters. For example, for grid search, the initial parameter range is set. Then for each parameter combination , run the simulation system and record the temperature response curve. Calculate the rise time based on the response curve , Overshoot , Steady-state error and adjustment time , substitute into the objective function , generate new parameter combinations according to the rules of the optimization algorithm (such as crossover and mutation of genetic algorithms, speed and position update of PSO). Repeat the above steps until the objective function J converges or reaches the preset stop condition.
[0125] In another embodiment, the optimization algorithm can be implemented by the following steps:
[0126] S4231. Set the range of PID parameters; wherein, .
[0127] S4232. Randomly generate population individuals, each individual is combination.
[0128] S4233. Set the population size N (e.g. N=20).
[0129] S4234. For each , substitute the PID parameters into the control system, run the simulation, and obtain the system response curve.
[0130] S4245. Calculation performance indicators , and use the objective function to calculate the fitness, Among them, the smaller J is, the higher the fitness of the individual is.
[0131] S4246. Sort individuals by fitness value, associate selection probability with ranking, and assign selection probability , where N is the population size, i is the rank of the individual, and the roulette wheel method is used for selection, and individuals with high selection probability are more likely to be selected.
[0132] S4267. Randomly select two individuals as parents, according to the crossover probability (like ) Exchange of genes between parents.
[0133] For example, parent 1: , Parent 2: . After crossover, offspring 1 is generated: , child 2: .
[0134] S4268. For each gene in the population, the mutation probability (like ) to mutate, randomly generate a small range of disturbance values, superimpose them on the original genes, and use the newly generated offspring to replace some individuals in the population to form the next generation of population. For example: .
[0135] S4269. Repeat S4245-S4268 until the stopping condition is reached, wherein the stopping condition is that the fitness J converges or reaches the maximum number of generations.
[0136] S424. Construct a relationship table or training data set between input parameters and PID control parameters.
[0137] Extract the input parameters of each set of experiments from the simulation experiment data , extract the corresponding PID parameter combination output by the optimization algorithm , combine each set of input parameters and the corresponding PID parameters into a data pair In order to improve the training effect, data sorting and normalization can also be performed.
[0138] S425. Use the collected data to train the neural network model and map the input parameters to the optimal PID parameters.
[0139] For example, first build a neural network model. The input layer of the neural network model has 4 nodes, corresponding to The hidden layer consists of several neurons, using the ReLU activation function. The output layer consists of three nodes, corresponding to , , In different embodiments, the loss function may be different. Here, the mean square error is used as the loss function, and the Adam optimizer is used to accelerate convergence. Then, the model is trained using simulation experimental data (input features and optimal PID parameters).
[0140] S43. Substitute the parameters of the PID adjustment formula output by the neural network model into the PID adjustment formula to calculate the charging current adjustment value.
[0141] The neural network outputs the corresponding parameters to adapt to the current charging conditions and ensure balanced current stability.
[0142] S5. Continue to execute S1-S4, and adjust the current charging current of the charging gun based on the charging current adjustment value.
[0143] During the charging process, the neural network continuously monitors the operating status of the charging gun and detects a balanced current. The system automatically adjusts PID parameters to reduce unnecessary current regulation and ensure smooth operation of the system.
[0144] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0145] In one embodiment, a current control device based on heating of a charging gun is provided, and the current control device based on heating of a charging gun corresponds one-to-one to the current control method based on heating of a charging gun in the above embodiment. Figure 3 As shown, the current control device based on charging gun heating includes a data sampling and coefficient matching module, a resistance calculation module, a balanced current calculation module, a current adjustment value acquisition module and a circulation module. The functional modules are described in detail as follows:
[0146] The data sampling and coefficient matching module is used to obtain the gun tip temperature and the ambient temperature based on the preset sampling frequency to match the heat transfer coefficient in the corresponding convection heat dissipation formula;
[0147] A resistance calculation module, used to calculate the gun tip resistance corresponding to the gun tip temperature based on a resistance-temperature polynomial fitting formula;
[0148] A balanced current calculation module, used to input the gun tip temperature, ambient temperature, heat transfer coefficient and gun tip resistance into a convection heat dissipation formula according to a preset calculation frequency to calculate the balanced current, wherein the preset calculation frequency is equal to the preset sampling frequency;
[0149] The current adjustment value acquisition module is used to obtain the parameters of the PID adjustment formula based on the gun tip temperature, the external temperature, the external humidity, and the resistance value, and obtain the charging current adjustment value based on the PID adjustment formula;
[0150] The circulation module is used to control the continuous circulation operation of the data sampling and coefficient matching module, the resistance calculation module, the balance current calculation module and the current adjustment value acquisition module, and adjust the current charging current of the charging gun based on the charging current adjustment value.
[0151] For the specific definition of the current control device based on the heating of the charging gun, please refer to the definition of the current control method based on the heating of the charging gun above, which will not be repeated here. Each module in the above-mentioned current control device based on the heating of the charging gun can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0152] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used for data related to the current control method based on the heating of the charging gun. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a current control method based on the heating of the charging gun is implemented.
[0153] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the current control method based on heating of the charging gun in the above embodiment is implemented, for example Figure 2 Alternatively, when the processor executes the computer program, the functions of each module / unit of the current control device based on the heating of the charging gun in the above embodiment are realized, for example Figure 3 The functions of the modules shown are not described here in detail to avoid repetition.
[0154] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the current control method based on the heating of the charging gun in the above embodiment is implemented, for example Figure 2 Alternatively, when the computer program is executed by the processor, the functions of each module / unit in the current control device based on the heating of the charging gun in the above device embodiment are realized, for example Figure 3 The functions of the modules shown are not described here in detail to avoid repetition.
[0155] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments of the present application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0156] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0157] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A current control method based on heating of a charging gun, characterized in that: The following steps are involved: S1. Obtain the gun tip temperature and the ambient temperature based on a preset sampling frequency to match the heat transfer coefficient in the corresponding convection heat dissipation formula; S2. Calculate the gun tip resistance corresponding to the gun tip temperature based on the resistance-temperature polynomial fitting formula; S3. According to a preset calculation frequency, the gun tip temperature, ambient temperature, heat transfer coefficient and gun tip resistance are input into a convection heat dissipation formula to calculate a balanced current, wherein the preset calculation frequency is equal to the preset sampling frequency; S4. Obtain the parameters of the PID adjustment formula based on the gun tip temperature, external temperature, external humidity, and resistance value, and obtain the charging current adjustment value based on the PID adjustment formula; S5. Continue to execute S1-S4, and adjust the current charging current of the charging gun based on the charging current adjustment value. The S3 includes the following steps: S31. Determine a sampling step The tip temperature and ambient temperature before and after the sampling step are respectively and ; S32. Calculate the temperature difference of each sampling , and smooth calculation is performed based on the temperature difference under continuous sampling; = gun tip temperature - ambient temperature; S33. Input the temperature sequence after smoothing calculation into the convection heat dissipation formula to calculate the balanced current; wherein, the convection heat dissipation formula of the charging gun in the heating state is: , I is the gun tip current, R is the gun tip resistance, is the sampling step length, is the heat transfer coefficient, A is the heat exchanger surface area of the charging gun, c is the average specific heat capacity of the charging gun, and m is the mass of the heating part of the charging gun; the convective heat dissipation formula of the charging gun in the state of heat dissipation equilibrium is: .
2. The current control method based on heating of the charging gun according to claim 1, characterized in that: The S32 comprises the following steps: S321. Set the first set of data as the estimated value of the initial temperature difference , and set the initial error covariance ; S322. Define process noise covariance Q and measurement noise covariance R; S323. Use the estimated value of the previous moment to predict the current state , and calculate the error covariance of the predicted state , where the state transfer matrix F is a matrix used to describe how the system state evolves over time, F=1; is the predicted state at time k obtained based on the state update at time k-1. The predicted error covariance will increase due to the process noise covariance Q; is the prediction error covariance of the data at time k based on time k-1, is the updated error covariance at time k; S324. Calculate Kalman gain ; S325. Make corrections based on the current temperature measurement value and the predicted state to update the state , represents the estimated value at time k after combining the measurement update, is the current temperature measurement value, To adjust for the contribution of bias to the estimate; S326. Update the error covariance to reflect the new state uncertainty, , where the observation matrix H takes 1: S327. Updated status and error covariance As the initial value of the next moment, steps S323-S326 are repeated to process all subsequent sampling points.
3. The current control method based on heating of the charging gun according to claim 1, characterized in that: The S4 comprises the following steps: S41. Obtain the gun tip temperature, external temperature, external humidity, and resistance value, and combine them as input features; S42. Input the input features into the pre-trained neural network model, wherein the neural network model is trained based on different pre-acquired gun tip temperatures, external temperatures, external humidity, and resistance values as input features, and three calibrated control parameters corresponding to the input features, wherein the PID adjustment formula is: , the three control parameters are proportional gain parameter , integral gain parameters and the differential gain parameter , is the difference between the balanced current and the actual current, To adjust the current; S43. Substitute the parameters of the PID adjustment formula output by the neural network model into the PID adjustment formula to calculate the charging current adjustment value.
4. The current control method based on heating of the charging gun according to claim 3 is characterized in that: The training steps of the pre-trained neural network model in S42 include: S421. Conduct a charging gun heating simulation experiment, combine and run simulation data for different gun tip temperatures, external temperatures, external humidity, and resistance values, and record the temperature response curve of the system; S422. Record the tracking of the target temperature by the system under different PID control parameter combinations; the evaluation indicators of the tracking include the rise time , Overshoot , Steady-state error and adjust time ; S423. Use the optimization algorithm to automatically adjust the PID control parameters and re-run the experiment to minimize the steady-state error and overshoot while controlling the rise time and the settling time; where the optimization objective function is is the weight coefficient, reflecting the priority of different performance indicators; S424. Construct a relationship table or training data set between input parameters and PID control parameters; S425. Use the collected data to train the neural network model and map the input parameters to the optimal PID parameters.
5. The current control method based on heating of the charging gun according to claim 1, characterized in that: The S2 comprises the following steps: S21. Obtain the charging gun model, and obtain the resistance temperature polynomial fitting formula according to the charging gun model; wherein the polynomial fitting formula is , where R(t) is the resistance value at temperature t; t is the temperature, is the resistance value when the temperature is 0°C, A and B are constants; S22. Input the gun tip temperature into the resistance temperature polynomial fitting formula to calculate the gun tip resistance.
6. A current control device based on heating of a charging gun, characterized in that: include: The data sampling and coefficient matching module is used to obtain the gun tip temperature and the ambient temperature based on the preset sampling frequency to match the heat transfer coefficient in the corresponding convection heat dissipation formula; A resistance calculation module, used to calculate the gun tip resistance corresponding to the gun tip temperature based on a resistance-temperature polynomial fitting formula; A balanced current calculation module, used to input the gun tip temperature, ambient temperature, heat transfer coefficient and gun tip resistance into a convection heat dissipation formula according to a preset calculation frequency to calculate the balanced current, wherein the preset calculation frequency is equal to the preset sampling frequency; The current adjustment value acquisition module is used to obtain the parameters of the PID adjustment formula based on the gun tip temperature, the external temperature, the external humidity, and the resistance value, and obtain the charging current adjustment value based on the PID adjustment formula; The circulation module is used to control the continuous circulation operation of the data sampling and coefficient matching module, the resistance calculation module, the balance current calculation module and the current adjustment value acquisition module, and adjust the current charging current of the charging gun based on the charging current adjustment value.
7. A computer device, characterized in that: It includes a processor, in which runs a program of the current control method based on heating of the charging gun as described in any one of claims 1 to 5.
8. A storage medium, characterized in that: A program storing the current control method based on heating of the charging gun as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Resistance detection method and device, medium, program product, controller and vehicle
CN118671448A
Charging gun temperature adjusting circuit
CN219738057U