Power converter control method and device based on neural network PID, and storage medium

By introducing neural networks into traditional PID control methods and dynamically adjusting PID parameters, the problem of poor performance of traditional PID control in nonlinear systems is solved, and higher control accuracy and stability is achieved, and it is suitable for complex power grid environments and multiple operating modes.

CN119945104APending Publication Date: 2025-05-06GUANGDONG DIANBANG NEW ENERGY TECH CO LTD

Patent Information

Application Number
CN202510244376.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-03
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

Traditional PID control methods are poor in processing nonlinear characteristics in power converters, making it difficult to achieve ideal control effects.

Method used

The PID control method based on neural network is adopted to dynamically adjust the proportional coefficient, integral coefficient and differential coefficient of PID through the neural network to adapt to complex power grid environments and load environments.

Benefits of technology

It improves the dynamic adaptability of the power converter, enhances the control accuracy and stability of nonlinear systems, and is suitable for PWM, PFM and PSM operating modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119945104A_ABST
    Figure CN119945104A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power electronics, in particular to a power converter control method and device based on neural network PID and a storage medium. Comprising the following steps: constructing a neural network PID controller consisting of a power converter, a signal conversion and storage part, a neural network PID system and a power converter driving signal generation part; collecting, storing and preprocessing data; building and training a model; the PWM operation mode of the power converter controls the output of the PID controller; and selecting a PID system. The neural network PID power converter in the design of the invention has considerable flexibility through double-layer nonlinear transformation or single-layer nonlinear transformation, and can adapt to a complex power grid environment and a load environment; the error is predicted through an ARIMA model, and a neural network PID system or a traditional PID system is selected, so that the stability of the output voltage of the power converter and the response speed to the external environment can be ensured; the method is suitable for a PWM operation mode, and is also suitable for PFM and PSM operation models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power electronics technology, and in particular to a power converter control method, device and storage medium based on a neural network PID. Background Art

[0002] The current power converter control technology is mainly divided into two categories: analog control technology and digital PID control technology. Analog control technology includes voltage mode control and current mode control, while digital PID control technology can support more complex algorithms, such as nonlinear control and adaptive control.

[0003] Traditional switching power supplies usually use analog control technology, using components such as comparators, error amplifiers, and analog power management chips to adjust the output voltage. However, this control method has many disadvantages, such as complex control circuits, a large number of components required, and difficulty in modifying the control circuit once it is designed.

[0004] With the rapid development of microelectronics technology, power supply control technology has evolved from pure analog control to analog-digital hybrid control, and then to the current full-digital PID control. Digital PID control not only simplifies the control circuit and reduces the number of components, but also provides higher flexibility, facilitates later adjustment and optimization, and greatly promotes the miniaturization and integration of switching power supplies.

[0005] With the development of artificial intelligence technology, neural network PID control power converters have emerged, which can adjust the PID system in real time. Parameters can further improve the dynamic adaptability of the power converter. Currently, the power converters controlled by neural network PID are also mostly used for PWM control.

[0006] The most commonly used digital control method is PID control, which has the advantages of simple algorithm, good steady-state performance, good robustness, high accuracy, and easy implementation of the design device. However, for power converters, the magnetic components (such as transformers and inductors), load changes, parasitic capacitance and parasitic diodes of switching devices, nonlinear components in the feedback loop (such as the saturation characteristics of the error amplifier), and temperature changes (such as changes in the temperature of the heat sink, transformer, and equipment) lead to nonlinear control of the switching power supply. In addition, the switching action of the switching device (such as MOSFET or IGBT) at the core of the switching power supply is also nonlinear, so the linear control method such as PID may not achieve the ideal control effect.

[0007] In recent years, scholars have proposed many intelligent control strategies to overcome the defects of traditional PID in practical applications. Typical ones include fuzzy PID control strategy, adaptive PID control strategy, neural network PID control strategy and so on.

[0008] Fuzzy PID control strategy combines the time fuzzy control strategy with the PID control strategy. By fuzzy processing the controlled system parameters and fuzzy relationship reasoning to generate corresponding fuzzy decisions, the PID system parameters are finally controlled, so that the PID controller no longer needs the control of the precise mathematical model of the controlled object. It can have stronger adaptability for nonlinear system control, but fuzzy control requires a lot of experience in design, making it difficult to determine the rule base and boundary conditions when designing the control strategy.

[0009] The adaptive PID control strategy is an improvement on the traditional PID. The main idea is to dynamically detect the peak value of the controlled system error, summarize and transform the system function of the controlled object in steady state and dynamic state, derive the corresponding PID control parameters, and reasonably change the PID parameters at each state transition to smoothly realize the state transition of the controlled object. The purpose of improving the traditional PID control is achieved. However, there is no clear basis for the formulation of state transition and adaptive adjustment rules.

[0010] Neural network PID combines neural network and traditional PD control strategy, takes the output error of the controlled object as the input object of the neural network, and adjusts the parameters of PID by the output of the neural network. When the system output error changes, the neural network adjusts the self-weight threshold through self-learning adaptive dynamic adjustment to achieve the purpose of reducing the error. In view of this, we propose a power converter control method, device and storage medium based on neural network PID. Summary of the invention

[0011] The object of the present invention is to provide a power converter control method, device and storage medium based on neural network PID to solve the problems raised in the above background technology.

[0012] In order to solve the above technical problems, one of the purposes of the present invention is to provide a power converter control method based on neural network PID, comprising the following steps:

[0013] S1. Constructing a neural network PID controller: The neural network PID controller consists of four parts: power converter, signal conversion and storage, neural network PID system and power converter drive signal generation;

[0014] S2. Data acquisition, storage and preprocessing: Calculate the actual output voltage of the power converter With the expected output and store and transmit the error signal of the previous moment and the previous two moments. and The error is differentially calculated, and the differential result and the error are used as the input of the PID controller and part of the input of the neural network PID system;

[0015] S3. Model building and training: The neural network PID system uses the forward propagation of the neural network to multiply the input signal by the input layer weight Get the net input of hidden layer neurons , and then converted to hidden layer output through activation function , the output layer neurons receive the hidden layer output signal and multiply it by the output layer weight Get the net input of the output layer neurons , and then converted to output layer output through activation function , which is dynamically adjusted by the neural network , To adjust the proportional coefficient of PID , integral coefficient and the differential coefficient ;

[0016] S4, the output of the power converter PWM operation mode controls the output of the PID controller: the power converter drive signal is generated by first converting the output of the PID controller Map to the duty cycle of PWM, the frequency of PFM and the number of pulse jumps of PSM, and then integrate the dead time to generate PWM, PFM and PSM control signals;

[0017] S5. PID system selection: predict the power converter error and choose whether to execute the classic PID system or the neural network PID system according to the prediction result.

[0018] As a further improvement of the technical solution, in S1, the power converter is a power converter, and the power converter includes but is not limited to Buck, Buck-Boost, CUK and resonant converters, and flyback converters, forward converters, push-pull converters, half-bridge converters and full-bridge converters, and parallel topology architectures of these types of converters, and power converters that use ZVS and ZCS technologies to reduce switching losses of power devices; the input voltage of the power converter is , the output voltage is .

[0019] As a further improvement of the technical solution, in S2, the specific process of data collection, storage and preprocessing includes the following steps:

[0020] S2.1. Data collection: including the collection of input voltage, output voltage, reference voltage of the power converter, and output signal of the PID controller The collection of

[0021] S2.2, data conversion: Calculate the reference voltage and actual output voltage of the power converter Error in sub-sampling time , and the errors of the previous and previous two times and , and the first-order difference and second-order differences :

[0022]

[0023] S2.3, Data preprocessing: Fill missing values ​​in the collected power converter data. In the case of standard dimensions, the input voltage, output voltage, reference voltage data, error, first-order difference and second-order difference data of the power converter are quite different. Normalize the data set and scale the features and labels of different scales to to eliminate the influence of dimension:

[0024]

[0025] In the formula, is the normalized data, To normalize the data, and They represent the maximum and minimum values ​​in the data to be normalized respectively. Finally, the data is mapped between 0 and 1 and input into the model as feature data for training.

[0026] As a further improvement of the technical solution, in S3, the neural network PID system can adopt neural networks such as BP, RBF and LSTM;

[0027] Among them, the BP neural network adopts a three-layer architecture, including an input layer, a hidden layer and an output layer. The input layer receives the current error and its historical information, multiplies this information with the weight of the input layer to obtain the input of the hidden layer, and after being processed by the hidden layer activation function, the output of the hidden layer is obtained. The output of the hidden layer is multiplied by the weight of the output layer to obtain the output of the neural network. The hidden layer and the output layer are used for feature extraction and nonlinear mapping, and the output layer gives the adjusted PID parameters;

[0028] The hidden layer activation function uses the ordinary sigmoid function. Since the PID parameter is generally a non-negative number, the output layer activation function Choose a non-negative sigmoid function:

[0029]

[0030] Among them, the three neurons in the output layer of the model correspond to the proportional coefficients of PID , integral coefficient and the differential coefficient .

[0031] As a further improvement of the technical solution, in S3, the neural network PID system adopts a BP neural network, and the process of model building and training includes the following steps:

[0032] S3.1. BP neural network model data set construction: The basic input data of the model contains errors and its first-order difference and second-order differences , and the controller is The control signal or control law output in each time step , and the power converter output voltage , reference voltage , Input voltage :

[0033]

[0034] S3.2. BP neural network model construction and training: The neural network PID system automatically adjusts the weights in the neural network so that the model can capture the potential correlation between input and output and is used to discover the internal structure of the neural network data.

[0035] As a further improvement of the technical solution, in S3.2, the training steps for the BP neural network PID system to discover the internal structure of the data are as follows:

[0036] S3.2.1, Forward propagation stage: In the forward propagation stage, each input layer neuron receives the input signal and multiplies it by the input layer weight Calculate the hidden layer net input , and then converted to hidden layer output through activation function :

[0037] The input signal of the input layer is:

[0038]

[0039] The hidden layer input and output signals are:

[0040]

[0041]

[0042] If there are more hidden layers, the above formula needs to be applied recursively until the last layer output; where, For The input signal to the The connection weight matrix between the outputs of hidden units; It is the sigmoid activation function, which is used to introduce nonlinearity;

[0043] In the forward propagation phase, each output layer neuron receives the hidden layer output signal and multiplies it by the output layer weight Calculate the net input of the output layer , and then through the activation function Convert to hidden layer output ;

[0044] The input and output signals of the output layer are:

[0045]

[0046]

[0047]

[0048] For hidden layers to The connection weight matrix between output units;

[0049] S3.2.2, Backward propagation stage: In the process of BP neural network training, after a round of forward propagation, a round of back propagation is carried out through the loss function. In the back propagation process, the weight parameters of the hidden layer and the output layer are updated, and the output of the network layer is dynamically adjusted, that is, the PID is dynamically adjusted. , , Parameters; for a 3-layer BP neural network, the weights between the output layer and the hidden layer need to be updated and the weights between the hidden layer and the input layer ;

[0050] The loss function of the BP neural network is based on the error between the output of the power converter and the reference voltage, where is the reference voltage of the system, is the actual output of the power converter, and the loss function for:

[0051]

[0052] The BP neural network corrects the weight coefficient of the network according to the gradient descent method through back propagation. The incremental formula of the weight coefficient between the hidden layer and the output layer is:

[0053]

[0054] In the formula, It is The second iteration is from the node To Node The change in the connection weight of is the learning rate, which is usually between 0 and 1. is the coefficient of inertia;

[0055] The output layer weight coefficient update formula is:

[0056]

[0057] It is The second iteration is from the node To Node The change in the connection weight of For neurons The actual output is the result obtained by forward propagation calculation;

[0058] The weight correction formula of the output layer is:

[0059]

[0060] The hidden layer weight update stage is:

[0061]

[0062] The weight coefficient correction formula of the hidden layer is:

[0063]

[0064] in, It is The second iteration is from the node To Node The change in the connection weights of

[0065] S3.2.3. BP neural network adjusts PID parameters in real time: Based on the learned internal structure of the data, the BP neural network continuously adjusts the internal connection weights to reveal the hidden structural features inside the data and applies this knowledge to improve the performance of the control system.

[0066] As a further improvement of the technical solution, in S4, the BP neural network adjusts the three gain parameters of the PID controller Perform online optimization, and the PID controller optimizes the three gain parameters according to the optimization and error information to calculate control signals ,according to The complexity of the correlation with the power converter control signal can be achieved through direct mapping, linear conversion or nonlinear mapping. To calculate the pulse duty cycle of the PWM signal , calculate the frequency of the PFM signal And calculate the number of pulse jumps of the PSM signal ;

[0067] First, direct mapping method: Assume The value range is interval, the control signal Directly mapped duty cycle or frequency Or the number of pulse jumps ,Right now:

[0068]

[0069] in, and They are the minimum and maximum frequency limits set by PFM; and They are the minimum and maximum pulse jump number limits set by PSM respectively; The function is used to round to the nearest integer, ensuring is an integer value;

[0070] Second, the linear conversion method: For PWM power converter, if The value range is not The control signal can be converted into Directly mapped duty cycle ,Right now:

[0071]

[0072] in, and is the scaling factor, ensuring The value falls in between; here is the maximum permissible control signal amplitude, Represents a saturation function, used to limit The value range is Inside;

[0073] Third, nonlinear mapping method: using the sigmoid function of nonlinear mapping, the sigmoid function can compress any real value into In scope:

[0074]

[0075] in, is a positive proportional factor used to adjust the steepness of the curve. , which can make the output duty cycle, frequency and pulse jump number respond more sensitively to input changes;

[0076] For PFM, which has a large change in the low frequency area and a slow change in the high frequency area, and for PSM, which wants a large change at low load and a slow change at high load, an exponential function mapping can be used:

[0077]

[0078] in, Is a negative number that determines the speed of exponential decay.

[0079] As a further improvement of the technical solution, in S5, the PID system construction step includes:

[0080] S5.1. Collect error data ;

[0081] S5.2. Preprocess data: handle missing values, fill or delete missing values; handle outliers, identify and handle outliers to ensure data quality; finally, normalize the data to eliminate dimensional effects;

[0082] S5.3. Model building: determining the order of differences , autoregressive order and the moving average order , based on the selected , , The ARIMA model is constructed based on the values, and the root mean square error (RMSE), mean absolute error (MAE) and other indicators are calculated to measure the prediction effect of the model;

[0083] S5.4. Forecasting application: Use iterative forecasting or multi-step direct forecasting methods to predict errors at multiple moments in the future.

[0084] The second object of the present invention is to provide a power converter control device based on a neural network PID, comprising a processor, a memory, and a computer program stored in the memory and running on the processor, wherein the processor is used to implement the steps of the power converter control method based on the neural network PID as described above when executing the computer program.

[0085] The third object of the present invention is to provide a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements the steps of the power converter control method based on the neural network PID as described above.

[0086] Compared with the prior art, the present invention has the following beneficial effects:

[0087] 1. In the power converter control method, device and storage medium based on neural network PID, based on the existing technology, a new method is proposed. The mapping method of the duty cycle of PWM, the frequency of PFM and the number of pulse jumps of PSM is used, and the dead time is integrated to generate PWM, PFM and PSM control signals; and the selection method of PID system is proposed. The classic PID system has the characteristics of fast response speed, and the neural network PID system needs dynamic calculation. Parameters affect the response speed of the PID system, predict the power converter error, and choose whether to execute the classic PID system or the neural network PID system according to the prediction result. When the error is less than a value, the classic PID system is selected, otherwise the neural network PID system is selected;

[0088] 2. In the power converter control method, device and storage medium based on neural network PID, the neural network PID power converter has considerable flexibility through double-layer nonlinear transformation or single-layer nonlinear transformation, and can adapt to complex power grid environment and load environment; through the prediction of the error by the ARIMA model, the neural network PID system or the traditional PID system is selected to ensure the stability of the power converter output voltage and the response speed to the external environment; the power converter control technology based on neural network PID is suitable for PWM operation mode, and is also suitable for PFM and PSM operation models. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] Figure 1 is an exemplary neural network PID controller diagram in the present invention;

[0090] Figure 2 This is an exemplary BP neural network architecture diagram in the present invention;

[0091] Figure 3 is an exemplary BP neural network training flow chart of the present invention;

[0092] Figure 4 Select a flow chart for an exemplary PID system in the present invention;

[0093] Figure 5 This is a structural diagram of an exemplary electronic computer product device in the present invention. DETAILED DESCRIPTION

[0094] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0095] Example 1

[0096] like Figure 1-Figure 4 As shown, this embodiment provides a power converter control method based on neural network PID, comprising the following steps:

[0097] S1. Constructing a neural network PID controller: The neural network PID controller consists of four parts: power converter, signal conversion and storage, neural network PID system, and power converter drive signal generation;

[0098] The power converter is a power converter, which includes but is not limited to Buck, Buck-Boost, CUK and resonant converters, flyback converters, forward converters, push-pull converters, half-bridge converters and full-bridge converters, and parallel topology architectures of these types of converters, and power converters that use ZVS and ZCS technologies to reduce switching losses of power devices; the input voltage of the power converter is , the output voltage is .

[0099] At the same time, the classic PID system has the characteristics of fast response speed, while the neural network PID system requires dynamic calculation Parameters affect the response speed of the PID system and predict the power converter error. According to the prediction result, it is chosen whether to execute the classical PID system or the neural network PID system. When the error is less than a value, the classical PID system is selected, otherwise the neural network PID system is selected.

[0100] S2. Data acquisition, storage and preprocessing: Calculate the actual output voltage of the power converter With the expected output and store and transmit the error signal of the previous moment and the previous two moments. and The error is differentially calculated, and the differential result and the error are used as the input of the PID controller and part of the input of the neural network PID system;

[0101] In this step, the specific process includes the following steps:

[0102] S2.1. Data collection: including the collection of input voltage, output voltage, reference voltage of the power converter, and output signal of the PID controller The collection of

[0103] S2.2, data conversion: Calculate the reference voltage and actual output voltage of the power converter Error in sub-sampling time , and the errors of the previous and previous two times and , and the first-order difference and second-order differences :

[0104]

[0105] S2.3, Data preprocessing: Fill missing values ​​in the collected power converter data. In the case of standard dimensions, the input voltage, output voltage, reference voltage data, error, first-order difference and second-order difference data of the power converter are quite different. Normalize the data set and scale the features and labels of different scales to to eliminate the influence of dimension:

[0106]

[0107] In the formula, is the normalized data, To normalize the data, and They represent the maximum and minimum values ​​in the data to be normalized respectively. Finally, the data is mapped between 0 and 1 and input into the model as feature data for training.

[0108] S3. Model building and training: The neural network PID system uses the forward propagation of the neural network to multiply the input signal by the input layer weight Get the net input of hidden layer neurons , and then converted to hidden layer output through activation function , the output layer neurons receive the hidden layer output signal and multiply it by the output layer weight Get the net input of the output layer neurons , and then converted to output layer output through activation function , which is dynamically adjusted by the neural network , To adjust the proportional coefficient of PID , integral coefficient and the differential coefficient ;

[0109] Among them, due to , is dynamically adjusted by the neural network, so The system will also change accordingly, allowing the system to automatically adapt to changes in the environment or working conditions during operation and achieve better control performance. The neural network uses the loss function for back propagation to update the weight parameters of the hidden layer and the output layer. and The automatic adjustment of weights in the neural network enables the neural network to discover the internal structure of the neural network data and capture the potential correlation between input and output. The goal of the neural network is no longer to predict specific labels. Finally, error feedback learning is constructed with the error between the actual output and the expected output of the power converter as the learning data. The learning goal is to reduce the error by gradually recursively correcting the neural network weight vector.

[0110] Specifically, the neural network control algorithm includes neural networks such as BP, RBF, LSTM and GRU; BP and RBF neural networks are preferably used, and the BP neural network is taken as an example for explanation in this embodiment.

[0111] like Figure 2 As shown in the figure, the BP neural network adopts a three-layer architecture, including an input layer, a hidden layer and an output layer. The input layer receives the current error and its historical information, multiplies this information with the weight of the input layer to obtain the input of the hidden layer, and after being processed by the hidden layer activation function, the output of the hidden layer is obtained. The output of the hidden layer is multiplied by the weight of the output layer to obtain the output of the neural network. The hidden layer and the output layer are used for feature extraction and nonlinear mapping, and the output layer gives the adjusted PID parameters;

[0112] The hidden layer activation function uses the ordinary sigmoid function. Since the PID parameter is generally a non-negative number, the output layer activation function Choose a non-negative sigmoid function:

[0113]

[0114] Among them, the three neurons in the output layer of the model correspond to the proportional coefficients of PID , integral coefficient and the differential coefficient .

[0115] Furthermore, the neural network PID system adopts BP neural network, and the model building and training process includes the following steps:

[0116] S3.1. BP neural network model data set construction: The basic input data of the model contains errors and its first-order difference and second-order differences , and the controller is The control signal or control law output in each time step , and the power converter output voltage , reference voltage , Input voltage :

[0117]

[0118] S3.2. BP neural network model construction and training: The neural network PID system automatically adjusts the weights in the neural network so that the model can capture the potential correlation between input and output and is used to discover the internal structure of the neural network data.

[0119] like Figure 3 As shown, the training steps of the BP neural network PID system to discover the internal structure of the data are as follows:

[0120] S3.2.1, Forward propagation stage: In the forward propagation stage, each input layer neuron receives the input signal and multiplies it by the input layer weight Calculate the hidden layer net input , and then converted to hidden layer output through activation function :

[0121] The input signal of the input layer is:

[0122]

[0123] The hidden layer input and output signals are:

[0124]

[0125]

[0126] in, For the The input layer input vector at the iteration, where is the number of input features, where is 7; For the The hidden layer output vector at the iteration is Indicates the number of output nodes (for a PID controller, there are usually 3 outputs, corresponding to ); For The input signal to the The connection weight matrix between the outputs of hidden units; It is the sigmoid activation function, which is used to introduce nonlinearity;

[0127] At the same time, one hidden layer is used here. If there are more hidden layers, the above formula needs to be recursively applied until the last layer output;

[0128] In the forward propagation phase, each output layer neuron receives the hidden layer output signal and multiplies it by the output layer weight Calculate the net input of the output layer , and then through the activation function Convert to hidden layer output ;

[0129] The input and output signals of the output layer are:

[0130]

[0131]

[0132]

[0133] For hidden layers to The connection weight matrix between output units;

[0134] S3.2.2, Backward propagation stage: In the process of BP neural network training, after a round of forward propagation, a round of back propagation is carried out through the loss function. In the back propagation process, the weight parameters of the hidden layer and the output layer are updated, and the output of the network layer is dynamically adjusted, that is, the PID is dynamically adjusted. , , Parameters; for a 3-layer BP neural network, the weights between the output layer and the hidden layer need to be updated and the weights between the hidden layer and the input layer ;

[0135] The loss function of the BP neural network is based on the error between the output of the power converter and the reference voltage, where is the reference voltage of the system, is the actual output of the power converter, and the loss function for:

[0136]

[0137] The BP neural network corrects the weight coefficient of the network according to the gradient descent method through back propagation. The incremental formula of the weight coefficient between the hidden layer and the output layer is:

[0138]

[0139] In the formula, It is The second iteration is from the node To Node The change in the connection weight of is the learning rate, which is usually between 0 and 1. is the coefficient of inertia;

[0140] The output layer weight coefficient update formula is:

[0141]

[0142] It is The second iteration is from the node To Node The change in the connection weight of For neurons The actual output is the result obtained by forward propagation calculation;

[0143] The weight correction formula of the output layer is:

[0144]

[0145] The hidden layer weight update stage is:

[0146]

[0147] The weight coefficient correction formula of the hidden layer is:

[0148]

[0149] in, It is The second iteration is from the node To Node The change in the connection weights of

[0150] S3.2.3, BP neural network adjusts PID parameters in real time: Based on the learned internal structure of the data, the BP neural network continuously adjusts the internal connection weights to reveal the hidden structural features of the data, and applies this knowledge to improve the performance of the control system. It can adjust the PID parameters in real time according to the error ( ), the PID controller does not rely on fixed preset values, but can continuously optimize its own control strategy during operation.

[0151] S4, the output of the power converter PWM operation mode controls the output of the PID controller: the power converter drive signal is generated by first converting the output of the PID controller Map to the duty cycle of PWM, the frequency of PFM and the number of pulse jumps of PSM, and then integrate the dead time to generate PWM, PFM and PSM control signals;

[0152] In this step, the BP neural network adjusts the three gain parameters of the PID controller Perform online optimization, and the PID controller optimizes the three gain parameters according to the optimization and error information to calculate control signal ,according to The complexity of the correlation with the power converter control signal can be achieved through direct mapping, linear conversion or nonlinear mapping. To calculate the pulse duty cycle of the PWM signal , calculate the frequency of the PFM signal And calculate the number of pulse jumps of the PSM signal ;

[0153] First, direct mapping method: Assume The value range is interval, the control signal Directly mapped duty cycle or frequency Or the number of pulse jumps ,Right now:

[0154]

[0155] in, and They are the minimum and maximum frequency limits set by PFM; and They are the minimum and maximum pulse jump number limits set by PSM respectively; The function is used to round to the nearest integer, ensuring is an integer value;

[0156] Second, the linear conversion method: For PWM power converter, if The value range is not The control signal can be converted into Directly mapped duty cycle ,Right now:

[0157]

[0158] in, and is the scaling factor, ensuring The value falls in between; here is the maximum permissible control signal amplitude, Represents a saturation function, used to limit The value range is Inside;

[0159] Third, nonlinear mapping method: Simple linear mapping may not be enough to provide ideal control effect. In this case, nonlinear mapping can be used, such as sigmoid function, which can compress any real value into In scope:

[0160]

[0161] in, is a positive proportional factor used to adjust the steepness of the curve. , which can make the output duty cycle, frequency and pulse jump number respond more sensitively to input changes;

[0162] For PFM, which has a large change in the low frequency area and a slow change in the high frequency area, and for PSM, which wants a large change at low load and a slow change at high load, an exponential function mapping can be used:

[0163]

[0164] in, is a negative number that determines the speed of exponential decay;

[0165] Fourth, mapping based on BP neural network: If you need to further improve the control accuracy and adapt to unknown nonlinear relationships, you can train a BP neural network to learn from arrive Once the training is completed, the BP neural network can be used to predict the pulse duty cycle of the PWM signal in real time. , the frequency of the PFM signal And the number of pulse jumps of the PSM signal , without explicit mathematical formulas;

[0166] In addition, the power converter control signal generation includes:

[0167] Taking the PWM full-bridge power converter as an example, the control signal period is , the duty cycle is ( ), that is, the high level time is , then the high level time of the upper and lower bridge arms are , now add the dead time , the dead time in each cycle will be allocated between the upper and lower bridge arms;

[0168] Upper arm opening time:

[0169] Lower bridge arm opening time:

[0170] Here This is because when the upper and lower bridge arms are switched, each needs to wait for half the dead time to ensure a safe interval.

[0171] S5, PID system selection: predict the power converter error, and choose whether to execute the classic PID system or the neural network PID system according to the prediction result;

[0172] like Figure 4 As shown, in this step, the PID system construction steps include:

[0173] S5.1. Collect error data ;

[0174] S5.2. Preprocess data: handle missing values, fill or delete missing values; handle outliers, identify and handle outliers to ensure data quality; finally, normalize the data to eliminate dimensional effects;

[0175] S5.3. Model building: determining the order of differences , autoregressive order and the moving average order , based on the selected , , The ARIMA model is constructed based on the values, and the root mean square error (RMSE), mean absolute error (MAE) and other indicators are calculated to measure the prediction effect of the model;

[0176] S5.4. Forecasting application: Use iterative forecasting or multi-step direct forecasting methods to predict errors at multiple moments in the future.

[0177] In addition, it is worth noting that the above-mentioned power converter control method based on neural network PID has the following characteristics and advantages:

[0178] (1) A method for controlling PWM, PFM and PSM power converters using a neural network PID control system is proposed;

[0179] (2) Proposed PID control system Nonlinear mapping method to PWM pulse width, PFM frequency, and PSM pulse jump number;

[0180] (3) The proposed neural network PID control system is suitable for the control of PWM, PFM and PSM power converters;

[0181] (4) Proposed a The multi-step prediction method selects the classic PID system or the neural network PID system according to the size of the prediction error. The neural network in the neural network PID system is optional.

[0182] (5) A single-layer nonlinear mapping relationship and a double-layer nonlinear mapping relationship are proposed:

[0183] BP neural network constitutes the first nonlinear layer. If a nonlinear function is used, Convert to , forming the second nonlinear layer, and constructing a double-layer nonlinear mapping relationship; if a linear function is used Convert to , forming a linear layer and constructing a single-layer nonlinear mapping relationship;

[0184] BP neural network layer:

[0185] In this layer, the BP neural network is based on the input (such as error and its changes) to dynamically adjust the PID parameters , these parameters are no longer fixed but vary with time, forming the first level of nonlinearity;

[0186] Non-linear mapping layer:

[0187] In the second layer, if some nonlinear function (such as Sigmoid or custom nonlinear transformation) is used to convert the control signal calculated by PID Convert to , which constitutes the second level of nonlinearity;

[0188] Linear Mapping Layer:

[0189] In the second layer, if the control signal calculated by PID is converted into Convert to , which constitutes nonlinearity.

[0190] like Figure 5 As shown, this embodiment also provides a power converter control device based on a neural network PID, including a processor, a memory, and a computer program stored in the memory and running on the processor.

[0191] The processor includes one or more processing cores. The processor is connected to the memory through a bus. The memory is used to store program instructions. When the processor executes the program instructions in the memory, the steps of the power converter control method based on the neural network PID are implemented.

[0192] Optionally, the memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.

[0193] In addition, the present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the above-mentioned power converter control method based on neural network PID are implemented.

[0194] Optionally, the present invention also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the steps of the power converter control method based on neural network PID in the above aspects.

[0195] A person of ordinary skill in the art can understand that the process of implementing all or part of the steps of the above-mentioned embodiments can be completed by hardware, or can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a disk or an optical disk, etc.

[0196] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and descriptions are only preferred examples of the present invention and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A power converter control method based on neural network PID, characterized in that: The steps include: S1. Constructing a neural network PID controller: The neural network PID controller consists of four parts: power converter, signal conversion and storage, neural network PID system and power converter drive signal generation; S2. Data acquisition, storage and preprocessing: Calculate the actual output voltage of the power converter With the expected output and store and transmit the error signal of the previous moment and the previous two moments. and The error is differentially calculated, and the differential result and the error are used as the input of the PID controller and part of the input of the neural network PID system; S3. Model building and training: The neural network PID system uses the forward propagation of the neural network to multiply the input signal by the input layer weight Get the net input of hidden layer neurons , and then converted to hidden layer output through activation function , the output layer neurons receive the hidden layer output signal and multiply it by the output layer weight Get the net input of the output layer neurons , and then converted to output layer output through activation function , which is dynamically adjusted by the neural network , To adjust the proportional coefficient of PID , integral coefficient and the differential coefficient ; S4, the output of the power converter PWM operation mode controls the output of the PID controller: the power converter drive signal is generated by first converting the output of the PID controller Map to the duty cycle of PWM, the frequency of PFM and the number of pulse jumps of PSM, and then integrate the dead time to generate PWM, PFM and PSM control signals; S5. PID system selection: predict the power converter error and choose whether to execute the classic PID system or the neural network PID system according to the prediction result.

2. The power converter control method based on neural network PID according to claim 1, characterized in that: In S1, the power converter is a power converter, including but not limited to Buck, Buck-Boost, CUK and resonant converters, flyback converters, forward converters, push-pull converters, half-bridge converters and full-bridge converters, parallel topology architectures of these types of converters, and power converters that use ZVS and ZCS technologies to reduce switching losses of power devices; the input voltage of the power converter is , the output voltage is .

3. The power converter control method based on neural network PID according to claim 2 is characterized in that: In S2, the specific process of data collection, storage and preprocessing includes the following steps: S2.

1. Data collection: including the collection of input voltage, output voltage, reference voltage of the power converter, and output signal of the PID controller The collection of S2.2, data conversion: Calculate the reference voltage and actual output voltage of the power converter Error in sub-sampling time , and the errors of the previous and previous two and , and the first-order difference and second-order differences : S2.3, Data preprocessing: Fill missing values ​​in the collected power converter data. In the case of standard dimensions, the input voltage, output voltage, reference voltage data, error, first-order difference and second-order difference data of the power converter are quite different. Normalize the data set and scale the features and labels of different scales to to eliminate the influence of dimension: In the formula, is the normalized data, To normalize the data, and They represent the maximum and minimum values ​​in the data to be normalized respectively. Finally, the data is mapped between 0 and 1 and input into the model as feature data for training.

4. The power converter control method based on neural network PID according to claim 3 is characterized in that: In S3, the neural network PID system can use BP, RBF and LSTM neural networks; Among them, the BP neural network adopts a three-layer architecture, including an input layer, a hidden layer and an output layer. The input layer receives the current error and its historical information, multiplies this information with the weight of the input layer to obtain the input of the hidden layer, and after being processed by the hidden layer activation function, the output of the hidden layer is obtained. The output of the hidden layer is multiplied by the weight of the output layer to obtain the output of the neural network. The hidden layer and the output layer are used for feature extraction and nonlinear mapping, and the output layer gives the adjusted PID parameters; The hidden layer activation function uses the ordinary sigmoid function, the PID parameter is a non-negative number, and the output layer activation function Choose a non-negative sigmoid function: Among them, the three neurons in the output layer of the model correspond to the proportional coefficients of PID , integral coefficient and the differential coefficient .

5. The power converter control method based on neural network PID according to claim 4 is characterized in that: In S3, the neural network PID system adopts a BP neural network, and the model building and training process includes the following steps: S3.

1. BP neural network model data set construction: The basic input data of the model contains errors and its first-order difference and second-order differences , and the controller is The control signal or control law output in each time step , and the power converter output voltage , reference voltage , Input voltage : S3.

2. BP neural network model construction and training: The neural network PID system automatically adjusts the weights in the neural network so that the model can capture the potential correlation between input and output and is used to discover the internal structure of the neural network data.

6. The power converter control method based on neural network PID according to claim 5, characterized in that: In S3.2, the training steps for the BP neural network PID system to discover the internal structure of the data are as follows: S3.2.1, Forward propagation stage: In the forward propagation stage, each input layer neuron receives the input signal and multiplies it by the input layer weight Calculate the hidden layer net input , and then converted to hidden layer output through activation function : The input signal of the input layer is: The hidden layer input and output signals are: If there are more hidden layers, the above formula needs to be applied recursively until the last layer output; in, For The input signal to the The connection weight matrix between the outputs of hidden units; It is the sigmoid activation function, which is used to introduce nonlinearity; In the forward propagation phase, each output layer neuron receives the hidden layer output signal and multiplies it by the output layer weight Calculate the net input of the output layer , and then through the activation function Convert to hidden layer output ; The input and output signals of the output layer are: For hidden layers to The connection weight matrix between output units; S3.2.2, Backward propagation stage: In the process of BP neural network training, after a round of forward propagation, a round of back propagation is carried out through the loss function. In the back propagation process, the weight parameters of the hidden layer and the output layer are updated, and the output of the network layer is dynamically adjusted, that is, the PID is dynamically adjusted. , , Parameters; for a 3-layer BP neural network, the weights between the output layer and the hidden layer need to be updated and the weights between the hidden layer and the input layer ; The loss function of the BP neural network is based on the error between the output of the power converter and the reference voltage, where is the reference voltage of the system, is the actual output of the power converter, and the loss function for: The BP neural network corrects the weight coefficient of the network according to the gradient descent method through back propagation. The incremental formula of the weight coefficient between the hidden layer and the output layer is: In the formula, It is The second iteration is from the node To Node The change in the connection weight of is the learning rate, is the coefficient of inertia; The output layer weight coefficient update formula is: It is The second iteration is from the node To Node The change in the connection weight of For neurons The actual output is the result obtained by forward propagation calculation; The weight correction formula of the output layer is: The hidden layer weight update stage is: The weight coefficient correction formula of the hidden layer is: in, It is The second iteration is from the node To Node The change in the connection weights of S3.2.

3. BP neural network adjusts PID parameters in real time: Based on the learned internal structure of the data, the BP neural network continuously adjusts the internal connection weights to reveal the hidden structural features inside the data and applies this knowledge to improve the performance of the control system.

7. The power converter control method based on neural network PID according to claim 6, characterized in that: In S4, the BP neural network is used to calculate the three gain parameters of the PID controller. Perform online optimization, and the PID controller optimizes the three gain parameters according to the optimization and error information to calculate control signals ,according to The complexity of the correlation with the power converter control signal can be achieved by direct mapping, linear conversion or nonlinear mapping. To calculate the pulse duty cycle of the PWM signal , calculate the frequency of the PFM signal And calculate the number of pulse jumps of the PSM signal ; First, direct mapping method: Assume The value range is interval, the control signal Directly mapped duty cycle or frequency Or the number of pulse jumps ,Right now: in, and They are the minimum and maximum frequency limits set by PFM; and They are the minimum and maximum pulse jump number limits set by PSM respectively; The function is used to round to the nearest integer, ensuring is an integer value; Second, the linear conversion method: For PWM power converter, if The value range is not interval, the control signal is converted into Directly mapped duty cycle ,Right now: in, and is the scaling factor, ensuring The value falls in between; is the maximum permissible control signal amplitude, Represents a saturation function, used to limit The value range is Inside; Third, nonlinear mapping method: using the sigmoid function of nonlinear mapping, the sigmoid function can compress any real value into In scope: in, is a positive proportional factor used to adjust the steepness of the curve; For PFM, which has a large change in the low frequency area and a slow change in the high frequency area, and for PSM, which wants a large change at low load and a slow change at high load, an exponential function mapping can be used: in, Is a negative number that determines the speed of exponential decay.

8. The power converter control method based on neural network PID according to claim 1, characterized in that: In S5, the PID system construction step includes: S5.

1. Collect error data ; S5.

2. Preprocess data: handle missing values, fill or delete missing values; handle outliers, identify and handle outliers to ensure data quality; finally, normalize the data to eliminate dimensional effects; S5.

3. Model building: determining the order of differences , autoregressive order and the moving average order , based on the selected , , The ARIMA model is constructed with the values, and the root mean square error and mean absolute error are calculated to measure the prediction effect of the model. S5.

4. Forecasting application: Use iterative forecasting or multi-step direct forecasting methods to predict errors at multiple moments in the future.

9. A power converter control device based on a neural network PID, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and running on the processor, wherein the processor is used to implement the steps of the power converter control method based on neural network PID as described in any one of claims 1 to 8 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the power converter control method based on neural network PID as described in any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Digital power factor converter with fast transient response function and control method of digital power factor converter

    CN103078530A

  • Photovoltaic grid-connected inverter device

    CN104158418A

  • Microgrid voltage control system and method based on fuzzy neuron PID

    CN111262269A

  • Method and device for optimizing PID (Proportion Integration Differentiation) controller parameters in Buck converter based on neural network

    CN114942582A

  • Three-phase PWM rectifier BP neural network PI parameter self-tuning method

    CN116449682A

Cited By

  • Virtual power plant power control method and device, equipment and storage medium

    CN120454204A

  • Virtual power plant power control method, device, equipment and storage medium

    CN120454204B

  • LLC converter dynamic response capability optimization control method based on neural network

    CN121356353A

  • Prefabricated cabin environment control method and system based on self-adaptive parameter adjustment

    CN121857348A