Why I do not have States or Inputs when using findop?
4 次查看(过去 30 天)
显示 更早的评论
I am trying to linearize a Simulink model of a Neural Network and I am having problems when setting the operating points. I set the Inputs and Outputs and compile the Simulink model, but then when I use 'findop' there are neither states nor Inputs and I get an error saying 'There are no free variables to optimize. Free either a state or an input.'.
How can I create/find operating Points?
This is the code:
>> sim1
Model Compilation for sim1 successful.
>> sim1_io(1)=linio('sim1/From Workspace',1,'input');
>> sim1_io(2)=linio('sim1/NN',1,'output');
>> setlinio('sim1',sim1_io);
>> sim1
>> opsim = findop('sim1',1)
Operating Point for the Model sim1.
(Time-Varying Components Evaluated at time t=1)
States: None
----------
Inputs: None
----------
>> opspec=operspec('sim1');
>> opspec=operspec('sim1');
>> opspec=initopspec(opspec,opsim);
>> opss=findop('sim1',opspec);
There are no free variables to optimize. Free either a state or an
input.
0 个评论
回答(1 个)
Arkadiy Turevskiy
2016-12-12
States comes from blocks such as integrators or transfer functions or state space systems. In a neural net I don't think you have any integrators, and therefore you are not getting any states.
What is it that you are trying to do, I mean, can you explain why you need to trim your model?
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Model Predictive Control Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!