I am trying to find the integral gain (ki) of the following transfer function.
6 ビュー (過去 30 日間)
This is my code,
sys = tf([30.672 175.694*ki],[1 38.672 175.694*ki]);
S = stepinfo(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.
回答 (2 件)
Star Strider 2022 年 5 月 17 日
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))
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.