Disclosure of Invention
The invention aims to provide a vehicle following optimization control method based on fuzzy reasoning, and solves the problem that vehicle following research in the prior art is easily interfered by noise.
The invention relates to a vehicle following optimization control method based on fuzzy reasoning, which is characterized by comprising the following steps:
step 1, screening road data of vehicle running to obtain vehicle following data in vehicle track data;
step 2, calculating the distance between the vehicle following data obtained in the step 1 through a sum of squared deviations formula, taking the calculation result as the similarity of a condensed hierarchical clustering algorithm, continuously merging the vehicle following data by taking the minimum similarity as a basis, and finally dividing the vehicle following data into a plurality of clusters; merging the clustered data into a cluster class through a hierarchical clustering algorithm to form a tree-shaped layer hierarchical structure, and setting a similarity threshold value theta as a clustering division basis of the car following data to enable a clustering result of the car following data division to be optimal;
step 3, obtaining a car following data clustering division result by utilizing the step 2, defining a fuzzy rule to enable the divided clusters to be fuzzy sets of input quantity, obtaining the central point of each cluster by adding and averaging car following data in each divided cluster, calculating the membership degree of the input quantity of each fuzzy set by utilizing an FCM algorithm, and constructing E(l)Measuring the value of the membership degree of the data and further setting the confidence degree bel(l);
Step 4, firstly, solving the weight value multiplied by the membership degree by using the fuzzy set defined in the step 3 and the calculated membership degree; then, improving the central value of the fuzzy set taking the clustering classification as the input quantity by using the trust degree set in the step 3; thirdly, calculating the confidence of the rule; and finally, a central average de-ambiguity method is used, so that the efficiency and reliability of the optimization solution are improved.
The present invention is also characterized in that,
the step 1 is implemented according to the following steps:
finding out vehicle following data according to a key field in the road data of the running vehicle, and further screening the vehicle following data according to a custom rule, wherein the custom rule is as follows: only the following behaviors among vehicles of the same type are researched, the data of the vehicles changing lanes in the driving process and the data of the vehicles on the lanes of multiple passengers are removed, and the data with the following time exceeding 45s are reserved to ensure the integrity of the following process, so that the data of the following of the vehicles are obtained.
The step 2 is implemented according to the following steps:
step 2.1, distance calculation:
the degree of dispersion between the vehicle-following data is represented by the sum of squared deviations, SrThe formula is as follows:
in the formula (x)
iTo process the vehicle-following data in the r-th cluster class through screening,
for the centre of gravity, n, of clusters obtained after clustering of vehicle-following data
rIs the number of cluster data, r belongs to n
rI is the index of the ith cluster class, i belongs to n
r;
Let d (c)r,cs) For cluster class c obtained after clusteringrAnd adjacent cluster class csSimilarity of (2) as cluster class crAnd adjacent cluster class crThe distance is close, the cluster distance can be calculated through the sum of squared deviations, and the calculation result is used as the hierarchical clustering calculation of the agglomerationSimilarity of method, vehicle following data merging according to the principle of minimum similarity, calculating formula d (c) of cluster inter-class distancer,cs) The following were used:
d(cr,cs)=(Sw-Sr-Ss)1/2
in the formula SwRepresents a cluster class crAnd adjacent cluster class csSum of squared deviations, S, of the merged clustersrRepresents a cluster class crSum of squared deviations of, SsIndicating neighboring cluster class csThe sum of squared deviations of;
step 2.2, hierarchical clustering:
step 2.2.1, during initial calculation, regarding each car-following data as a single-element cluster, calculating the distance between the car-following data by using a distance calculation formula, and storing the calculation result as the similarity of the cohesive hierarchical clustering algorithm in a similarity matrix D ═ D (c)i,cj)]Performing the following steps;
wherein, ciFor a single-element cluster with sequence number i in vehicle-following data, cjThe method comprises the steps of obtaining adjacent element clusters with sequence number j in vehicle-following data;
setting the level l (m) of the preliminary clustering to 0, i.e., l (m) is 0;
wherein m represents the number of layers of the cluster;
step 2.2.2, two single element cluster classes with the closest similarity in the car following data are found by comparing the distance values stored in the similarity matrix in the step 2.2.1;
step 2.2.3, accumulating the clustering levels of the vehicle following data, merging the two single element clusters with the closest similarity found in the step 2.2.2, thereby generating a new multi-element cluster, and at the moment, determining the clustering class c of the levelrAnd adjacent cluster class csAt position D [ c ] in the matrixr,cs]So that the hierarchy L (m) of this clustering is D [ c ]r,cs];
Wherein (c)r,cs) Serial number for new cluster formation; if the initial single-element cluster class in the similarity matrix is completely replaced, merging the multi-element clustersClass;
step 2.2.4, updating the similarity matrix D and deleting the cluster class crAnd adjacent cluster class csAdding the value of the corresponding position of the newly generated cluster to the similarity matrix D at the corresponding position of the matrix;
step 2.2.5, if the termination condition is met, stopping clustering, otherwise, turning to the step 2.2.2;
wherein the termination condition is as follows: all vehicle-following data are merged into a cluster class;
step 2.3, carrying out hierarchical clustering on the vehicle following data through the step 2.2 to construct a tree map hierarchical structure, wherein the horizontal axis in the tree map hierarchical structure represents the serial number of the data, the vertical axis represents the distance between the data, and the original data is positioned at the lowest layer of the tree;
and 2.4, setting the threshold theta to be 0.2 times of the maximum value of the similarity by using the Barledo law, and ensuring that the number of the car-following data division clusters is proper so as to reduce the operation time and have higher reliability.
Step 3 is specifically implemented according to the following steps:
step 3.1, defining fuzzy rules:
clustering the cluster class divided by the vehicle-following data clustering in the step 2 as n input single output sample data T { (x)(p);y(p)) 1,2, …, N, where each sample data corresponds to a rule;
wherein N is the number of the divided cluster classes, N is the number of input data in a group of cluster classes, and x
(p)Input data for the pth cluster class and
y
(p)representing the corresponding output data;
the extracted IF-THEN rule is expressed as:
IF x
i1 is
and...and x
im is
and THEM y is B
(l)
wherein,
clustering classified clusters for vehicle-following data clustering as input-quantity fuzzy sets, B
(l)A fuzzy set of output quantities y on a rule sequence number l, l ═ 1, 2.. M denotes the sequence number of the rule, M denotes the total number of the rule, (
i 1.. im) is a subsequence of (1.. n), and M ≦ n;
step 3.2, calculating the membership degree by an FCM algorithm:
calculating membership degree mu by using FCM algorithmij (l)The formula is as follows:
in the formula (d)ijRepresenting vehicle following data xjDistance to center point of cluster i after hierarchical clustering, dkjRepresenting vehicle following data xjDistance, x, to the center point of cluster k after hierarchical clusteringjThe method comprises the steps of obtaining vehicle following data, wherein N is the number of clusters after hierarchical clustering, i is the cluster after ith hierarchical clustering, k is the cluster after kth group hierarchical clustering, j is a vehicle following data index, and l is a current rule serial number index;
dividing the car-following data into corresponding cluster classes by utilizing hierarchical clustering, and calculating the membership degree of the car-following data to the center distance of each divided cluster class if
Indicating that there is a risk of collision if
Indicating that the rear-end collision and the following state are separated, and indicating that the automobile is in a safe and stable driving environment at present;
step 3.3, calculating the measurement value:
let E(l)Measuring vehicle following data xjDegree of membership mu ofijAccording to the definition of entropy, calculating a value formula E for measuring the degree of membership of the following data(l)The following were used:
wherein c is the number of clusters after hierarchical clustering, x
jFor the vehicle-following data,
for vehicle-following data x
jI is the index of the ith cluster class, and j is the index of the car following data;
step 3.4, setting the trust:
using the medium membership value E of step 3.3(l)Setting vehicle following data xjHas a confidence level of bej(l)Degree of trust bej(l)The calculation formula is as follows:
in the formula, N represents the total number of car-following data samples.
Step 4 is specifically implemented according to the following steps:
step 4.1, if the termination condition is met
No rule is generated and the method terminates; otherwise, the weight multiplied by the membership is solved by using the fuzzy set defined in the step 3 and the calculated membership, and the formula is as follows:
in the formula, A
ijObtaining cluster classes for vehicle following data hierarchical clustering, wherein each cluster class corresponds to a fuzzy set of input quantity respectively,
representative of following data
Inputting membership values of the fuzzy sets at p;
each cluster obtained after hierarchical clustering of the vehicle following data is subjected to membership calculation to obtain a weight multiplied by the membership, the weight is further substituted into the step 2.2.4, the similarity matrix is updated, and the similarity of newly generated clusters and other clusters in the similarity matrix is calculated to further accelerate the hierarchical clustering speed;
4.2, aiming at the rules defined in the step 3, taking the cluster of the vehicle following data classification as an input fuzzy set, wherein each input quantity corresponds to one rule, generating a fuzzy rule, and if the rules have the same repeated rules as the former rules, merging the extracted rules;
let the central value in each rule sequence number l be
Improving the central value by using the confidence of the input fuzzy set samples and the confidence among the input fuzzy set samples, and obtaining the improved central value
The calculation formula is as follows:
in the formula, doc(i)To input fuzzy set sample confidence, bel(l)Inputting the confidence among the fuzzy set samples, wherein N is the number of samples taking a cluster differentiated by vehicle following data as an input fuzzy set, and l is the index of the current rule sequence number;
step 4.3, fuzzy rule generation is as follows:
IF x
i1 is
and…and x
im is
THEN y is B
(l)
wherein, B
(l)Is a Gaussian distribution membership function
Fuzzy sets of (1), Gaussian distribution membership functions
Middle parameter sigma
(l)The calculation is as follows:
in the formula, y
(l)Is the rule center value with rule serial number l,
is the central value, u, of the sequence number of the input fuzzy set with rule sequence number l
(l)M membership products of clusters are obtained for hierarchical clustering of vehicle-following data,
is the membership product of the order numbers of the input fuzzy sets with rule order number l,
expressing the index corresponding to the kth data of the output fuzzy set data with the rule sequence number of l; a. the
ijFor vehicle following data hierarchyClustering to obtain cluster classes, wherein m represents the number of output fuzzy sets of the rule l;
calculating confidence doc of rule(l)The following were used:
in the formula,
is the center value of the sequence number of the output fuzzy set with rule sequence number l,
the central value of the serial number of the input fuzzy set with the rule serial number of l, k is the kth output model, and t is the tth input model;
calculating the confidence of the rules to evaluate the reasonability degree of the rules, and showing that no conflict exists between the merged rules;
4.4, obtaining a prediction model by using a central average de-blurring method;
let the activation degree with rule number l be act (l), the activation degree act (l) is as follows:
in the formula,
for fuzzy sets A with rule sequence number l
ijDegree of membership of;
and (3) setting the construction prediction formula of each regular center point and the prediction point as f (x), wherein the prediction formula f (x) is as follows:
in the formula,
is the rule center with rule serial number l, M is the rule number;
by calculating the central value of each rule
Describing rule center points by using activation function act (l)
And (3) calculating each generated new rule by using a prediction formula f (x) according to the relation with the current car following data x', finally obtaining a predicted following data result of the following car at the next moment, adjusting the current running speed by a driver according to the predicted data of the vehicle at the next moment, immediately decelerating the car if the rear-end collision of the car is predicted, and keeping the car following by the driver if the predicted data is always in a safe and stable state.
The invention has the beneficial effect that the vehicle following optimization control method based on the fuzzy reasoning firstly carries out fuzzy interval division on input and output variables. Compared with the WM algorithm which needs to artificially set fuzzy intervals of input and output variables, the method can better avoid the incompleteness of the generated fuzzy rule base caused by the intuitive influence of interval division on the extraction of the fuzzy rule. Aiming at the defect of poor robustness of the WM algorithm, the invention introduces information entropy and trust degree to weight data. When the vehicle follows the noisy data, the rule with low credibility and even error is easy to extract. Therefore, when data are preprocessed, the data are screened according to the car following characteristic and the reaction time of a driver. And analyzing the following behavior of the driver and determining the input and output variables of the following model. Due to the lack of higher robustness of the WM method, the invention provides a confidence formula in the HC _ WM algorithm to represent the confidence value that a sample belongs to a real data set. In addition, in the process of extracting the fuzzy rule, the trust degree is added into a calculation formula of the output quantity of the central point of the rule, so that the robustness of the WM method is improved.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
The problems existing in the traditional WM method are improved and optimized. The traditional WM method needs the following 3 steps to directly extract the fuzzy rule from the sample.
Step 1, rule extraction
Step 1.1, set input quantity x ═ x
1,...x
n) And input the quantity x
iIs divided into m
iThe complete fuzzy rule numbers are common in the fuzzy sets
And (3) strips.
Step 1.2, data-rule conversion
Step 1.2.1, p ═ 1, data (x)
(p),y
(p)) Each input quantity of
Conversion into fuzzy sets
And is computed in the fuzzy set
The corresponding membership degree of the formula is as follows:
step 1.2.2, input quantity per item
Possibly mapped to a plurality of fuzzy sets, with the fuzzy set having the greatest membership
As an input quantity
From the fuzzy set of (x) data
(p),y
(p)) The extracted fuzzy rule is as follows:
if x
1 is
and...and x
n is
Then y is y
(i)
step 1.2.3, calculate data (x)(p),y(p)) The formula corresponding to the weight of the fuzzy rule is as follows:
step 1.2.4, if i is equal to K, the rule extraction of all data is completed, and the rule extraction is finished; otherwise, i is i +1, and go to step 1.2.2 to continue extracting the rule.
Step 2, rule merging
Step 2.1, the fuzzy rules with the same former parts are divided into a group, the group is M in total, the first group comprises NlA rule; and combining the values of the back-part y of the rule to obtain a set Bl。
Step 2.2, utilizing trigonometric membership functions
Constructing corresponding membership degrees on the domain of discourse and calculating yc
lThe center point, the formula is as follows:
step 2.3, calculate σlThe formula is as follows:
and 2.4, after the rules are combined, each group corresponds to one fuzzy rule, and the fuzzy rules are as follows:
if x
1 is
and...and x
n is
then y is B
l.
calculating confidence doc of the merged rulelThe formula is as follows:
step 3, rule inference
Step 3.1, find the largest number of such neighbors in the set of extrapolation rules, and call this set max-group. Each rule in max-group is calculated, the formula is as follows:
b is the number of neighbors possessed by the rule to be pushed from the rule generated by the data; lrIs the index number of the adjacent rule; disrIs the distance between the input center of the rule and its neighboring rules.
And 3.2, generating by an extrapolation rule of max-group as:
if x
1 is
and...and x
n is
Then y is B
l.
wherein, B
lIs a fuzzy set of triangles with membership functions of
Wherein sigma
lThe specific calculation formula is shown as (2-15):
step 3.3, calculating the reliability of the extrapolation rule, wherein the formula is as follows:
and 3.3, repeating the step 3.1 and finding the next extrapolation rule.
Although the method for estimating the unknown rule by using the adjacent known rules can be improved, the specific process is shown in fig. 2, the number of the estimated rules still cannot meet the requirement of the actual situation, and the rule stock is incomplete. In addition, the conventional WM method uses a single sample data extraction rule, and once the sample data has noise, the WM algorithm is easily interfered by wrong sample data, so that the WM algorithm lacks high integrity and robustness. Therefore, in order to improve the integrity problem of the WM method, the present invention uses all sample data for calculating the output variables of the current rule and enhances the MW method based on hierarchical clustering.
The invention relates to a vehicle following optimization control method based on fuzzy inference, which is implemented according to the following steps:
as shown in fig. 3 and 4, step 1, screening road data on which a vehicle runs to obtain vehicle following data in vehicle track data;
the step 1 is implemented according to the following steps:
finding out vehicle following data according to a key field in the road data of the running vehicle, and further screening the vehicle following data according to a custom rule, wherein the custom rule is as follows: only the following behaviors among vehicles of the same type are researched, the data of the vehicles changing lanes in the driving process and the data of the vehicles on the lanes of multiple passengers are removed, and the data with the following time exceeding 45s are reserved to ensure the integrity of the following process, so that the data of the following of the vehicles are obtained.
Step 2, calculating the distance between the vehicle following data obtained in the step 1 through a sum of squared deviations formula, taking the calculation result as the similarity of a condensed hierarchical clustering algorithm, continuously merging the vehicle following data by taking the minimum similarity as a basis, and finally dividing the vehicle following data into a plurality of clusters; merging the clustered data into a cluster class through a hierarchical clustering algorithm to form a tree-shaped layer hierarchical structure, and setting a similarity threshold value theta as a clustering division basis of the car following data to enable a clustering result of the car following data division to be optimal;
the step 2 is implemented according to the following steps:
step 2.1, distance calculation:
the degree of dispersion between the vehicle-following data is represented by the sum of squared deviations, SrThe formula is as follows:
in the formula (x)
iTo process the vehicle-following data in the r-th cluster class through screening,
for the centre of gravity, n, of clusters obtained after clustering of vehicle-following data
rIs the number of cluster data, r belongs to n
rI is the index of the ith cluster class, i belongs to n
r;
Let d (c)r,cs) For cluster class c obtained after clusteringrAnd is adjacent toClusters csSimilarity of (2) as cluster class crAnd adjacent cluster class crThe distance between clusters is close, the cluster distance can be calculated through the sum of squared deviations, the calculation result is used as the similarity of the condensed hierarchical clustering algorithm, the vehicle following data are merged according to the minimum similarity principle, and a formula d (c) for calculating the distance between clusters is obtainedr,cs) The following were used:
d(cr,cs)=(Sw-Sr-Ss)1/2
in the formula SwRepresents a cluster class crAnd adjacent cluster class csSum of squared deviations, S, of the merged clustersrRepresents a cluster class crSum of squared deviations of, SsIndicating neighboring cluster class csThe sum of squared deviations of;
step 2.2, hierarchical clustering:
step 2.2.1, during initial calculation, regarding each car-following data as a single-element cluster, calculating the distance between the car-following data by using a distance calculation formula, and storing the calculation result as the similarity of the cohesive hierarchical clustering algorithm in a similarity matrix D ═ D (c)i,cj)]Performing the following steps;
wherein, ciFor a single-element cluster with sequence number i in vehicle-following data, cjThe method comprises the steps of obtaining adjacent element clusters with sequence number j in vehicle-following data;
setting the level l (m) of the preliminary clustering to 0, i.e., l (m) is 0;
wherein m represents the number of layers of the cluster;
step 2.2.2, two single element cluster classes with the closest similarity in the car following data are found by comparing the distance values stored in the similarity matrix in the step 2.2.1;
step 2.2.3, accumulating the clustering levels of the vehicle following data, merging the two single element clusters with the closest similarity found in the step 2.2.2, thereby generating a new multi-element cluster, and at the moment, determining the clustering class c of the levelrAnd adjacent cluster class csAt position D [ c ] in the matrixr,cs]So that the hierarchy L (m) of this clustering is D [ c ]r,cs];
Wherein (c)r,cs) Serial number for new cluster formation; if the initial single element cluster classes in the similarity matrix are completely replaced, combining the multiple element cluster classes;
step 2.2.4, updating the similarity matrix D and deleting the cluster class crAnd adjacent cluster class csAdding the value of the corresponding position of the newly generated cluster to the similarity matrix D at the corresponding position of the matrix;
step 2.2.5, if the termination condition is met, stopping clustering, otherwise, turning to the step 2.2.2;
wherein the termination condition is as follows: all vehicle-following data are merged into a cluster class;
step 2.3, carrying out hierarchical clustering on the vehicle following data through the step 2.2 to construct a tree map hierarchical structure, wherein the horizontal axis in the tree map hierarchical structure represents the serial number of the data, the vertical axis represents the distance between the data, and the original data is positioned at the lowest layer of the tree;
and 2.4, setting the threshold theta to be 0.2 times of the maximum value of the similarity by using the Barledo law, and ensuring that the number of the car-following data division clusters is proper so as to reduce the operation time and have higher reliability.
Step 3, obtaining a car following data clustering division result by utilizing the step 2, defining a fuzzy rule to enable the divided clusters to be fuzzy sets of input quantity, obtaining the central point of each cluster by adding and averaging car following data in each divided cluster, calculating the membership degree of the input quantity of each fuzzy set by utilizing an FCM algorithm, and constructing E(l)Measuring the value of the membership degree of the data and further setting the confidence degree bel(l);
Step 3 is specifically implemented according to the following steps:
step 3.1, defining fuzzy rules:
clustering the cluster class divided by the vehicle-following data clustering in the step 2 as n input single output sample data T { (x)(p);y(p)) 1,2, …, N, where each sample data corresponds to a rule;
wherein N is the number of the divided clusters, and N is a group of clustersNumber of input data, x
(p)Input data for the pth cluster class and
y
(p)representing the corresponding output data;
the extracted IF-THEN rule is expressed as:
IF x
i1 is
and…and x
im is
and THEM y is B
(l)
wherein,
clustering classified clusters for vehicle-following data clustering as input-quantity fuzzy sets, B
(l)A fuzzy set of output quantities y on rule indices l, l ═ 1, 2.. M denotes rule indices, M denotes the total number of rules, (i1, … im) is a subsequence of (1, … n), and M ≦ n;
in the invention, m is equal to n, namely, all the following data in the cluster classified by vehicle following data clustering are used as the precondition of the extracted IF-THEN rule, thereby improving the integrity of the WM method.
Step 3.2, calculating the membership degree by an FCM algorithm:
calculating membership degree mu by using FCM algorithmij (l)The formula is as follows:
in the formula (d)ijRepresenting vehicle following data xjDistance to center point of cluster i after hierarchical clustering, dkjRepresenting vehicle following data xjDistance, x, to the center point of cluster k after hierarchical clusteringjFor vehicle following data, N is the number of clusters after hierarchical clustering, i is the cluster after ith hierarchical clustering, and k is thek groups of hierarchically clustered clusters, j is a vehicle following data index, and l is a current rule sequence number index;
dividing the car-following data into corresponding cluster classes by utilizing hierarchical clustering, calculating the membership degree of the car-following data to the center distance of each divided cluster class, if mu ij (l)1, indicates that there is a risk of collision if μij (l)If the result is 0, the rear-end collision and following state is separated, which indicates that the current running environment is safe and stable, the FCM is adopted to calculate the membership degree, and the number of fuzzy sets of input and output quantity can greatly influence the accuracy of the extraction rule;
step 3.3, calculating the measurement value:
let E(l)Measuring vehicle following data xjDegree of membership mu ofijAccording to the definition of entropy, calculating a value formula E for measuring the degree of membership of the following data(l)The following were used:
wherein c is the number of clusters after hierarchical clustering, x
jFor the vehicle-following data,
for vehicle-following data x
jI is the index of the ith cluster class, and j is the index of the car following data;
step 3.4, setting the trust:
using the medium membership value E of step 3.3(l)Setting vehicle following data xjHas a confidence level of bej(l)Degree of trust bej(l)The calculation formula is as follows:
in the formula, N represents the total number of car-following data samples;
extracting vehicle heels in a WM algorithmWhen the data is driven, the problem that the extraction process is interfered due to the existence of noise exists, so that the confidence level is set for the data of the car-following sample. Confidence bej when sample data in the presence of noise is sampled(l)When calculating, bej(l)The larger the value, the higher the confidence of the noisy data, according to which feature bej is excluded(l)The large value data reduces the noise data in the data samples, so that a good rule set can be obtained during rule extraction, thereby enhancing the robustness of the WM algorithm.
By improving the membership degree and setting the corresponding trust degree to weight the car following data, the trust degree of predicting the rear-end collision or the safety state of the car in running through the membership degree is enhanced. The problem that the extraction process is interfered due to the existence of noise when the WM algorithm extracts the car following data is solved, and the robustness of the WM algorithm is enhanced.
Step 4, firstly, solving the weight value multiplied by the membership degree by using the fuzzy set defined in the step 3 and the calculated membership degree; then, improving the central value of the fuzzy set taking the clustering classification as the input quantity by using the trust degree set in the step 3; thirdly, calculating the confidence of the rule; and finally, a central average de-ambiguity method is used, so that the efficiency and reliability of the optimization solution are improved.
Step 4 is specifically implemented according to the following steps:
step 4.1, if the termination condition is met
No rule is generated and the method terminates; otherwise, the weight multiplied by the membership is solved by using the fuzzy set defined in the step 3 and the calculated membership, and the formula is as follows:
in the formula, A
ijObtaining cluster classes for vehicle following data hierarchical clustering, wherein each cluster class corresponds to a fuzzy set of input quantity respectively,
representative of following data
Inputting membership values of the fuzzy sets at p;
each cluster obtained after hierarchical clustering of the vehicle following data is subjected to membership calculation to obtain a weight multiplied by the membership, the weight is further substituted into the step 2.2.4, the similarity matrix is updated, and the similarity of newly generated clusters and other clusters in the similarity matrix is calculated to further accelerate the hierarchical clustering speed;
4.2, aiming at the rules defined in the step 3, taking the cluster of the vehicle following data classification as an input fuzzy set, wherein each input quantity corresponds to one rule, generating a fuzzy rule, and if the rules have the same repeated rules as the former rules, merging the extracted rules;
let the central value in each rule sequence number l be
Improving the central value by using the confidence of the input fuzzy set samples and the confidence among the input fuzzy set samples, and obtaining the improved central value
The calculation formula is as follows:
in the formula, doc(i)To input fuzzy set sample confidence, bel(l)Inputting the confidence among the fuzzy set samples, wherein N is the number of samples taking a cluster differentiated by vehicle following data as an input fuzzy set, and l is the index of the current rule sequence number;
the improved central value formula is used for solving the regular central value, confidence coefficient of input samples and confidence degree between samples are obtained by hierarchical clustering of vehicle following data, the central value formula obtained by using simply processed original data and corresponding to the weight of a fuzzy rule in the WM algorithm is replaced, and the confidence coefficient is increased for seeking the optimal solution.
Step 4.3, fuzzy rule generation is as follows:
IF x
i1 is
and…and x
im is
THEN y is B
(l)
wherein, B(l)Is a Gaussian distribution membership function muB(l)=μ(y·,y(l),σ(l)) Fuzzy set of (1), Gaussian distribution membership function muB(l)=μ(y·,y(l),σ(l)) Middle parameter sigma(l)The calculation is as follows:
in the formula, y
(l)Is the rule center value with rule serial number l,
is the central value, u, of the sequence number of the input fuzzy set with rule sequence number l
(l)M membership products of clusters are obtained for hierarchical clustering of vehicle-following data,
is the membership product of the order numbers of the input fuzzy sets with rule order number l,
expressing the index corresponding to the kth data of the output fuzzy set data with the rule sequence number of l; a. the
ijObtaining cluster classes for vehicle following data hierarchical clustering, wherein m represents the number of output fuzzy sets of a rule l;
calculating confidence doc of rule(l)The following were used:
in the formula,
is the center value of the sequence number of the output fuzzy set with rule sequence number l,
the central value of the serial number of the input fuzzy set with the rule serial number of l, k is the kth output model, and t is the tth input model;
calculating the confidence of the rules to evaluate the reasonability degree of the rules, and showing that no conflict exists between the merged rules;
4.4, obtaining a prediction model by using a central average de-blurring method;
let the activation degree with rule number l be act (l), the activation degree act (l) is as follows:
in the formula,
for fuzzy sets A with rule sequence number l
ijDegree of membership of;
and (3) setting the construction prediction formula of each regular center point and the prediction point as f (x), wherein the prediction formula f (x) is as follows:
in the formula,
is the rule center with rule serial number l, M is the rule number;
by calculating the central value of each rule
Describing rule center points by using activation function act (l)
And (3) calculating each generated new rule by using a prediction formula f (x) according to the relation with the current car following data x', finally obtaining a predicted following data result of the following car at the next moment, adjusting the current running speed by a driver according to the predicted data of the vehicle at the next moment, immediately decelerating the car if the rear-end collision of the car is predicted, and keeping the car following by the driver if the predicted data is always in a safe and stable state. By the method, the vehicle following data subjected to rule extraction processing is predicted, whether the following state is separated or the rear-end collision problem occurs in the driving process of the vehicle can be obtained in advance, and the obtained prediction result has high reliability and safety.
According to the method, the WM method is improved through hierarchical clustering, the performance of the car following fuzzy rule base is improved, and the effectiveness of the output result of the following data is guaranteed. According to the method, a vehicle-following optimization control method based on safety consideration is designed by establishing a vehicle-following model, the problems of separation and collision rear-end collision of the following state of the vehicle-following model are solved, and the safety and reliability of the vehicle-following model are ensured.