main content

hybrid clutch system -凯发k8网页登录

this example shows how to use simulink based states inside a stateflow® chart to model a clutch system. for a detailed explanation of the physical system, see (simulink).

recommended workflow

this model shows the recommended way of modeling hybrid systems by using simulink and stateflow. this model also covers when to use simulink or physical modeling tools if the continuous dynamics are complex coupled with mode changes.

modeling a hybrid system involves addressing the following concerns:

  • modeling the continuous dynamics

  • modeling the mode logic

  • initializing states when switching between modes

continuous dynamics

hybrid systems have multiple modes of operation where each mode is defined by continuous dynamics. when the continuous dynamics are complex, model them by using simulink based states. in this model, the locked and slipping states represent the two modes of operation of a clutch. simulink blocks within a simulink based state represent the logic of the state. these blocks include continuous time blocks, such as integrators. within each simulink based state, you can access chart inputs and outputs by creating inports and outports with the same name. each simulink based state reads from a subset of chart inputs and writes to all the chart outputs.

mode logic

mode logic refers to the conditions under which the model switches from one mode of operation to another. in this example, the mode logic is described by the transition logic between the two simulink based states. the conditions needed to switch from one simulink based state to another depend on the internal state of the integrators within in the current active mode. for example, when switching from slipping to locked stateflow must read the internal state of the integrator in the slipping mode.

this is possible using two different mechanisms:

1. using state reader and state writer blocks inside simulink functions: stateflow can call simulink functions on the transition logic between the two modes. inside the simulink function, use state reader blocks to refer to the internal state of the integrator. for example, the simulink function detectlockup uses the state reader block enginespeed to read the state of the integrator block sf_clutch/clutch/slipping/xe.

2. using qualified dot notation on the transition conditions: if the transition logic is simple and can be expressed textually, it is possible to use a syntax like slipping.we == ... to refer to the state of the integrator sf_clutch/clutch/slipping/xe. for this syntax to work, the state name parameter of the integrator has to be set to "we".

state handoff

when switching from one mode of operation to another, the integrators in the newly activated subsystem need to be initialized properly in order to get smooth output. this can be done using either simulink state reader and state writer blocks in simulink functions or textually using the qualified dot notation. for example, on the transition from slipping to locked, initialize the state of the single integrator in locked by using the state of one of the integrators in slipping. initialize the state by using the syntax:

locked.w = slipping.we;

simulation results

when the system is simulated, the engine and vehicle velocities are as shown in the following graph. the plates lock at about 4 seconds and begin slipping again at about 6.25 seconds.

related topics

网站地图