Coupled Clutches: Analysis Using Template Cells

Introduction

By coupling clutches together, a variable structure drivetrain can be achieved. With different clutches engaged at different times, torque is supplied to different parts of the system. In this notebook, the system is analyzed using built-in templates. These simplify many of the model analytics tasks that can be performed on SystemModeler models in Mathematica.

Explore the available scenarios by evaluating each cell in order. Evaluation is done by selecting a cell and pressing Shift+Enter.

In order to get the full experience of this example, you need the following:

Wolfram SystemModeler; a free trial download is available at www.wolfram.com/system-modeler

The model that came in the same bundle as this notebook

For more information about Wolfram SystemModeler, visit www.wolfram.com/system-modeler.

Initialize

Load the package:

Needs["WSMLink`"]

Define the model name:

mmodel="EducationExamples.MechanicalEngineering.CoupledClutches.CoupledClutchesModel";
mrtmodel="EducationExamples.MechanicalEngineering.CoupledClutches.Components.Clutches";

Model

A good way to start is by looking at the model diagram:

WSMModelData[{mmodel,"clutches"},"Diagram"]

The model consists of a series of coupled inertia components separated by clutches between them. When a clutch is engaged, friction will be present between two adjacent inertia components, causing them to transfer momentum to each other. The first and the last inertia components are damped by rotational dampers, and a constant torque is applied to the first inertia.

From left to right, the first two clutches are timed so that they disengage after 15 seconds and engage after 5 seconds, respectively. The third clutch can be controlled by user input. On the top level, that user input is also connected to a timer, engaging the clutch after 10 seconds:

WSMModelData[mmodel,"Diagram"]

Simulation

First, see how the system behaves without any changes. Calling the WSMPlot function without any arguments will bring up the preferred plot:

Quiet[WSMPlot[mmodel,PlotRange->All]]

The plot shows the angular velocities of the different parts of the coupled clutches. At different times, different clutches are pressed together to transfer momentum from one inertia component to an adjacent one.

In this notebook, different aspects of the system will be examined using the WSMCreateTemplateCells function. Many different templates are available to quickly get you started analyzing a model. All the available templates can be listed with the following command:

TableForm[WSMCreateTemplateNotebook["Properties"]]

Initial Values

One useful template is “ChangeInitialValue”. It can be used to change the initial rotational speed of one of the inertia components, for example.

To do this, evaluate the following command and set the template cells variableName to “clutches.J3.w” and "initialValue" to 10, then evaluate the resulting expressions:

WSMCreateTemplateCells[mmodel,"ChangeInitialValue"]

In the preceding WSMPlot command, you can leave out the second argument to plot the preferred plot, or use a stored plot name as argument (called without the curly brackets). You can list all the stored plots with the “PlotNames” argument to WSMModelData:

TableForm[WSMModelData[mmodel,"PlotNames"]]

Parameter Values

Templates can also be used to change parameter values using the “ChangeParameter” template. After evaluating the following command, set the template cells parameterName to “T1” and "parameterValue" to 0. Remove the second argument to WSMPlot, containing the variableName template cell:

WSMCreateTemplateCells[mmodel,"ChangeParameter"]

The parameter “T1” sets the time when the first clutch is disengaged. If set to 0, as in the preceding example, the momentum will never be transferred to the other inertia components.

To compare the response to different parameter values, the “SweepParameter” template can be used.

After evaluating the following command, set the template cells parameterName to “d” and inside the Range command, set "imin" to 0.5, "imax" to 2 and "di" to 0.5. Also set variableName to “clutches.J1.w”:

WSMCreateTemplateCells[mmodel,"SweepParameter"]

The parameter “d” corresponds to the damping constant affecting the first and the last inertia components. The less damping there is, the higher the rotational velocity of the system.

Real-Time Simulations

SystemModeler models can be simulated in real time. The “SimulateInRealTime” template helps to set this up.

A real-time simulation of the angular velocity of the first inertia component can be created with the following command. Evaluate it and set the template cell variableName to “clutches.J1.w”:

WSMCreateTemplateCells[mmodel,"SimulateInRealTime"]

Real-time simulations can also be interacted with directly, using Mathematica control objects. Evaluate the command to create a slider that can be used to control the force applied to the third clutch:

Slider[Dynamic[input],{0,1}]

After evaluating the following command, set the template cells variableName to “J4.w” and inputVariableName to “u”, and change the "function" to the variable input. After starting the simulation, drag the slider to see how the clutch force affects the angular velocity of the last inertia component:

WSMCreateTemplateCells[mrtmodel,"ChangeRealTimeInput"]

Fourier Analysis

By applying a sinusoidal function to the last clutch, a pattern emerges that can be studied using Fourier analysis. First, simulate the model with a sinusoidal input function:

sim=Quiet[WSMSimulate[mrtmodel,{0,120},
WSMInputFunctions->{"u"->( Sin[#*0.5]*0.1&)}]];

The response on the angular acceleration of the last inertia can be seen with the following command:

Quiet[WSMPlot[sim,"J4.a",ImageSize->Medium]]

The “FourierAnalyze” template can be used to do a Fourier analysis on the simulated model. After creating the template cells with the following command, remove the command that simulates the model, or replace the simulation expression with the preceding simulation. Lastly, set variableName to “J1.a”.

WSMCreateTemplateCells[mrtmodel,"FourierAnalyze"]

Terms and Conditions of Use

This domain example is an informational resource made freely available by Wolfram Research.

Use of This Example

• You may not use this example for any purpose that is unlawful or dangerous.
• You assume total responsibility and risk for your use of this example.
• You may not present this example with any alteration to its trade dress, trademarks, or design.

License

All content in this bundle is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. By accessing the content or using it in any way, you accept and agree to be bound by the terms of this license. If you do not agree to these Terms of Use, you may not use this content. Wolfram Research reserves the right to change, modify, add to, or remove portions of these Terms of Use at any time without notice. Please refer back to www.wolfram.com for the latest Terms of Use.

A summary of the licensing terms can be found at:
http://creativecommons.org/licenses/by-nc-sa/3.0

The full legal code can be found at: 
http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode