Gray System Theory and Its Application

灰色系统理论及其应用

For many practical problems in the objective world, their internal structures, parameters and characteristics are not fully understood by people. It is impossible for people to study their internal mechanisms as clearly as they study white box problems. They can only construct models based on certain thinking logic and inferences. . We call this kind of system in which part of the information is known and part of the information is unknown 灰色系统. The method introduced in this chapter starts from the intrinsic gray of the gray system, and studies how to analyze and solve practical problems in the case of a large amount of information that is lacking or disordered .

1. 灰色系统概论

While the objective world is constantly developing and changing, it often forms a whole through mutual constraints and interrelationships between things and factors, which we call a system. According to the different connotations of things, people have established engineering technology, social systems, economic systems, etc. People try to analyze some of the characteristics exposed by various systems, so as to figure out the internal operating mechanism of the system. From the point of view of the completeness of information and the construction of models, systems such as engineering technology have a relatively sufficient amount of information, their development and change rules are obvious, quantitative description is more convenient, and the structure and parameters are more specific .white system; For other types of systems such as social systems, agricultural systems, ecological systems, etc., people cannot establish objective physical prototypes, and their working principles are not clear, internal factors are difficult to identify or the relationship between them is hidden, and it is difficult for people to accurately understand this type of system Therefore, it is difficult to quantitatively describe its behavior characteristics, which brings difficulties in building models . A system whose internal properties are partially known is calledgray system. A system whose internal properties are all unknown is calledblack system

The important sign to distinguish the white system from the gray system is whether there is a definite relationship between the various factors in the system . In kinematics, the speed and acceleration of an object's motion are related to the external force it receives. The relationship can be clarified quantitatively by Newton's law. Therefore, the motion of an object is a white system.

Of course, white, gray, and black are relative to a certain level of understanding, so they are relative. A man went to his friend's house as a guest one day and found that his friend's dog hid in the corner of the house and shivered when a car came by. He was baffled by this. But to his friend, the behavior of the dog was understandable because he knew that the dog had been hit by a car not long ago. Apparently, with regard to the same "fearful behavior of dogs", the guests face ablack box, while the master faces agray box

As a practical matter, there are a lot of gray systems in the world, and there are very few absolute white or black systems. With the advancement of human cognition and the upgrading of requirements for mastering the real world, people's research on social and economic issues is often not satisfied with qualitative analysis. Despite the rapid development of modern science and technology, people's understanding of the natural world is still superficial. The production of food crops is an actual big problem related to people's food, but at the same time, it is an abstract gray system . Fertilizers, seeds, pesticides, weather, soil, labor, water conservancy, farming and policies are all factors that affect production, but it is difficult to determine the definite factors that affect production, and it is even more difficult to determine the quantitative relationship between these factors and grain output. People can only get the model according to some logical deduction under certain assumptions (often some experience and common sense). This model is not a "copy" of the theoretical understanding of food crop production issues, but can only be seen as a == "reflection" or "approximation" == of people's understanding of practical issues.

Societies, economies, agriculture, and ecosystems generally have non-negligible "noise" (ie, random disturbances). Existing research is often polluted by "noise". The theory of systems eroded by random disturbances is largely based on probability and statistics. Predict the development of things through statistical laws and probability distributions, and make decisions on the disposal of things. Most of the existing quantitative methods for system analysis are mathematical statistics methods such as regression analysis, variance analysis, principal component analysis, etc., and regression analysis is the most widely used method . However, regression analysis requires large samples, and quantitative rules can only be obtained through a large amount of data, which brings difficulties to the solution of many practical problems that cannot be obtained or lack of data for a while. Regression analysis also requires samples to have a good distribution, but many actual situations are not like this . For example, since the founding of the People's Republic of my country, there have been several ups and downs in the economy, and it is difficult to meet the requirements of a relatively regular distribution of samples. Therefore, it is not necessarily possible to obtain statistical laws with a large amount of data, and even if statistical laws are obtained, not all situations can be analyzed. In addition, regression analysis cannot analyze the dynamic correlation between factors, even if it is static, its accuracy is not high, and abnormal phenomena often appear.

gray system theoryA new analysis method—correlation degree analysis method is proposed, which measures the degree of correlation between factors according to the similarity or difference of the development trend between factors, which reveals the characteristics and degree of dynamic correlation of things . Since the development trend is taken as the foothold, there is no excessive requirement on the number of samples, and the typical distribution law is not required. The amount of calculation is so small that it can even be calculated by hand, and there will be no inconsistency between the quantitative results of the correlation degree and the qualitative analysis. . This method has been applied to agricultural economy, water conservancy, macroeconomics and other aspects, and has achieved good results. The main task of gray system theory modeling is to fully develop and utilize the explicit and implicit information in the few data based on the behavioral characteristic data of the specific gray system, and to find the mathematical relationship between factors or the factors themselves. The usual approach is to use a discrete model and build a model that is analyzed segment by segment over time . but,discrete modelWe can only do short-term analysis of the development of objective systems, and cannot meet the requirements of longer-term analysis, planning, and decision-making from now on . Although discrete approximate models of continuous systems are useful for many engineering applications, in some research areas it is often desirable to use differential equation models. In fact,differential equationThe system of describes the nature of the physical or chemical process inside the system that we wish to identify.

The gray system theory is firstly based on a new understanding of the objective system. Although the information of some systems is not sufficient, as a system, it must have specific functions and order, but its internal laws are not fully exposed. Some random quantities, random disturbance components, and random data columns are not considered elusive from the gray system point of view. On the contrary, the gray system theory regards the random quantity as a gray quantity that changes within a certain range, processes the original data in an appropriate way, transforms the gray number into a generated number, and then obtains the generated number with strong regularity from the generated number. function. For example, the data of some systems show exponential law after processing. This is because most systems are generalized energy systems, and the exponential law is a law of energy change. The quantitative basis of the gray system theory is the generated number, which breaks through the limitations of probability and statistics, so that the result is no longer an empirical statistical law obtained based on a large amount of data in the past, but a realistic generative law. This process of making gray systems as clear and distinct as possible is called whitening.

At present, gray system theory has been successfully applied in engineering control, economic management, futuristic research, ecological system and complex and changeable agricultural system, and has achieved gratifying achievements. Gray system theory is likely to analyze, model, predict, make decisions and control abstract systems such as society and economy, and it may become a new theoretical tool for people to understand objective systems and transform objective systems.

2. 关联分析

The objective things in the world are often complex and have many factors. We often need to analyze the factors of the system, which of these factors are the main ones for the system, which ones are secondary, which ones need to be developed, which ones need to be suppressed, which ones are potential, and which ones are obvious. Generally speaking, these are issues of great concern to us. In fact, the key and starting point of system analysis is how to correlate among factors and how to quantify the degree of correlation .

The basic method of factor analysis used to mainly adoptregression analysisAnd so on. As pointed out in the previous section, the method of regression analysis has many deficiencies, such as requiring a large amount of data, a large amount of calculation, and possible abnormal situations. In order to overcome the above drawbacks, this section uses the method of correlation analysis to do system analysis.

As a developing and changing system, correlation analysis is actually a quantitative comparative analysis of the dynamic process development situation. The so-called comparison of development situation refers to the comparison of the geometric relationship of the statistical data in each period of the system.
For example, see Table 1 for the total income of a certain region from 1977 to 1983 and the income from raising pigs and raising rabbits.
Table 1 Income data
insert image description here
According to Table 1, make graph 1.
insert image description here
Figure 1 Revenue data graph

It is easy to see from the above figure that the development trend of curve A and curve B is relatively close, but it is quite different from curve C. Therefore, it can be judged that the direct impact on the total income in this area is the pig industry, not the rabbit industry. Obviously, the closer the geometric shapes, the greater the degree of correlation. Of course, intuitive analysis is difficult for slightly more complicated problems. Therefore, it is necessary to provide a calculation method to measure the degree of correlation between factors.

2.1 Data Transformation Technology
In order to ensure the quality of modeling and the correct results of system analysis, data transformation and processing must be performed on the collected original data to make it dimensionless and comparable.
Definition 1 If there is no sequence insert image description here, then the mapping is called
insert image description here
the data transformation from sequence x to sequence y.
1) When
insert image description here
f is called an initialization transformation.
2) When
insert image description here
f is said to be a mean transformation.
3) When
insert image description here
called f is a percentage transformation.

4) When
insert image description here
is called f is a multiple transformation.
5) When
insert image description here
x0 is a value greater than zero, f is called normalization transformation.
6) When
insert image description here
f is called the range maximization transformation.
7) When
insert image description here
f is called an interval-valued transformation.
2.2 Correlation analysis
Definition 2 Select reference sequence
insert image description here

where k represents time. Assuming that there are m comparison series,
insert image description here
it is called
insert image description here
the correlation coefficient between comparison series xi and reference series x0 at time k, where ρ∈[0,1]
is the resolution coefficient. In the weighing formula,
insert image description herethey are two-level minimum difference and two-level maximum difference.
Generally speaking, the larger the resolution coefficient ρ, the larger the resolution; the smaller ρ, the smaller the resolution.
The correlation coefficient defined by formula (1) is an index to describe the degree of correlation between the comparison sequence and the reference sequence at a certain moment. Since there is a correlation number at each moment, the information is too scattered and not easy to compare. For this reason, we give the
definition 3 is called
insert image description here
the correlation degree of sequence xi to reference sequence x0.
From (2), it is easy to see that the correlation degree is to concentrate the correlation coefficients at each moment into an average value, that is, to centralize the over-dispersed information. Using the concept of correlation degree, we can conduct factor analysis on various issues. Consider the following questions.
Example 1 Through the follow-up investigation of a certain female shot put athlete, the time series data of her best performance and 16 special qualities and physical qualities were obtained from 1982 to 1986, as shown in Table 2, try the special achievements of this shot put athlete Perform factor analysis.
Table 2 Various achievement data
insert image description here
Before using formula (1) and formula (2) to calculate the degree of correlation, we need to initialize each sequence in table 2. Generally speaking, different series in practical problems often have different dimensions, and when we calculate the correlation coefficient, we require the same dimension. Therefore, various data need to be dimensionless first. In addition, for ease of comparison, all sequences are required to have a common point of intersection. In order to solve the above two problems, we transform the given sequence.
Definition 4 Given a sequence of numbers x=(x(1),x(2),…,下(n)), it is called the
insert image description here
initialization sequence of the original sequence X.
In this way, we can initialize the 17 numbers in Table 2. Note that for the first 15 series, as time increases, the increase in value means that the level of exercise has improved, while for the last 2 series, as time increases, the decrease in value (seconds) means movement level of progress. Therefore, when initializing the sequence 15x and 16x, the following formula is adopted to meet the
insert image description here
requirements of the problem. We naturally select the special scores of shot putters as the reference sequence, and substitute the initialization sequence of each sequence in Table 2 into (1) and (2) It is easy to calculate the correlation degree of each sequence as shown in the following table (here ρ=5.0).
insert image description here

clc,clear
load x.txt %把原始数据存放在纯文本文件 x.txt 中
for i=1:15
x(i,:)=x(i,:)/x(i,1); %标准化数据
end
for i=16:17
x(i,:)=x(i,1)./x(i,:); %标准化数据
end
data=x;
n=size(data,1);
ck=data(1,:);m1=size(ck,1);
bj=data(2:n,:);m2=size(bj,1);
for i=1:m1
for j=1:m2
t(j,:)=bj(j,:)-ck(i,:);
end
jc1=min(min(abs(t')));jc2=max(max(abs(t')));
rho=0.5;
ksi=(jc1+rho*jc2)./(abs(t)+rho*jc2);
rt=sum(ksi')/size(ksi,2);
r(i,:)=rt;
end
r
[rs,rind]=sort(r,'descend') %对关联度进行排序

It is easy to see from Table 3 that the first eight main factors affecting the shot put performance are full squat, 3kg slide, high clean, 4kg in situ, clean and jerk, standing long jump, 30m take-off, and 100m. Therefore, the practice of arranging these eight indicators should be considered emphatically in training. This can reduce the blindness of training and improve the training effect.
It should be pointed out that |)()(| 0 kxkx i− in formula (1) cannot distinguish whether the factor correlation is positive or negative, and the following methods can be adopted to solve this problem. Note
insert image description here

3.优势分析

insert image description here

insert image description here
insert image description here
insert image description here
insert image description here
According to the data in Table 4, use the following MATLAB program

clc,clear
load data.txt %把原始数据存放在纯文本文件 data.txt 中
n=size(data,1);
for i=1:n
data(i,:)=data(i,:)/data(i,1); %标准化数据
end
ck=data(6:n,:);m1=size(ck,1);
bj=data(1:5,:);m2=size(bj,1);
for i=1:m1
for j=1:m2
t(j,:)=bj(j,:)-ck(i,:);
end
jc1=min(min(abs(t')));jc2=max(max(abs(t')));
rho=0.5;
ksi=(jc1+rho*jc2)./(abs(t)+rho*jc2);
rt=sum(ksi')/size(ksi,2);
r(i,:)=rt;
end
r

Calculate the correlation degree of each child factor to the parent factor (here ρ=0.5), so that the correlation matrix is
insert image description here
insert image description here

4.生成树

insert image description here

insert image description here
insert image description here
insert image description here

5.灰色模型GM

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

6.灰色预测

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

clc,clear
a=[390.6,412,320,559.2,
380.8,542.4,553,310,561,300,632,540,406.2,313.8,576,587.6,318.5]'
;
t0=find(a<=320);
t1=cumsum(t0);n=length(t1);
B=[-0.5*(t1(1:end-1)+t1(2:end)),ones(n-1,1)];Y=t0(2:end);
r=B\Y
y=dsolve('Dy+a*y=b','y(0)=y0');
y=subs(y,{
    
    'a','b','y0'},{
    
    r(1),r(2),t1(1)});
yuce1=subs(y,'t',[0:n+1])
digits(6),y=vpa(y) %为提高预测精度,先计算预测值,再显示微分方程的解
yuce=diff(yuce1);
yuce=[t0(1),yuce]

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

clc,clear
x0=[71.1 72.4 72.4 72.1 71.4 72.0 71.6];
n=length(x0);
lamda=x0(1:n-1)./x0(2:n)
range=minmax(lamda)
x1=cumsum(x0)
for i=2:n
z(i)=0.5*(x1(i)+x1(i-1));
end
B=[-z(2:n)',ones(n-1,1)];
Y=x0(2:n)';
u=B\Y
x=dsolve('Dx+a*x=b','x(0)=x0');
x=subs(x,{
    
    'a','b','x0'},{
    
    u(1),u(2),x1(1)});
yuce1=subs(x,'t',[0:n-1]);
digits(6),y=vpa(x) %为提高预测精度,先计算预测值,再显示微分方程的解
yuce=[x0(1),diff(yuce1)]
epsilon=x0-yuce %计算残差
delta=abs(epsilon./x0) %计算相对误差
rho=1-(1-0.5*u(1))/(1+0.5*u(1))*lamda %计算级比偏差值

7.SARA疫情对某些经济指标影响问题

insert image description here
insert image description here

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

clc,clear
load han1.txt %把原始数据保存在纯文本文件han1.txt中
han1(end,:)=[];m=size(han1,2);
x0=mean(han1,2);
x1=cumsum(x0)
alpha=0.4;n=length(x0);
z1=alpha*x1(2:n)+(1-alpha)*x1(1:n-1)
Y=x0(2:n);B=[-z1,ones(n-1,1)];
ab=B\Y
k=6;
x7hat=(x0(1)-ab(2)/ab(1))*(exp(-ab(1)*k)-exp(-ab(1)*(k-1)))
z=m*x7hat
u=sum(han1)/sum(sum(han1))
v=z*u

insert image description here
insert image description here
insert image description here

8.道路交通事故灰色Verhulst预测模型

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

clc,clear
x1=[4.93 5.33 5.87 6.35 6.63 7.15 7.37 7.39 7.81 8.35
9.39 10.59 10.94 10.44];
n=length(x1);
nian=1990:2003;
plot(nian,x1,'o-');
x0=diff(x1);
x0=[x1(1),x0]
for i=2:n
z1(i)=0.5*(x1(i)+x1(i-1));
end
z1
B=[-z1(2:end)',z1(2:end)'.^2]
Y=x0(2:end)'
abhat=B\Y %估计参数 a,b 的值
x=dsolve('Dx+a*x=b*x^2','x(0)=x0'); %求解常微分方程
x=subs(x,{
    
    'a','b','x0'},{
    
    abhat(1),abhat(2),x1(1)}); %代入参数值
yuce=subs(x,'t',0:14) %计算预测值
digits(6); x=vpa(x) %显示微分方程的解,为了提高计算精度,把该语句放在计算预测值
之后,或者不使用该语句
yuce(16)=yuce(15);
x1_all=[x1,9.92,10.71];
epsilon=x1_all-yuce %计算残差
delta=abs(epsilon./x1_all) %计算相对误差
delta_mean=mean(delta) %计算平均相对误差
x1_all_0=x1_all-x1_all(1); %数据列的始点零化像
yuce_0=yuce-yuce(1); %数据列的始点零化像
s0=abs(sum(x1_all_0(1:end-1))+0.5*x1_all_0(end));
s1=abs(sum(yuce_0(1:end-1))+0.5*yuce_0(end));
tt=yuce_0-x1_all_0;
s1_s0=abs(sum(tt(1:end-1))+0.5*tt(end));
absdegree=(1+s0+s1)/(1+s0+s1+s1_s0) %计算灰色绝对关联度
c=std(epsilon,1)/std(x1_all,1) %计算标准差比值

insert image description here
insert image description here
insert image description here

clc,clear
x1=[4.93 5.33 5.87 6.35 6.63 7.15 7.37 7.39 7.81 8.35
9.39 10.59 10.94 10.44];
n=length(x1);
x0=diff(x1);
x0=[x1(1),x0]
for i=2:n
z1(i)=0.5*(x1(i)+x1(i-1));
end
B=[-z1(2:end)',ones(n-1,1)];
Y=x0(2:end)';
abhat=B\Y %估计参数 a,b 的值
x=dsolve('Dx+a*x=b','x(0)=x0');
x=subs(x,{
    
    'a','b','x0'},{
    
    abhat(1),abhat(2),x1(1)});
yuce=subs(x,'t',0:14) %计算预测值
digits(6); x=vpa(x) %显示微分方程的解,为了提高计算精度,把该语句放在计算预测
值之后,或者不使用该语句
yuce(16)=yuce(15);
x1_all=[x1,9.92,10.71];
epsilon=x1_all-yuce %计算残差
delta=abs(epsilon./x1_all) %计算相对误差
delta_mean=mean(delta) %计算平均相对误差
x1_all_0=x1_all-x1_all(1); %数据列的始点零化像
yuce_0=yuce-yuce(1); %数据列的始点零化像
s0=abs(sum(x1_all_0(1:end-1))+0.5*x1_all_0(end));
s1=abs(sum(yuce_0(1:end-1))+0.5*yuce_0(end));
tt=yuce_0-x1_all_0;
s1_s0=abs(sum(tt(1:end-1))+0.5*tt(end));
absdegree=(1+s0+s1)/(1+s0+s1+s1_s0) %计算灰色绝对关联度
c=std(epsilon,1)/std(x1_all,1) %计算标准差比值

insert image description here

9.GM(2,1)和DGM模型

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

clc,clear
x0=[41,49,61,78,96,104];
n=length(x0);
x1=cumsum(x0)
a_x0=diff(x0);
a_x0=[0,a_x0]
for i=2:n
z(i)=0.5*(x1(i)+x1(i-1));
end
B=[-x0(2:end)',-z(2:end)',ones(n-1,1)];
Y=a_x0(2:end)';
u=B\Y
x=dsolve('D2x+a1*Dx+a2*x=b','x(0)=c1,x(5)=c2');
x=subs(x,{
    
    'a1','a2','b','c1','c2'},{
    
    u(1),u(2),u(3),x1(1),x1(6)});
yuce=subs(x,'t',0:n-1);
digits(6),x=vpa(x)
x0_hat=[yuce(1),diff(yuce)]
epsilon=x0-x0_hat
delta=abs(epsilon./x0)

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

clc,clear
x0=[2.874,3.278,3.39,3.679,3.77,3.8];
n=length(x0);
a_x0=diff(x0);
a_x0=[0,a_x0]
B=[-x0(2:end)',ones(n-1,1)];
Y=a_x0(2:end)';
u=B\Y
x=dsolve('D2x+a*Dx=b','x(0)=c1,Dx(0)=c2');
x=subs(x,{
    
    'a','b','c1','c2'},{
    
    u(1),u(2),x0(1),x0(1)});
yuce=subs(x,'t',0:n-1);
digits(6),x=vpa(x)
x0_hat=[yuce(1),diff(yuce)]
epsilon=x0-x0_hat
delta=abs(epsilon./x0)

10.GM(1,N)和GM(0,N)模型

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

clc,clear
x10=[2.874,3.278,3.307,3.39,3.679];
x20=[7.04,7.645,8.075,8.53,8.774];
n=length(x10);
x11=cumsum(x10)
x21=cumsum(x20)
for i=2:n
z11(i)=0.5*(x11(i)+x11(i-1));
end
B=[-z11(2:n)',x21(2:n)'];
Y=x10(2:n)';
u=B\Y
x=dsolve('Dx+a*x=b*x2','x(0)=x0');
x=subs(x,{
    
    'a','b','x0','x2'},{
    
    u(1),u(2),x10(1),'x21'});
digits(6),x=vpa(x);x=simple(x)
x=subs(x,{
    
    't','x21'},{
    
    [0:n-1],x21(1:n)})
xhat=[x(1),diff(x)]
epsilon=x10-xhat
delta=abs(epsilon./x10)

insert image description here
insert image description here
insert image description here

clc,clear
x10=[2.874,3.278,3.307,3.39,3.679];
x20=[7.04,7.645,8.075,8.53,8.774];
n=length(x10);
x11=cumsum(x10)
x21=cumsum(x20)
B=[ones(n,1),x21(1:n)'];
Y=x11(1:n)';
u=B\Y
x11hat=B*u
x10hat=[x11hat(1),diff(x11hat)']
epsilon=x10-x10hat
delta=abs(epsilon./x10)

11.总结

insert image description here

Guess you like

Origin blog.csdn.net/YouWan797411/article/details/130893683