How to visualise feedback function?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
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 commentaires
Réponse acceptée
Sam Chak
le 28 Avr 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Get Started with Control System Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!