https://www.mathworks.com/help/control/ref/feedback.html
Sistemas realimentados en matlab
feedback
Feedback connection of two models
Syntax
sys = feedback(sys1,sys2)
Description
sys = feedback(sys1,sys2)
returns a model object sys
for the negative feedback interconnection of model objects sys1
and sys2
.sys
has u as input vector and y as output vector. The models sys1
and sys2
must be both continuous or both discrete with identical sample times.
Precedence rules are used to determine the resulting model type (see Rules That Determine Model Type).To apply positive feedback, use the syntax
sys = feedback(sys1,sys2,+1)
feedback(sys1,sys2)
assumes negative feedback and is equivalent to feedback(sys1,sys2,-1)
.Finally,
sys = feedback(sys1,sys2,feedin,feedout)
sys
for the more general feedback loop.feedin
contains indices into the input vector of sys1
and specifies which inputs u are involved in the feedback loop. Similarly, feedout
specifies which outputs y of sys1
are used for feedback. The resulting model sys
has the same inputs and outputs as sys1
(with their order preserved). As before, negative feedback is applied by default and you must usesys = feedback(sys1,sys2,feedin,feedout,+1)
For more complicated feedback structures, use
append
and connect
.Examples
Example 1
G(s)=2s2+5s+1s2+2s+3
H(s)=5(s+2)s+10
G = tf([2 5 1],[1 2 3],'inputname','torque',... 'outputname','velocity'); H = zpk(-2,-10,5) Cloop = feedback(G,H)
Zero/pole/gain from input "torque" to output "velocity": 0.18182 (s+10) (s+2.281) (s+0.2192) ----------------------------------- (s+3.419) (s^2 + 1.763s + 1.064)
Cloop
inherited the input and output names from G
.Example 2
Consider a state-space plantP
with five inputs and four outputs and a state-space feedback controller K
with three inputs and two outputs.P = rss(3,4,5); K = rss(3,2,3);
feedin = [4 2]; feedout = [1 3 4]; Cloop = feedback(P,K,feedin,feedout)
Example 3
You can form the following negative-feedback loopsCloop = feedback(G,1) % left diagram Cloop = feedback(1,G) % right diagram
No hay comentarios:
Publicar un comentario