On obtaining state names names with GenSS
2 次查看(过去 30 天)
显示 更早的评论
I am working on a large Simulink model and extracting various I/O models between different points in the sim using the GenSS built-in getIOTransfer() function. Lets say such a GenSS model is "plant". If I type ss(plant) I get the entire A,B,C,D,E state space representation, with corresponding state, input, and output names. These names are predefined and added to the model using addPoint(). Im addition, my GenSS model also includes additional states "Integrator #n" due to other dynamic modes present in the model, which I have not added to the analysis using addpoint() function. Everything is fine up to here. No lets say I want to obtain a minimal realization of this model by issuing the command
>> plant_min = minreal(plant)
this returns a minimal representation GenSS of the plant but all the state names are now x1, x2, .., x_min. Input and output names are still the same.
My question is can I somehow preserve the original names of states during this procedure?
Thanks.
0 个评论
回答(1 个)
Prashant Arora
2016-12-29
If the states and order of states in State-space realization remain the same after minimum realization, you can use the following commands to re-assign the state names.
Names = plant.StateName;
plant_min.StateName = Names(1:numel(plant_min.StateName));
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!