MATLAB: Inconsistent result with the documentation

Control System ToolboxfeedbackMATLAB

Take a look at a feedback system where G=1/s and H=1 where G is forward feedback and H backward feedback.
—-O———|G|———–>
^ |
|<———-|H|—-|
According to the documentation,
sys = feedback(___,sign) returns a model object sys for a feedback loop with the type of feedback specified by sign. By default, feedback assumes negative feedback and is equivalent to feedback(sys1,sys2,-1). To compute the closed-loop system with positive feedback, use sign = +1.
It means T1 and T2 in the following code must be same
s = tf('s');
G = 1/s;
T1 = feedback(G,-1)
T2 = feedback(G,1,-1)
But they are not the same.

Best Answer

In the first one sys2 is -1 and the default negative feedback is used. In the second one sys2 is +1 and negative feedback is explicitly used. You are using different sys2 with the same feedback so the results are going to be different.