How to visualise feedback function?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Rubayet
am 28 Apr. 2024
Beantwortet: Sam Chak
am 28 Apr. 2024
numA = [0.1];
denomA = [1 0];
C = tf(numA, denomA)
numB = [1];
denomB = [1 1];
G = tf(numB, denomB)
s = tf('s');
R = 10/s
My task is to write an M-file to find and plot the response of the following system to an input signal of R(s) = 10/s.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1681061/image.png)
However, I am unable to understand the function of different parameters in the FUNCTION called feedback().
One thing I understood is that it is a closed negative loop, therefore I won't have to add 1 at the last parameter which is for positive feedback loop.
Hence, I am unsure whether to use one of these for the final output:
Given that R(s) = 10/s.
I am thinking between:
system1 = feedback(C,G)
step(R*system1)
system2 = feedback(C*G,1,-1)
step(R*system2)
What is the difference between system1 and system 2? Both are closed loops. In system 1, C and G are two different models. In system 2, C and G are treated as one model by mutliplying with unity being the other model.
What is the visual difference between system1 and system2? What am I doing wrong?
0 Kommentare
Akzeptierte Antwort
Sam Chak
am 28 Apr. 2024
Hi @Rubayet
This is how you can use the 'feedback()' function to obtain the closed-loop system. You can compare the two approaches presented below:
numA = [0.1];
denomA = [1 0];
C = tf(numA, denomA)
numB = [1];
denomB = [1 1];
G = tf(numB, denomB)
Approach #1: Use the built-in 'feedback()' function
%% closed-loop system
clsys = feedback(C*G, 1)
%% input signal (a constant)
R = 10; % R(s) = 10/s --> R(t) = 10
%% System response
step(R*clsys), grid on
Approach #2: Use the direct formula
s = tf('s');
clsys2 = (C*G)/(1 + (C*G))
clsys2 = minreal(clsys2) % simplification (minimal realization)
%% System response
step(R*clsys), grid on
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with Control System Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!