Consider the closed loop shown in Figure 11.8 in [1]where =, =, =, =1, and =1+.
G
p
1
5s+1
G
v
1
2s+1
G
m
1
s+1
K
m
G
c
K
c
1
5s
Here, we consider a proportional-integral controller since we have =1+. We propose to set the value of the control gain for a fixed integral time (=5).
G
c
K
c
1
5s
K
c
τ
I
These three integral errors (all truncated at in the calculation shown here) are defined by: (the integral of the absolute value of the error indicated by the gray area shown in the response versus time plot), (the integral of the squared error),and (the integral of the time-weighted absolute error).
t=2000
IAE=e(t)dt
∞
∫
0
ISE=dt
∞
∫
0
2
(e(t))
ITAE=te(t)dt
∞
∫
0
Closed-looptransferfunctionis
Kc(1+s)
Kc+5s(1+s)(1+2s)
In[]:=
Kc=.
In[]:=
Gp=1/(5s+1);Gv=1/(2s+1);Gm=1/(s+1);Km=1;Gc=Kc(1+1/(5s));
In[]:=
KmGcGvGp/(1+GcGvGpGm)//FullSimplify
Out[]=
Kc(1+s)
Kc+5s(1+s)(1+2s)
Time-domain response
Time-domain response
In[]:=
y[q_?NumericQ]:=InverseLaplaceTransform1s,s,t//Chop;(*q=Kc*)
q(1+s)
q+5s(1+3s+2)
2
s
In[]:=
ym[q_?NumericQ]:=InverseLaplaceTransform1sGm,s,t//Chop;(*q=Kc*)
q(1+s)
q+5s(1+3s+2)
2
s
Below we compute the three integral errors
Below we compute the three integral errors
In[]:=
f1[q_?NumericQ]:=Re[Quiet@NIntegrate[Abs[1-ym[q]],{t,0,2000},AccuracyGoal->10]//Chop];(*IAE*)f2[q_?NumericQ]:=Re[Quiet@NIntegrate[(1-ym[q])^2,{t,0,2000},AccuracyGoal->10]//Chop];(*ISE*)f3[q_?NumericQ]:=Re[Quiet@NIntegrate[tAbs[1-ym[q]],{t,0,2000},AccuracyGoal->10]//Chop];(*ITAE*)
In[]:=
Kc=.
In[]:=
IAEdata=Join[Flatten[{{{Kc,IAE}},Table[{q,f1[q]},{q,1,3,0.1}]},1]]
Out[]=
{{Kc,IAE},{1.,6.29076},{1.1,6.09631},{1.2,5.9707},{1.3,5.90318},{1.4,5.84785},{1.5,5.81797},{1.6,5.81315},{1.7,5.82367},{1.8,5.8469},{1.9,5.88281},{2.,5.92813},{2.1,5.98918},{2.2,6.05518},{2.3,6.14005},{2.4,6.21877},{2.5,6.36962},{2.6,6.41802},{2.7,6.52688},{2.8,6.60275},{2.9,6.74772},{3.,6.88155}}
In[]:=
%//TableForm
Out[]//TableForm=
Kc | IAE |
1. | 6.29076 |
1.1 | 6.09631 |
1.2 | 5.9707 |
1.3 | 5.90318 |
1.4 | 5.84785 |
1.5 | 5.81797 |
1.6 | 5.81315 |
1.7 | 5.82367 |
1.8 | 5.8469 |
1.9 | 5.88281 |
2. | 5.92813 |
2.1 | 5.98918 |
2.2 | 6.05518 |
2.3 | 6.14005 |
2.4 | 6.21877 |
2.5 | 6.36962 |
2.6 | 6.41802 |
2.7 | 6.52688 |
2.8 | 6.60275 |
2.9 | 6.74772 |
3. | 6.88155 |
In[]:=
ISEdata=Join[Flatten[{{{Kc,ISE}},Table[{q,f2[q]},{q,1,3,0.1}]},1]]
Out[]=
{{Kc,ISE},{1.,4.23077},{1.1,4.03054},{1.2,3.86905},{1.3,3.73759},{1.4,3.62998},{1.5,3.54167},{1.6,3.46928},{1.7,3.41024},{1.8,3.36257},{1.9,3.32472},{2.,3.29545},{2.1,3.27381},{2.2,3.25901},{2.3,3.25042},{2.4,3.24755},{2.5,3.25},{2.6,3.25746},{2.7,3.26968},{2.8,3.28647},{2.9,3.30772},{3.,3.33333}}
In[]:=
%//TableForm
Out[]//TableForm=
Kc | ISE |
1. | 4.23077 |
1.1 | 4.03054 |
1.2 | 3.86905 |
1.3 | 3.73759 |
1.4 | 3.62998 |
1.5 | 3.54167 |
1.6 | 3.46928 |
1.7 | 3.41024 |
1.8 | 3.36257 |
1.9 | 3.32472 |
2. | 3.29545 |
2.1 | 3.27381 |
2.2 | 3.25901 |
2.3 | 3.25042 |
2.4 | 3.24755 |
2.5 | 3.25 |
2.6 | 3.25746 |
2.7 | 3.26968 |
2.8 | 3.28647 |
2.9 | 3.30772 |
3. | 3.33333 |
The minimal values of IAE, ISE and ITAE and their corresponding values of q = Kc
Below we plot the three integral errors and we indicate with a blue dot the optimal values of Kc (the PI controller’s gain)
Below we plot the three integral errors and we indicate with a blue dot the optimal values of Kc (the PI controller’s gain)
Below we plot the response for Kc=1.25, 2.75 and 7.5
Below we plot the response for Kc=1.25, 2.75 and 7.5
References
References
[1] D. E. Seborg, T. F. Edgar, D. A. Mellichamp, and F. J. Doyle III, Process Dynamics and Control, 4th ed., Hoboken, NJ: John Wiley & Sons, Inc., 2017.
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
Integral Error Criteria for Controller Tuning
by Housam Binous and Ahmed Bellagi
Wolfram Community, STAFF PICKS, March 20, 2024
https://community.wolfram.com/groups/-/m/t/3144502
by Housam Binous and Ahmed Bellagi
Wolfram Community, STAFF PICKS, March 20, 2024
https://community.wolfram.com/groups/-/m/t/3144502