> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/example-models/motor-drives/mechanical-shaft.md).

# Mechanical Shaft

This example shows the mechanical shaft model.

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-61b45ff8788f074f6d5336381b546635a654c2a8%2Fmechanical_shaft_ex.png?alt=media" alt=""><figcaption></figcaption></figure>

C.Semaille, Louis-A. Dessaint (Ecole de technologie supérieure, Montreal)

## Description <a href="#description" id="description"></a>

The model outputs the transmitted torque through the shaft regarding the speed difference between the driving side and the loaded side of the shaft.

The shaft has a stiffness of 17190 N.m and an internal damping factor of 600 N.m.s. This shaft is designed to have 0.1 degree of angular deflection for a 30 N.m load torque.

The shaft is driven by a variable speed source and is connected to a load. The load has an inertia of 0.35 kg.m2 and a viscous friction term of 0.006 N.m.s

## Simulation <a href="#simulation" id="simulation"></a>

Start the simulation. You can observe the driving and the load speeds, the speed difference, the angular deflection and the transmitted torque values on the scope.

At t = 0 s, the driving speed starts climbing to 1750 rpm with a 500 rpm/s acceleration ramp. The angular deflection jumps to about 0.06 degree and the shaft transmits about 18.5 Nm to the load in order to accelerate it. At t = 0.2 s, the driving and load speeds tend to equalize. During the acceleration phase, the angular deflection increases slowly in order to transmit a higher torque to compensate the viscous friction increase.

At t = 3.5 s, the driving speed settles at 1750 rpm. This reduces the angular deflection and also the transmitted torque which settles around 1.1 Nm to compensate the viscous friction of the load.

At t = 5 s, the driving speed lowers towards 0 rpm with a -500 rpm/s deceleration ramp. The angular deflection becomes negative and thus the transmitted torque in order to decelerate the load. During the deceleration phase, the angular deflection increases in order to transmit a higher deceleration torque to compensate the reduction of viscous friction.

At t = 8.5 s, the driving speed stabilizes at 0 rpm. This causes the angular deflection to reduce to 0 degree, the transmitted torque becomes nul and the load stops.

#### Notes <a href="#notes" id="notes"></a>

1. The shaft has been discretized with a 10 us time step.
2. In order to reduce the number of points stored in the scope memory, a decimation factor of 10 is used.

## Command <a href="#command" id="command"></a>

Example model name: shaft\_example

{% code lineNumbers="true" expandable="true" %}

```matlab
open('shaft_example')
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/smart-power-simulation-software-sps/example-models/motor-drives/mechanical-shaft.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
