10 October 2017 0 5K Report

Hello,

Want to ask for help some Matlab/Simscape professionals. I have designed recently a few Simscape hydraulic customs models (written in Simscape language). I can say that it was not too difficult. However, now I’ve came across one small issue with the “Switch with Hysteresis” example (https://au.mathworks.com/help/physmod/simscape/lang/delayed-switch.html). I need to design a valve that has two pressure flow characteristics at different thresholds.

Pretty much I need to use this hysteresis structure for my new hydraulic block. The issue is that I can’t compile (hence create) the switch model by using the presented code. It gives me “Unexpected MATLAB expression” in “modecharts(ExternalAccess = observe” line (compiling directly from a Simulink model via the block “Simscape component” . I can see in the help section that I need to also create the switching m file, but even with this file in a working folder I am still getting the same error all the time. Are there any suggestions how I can overcome it? Or maybe there are other options for modeling the hysteresis effect?

Similar questions and discussions