CN108540029B - Motor rotating speed control parameter optimization method and system based on improved SPSA - Google Patents
Motor rotating speed control parameter optimization method and system based on improved SPSA Download PDFInfo
- Publication number
- CN108540029B CN108540029B CN201810482096.8A CN201810482096A CN108540029B CN 108540029 B CN108540029 B CN 108540029B CN 201810482096 A CN201810482096 A CN 201810482096A CN 108540029 B CN108540029 B CN 108540029B
- Authority
- CN
- China
- Prior art keywords
- control parameter
- parameter combination
- iteration
- sequence
- termination
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02P—CONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
- H02P21/00—Arrangements or methods for the control of electric machines by vector control, e.g. by control of field orientation
- H02P21/0003—Control strategies in general, e.g. linear type, e.g. P, PI, PID, using robust control
Abstract
The invention relates to a motor rotating speed control parameter optimization method and system based on improved SPSA, wherein the method comprises the following steps: s1, initializing; s2, optimizing the process, and providing a new iteration control parameter combination to be tested and scaled according to the improved SPSA method; s3, preprocessing the scaled iteration control parameter combination into an actual feasible iteration control parameter combination; s4, experimental testing process; s5, post-processing according to the formulaCalculating the ITAE index of the motor to evaluate the control performance of the motor, and scaling the actual feasible iterative control parameter combination; and S6, in the evaluation process, according to the actual feasible iterative control parameter combination and the ITAE value corresponding to the actual feasible iterative control parameter combination, carrying out real-time evaluation on whether the actual feasible iterative control parameter combination meets optimality, if the actual feasible iterative control parameter combination meets the optimality, outputting the optimal control parameter combination, and otherwise, turning to S2 for iteration. The method has low implementation cost, and saves optimization time and experiment consumption.
Description
Technical Field
The invention relates to the field of motor rotating speed control, in particular to a motor rotating speed control parameter optimization method and system based on improved SPSA.
Background
The performance of the control system is critical to the design of the control system. The performance of the control system is affected by various factors, namely the structure of the controller, process noise or disturbance and parameters of the control system. Once the configuration of the controller is determined, control system performance can only be improved by adjusting control system parameters. Therefore, parameter tuning of the control system is an important task.
The most important control parameter setting and optimizing methods at present can be divided into four categories. The first type is trial and error, which is a method in which engineers continuously adjust the control parameter settings according to the operating experience and perform tests until a group of acceptable control parameter combinations is found. The method depends heavily on personal experience of engineers, the setting process is time-consuming and labor-consuming, and the optimality of the setting value cannot be guaranteed. The second type of method is an empirical formula method, which is mainly used for PID control parameter tuning. For example, Ziegler-Nichols tuning methods anda relay feedback method, etc. In such methods, an engineer usually needs to obtain an object model through a transient response test, a parameter estimation or a frequency response test, and then give a parameter setting value according to an empirical setting formula. The advantage of this method is its simplicity of implementation. However, it also has the following problems: first, the method needs to rely on process models, but accurate models are difficult or impossible to obtain; secondly, the control parameter setting value obtained by the method is usually not an optimal value; again, the selection of the empirical formula needs to be dependent on the engineer's experience and knowledge of the process characteristics. These problems have led to methods that in most cases do not provide the desired results. The third type of method is a model-based optimization method, which is a method based on the premise that a model for controlling performance is known. Given that the model between the control performance and the control parameters is known, optimization of the control parameters can be achieved by a model-based optimization method. However, in practical situations, the correlation between the control performance and the control parameter is very complicated and is generally difficult to obtain. Therefore, the method is difficult to be applied to control parameter setting value research in practice. The fourth type is that on the basis of a control system simulation model, simulation optimization is carried out through optimization algorithms such as genetic algorithm, group intelligent algorithm and the like, but control parameters obtained by simulation should be optimizedIt is often difficult to achieve optimal results for practical process control.
Disclosure of Invention
The invention provides an improved SPSA motor rotating speed control parameter optimization system and method aiming at the main problems of high optimization cost, dependence on expert experience, difficulty in ensuring optimality and the like in the control parameter setting of a motor rotating speed control system, and aims to quickly find the optimal control parameter combination of the control system through a small amount of online experiments under the condition of reducing the quality optimization cost as much as possible so as to improve the control performance of the motor rotating speed control system.
The parallel perturbation random approximation method (SPSA) was proposed by j.c. ball in 1987 by improving on the basis of a finite difference random approximation algorithm. The gradient estimation of the method only needs two times of evaluation values of the objective function without considering the dimensionality of the problem. Under the appropriate precondition, given the same iteration times, the SPSA can obtain the same statistical precision as the gradient approximation of the finite difference method, and only needs 1/n function evaluation, wherein n is a variable dimension. Therefore, the method has high optimization efficiency. In the invention, the method is improved, and the efficiency of the optimization process is further improved by using the historical iterative process information.
Therefore, the invention adopts the following specific technical scheme:
a motor rotating speed control parameter optimization method based on improved SPSA is disclosed, wherein the method comprises the following steps:
s1, initializing, artificially setting an initial control parameter group, scaling the initial control parameter group, and setting initial values of relevant parameters required by an optimization process and an evaluation process;
s2, optimizing the process, and providing a new iteration control parameter combination to be tested and scaled according to the improved SPSA method;
s3, preprocessing the scaled iteration control parameter combination into an actual feasible iteration control parameter combination;
s4, experimental test process, control of transmitting practical iterative control parameter combination to motorThe system makes the motor run under the control parameter combination, and the control system collects the starting time t0From the start to the test termination time tfThe actual rotational speed in between, form a rotational speed sequence, wherein at time t0The rotational speed is zero at time tfThe rotation speed is a target set value vsp;
S5, post-processing according to the formula of the actual rotating speedCalculating its ITAE index to evaluate the control performance of the motor, wherein tiE (i) is the deviation of the actual rotating speed and the set rotating speed at the sampling moment, and the combination of the actual feasible iteration control parameters is scaled;
and S6, in the evaluation process, calculating a relative optimality sequence according to the actual feasible iterative control parameter combination and the ITAE value corresponding to the actual feasible iterative control parameter combination and the historical information, evaluating whether the actual feasible iterative control parameter combination meets optimality in real time according to the track characteristics of the sequence, outputting the optimal control parameter combination if the actual feasible iterative control parameter combination meets the optimality, and otherwise, turning to S2 for iteration.
Further, the scaling in S1 is by formula
The method comprises the steps of (a) carrying out, wherein,for the initial control parameter combination, (X)t)L=inf(Xt) Is lower bound, (X)t)H=sup(Xt) To the upper bound, n is the number of optimized control parameters,the initial value of the ith control parameter, t, 1,2, …, n.
Further, in S1, the parameters { a, c, α, γ } of the modified SPSA method are assigned, and the modified SPSA method is setThe SPSA iterative operator v is 1; setting relevant parameters of the evaluation process, setting an initial value k of the termination state coefficient to be 0, and setting a lower limit threshold kFLower threshold value ξ for termination factorΓA slip smoothing factor λ, a slip termination factor η.
Further, in a preferred embodiment, the parameter { a, c, α, γ } is { α ═ 0.602, γ ═ 0.101, a ═ 50, a ═ 30, c ═ 8}, and the lower threshold value κ is set to be lower than the threshold value k F3, lower threshold of termination factor ξΓThe slip smoothing factor λ is 0.05, and the slip end factor η is 1.
Further, the specific steps of S2 are:
s21, algorithm gain updatings=a/(A+s)α,cs=c/sγ;
S22, perturbation vector generation, generating an n-dimensional random vector (perturbation vector) delta by Monte Carlo methodsWherein each dimension of the vector is randomly generated by Bernoulli + -1 distribution, wherein the probabilities of generating +1, -1 are all 0.5;
s23, forward perturbation point generation:let k be k +1, and obtain ITAE value under corresponding control parameter through experiment
S24, reverse perturbation point generation:let k be k +1, and obtain ITAE value under corresponding control parameter through experiment
S25, approximating the gradient by estimating the point of perturbationApproximate gradient at a pointBecause there is a constraint on the optimization operation interval, the gradient estimation formula is modified as follows:
s26, searching the combination point of the iteration control parameter, namely, approximating the next iteration point by using the difference value of the approximate gradient and the optimal solution of the iteration, and searching the combination point of the iteration control parameter according to a formulaCalculating; let k be k +1 and s be s + 1.
Further, the specific steps of S3 are:
s31, according toAnd the corresponding iteration control parameter combination is restored to the actual iteration control parameter, wherein,combining the restored iteration control parameters;each dimension of (1) represents and representsCorresponding actual physical parameters;
s32, ifThe actual feasible iterative control parameterOtherwise, selecting a distance satisfying the feasible regionHas the closest Euclidean distanceTo replaceAnd make the iterative control parameter practicalRules for choosing approximate feasible points such asWherein the content of the first and second substances,is a point in space toΦ is the solution set that satisfies the minimum euclidean distance.
Further, the specific steps of S6 are as follows:
s61, generating or updating a relative optimality sequence: let the iterative control parameter combination sequence of the previous batch be Mk-1={(X1,Y1),(X2,Y2),…(Xk-1,Yk-1) In which X isiFor a practically feasible iterative control parameter combination, YiFor the ITAE calculation value under the control parameter combination, (X)i,Yi) And forming an iteration control parameter combination information set. The new iteration control parameter combination information set is (X)k,Yk) After updating the iteration point sequence, the current iteration combination sequence M is formedk(ii) a Then, the control parameter combination information sets are reordered based on the size of the iterative control parameter combination ITAE to form a group of sequences increasing according to the ITAE valueWhereinControlling the minimum ITAE value in the parameter combination sequence for the current iteration point,Controlling the combination of iteration control parameters with optimal performance; and writing the set of iteration control parameter combination information into a relative optimality sequenceWherein newly added points of the current optimal sequenceIs that
S62, generating or updating a smoothed trajectory: taking n +1 as the calculation base number of the sliding track, λ as a sliding smoothing coefficient (taking an integer of 1,2 …), and the size of the sliding window is λ (n +1), the calculation rule of the sliding track is as follows:
smoothing the relative optimality sequence by adopting the calculation rule to generate a sliding track
And S63, generating or updating an ending track: in the sliding trackBased on the obtained data, further calculating the termination trajectory by moving averageThe calculation rule is as follows:
wherein η is the slip termination coefficient;
s64, generating or updating the difference sequence and the termination factor: according to the termination trackThe difference sequence delta Y can be obtainedTThe sequence characterizing the target value growth trend at different iterative control parameter combinations, the sequence of differences DeltaYTThe generation rule of (1) is as follows:
calculating to obtain the termination factor of the optimized process based on the difference sequence and the termination trackThe mathematical meaning of the factor is that the ratio of the improvement of the current iteration control parameter combination point to the ITAE value of the current iteration point reflects the relative progress of the optimization process, the larger ξ indicates the greater the improvement at the current iteration control parameter combination point, and conversely, the smaller the improvement at the point, the lower threshold ξ of the factorΓFlagging the system optimization as approaching a standstill;
s65, judging whether the optimization process is terminated when ξ is less than ξΓWhen the condition is satisfied, κ is set from 0 to 1, and then, in a subsequent iteration batch, when the iteration control parameter combination again satisfies ξ < ξΓκ is incremented by 1, and if ξ > ξ occurs when κ ≠ 0ΓThe flag optimization process jumps out of the stall state, resets κ to 0, and only if κ equals its lower threshold κFWhen the optimization process is considered to meet the termination condition, the iteration termination criterion condition is (ξ < ξ)Γ)∩(κ=κF);
S66, when the optimization process is terminated, outputting the control state flag psi of the optimization process to 1, and outputting the optimal control parameter combination (X) by the system*,Y*) (ii) a If the termination condition is not satisfied, the process goes to S2 to continue the iterative process.
Further, the control parameters include a proportional coefficient P, an integral coefficient I, and a differential coefficient D.
A motor rotation speed control parameter optimization system based on improved SPSA (spin-spray assisted magnetic System), wherein the motor rotation speed control parameter optimization system comprises an initial motor rotation speed control parameter optimization systemThe system comprises an initialization module, an optimization module, a preprocessing module, an experimental test module, a post-processing module and an evaluation module, wherein the initialization module is used for receiving an initial control parameter combination and upper and lower limits of each control parameter provided by an engineer or an operator, scaling the initial control parameter combination and setting related parameters of the optimization module and the evaluation module; the optimization module is used for receiving the scaled control parameter combination and searching and giving a new iteration control parameter combination to be tested and scaled according to the improved SPSA method; the preprocessing module is used for preprocessing the scaled iteration control parameter combination into an actual feasible iteration control parameter combination; the experimental test module is used for transmitting the practical feasible iterative control parameter combination to the control system of the motor, enabling the motor to operate under the control parameter combination, and the control system collects the control parameter combination from the initial time t0From the start to the test termination time tfActual rotational speeds in between, forming a rotational speed sequence and sending it to the post-processing module, wherein at time t0The rotational speed is zero at time tfThe rotation speed is a target set value vsp(ii) a The post-processing module is used for calculating the actual rotating speed according to a formulaCalculating its ITAE index to evaluate the control performance of the motor, wherein tiE (i) is the deviation of the actual rotating speed and the set rotating speed at the sampling moment, and the combination of the actual feasible iteration control parameters is scaled; and the evaluation module is used for calculating a relative optimality sequence according to the actual feasible iteration control parameter combination and the ITAE value corresponding to the actual feasible iteration control parameter combination and the historical information, evaluating whether the actual feasible iteration control parameter combination meets optimality in real time according to the track characteristics of the sequence, outputting the optimal control parameter combination if the actual feasible iteration control parameter combination meets the optimality, and switching to the optimization module for iteration if the actual feasible iteration control parameter combination does not meet the optimality.
By adopting the technical scheme, the invention has the beneficial effects that:
1. the implementation cost is low, and the optimization time and the experiment consumption are saved;
2. the method does not depend on expert experience and is easy to implement;
3. the optimized control parameter combination can be efficiently given at the lowest optimized cost.
Drawings
FIG. 1 is a schematic diagram of the system architecture of the present invention;
FIG. 2 is a schematic diagram of the general flow of the process of the present invention;
FIG. 3 is a schematic representation of the steps of the improved SPSA process in the process of the present invention;
FIG. 4 is a schematic diagram of the steps of the evaluation process.
Detailed Description
To further illustrate the various embodiments, the invention provides the accompanying drawings. The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the embodiments. Those skilled in the art will appreciate still other possible embodiments and advantages of the present invention with reference to these figures. Elements in the figures are not drawn to scale and like reference numerals are generally used to indicate like elements.
The invention will now be further described with reference to the accompanying drawings and detailed description.
Fig. 1 is a structural diagram of a motor rotation speed control parameter optimization system based on the improved SPSA, and fig. 2 is a general step diagram of a motor rotation speed control parameter optimization method based on the improved SPSA. The motor rotating speed control parameter optimization system comprises an initialization module 1, an optimization module 2, a preprocessing module 3, an experiment testing module 4, a post-processing module 5 and an evaluation module 6, wherein the initialization module 1 is used for receiving an initial control parameter combination and upper and lower limits of each control parameter provided by engineers or operators, scaling the initial control parameter combination and setting related parameters of the optimization module and the evaluation module. The optimization module 2 is used for receiving the scaled control parameter combination and searching and providing a new iteration control parameter combination to be tested and scaled according to the improved SPSA method. The preprocessing module 3 is used for setting the scaled iteration control parameter groupAnd preprocessing the combination into a practical feasible iterative control parameter combination. The experimental test module 4 is used for transmitting the practical feasible iterative control parameter combination to the control system of the motor, enabling the motor to operate under the control parameter combination, and acquiring the control parameter combination from the initial time t by the control system0From the start to the test termination time tfActual rotational speeds in between, forming a rotational speed sequence and sending it to the post-processing module, wherein at time t0The rotational speed is zero at time tfThe rotation speed is a target set value vsp. The post-processing module 5 is used for expressing the actual rotating speed according to a formulaCalculating its ITAE index to evaluate the control performance of the motor, wherein tiAnd e (i) is the deviation of the actual rotating speed and the set rotating speed at the sampling moment, and the actually feasible iteration control parameter combination is scaled. The evaluation module 6 is used for calculating a relative optimality sequence according to the actual feasible iterative control parameter combination and the ITAE value corresponding to the actual feasible iterative control parameter combination and the historical information, evaluating whether the actual feasible iterative control parameter combination meets optimality in real time according to the track characteristics of the sequence, outputting the optimal control parameter combination if the actual feasible iterative control parameter combination meets the optimality, and otherwise, switching to the optimization module 2 for iteration.
The following describes a method for optimizing a motor speed control parameter based on improved SPSA with reference to fig. 1 to 4 in conjunction with a specific example, the method comprising the steps of:
s1: an operator determines control system parameters according to a control system design scheme, and selects parameters such as a proportionality coefficient kp, an integral coefficient Ti, a differential coefficient Td and the like as optimized control parameters. Let X1Expressing the proportionality coefficients kp, X2Represents the integral coefficients Ti and X3Representing the differential coefficient Td. Setting of initial control parameter combination by operatorX0=[1,0.1,0.51]T(ii) a The lower limit value and the upper limit value of each control parameter are set by operators according to experience to obtain strict limitationThe upper limit values of the proportional coefficient kp, the integral coefficient Ti and the differential coefficient Td are recorded asIn this embodiment, take: xmax=[30,10,5]TThe lower limit is given as:in this embodiment, take: xmin=[0,0,0]T(ii) a The maximum number of optimization iterations is set by the operator to 100. An engineer or an operator determines an optimization problem feasible region according to the upper limit and the lower limit of each control parameter, and the optimization problem feasible region is expressed as D ═ { X | (X)t)L≤Xt≤(Xt)H1, …, n, where (X)t)L=inf(Xt) Is lower bound, (X)t)H=sup(Xt) Is the upper bound. Calling an initialization module 1 to input the information, and inputting X according to a formula (1)0=[1,0.1,0.51]TScaling to
After scaling, the control parameter variable of each dimension has a uniform scale, and each control parameter is scaled to [0,100]]And assigning parameters { a, A, c, α and gamma } of the improved SPSA method, taking { α ═ 0.602, gamma ═ 0.101, a ═ 50, A ═ 30 and c ═ 8}, setting an improved SPSA iterative operator s ═ 1, setting parameters of the optimization process evaluation module, setting an initial termination state coefficient value kappa ═ 0, and setting a lower limit threshold value kappa ═ 8F3, lower threshold of termination factor ξΓThe slip smoothing factor λ is 0.05, and the slip end factor η is 1.
S2: the optimization module 2 receives the scaled control parameter combinationSearching and giving out new, to-be-tested and scaled iterative control parameter combination according to the improved SPSA methodLet i equal i + 1. As shown in fig. 3, the given method and steps are as follows:
s21: algorithm gain update as=a/(A+s)α,cs=c/sγ。
S22: perturbation vector generation by generating an n-dimensional random vector (perturbation vector) delta in a Monte Carlo mannersWherein each dimension of the vector is randomly generated by a Bernoulli + -1 distribution, wherein the probabilities of generating +1, -1 are all 0.5.
S23: forward perturbation point generation:let k be k + 1. The ITAE value of the corresponding control parameter is obtained through experiments
S24: reverse perturbation point generation:let k be k + 1. The ITAE value of the corresponding control parameter is obtained through experiments
S25: gradient approximation, namely estimating at the perturbation pointApproximate gradient at a pointBecause there is a constraint on the optimization operation interval, the gradient estimation formula is modified as follows:
s26: and (4) performing iterative control parameter combination point search, namely approaching the next iterative point by using the difference value of the approximate gradient and the iterative optimal solution. Iterative control parameter combination point according to formulaAnd (4) calculating. Let k be k +1 and s be s + 1.
S3: combining scaled iterative control parameters given by the improved SPSA optimization moduleAnd transmitting the data to a preprocessing module. Scaled iterative control parameter combinationsAnd (3) restoring the actual iteration control parameters through a preprocessing module according to a formula (2).
Wherein the content of the first and second substances,combining the restored iteration control parameters;each dimension of (1) represents and representsCorresponding actual control parameters.
If it is notIterative control parameter combination feasible pointOtherwise, selecting a distance satisfying the feasible regionHas the closest Euclidean distanceTo replaceAnd make the new iteration control parameter combination feasibleThe rule for selecting the approximate feasible point is as follows (3).
Wherein the content of the first and second substances,is a point in space toΦ is the solution set that satisfies the minimum euclidean distance.
Practical feasible iterative control parameter combination XiAnd transmitting the data to a control system module.
S4: the experiment testing module 4 combines the practical feasible iteration control parameters XiTo the control system of the motor and to operate the motor under the combination of control parameters. The module collects the actual rotating speed of the motor and controls the rotating speed of the motor according to an incremental PID control algorithm. The formula for calculating the controlled variable is shown in the following equation (4).
Wherein u (n) is the control quantity output by the control system at the moment n, and e (n) represents the rotating speed deviation value at the moment n. Wherein k isp,Ti,TdBy combination of control parameters XiAnd (4) determining.
Start t0The actual rotating speed of the motor is set to be 0 at the moment, and the control system starts from t0The rotating speed of the motor is regulated to the target set value v according to the control mode at the momentspTest duration tfIn this example, take tfIt was 10 seconds. When t isfThe reset motor speed is 0 from the moment. The modules simultaneously record the time t from the start0From the start to the test termination time tfThe actual rotational speeds in between, constitute a rotational speed sequence and are sent to the post-processing module 5.
S5: the post-processing module 5 obtains the actual rotating speed sequence of the motor from the experimental test module 4, and the ITAE index of the motor is calculated according to the actual rotating speed according to the formula (5) to evaluate the control performance of the motor, wherein the smaller the ITAE value is, the better the control performance is.
Wherein, tiAt the sampling time, e (i) is the deviation between the actual rotational speed and the set rotational speed at the sampling time.
The actual iterative control parameter combinations are scaled, each to the [0,100] interval. The scaling rule is as follows (6).
Wherein the optimized interval is D ═ { X | (X)t)L≤Xt≤(Xt)H,t=1,…,n},(Xt)L=inf(Xt),(Xt)H=sup(Xt)。
S6: the optimization process evaluation module collects control parameter combinations and corresponding ITAE values in the optimization process, calculates a relative optimality sequence according to historical information, evaluates the optimization process in real time according to the track characteristics of the sequence, timely identifies the state of a dead section according to the evaluation result, controls the optimization process to be timely terminated, and outputs the optimal control parameter combinations. As shown in fig. 4, the main steps are as follows:
s61: a relative optimality sequence is generated or updated. Setting the iterative control parameter of the previous batchThe combined sequence is Mk-1={(X1,Y1),(X2,Y2),…(Xk-1,Yk-1) In which X isiFor a practically feasible iterative control parameter combination, YiFor the ITAE value (X) in this combination of control parametersi,Yi) And forming an iteration control parameter combination information set. The new iteration control parameter combination information set is (X)k,Yk) After updating the iteration point sequence, the current iteration combination sequence M is formedk. Then, the control parameter combination information sets are reordered based on the magnitude of the ITAE values of the iterative control parameter combination to form a group of sequences increasing according to the ITAE valuesWhereinAnd controlling the iterative control parameter combination with the optimal control performance (taking the minimal value problem as an example) in the parameter combination sequence for the current iteration point. And writing the set of iteration control parameter combination information into a relative optimality sequenceWherein newly added points of the current optimal sequenceIs that
S62: a smooth trajectory is generated or updated. Taking n +1 as the calculation base number of the sliding track, λ is the sliding smoothing coefficient (taking the integer 1,2 …), and the sliding window size is λ (n + 1). The calculation rule of the sliding trajectory is as follows (7).
Smoothing the relative optimality sequence by adopting the calculation rule to generate a sliding track
S63: a termination trace is generated or updated. In the sliding trackBased on the obtained data, further calculating the termination trajectory by moving averageThe calculation rule is as follows (8).
Wherein η is the slip termination coefficient.
S64: a sequence of difference values and a termination factor are generated or updated. According to the termination trackThe difference sequence delta Y can be obtainedTThe sequence characterizes the target value growth trend at different iterative control parameter combinations. Sequence of differences DeltaYTThe production rule of (2) is as follows (9).
Calculating to obtain the termination factor of the optimized process based on the difference sequence and the termination trackThe mathematical meaning of this factor is the ratio of the improvement of the current iteration control parameter combination point relative to the ITAE value of the current iteration point, reflecting the relative progress of the optimization process the greater ξ indicates the greater the improvement at the current iteration control parameter combination point, and conversely, the lesser the improvement at that point, the lower threshold ξ of this factorΓThe mark system optimization approaches a stall.
S65: and (5) judging the termination of the optimization process.When ξ is less than ξΓWhen the condition is satisfied, κ is set from 0 to 1, then, in subsequent iteration batches, when the iteration control parameter combination again satisfies ξ < ξΓκ is incremented by 1, and if ξ > ξ occurs when κ ≠ 0ΓThe flag optimization process jumps out of the stall state and resets κ to 0 again. Only when k is equal to its lower threshold kFWhen the optimization process is satisfied, the termination condition may be considered. The iteration termination criterion condition is as follows (10).
(ξ<ξΓ)∩(κ=κF) (10)
S66, when the optimization process evaluation module judges that the optimization process is terminated, namely (ξ < 0.1) ∩ (kappa is 3), the optimization process control state flag psi is output to be 1, and the system outputs the optimal control parameter combination (X)*,Y*) The optimization system stops running; if the termination condition has not been met, the optimization system jumps to step S2 to continue the iterative execution.
In this embodiment, after 32 iteration experiments, the optimal process parameter combination found by the optimization system provided by the present invention is as follows: x0=[0.523,0.032,0.158]T. Namely, the proportionality coefficient is 0.523, the integral coefficient is 0.032, and the differential coefficient is 0.158.
While the invention has been particularly shown and described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (5)
1. A motor rotating speed control parameter optimization method based on improved SPSA is characterized in that: the method comprises the following steps:
s1, initializing, artificially giving the initial control parameter group and scaling the initial control parameter group, wherein the scaling is performed by a formula
Is carried out, wherein,For the initial control parameter combination, (X)t)L=inf(Xt) Is lower bound, (X)t)H=sup(Xt) To the upper bound, n is the number of optimized control parameters,setting initial values of relevant parameters needed by an optimization process and an evaluation process, specifically, assigning the parameters { a, A, c, α, gamma } of the improved SPSA method, setting an iterative operator s of the improved SPSA to be 1, setting the relevant parameters of the evaluation process, setting an initial value k of a termination state coefficient to be 0, and setting a lower limit threshold k to be 1FLower threshold value ξ for termination factorΓA slip smoothing coefficient λ, a slip termination coefficient η;
s2, optimizing the process, and giving out a new iteration control parameter combination to be tested and scaled according to the improved SPSA method, wherein the method comprises the following specific steps:
s21, algorithm gain updatings=a/(A+s)α,cs=c/sγ;
S22, perturbation vector generation, generating an n-dimensional random vector, namely perturbation vector delta through Monte Carlo modesWherein each dimension of the vector is randomly generated by Bernoulli + -1 distribution, wherein the probabilities of generating +1, -1 are all 0.5;
s23, forward perturbation point generation:let k be k + 1; the ITAE value under the corresponding control parameter is obtained through experiments
S24, reverse perturbation point generation:let k be k + 1; the ITAE value under the corresponding control parameter is obtained through experiments
S25, approximating the gradient by estimating the point of perturbationApproximate gradient at a pointBecause there is a constraint on the optimization operation interval, the gradient estimation formula is modified as follows:
s26, searching the combination point of the iteration control parameter, namely, approximating the next iteration point by using the difference value of the approximate gradient and the optimal solution of the iteration, and searching the combination point of the iteration control parameter according to a formulaCalculating; let k be k +1 and s be s + 1;
s3, preprocessing the scaled iteration control parameter combination into an actual feasible iteration control parameter combination;
s4, an experimental test process, namely, transmitting the practical feasible iterative control parameter combination to the control system of the motor, enabling the motor to operate under the control parameter combination, and acquiring from the initial time t by the control system0From the start to the test termination time tfThe actual rotational speed in between, form a rotational speed sequence, wherein at time t0The rotational speed is zero at time tfThe rotation speed is a target set value vsp;
S5, post-processing according to the formula of the actual rotating speedCalculating its ITAE index to evaluate controllability of motorCan, wherein, tiE (i) is the deviation of the actual rotating speed and the set rotating speed at the sampling moment, and the combination of the actual feasible iteration control parameters is scaled;
s6, in the evaluation process, according to the actual feasible iterative control parameter combination and the ITAE value corresponding to the actual feasible iterative control parameter combination, a relative optimality sequence is calculated according to historical information, according to the track characteristics of the sequence, whether the actual feasible iterative control parameter combination meets optimality or not is evaluated in real time, if the actual feasible iterative control parameter combination meets the optimality, the optimal control parameter combination is output, and if not, the operation is switched to S2 for iteration; the specific steps of S6 are as follows:
s61, generating or updating a relative optimality sequence: let the iterative control parameter combination sequence of the previous batch be Mk-1={(X1,Y1),(X2,Y2),…(Xk-1,Yk-1) In which X isiFor a practically feasible iterative control parameter combination, YiFor the ITAE calculation value under the control parameter combination, (X)i,Yi) Forming an iteration control parameter combination information set; the new iteration control parameter combination information set is (X)k,Yk) After updating the iteration point sequence, the current iteration combination sequence M is formedk(ii) a Then, the control parameter combination information sets are reordered based on the size of the iterative control parameter combination ITAE to form a group of sequences increasing according to the ITAE valueWhereinThe iteration control parameter combination with the optimal ITAE value in the current iteration point control parameter combination sequence is obtained; and writing the set of iteration control parameter combination information into a relative optimality sequenceWherein newly added points of the current optimal sequenceIs that
S62, generating or updating a smoothed trajectory: taking n +1 as the calculation base number of the sliding track, and λ as a sliding smoothing coefficient, where λ is an integer 1,2 … n, and the size of the sliding window is λ (n +1), the calculation rule formed by the sliding track is as follows:
smoothing the relative optimality sequence by adopting the calculation rule to generate a sliding track
And S63, generating or updating an ending track: in the sliding trackBased on the obtained data, further calculating the termination trajectory by moving averageThe calculation rule is as follows:
wherein η is the slip termination coefficient;
s64, generating or updating the difference sequence and the termination factor: according to the termination trackThe difference sequence delta Y can be obtainedTThe sequence characterizing the target value growth trend at different iterative control parameter combinations, the sequence of differences DeltaYTThe generation rule of (1) is as follows:
calculating to obtain the termination factor of the optimized process based on the difference sequence and the termination trackThe mathematical meaning of the factor is that the ratio of the improvement of the current iteration control parameter combination point to the ITAE value of the current iteration point reflects the relative progress of the optimization process, the larger ξ indicates the greater the improvement at the current iteration control parameter combination point, and conversely, the smaller the improvement at the point, the lower threshold ξ of the factorΓFlagging the system optimization as approaching a standstill;
s65, judging whether the optimization process is terminated when ξ<ξΓWhen the condition is satisfied, κ is set from 0 to 1, and then, in the subsequent iteration batch, ξ is satisfied again when the iteration control parameter combination is satisfied<ξΓκ is incremented by 1, and if ξ occurs when κ ≠ 0>ξΓThe flag optimization process jumps out of the stall state, resets κ to 0, and only if κ equals its lower threshold κFWhen the optimization process is considered to satisfy the termination condition, the iteration termination criterion condition is (ξ)<ξΓ)∩(κ=κF);
S66, when the optimization process is terminated, outputting the control state flag psi of the optimization process to 1, and outputting the optimal control parameter combination (X) by the system*,Y*) (ii) a If the termination condition is not satisfied, the process goes to S2 to continue the iterative process.
2. The method as claimed in claim 1, wherein the parameter { a, c, α, γ } is { α ═ 0.602, γ ═ 0.101, a ═ 50, a ═ 30, c ═ 8}, and the lower threshold value κ is set asF3, lower threshold of termination factor ξΓThe slip smoothing factor λ is 0.05, and the slip end factor η is 1.
3. The improved SPSA-based motor speed control parameter optimization method of claim 1, wherein: the specific steps of S3 are:
s31, according toAnd the corresponding iteration control parameter combination is restored to the actual iteration control parameter, wherein,combining the restored iteration control parameters;each dimension of (1) represents and representsCorresponding actual physical parameters;
s32, ifThe actual feasible iterative control parameterOtherwise, selecting a distance satisfying the feasible regionHas the closest Euclidean distanceTo replaceAnd make the iterative control parameter practicalRules for choosing approximate feasible points such asWherein the content of the first and second substances,is a point in space toΦ is the solution set that satisfies the minimum euclidean distance.
4. The improved SPSA-based motor speed control parameter optimization method of claim 1, wherein: the control parameters include a proportional coefficient P, an integral coefficient I, and a differential coefficient D.
5. The utility model provides a motor speed control parameter optimization system based on improved generation SPSA which characterized in that: the motor rotating speed control parameter optimization system comprises an initialization module, an optimization module, a pretreatment module, an experiment test module, a post-processing module and an evaluation module,
the initialization module is used for receiving an initial control parameter combination and upper and lower limits of each control parameter provided by an engineer or an operator, scaling the initial control parameter combination, and setting related parameters of the optimization module and the evaluation module, wherein the scaling is realized by a formula
The method comprises the steps of (a) carrying out, wherein,for the initial control parameter combination, (X)t)L=inf(Xt) Is lower bound, (X)t)H=sup(Xt) To the upper bound, n is the number of optimized control parameters,indicating the ith control parameterSetting initial value of number t 1,2, …, n, setting initial values of relevant parameters needed by optimization process and evaluation process, concretely, assigning values to parameters { a, A, c, α, gamma } of improved SPSA method, setting iterative operator s of improved SPSA 1, setting relevant parameters of evaluation process, setting initial value of termination state coefficient k 0, lower limit threshold k 0FLower threshold value ξ for termination factorΓA slip smoothing coefficient λ, a slip termination coefficient η;
the optimization module is used for receiving the scaled control parameter combination, searching and giving a new iteration control parameter combination to be tested and scaled according to the improved SPSA method, and comprises the following specific steps:
algorithm gain update as=a/(A+s)α,cs=c/sγ;
Perturbation vector generation, namely generating an n-dimensional random vector, namely perturbation vector delta in a Monte Carlo modesWherein each dimension of the vector is randomly generated by Bernoulli + -1 distribution, wherein the probabilities of generating +1, -1 are all 0.5;
forward perturbation point generation:let k be k + 1; the ITAE value under the corresponding control parameter is obtained through experiments
Reverse perturbation point generation:let k be k + 1; the ITAE value under the corresponding control parameter is obtained through experiments
Gradient approximation, namely estimating at the perturbation pointApproximation at pointsGradient of gradientBecause there is a constraint on the optimization operation interval, the gradient estimation formula is modified as follows:
searching the combination point of the iteration control parameter, namely, approximating the next iteration point by using the difference value of the approximate gradient and the iterative optimal solution, wherein the combination point of the iteration control parameter is according to a formulaCalculating; let k be k +1 and s be s + 1;
the preprocessing module is used for preprocessing the scaled iteration control parameter combination into an actual feasible iteration control parameter combination;
the experimental test module is used for transmitting the practical feasible iterative control parameter combination to the control system of the motor, enabling the motor to operate under the control parameter combination, and the control system collects the control parameter combination from the initial time t0From the start to the test termination time tfActual rotational speeds in between, forming a rotational speed sequence and sending it to the post-processing module, wherein at time t0The rotational speed is zero at time tfThe rotation speed is a target set value vsp;
The post-processing module is used for calculating the actual rotating speed according to a formulaCalculating its ITAE index to evaluate the control performance of the motor, wherein tiE (i) is the deviation of the actual rotating speed and the set rotating speed at the sampling moment, and the combination of the actual feasible iteration control parameters is scaled;
the evaluation module is used for calculating a relative optimality sequence according to the actual feasible iterative control parameter combination and the ITAE value corresponding to the actual feasible iterative control parameter combination and the historical information, evaluating whether the actual feasible iterative control parameter combination meets optimality in real time according to the track characteristics of the sequence, outputting the optimal control parameter combination if the actual feasible iterative control parameter combination meets the optimality, and otherwise, switching to the optimization module for iteration, wherein the specific steps are as follows:
generating or updating a relative optimality sequence: let the iterative control parameter combination sequence of the previous batch be Mk-1={(X1,Y1),(X2,Y2),…(Xk-1,Yk-1) In which X isiFor a practically feasible iterative control parameter combination, YiFor the ITAE calculation value under the control parameter combination, (X)i,Yi) Forming an iteration control parameter combination information set; the new iteration control parameter combination information set is (X)k,Yk) After updating the iteration point sequence, the current iteration combination sequence M is formedk(ii) a Then, the control parameter combination information sets are reordered based on the size of the iterative control parameter combination ITAE to form a group of sequences increasing according to the ITAE valueWhereinThe iteration control parameter combination with the optimal ITAE value (taking a minimal value problem as an example) in the current iteration point control parameter combination sequence is obtained; and writing the set of iteration control parameter combination information into a relative optimality sequenceWherein newly added points of the current optimal sequenceIs that
Generating or updating a smoothed trajectory: taking n +1 as the calculation base number of the sliding track, and λ as a sliding smoothing coefficient, where λ is an integer 1,2 … n, and the size of the sliding window is λ (n +1), the calculation rule formed by the sliding track is as follows:
smoothing the relative optimality sequence by adopting the calculation rule to generate a sliding track
Generating or updating termination traces: in the sliding trackBased on the obtained data, further calculating the termination trajectory by moving averageThe calculation rule is as follows:
wherein η is the slip termination coefficient;
generating or updating a sequence of difference values and a termination factor: according to the termination trackThe difference sequence delta Y can be obtainedTThe sequence characterizing the target value growth trend at different iterative control parameter combinations, the sequence of differences DeltaYTThe generation rule of (1) is as follows:
calculating to obtain the termination factor of the optimized process based on the difference sequence and the termination trackThe mathematical meaning of the factor is the improvement phase of the current iteration control parameter combination pointThe ratio of the ITAE values for the current iteration point reflects the relative progress of the optimization process, with a greater ξ indicating a greater degree of improvement at the current iteration control parameter combination point and conversely a lesser degree of improvement at that point, the lower threshold ξ for that factorΓFlagging the system optimization as approaching a standstill;
the optimization process terminates when ξ<ξΓWhen the condition is satisfied, κ is set from 0 to 1, and then, in the subsequent iteration batch, ξ is satisfied again when the iteration control parameter combination is satisfied<ξΓκ is incremented by 1, and if ξ occurs when κ ≠ 0>ξΓThe flag optimization process jumps out of the stall state, resets κ to 0, and only if κ equals its lower threshold κFWhen the optimization process is considered to satisfy the termination condition, the iteration termination criterion condition is (ξ)<ξΓ)∩(κ=κF);
When the optimization process is terminated, the control state flag psi of the output optimization process is 1, and the system outputs the optimal control parameter combination (X)*,Y*) (ii) a And if the termination condition is not met, jumping to the optimization module to continue the iterative execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810482096.8A CN108540029B (en) | 2018-05-18 | 2018-05-18 | Motor rotating speed control parameter optimization method and system based on improved SPSA |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810482096.8A CN108540029B (en) | 2018-05-18 | 2018-05-18 | Motor rotating speed control parameter optimization method and system based on improved SPSA |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108540029A CN108540029A (en) | 2018-09-14 |
CN108540029B true CN108540029B (en) | 2020-06-16 |
Family
ID=63472247
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810482096.8A Active CN108540029B (en) | 2018-05-18 | 2018-05-18 | Motor rotating speed control parameter optimization method and system based on improved SPSA |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108540029B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102101352A (en) * | 2010-12-22 | 2011-06-22 | 浙江大学 | Model-free weight controlling method for injection molding product |
-
2018
- 2018-05-18 CN CN201810482096.8A patent/CN108540029B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102101352A (en) * | 2010-12-22 | 2011-06-22 | 浙江大学 | Model-free weight controlling method for injection molding product |
Non-Patent Citations (2)
Title |
---|
SPSA-based PID parameters optimization for a dual-tank liquid-level control system;xiangsong kong等;《2016 IEEE International Conference on Industrial Engineering and Engineering Management (IEEM)》;20161229;第1463-1467页 * |
快速、低成本间歇过程无模型优化方法研究;孔祥松;《中国博士学位论文全文数据库(电子期刊)•工程科技Ⅰ辑》;20120715(第07期);论文第34-38、43-44、109-119页 * |
Also Published As
Publication number | Publication date |
---|---|
CN108540029A (en) | 2018-09-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6774637B2 (en) | Control device and control method | |
Gu et al. | Continuous deep q-learning with model-based acceleration | |
CN107272403A (en) | A kind of PID controller parameter setting algorithm based on improvement particle cluster algorithm | |
CN111106772B (en) | Induction motor state strong tracking filtering estimation method including parameter tracking | |
CN105700353A (en) | A PID controller parameter optimal setting method based on a differential evolution method | |
CN105807607A (en) | Method for optimizing predictive fuzzy-PID coking furnace temperature control through genetic algorithm | |
CN109254530A (en) | MFA control method based on grinding process basis circuit | |
Lawrence et al. | Optimal pid and antiwindup control design as a reinforcement learning problem | |
Pazis et al. | Binary action search for learning continuous-action control policies | |
CN112564557B (en) | Control method, device and equipment of permanent magnet synchronous motor and storage medium | |
CN117097227B (en) | Speed regulation control method and related device for motor | |
CN108540029B (en) | Motor rotating speed control parameter optimization method and system based on improved SPSA | |
CN111240201B (en) | Disturbance suppression control method | |
Jalilvand et al. | Advanced particle swarm optimization-based PID controller parameters tuning | |
Liu et al. | Online expectation maximization for reinforcement learning in POMDPs | |
CN110932629A (en) | Inertia estimation method based on single neuron network and self-adaptive adjustment strategy thereof | |
JP7115654B1 (en) | Control device, control method and program | |
CN110442027A (en) | A kind of gap multi-model weighting function methods of self-tuning | |
CN108710289B (en) | Relay base quality optimization method based on improved SPSA | |
Wang et al. | An adaptive gradient method with differentiation element in deep neural networks | |
Su et al. | Supervisory enhanced genetic algorithm controller design and its application to decoupling induction motor drive | |
Omizegba et al. | Fuzzy logic controller parameter tuning using particle swarm algorithm | |
He et al. | Decoupling Meta-Reinforcement Learning with Gaussian Task Contexts and Skills | |
CN109491349B (en) | Batch running track and space adjusting method applied to continuous stirring reaction kettle | |
Zhang et al. | A novel iterative learning control strategy based on hybrid genetic particle swarm optimization algorithm for batch processes |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |