The answer is Maple! It is awesome, and also there is MapleSim that is like Simulink/Xcos but you can use all kind of variables in transfer functions.
Symbolic transfer function matlab
-
03-07-2023 - |
Question
I am trying to use transfer functions with symbolic values but I only returns errors.
Is there a way to work with Laplace transformed in symbolic mode with MatLab?
Here an example that I am trying to do and the MatLab message error:
>> syms Ki Kp Te R;
>> s=tf('s');
>> g=((Kp*s+Ki)/s)
Error using sym>tomupad (line 1014)
Conversion to 'sym' from 'tf' is not possible.
Error in sym (line 139)
S.s = tomupad(x,'');
Error in sym/privResolveArgs (line 823)
argout{k} = sym(arg);
Error in sym/privBinaryOp (line 838)
args = privResolveArgs(A, B);
Error in * (line 216)
X = privBinaryOp(A, B, 'symobj::mtimes');
I have tried some other forms to create a transfer function with no results:
>> sys=tf([Te],[0 Ki])
Error using tf (line 287)
The values of the "num" and "den" 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.
La solution 2
Autres conseils
You can't use transfer functions with symbolic variables. Check the documentation on tf
:
sys = tf(num,den)
creates a continuous-time transfer function with numerator(s) and denominator(s) specified bynum
andden
. The outputsys
is:
- A
tf
model object, whennum
andden
are numeric arrays.- A generalized state-space model (
genss
) whennum
orden
include tunable parameters, such asrealp
parameters or generalized matrices (genmat
).- An uncertain state-space model (
uss
) whennum
orden
are uncertain (requires Robust Control Toolbox™ software).
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow