How to close a feedback loop in parallel models with arrays as inputs/outputs?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello everyone,
I'm trying to adapt this example https://www.mathworks.com/help/control/ug/kalman-filtering.html to my system with a kalman filter.
In the example, a system 'sys' is created by combining in parallel the subsystem 'P' and an kalman filter 'kalmf' previously constructed.
sys = parallel(P,kalmf,1,1,[],[]);
The goal is to send the 2nd output 'yv' to the 4th input 'yv' in 'sys', by doing
SimModel = feedback(sys,1,4,2,1); % Close loop around input #4 and output #2
I searched for the documentation of feedback function and I found examples with sys1 and sys2 in the two first arguments of feedback function. So, my first doubt is:
What the 2nd argument '1' means to the feedback function? And the 5th argument?
Secondly, in my system, the inputs and outputs are vectors:
Inputs Outputs
1-88: w(88x1) 1-2: y(2x1)
89-90: v(2x1) 3-4: yv(2x1)
91-134: u(44x1) 5-6: ye(2x1)
135-136: yv(2x1)
Thus, I thought that the arguments feedin '4' and feedout '2' should be replaced by 135:136 and 3:4, like so
SimModel = feedback(sys,1,135:136,3:4,1); % Close loop around input #4 and output #2
But it gives me the error message:
In the "feedback(SYS1,SYS2,FEEDIN,FEEDOUT,...)" command, FEEDIN must have as many entries as outputs in SYS2.
and I don't understand whats going on, since there's no SYS2 in the function.
So, how should I proceed to correctly feedback yv as an input?
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Online Estimation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!