Matlab中feedback函数负反馈场景参数用法的疑问
feedback Function: Clarifying Your Confusions Let's break down your two key questions about MATLAB's feedback function step by step—this is a common point of confusion, so you're not alone!
First Confusion: feedback(G*C, -1) vs feedback(G*C, 1, -1)
First, let's recap the core syntax and behavior of feedback:
- The standard call is
sys = feedback(sys1, sys2, sign)sys1: Forward path transfer functionsys2: Feedback path transfer functionsign: Optional, defaults to-1(negative feedback). Use+1for positive feedback.
The closed-loop transfer function formula is:
- For negative feedback (
sign=-1):sys = sys1 / (1 + sys1*sys2) - For positive feedback (
sign=+1):sys = sys1 / (1 - sys1*sys2)
Now let's analyze your two cases:
feedback(G*C, -1):- Here,
sys1 = G*C(forward path),sys2 = -1(feedback path), andsignuses the default-1. - Plugging into the formula:
(G*C) / (1 + (G*C)*(-1)) = (G*C)/(1 - G*C)— this is actually a positive feedback loop, not negative. - If your documentation claims this creates a negative feedback loop for G and C, there's likely a misinterpretation of the context. Maybe the documentation was referring to a rearranged loop structure where the feedback path's sign is folded into
sys2?
- Here,
feedback(G*C, 1, -1):- Here,
sys1 = G*C,sys2 = 1,sign=-1. - Formula result:
(G*C)/(1 + (G*C)*1) = (G*C)/(1 + G*C)— this is a negative feedback loop with a unit feedback path around the combined G*C forward path.
- Here,
If you're trying to create the classic negative feedback loop where the forward path is G and feedback path is C, the correct call is actually feedback(G, C) (defaults to negative feedback), which gives G/(1 + G*C)—that's the standard form.
Second Confusion: Why feedback(G, 1) is Negative Feedback
Let's clarify why feedback(G, 1) gives a negative feedback loop:
sys1 = G(forward path),sys2 = 1(unit feedback path),signdefaults to-1(negative feedback).- Applying the formula:
G / (1 + G*1) = G/(1 + G)— this is the standard unit negative feedback closed-loop transfer function, which matches what the documentation is doing.
If you used feedback(G, -1), you'd get G/(1 + G*(-1)) = G/(1 - G), which is a positive feedback loop—not what you want for unit negative feedback.
The key takeaway is:
- The
signparameter controls whether you subtract (-1) or add (+1) the feedback signal to the input. - The
sys2parameter is the transfer function of the feedback path itself. For unit feedback, that's1, and the defaultsign=-1handles the negative feedback subtraction.
内容的提问来源于stack exchange,提问作者rrz0

