%% Positive Feedback Loop with Plant and Controller
% For this example, consider two transfer functions that describe a plant G and controller C respectively.
%
% G(s)=\frac{2s^2+5s+1}{s^2+2s+3}\;\;\;\;\;\;C(s) = \frac{5(s+2)}{s+10}
% Create the plant and controller transfer functions.

G = tf([2 5 1],[1 2 3],'inputname',"torque",'outputname',"velocity");
C = tf([5,10],[1,10]); 

% Use feedback to create the positive feedback loop using G and C.

sys = feedback(G,C,+1)

% sys is the resultant closed loop transfer function obtained using positive feedback with torque as the input and velocity as the output.
% Copyright 2019 The MathWorks, Inc.
%