Hi @Rafael
Most probably because you did a "positive feedback".
Try do this
impulse(feedback(K*TF, 1))
instead of
impulse(feedback(K*TF, -1))
Also check:
help feedback
FEEDBACK Feedback connection of two input/output systems.
M = FEEDBACK(M1,M2) computes a closed-loop model M for the feedback loop:
u --->O---->[ M1 ]----+---> y
| | y = M * u
+-----[ M2 ]<---+
Negative feedback is assumed and the model M maps u to y. To apply
positive feedback, use the syntax M = FEEDBACK(M1,M2,+1).
M = FEEDBACK(M1,M2,FEEDIN,FEEDOUT,SIGN) builds the more general feedback
interconnection:
+------+
v --------->| |--------> z
| M1 |
u --->O---->| |----+---> y
| +------+ |
| |
+-----[ M2 ]<---+
The vector FEEDIN contains indices into the input vector of M1 and
specifies which inputs u are involved in the feedback loop. Similarly,
FEEDOUT specifies which outputs y of M1 are used for feedback. If SIGN=1
then positive feedback is used. If SIGN=-1 or SIGN is omitted, then
negative feedback is used. In all cases, the resulting model M has the
same inputs and outputs as M1 (with their order preserved).
If M1 and M2 are arrays of models, FEEDBACK returns a model array M of
the same dimensions where
M(:,:,k) = FEEDBACK(M1(:,:,k),M2(:,:,k)) .
For dynamic systems SYS1 and SYS2,
SYS = FEEDBACK(SYS1,SYS2,'name')
connects SYS1 and SYS2 by matching their I/O names. The I/O names of
SYS1 and SYS2 must be fully defined.
See also LFT, PARALLEL, SERIES, CONNECT, INPUTOUTPUTMODEL, DYNAMICSYSTEM.
Documentation for feedback
doc feedback
Other uses of feedback
iddata/feedback InputOutputModel/feedback lti/feedback
idmodel/feedback