Is it possible to specify discrete sample time in a subsystem containing blocks from SimMechanics 2.4 (R2006a)?

1 view (last 30 days)
I have a Simulink model which consists of a "Controller" subsystem and a "Plant" subsystem. The Controller consists of mainly Simulink blocks and the Plant consists of SimMechanics blocks.
I want to use Rate-Transition blocks to specify the rate between the controller unit and the plant unit, i.e., I require my Plant subsystem to run at a rate much slower than the Controller unit and hence want to specify a discrete sample time for this subsystem.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
It is not possible to specify discrete sample time for a subsystem consisting of blocks from SimMechanics 2.4 (R2006a). This is because SimMechanics reduces the physical model (represented by the Physical Modeling blocks) into an equivalent state space system containing only continuous states. This requires the subsystem to operate at continuous sample time. Hence you cannot specify a discrete sample time for the subsystem block or by using Rate-Transition blocks.
To work around this issue, you can create an S-function for the plant subsystem containing SimMechanics blocks using the S-function Target and then specify a discrete sample rate to this S-function block.

More Answers (0)

Categories

Find more on Physical Units 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!