NNPC error - S-function block 'untitled/NN Predictive Controller/S-Function' references obsolete level-1 MATLAB S-function 'predopt'.
55 views (last 30 days)
Show older comments
Tasmiyah Javed
on 19 Nov 2024 at 17:33
Commented: Tasmiyah Javed
on 11 Dec 2024 at 14:15
Hello
I am working with NNPC block in Simulink with my plant model designed as a physical model of Ohmic heater using the Simscape library. The inputs to the NNPC for 'Plant Identification' step is Voltage (input) and Temperature (output). After the training of the NN, I enter the necessary values for the controller. The controller block gives me this error:
"Warning:S-function block 'untitled/NN Predictive Controller/S-Function' references obsolete level-1 MATLAB S-function 'predopt'. Manually review the code and convert to level-2 MATLAB S-function if necessary. For more information, see Convert Level-1 MATLAB S-Functions to Level-2."
Can anyone please help me how to remove this error. Any insights on this issue will be highly appreciated.
Thanking in anticipation.
0 Comments
Accepted Answer
Saurabh
on 9 Dec 2024 at 6:53
It seems that the model was initially developed using an older version of MATLAB with a Level-1 S-function, and then it was imported and saved in a newer version. Could you try the following steps? Enter the "NN Predictive Controller" subsystem of the model and remove the "predopt" block. Then, create a new Level-2 S-function block with the following details:
S-function name: predopt
Parameters: You can copy and paste this list of parameters from the Level-1 S-function, as they might be the same.
After replacing the Level-1 S-function with a Level-2 one, try running the model again to see if it works successfully.
I hope this helps!
More Answers (0)
See Also
Categories
Find more on Configure Block Features for MATLAB S-Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!