I am trying to find the integral gain (ki) of the following transfer function.
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
This is my code,
syms ki
sys = tf([30.672 175.694*ki],[1 38.672 175.694*ki]);
S = stepinfo(sys);
subplot(2,1,1)
step(sys)
However it's showing the error:
Error using tf (line 303)
The values of the "Numerator" and "Denominator" properties must be row vectors or cell arrays of row vectors, where each vector is nonempty and containing numeric data. Type "help tf.num" or "help tf.den" for more information.
0 Kommentare
Antworten (2)
VBBV
am 17 Mai 2022
Bearbeitet: VBBV
am 17 Mai 2022
syms ki
ki = 10 % e.g numeric values , not symbolic
sys = tf([30.672 175.694*ki],[1 38.672 175.694*ki]);
S = stepinfo(sys);
subplot(2,1,1)
step(sys)
As the error states num and den vectors should be numeric, and not symbolic as you defined.
0 Kommentare
Star Strider
am 17 Mai 2022
Symbolic variables are not permitted in Control System Toolbox objects, however anonymous functions are.
Try this —
sys = @(ki) tf([30.672 175.694*ki],[1 38.672 175.694*ki]);
ki = 42;
S = stepinfo(sys(ki))
subplot(2,1,1)
step(sys(ki))
The value of ‘ki’ can be whatever you want, and you can use ‘sys’ here as an anonymous function as an argument to integration and optimisation functions.
.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Robust Control 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!