Calculation largely inspired from Ref. 1.
The block diagram of a special feedback control system is shown in Figure below. We Derive an expression for the closed-loop transfer function, Y (s)/D(s).​Using the following relationships:​Y=G *P + G*Gd*DE= Y2-YY2= delay*Y1Y1=Gs*PE’=E-Y1P= Gc*E’Y1 = Gc*Gs/(1+Gc*Gs)*Edelay=exp[-theta*s] also delay=(1-theta*s/2)/(1+theta*s/2) (using Padé Approximation)​one gets to the final result: Y=G1*D​​
G1=
GGd(1+GcGs(1-delay))
1+Gc(G+Gs(1-delay))
​​​
In[]:=
Solve[{GGdDist+PGY,PGcError(1-GcGs/(1+GcGs)),Error(1+GcGs(1-delay))-(1+GcGs)Y},{Y,Error,P}]//FullSimplify
Out[]=
Y
DistGGd(1+Gc(Gs-delayGs))
1+Gc(G+Gs-delayGs)
,Error-
DistGGd(1+GcGs)
1+Gc(G+Gs-delayGs)
,P-
DistGGcGd
1+Gc(G+Gs-delayGs)

In[]:=
G1=
GGd(1+Gc(Gs-delayGs))
1+Gc(G+Gs-delayGs)
Out[]=
GGd(1+Gc(Gs-delayGs))
1+Gc(G+Gs-delayGs)
For illustration purposes, let us choose :
In[]:=
Gd=1/(s+1);​​delay=(1-s)/(1+s);(*delay=exp(-2s)*)​​Gs=4/(2s+1);​​Gc=Kp(1+1/s/tauI);Kp=1;tauI=3;(*wechooseaPIcontroller*)​​G=3/(3s+1);
In[]:=
G1//Simplify
Out[]=
3s(11+33s+6
2
s
)
(1+s)(1+3s)(3+20s+39
2
s
+6
3
s
)
Response to a step disturbance (Dist = 2/s)
In[]:=
y=InverseLaplaceTransform[G12/s,s,t];
Disturbance is rejected
In[]:=
y/.t100.//Chop
Out[]=
0
In[]:=
p1=Plot[y,{t,0,40},FrameTrue,AspectRatio1,GridLinesAutomatic,ImageSize400{1,1},PlotStyle{Thickness[0.0125],Dashed,Darker@Red},AxesOrigin{0,0},FrameLabel{Style["time",14],Style["response",14]}]
Out[]=
Comparison with result obtained using Simulink​
In[]:=
IMG=
;
In[]:=
Show[p1,ImageSize->450{1,1},Prolog->{Raster[ImageData[IMG,DataReversed->True],{Scaled[{0.0175,0.0475}],Scaled[{1,1.}]}]},FrameLabel->{Style["time",16,Italic],Style["response",16,Italic]}]
Out[]=

References

[1] D.E. Seborg, T.F. Edgar, D.A. Mellichamp, and F.J. Doyle III, Process Dynamics and Control, 4th ed., New York : Wiley, 2017.

CITE THIS NOTEBOOK

A special feedback control system​
by Housam Binous and Ahmed Bellagi
Wolfram Community, STAFF PICKS, August 16, 2025
​https://community.wolfram.com/groups/-/m/t/3531213