Adapted from:
​https://engineering.stackexchange.com/questions/28451/how-to-find-performance-assessment-iae-and-ise-of-a-pid-controlled-system

Direct Route

We get K=3.16228 and ISE=0.632456
In[]:=
(s^2+0.5Ks+2.5)/2.5/.K->Sqrt[10]//Expand
Out[]=
1.+0.632456s+0.4
2
s
In[]:=
xi=0.632455532033676/2/Sqrt[0.4]
Out[]=
0.5
In[]:=
(s^2+0.5Ks+2.5)/2.5/.K->4.2//Expand
Out[]=
1.+0.84s+0.4
2
s
In[]:=
xi=0.84/2/Sqrt[0.4]
Out[]=
0.664078
In[]:=
0.84×2.5
Out[]=
2.1
In[]:=
4.20.5/2/Sqrt[2.5]
Out[]=
0.664078
In[]:=
y1=InverseLaplaceTransform[(s+0.5K)/(s^2+0.5Ks+2.5),s,t]//FullSimplify
Out[]=
-0.25Kt-0.5
-10.+0.25
2
K
t

-0.25K+0.5
-10.+0.25
2
K
+
1.
-10.+0.25
2
K
t

0.25K+0.5
-10.+0.25
2
K

-10.+0.25
2
K
In[]:=
Integrate[(y1//Chop)^2,{t,0,Infinity}]//Chop(*ISE*)
Out[]=
-
0.1(100.+7.5
2
K
-0.25
4
K
)
K(-10.+0.25
2
K
)
if Re[K]>0
In[]:=
sol=FindRootD-
0.1`(100.`+7.5`
2
K
-0.25`
4
K
)
K(-10.`+0.25`
2
K
)
,K==0,{K,4}
Out[]=
{K3.16228}
In[]:=
Sqrt[10]//N
Out[]=
3.16228
In[]:=
ISE=Integrate[(y1/.sol//Chop)^2,{t,0,Infinity}]//Chop
Out[]=
0.632456
In[]:=
1/K+0.1K/.sol
Out[]=
0.632456

Alternative Route

We also get K=3.16228 and ISE=0.632456
In[]:=
y1=.
In[]:=
y1[K_,t_]:=InverseLaplaceTransform[1/ss(s+0.5K)/(s^2+0.5Ks+2.5),s,t]//FullSimplify
In[]:=
f2[K_?NumericQ]:=Quiet@NIntegrate[Chop@(y1[K,t])^2,{t,0,1000},AccuracyGoal->10]//Chop;(*ISE*)
In[]:=
ISE=.
In[]:=
K=.
In[]:=
ISEdata=Join[Flatten[{{{K,ISE}},Table[{q,f2[q]},{q,1,9.2,0.25}]},1]]
Out[]=
{{K,ISE},{1.,1.1},{1.25,0.925},{1.5,0.816667},{1.75,0.746429},{2.,0.7},{2.25,0.669444},{2.5,0.65},{2.75,0.638636},{3.,0.633333},{3.25,0.632692},{3.5,0.635714},{3.75,0.641667},{4.,0.65},{4.25,0.660294},{4.5,0.672222},{4.75,0.685526},{5.,0.7},{5.25,0.715476},{5.5,0.731818},{5.75,0.748913},{6.,0.766667},{6.25,0.785},{6.5,0.803846},{6.75,0.823148},{7.,0.842857},{7.25,0.862931},{7.5,0.883333},{7.75,0.904032},{8.,0.925},{8.25,0.946212},{8.5,0.967647},{8.75,0.989286},{9.,1.01111}}
In[]:=
%//TableForm
Out[]//TableForm=
K
ISE
1.
1.1
1.25
0.925
1.5
0.816667
1.75
0.746429
2.
0.7
2.25
0.669444
2.5
0.65
2.75
0.638636
3.
0.633333
3.25
0.632692
3.5
0.635714
3.75
0.641667
4.
0.65
4.25
0.660294
4.5
0.672222
4.75
0.685526
5.
0.7
5.25
0.715476
5.5
0.731818
5.75
0.748913
6.
0.766667
6.25
0.785
6.5
0.803846
6.75
0.823148
7.
0.842857
7.25
0.862931
7.5
0.883333
7.75
0.904032
8.
0.925
8.25
0.946212
8.5
0.967647
8.75
0.989286
9.
1.01111
In[]:=
w2=FindMinimum[f2[q],{q,1.5,1.4}]
Out[]=
{0.632456,{q3.16228}}
In[]:=
y1=.
In[]:=
y1[K_,t_]:=InverseLaplaceTransform[1/ss(s+0.5K)/(s^2+0.5Ks+2.5),s,t]//FullSimplify
In[]:=
f1[K_]:=Quiet@NIntegrate[Abs[y1[K,t]],{t,0,1000}]//Chop;;(*IAE*)
In[]:=
K=.
In[]:=
IAE=.
In[]:=
f1[2]
Out[]=
1.43763
In[]:=
Log[%]
Out[]=
0.362997
In[]:=
IAEdata=Join[Flatten[{{{K,IAE}},Table[{q,f1[q]},{q,1,8.5,0.25}]},1]]
Out[]=
{{K,IAE},{1.,2.62655},{1.25,2.13766},{1.5,1.81912},{1.75,1.59607},{2.,1.43763},{2.25,1.31966},{2.5,1.2303},{2.75,1.15905},{3.,1.10943},{3.25,1.0722},{3.5,1.04443},{3.75,1.02654},{4.,1.01733},{4.25,1.01591},{4.5,1.02068},{4.75,1.03313},{5.,1.05224},{5.25,1.07868},{5.5,1.11249},{5.75,1.15348},{6.,1.20027},{6.25,1.25},{6.5,1.3},{6.75,1.35},{7.,1.4},{7.25,1.45},{7.5,1.5},{7.75,1.55},{8.,1.6},{8.25,1.65},{8.5,1.7}}
In[]:=
%//TableForm
Out[]//TableForm=
K
IAE
1.
2.62655
1.25
2.13766
1.5
1.81912
1.75
1.59607
2.
1.43763
2.25
1.31966
2.5
1.2303
2.75
1.15905
3.
1.10943
3.25
1.0722
3.5
1.04443
3.75
1.02654
4.
1.01733
4.25
1.01591
4.5
1.02068
4.75
1.03313
5.
1.05224
5.25
1.07868
5.5
1.11249
5.75
1.15348
6.
1.20027
6.25
1.25
6.5
1.3
6.75
1.35
7.
1.4
7.25
1.45
7.5
1.5
7.75
1.55
8.
1.6
8.25
1.65
8.5
1.7

Below we plot the integral errors (ISE and IAE) and we indicate with a blue dot the optimal values of K

References

◼
  • [1] Richard S . Dorf and Robert H . Bishop, Modern Control Systems, 13th edition, Hoboken: Pearson, 2017 .
  • CITE THIS NOTEBOOK

    Why my IAE plot is off with respect to result by Dorf and Bishop?​
    by Housam Binous
    Wolfram Community, STAFF PICKS, April 21, 2024
    ​https://community.wolfram.com/groups/-/m/t/3162229