C2 = make2DOF(C1)
converts the one-degree-of-freedom PID controller C1 to two
degrees of freedom. The setpoint weights b and
c of the 2-DOF controller are 1, and the remaining PID
coefficients do not change.
C1 =
1 s
Kp + Ki * --- + Kd * --------
s Tf*s+1
with Kp = 1.12, Ki = 0.23, Kd = 1.3, Tf = 0.122
Continuous-time PIDF controller in parallel form.
Model Properties
Convert the controller to two degrees of freedom.
C2 = make2DOF(C1)
C2 =
1 s
u = Kp (b*r-y) + Ki --- (r-y) + Kd -------- (c*r-y)
s Tf*s+1
with Kp = 1.12, Ki = 0.23, Kd = 1.3, Tf = 0.122, b = 1, c = 1
Continuous-time 2-DOF PIDF controller in parallel form.
Model Properties
The new controller has the same PID gains and filter constant. It also contains new terms involving the setpoint weights b and c. By default, b = c = 1. Therefore, in a closed loop with the plant G, the 2-DOF controller C2 yields the same response as C1.
T1 = feedback(G*C1,1);
CM = tf(C2);
T2 = CM(1)*feedback(G,-CM(2));
stepplot(T1,T2,'r--')
Convert C1 to a 2-DOF controller with different b and c values.
C2_2 = make2DOF(C1,0.5,0.75)
C2_2 =
1 s
u = Kp (b*r-y) + Ki --- (r-y) + Kd -------- (c*r-y)
s Tf*s+1
with Kp = 1.12, Ki = 0.23, Kd = 1.3, Tf = 0.122, b = 0.5, c = 0.75
Continuous-time 2-DOF PIDF controller in parallel form.
Model Properties
The PID gains and filter constant are still unchanged, but the setpoint weights now change the closed-loop response.
2-DOF PID controller, returned as a pid2 object or
pidstd2 object. C2 is in
parallel form if C1 is in parallel form, and standard
form if C1 is in standard form.
For example, suppose C1 is a continuous-time,
parallel-form pid controller of the form:
Then C2 is a parallel-form 2-DOF
pid2 controller, which has two inputs and one
output. The relationship between the inputs, r and
y, and the output u of
C2 is given by:
The PID gains Kp,
Ki, and
Kd, and the filter time
constant Tf are unchanged. The
setpoint weights b and c are specified
by the input arguments b and c, or
1 by default. For more information about 2-DOF PID controllers, see Two-Degree-of-Freedom PID Controllers.
The conversion also preserves the values of the properties
Ts, TimeUnit, Sampling
Grid, IFormula, and
DFormula.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: United States.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.