How to avoid defining variable value with simulink.
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I basically am given a block diagram and told to reduce it into a single transfer function. There are no values given for the problem but rather all transfer function are given as a variable name such as (G1, G2, and H). When I use simulink and create my diagram and input the variable names, it asks me to assign a value for variable name. Is there a way to avoid assigning a value to the variable and rather have the final answer be in variable form. Attached are images of my code, Block diagram in simulink, and the orginal problem statement.
0 commentaires
Réponses (1)
Paul
le 14 Oct 2023
No, this can't be done in Simulink, nor in the Control System Toolbox. With G1(s), G2(s), and H(s) define as symfun objects, you'll have to algebraically solve for the transfer function.
2 commentaires
Walter Roberson
le 14 Oct 2023
To emphasize:
Simulink does not have any symbolic operations, and does not support symbolic symbols.
Simulink does support some operations for control systems with parameters, but at any given time, each parameter must have a well-defined value. The point of the parameter ability for those systems is that it permits updating the active value of the parameters quickly, without having to rebuild the system with new parameter values; the facilities for working with these kind of parameters also permit automatic optimization of parameters (such as to find the parameter values that cause the system to match most closely to a known signal.)
The algebraic solutions that @Paul refers to would be done at the MATLAB level using the Symbolic Toolbox. Typically you would work with transfer function form, and add, subtract, and multiply those together. If you then use numden on the resulting expression, you get out the symbolic expressions for the numerator and denominator, which you can then use sym2poly or coeffs on.
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!