getlinio command returns empty array
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am trying to find the analysis points for existing simulink model 'rct_CSTR_OL'. However the following command returns an empty array
>> sys = 'rct_CSTR_OL'
sys =
rct_CSTR_OL
>> open_system(sys)
>> getlinio(sys)
ans =
[]
However the gain scheduling example uses the analysis point with the following command
% Linearize process dynamics at trim conditions
G = linearize('rct_CSTR_OL', 'rct_CSTR_OL/CSTR', op);
where op is the operating point created with operspec command.
I do not understand the effect of using the subsystem name 'rct_CSTR_OL/CSTR' in the above command because all examples of linearize command use linio to create analysis point.
When I try to replace the second argument in linearize with the following code
io(1)= linio('rct_CSTR_OL/CSTR',3, 'input');
io(2)= linio('rct_CSTR_OL/CSTR', 1, 'output');
io(3)= linio('rct_CSTR_OL/CSTR', 2, 'output');
G = linearize('rct_CSTR_OL', io, op)
it throws the following error
For linear analysis, the specified I/Os must map to a valid set of ports of a Simulink block. Port 3 on the "rct_CSTR_OL/CSTR" block
is no longer valid.
My questions:
1. What analysis points are being used in the first code fragment
2. How can I create a linio object to achieve the same effect as done by the first fragment
Kindly let me know. Thanks.
1 commentaire
Réponses (1)
Valentina Bugueño Olivos
le 29 Fév 2024
Is it is a Simulink block you must identify the lines as inputs or outputs.
You can do it by clicking right in the line --> click linear analysis points ---> select the type of signal (input perturbation/output measurement)
Now when you use getlinio it won't give yoy an empty array
:)
0 commentaires
Voir également
Catégories
En savoir plus sur Linearization Basics dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!