WOLFRAM SYSTEM MODELER

# JoystickReturnTrajectory

Model simulating response of three joystick designs to circularly varying test force.

# Wolfram Language

In[1]:=
`SystemModel["IndustryExamples.ConsumerProducts.Joystick.JoystickReturnTrajectory"]`
Out[1]:=

# Joystick Design: Return Trajectory

## Introduction

This model compares the return trajectory of three analog joysticks after being suddenly released after being displaced from the center equilibrium position. Each joystick has a handle re-centering mechanism based on a symmetrical arrangement of a different number of tension springs.

View the model diagram for this model.

The other model in this example is JoystickForceResponse, which compares the response of the three joysticks to a circularly varying test force.

## Hierarchical Modeling

The joystick model is constructed hierarchically. Double-click on a component such as fourSpringReturn1 to see its model diagram. Inside fourSpringReturn1 double-click on one of the tension springs to see its model diagram, and so on:

## Simulation & Animation

To simulate the model and view a 3D animation of it, follow the steps below:

• Click the button in the top-right corner.
• When the build is finished, click the Simulate button .
• Click the Animate button .
• Use your mouse or trackpad to drag the animation into a good angle, and zoom in with your scroll wheel or by using the trackpad. Then click the play button to play the animation.
• Change the Time Scale at the bottom of the animation window to 0.1 to watch the joystick in slow motion.

The animation shows the trajectory of the joystick handle as it springs back after being suddenly released from a position away from the center equilibrium:

Note that the handle does not return along a linear trajectory. The joysticks with a larger number of symmetrically spaced springs (four or six) follow a path that is more nearly linear.

## Visualization

After simulating the model, look at the stored plots to see parametric plots of the path along which each joystick returns.

The parametric plots look like this:

You can see that the six-spring arrangement leads to the most linear return trajectory.

By simulating the other model in this example, JoystickForceResponse, you can also obtain the following parametric plots of the response of each joystick to a circularly varying test force:

You can see that the-six spring arrangement leads to the most circular force response.

# Parameters (2)

initialAngles Value: {0.5, 0.1} Type: Angle[2] (rad) Description: Initial angles of the joysticks, first rotating aroung the X-axis and then rotating around the Y-axis. Value: 100 Type: TranslationalSpringConstant (N/m) Description: Base spring constant of the joystick springs.

# Components (23)

world Type: World Type: JoystickJoint Type: BodyCylinder Type: BodyCylinder Type: ThreeSpringReturn Type: FixedTranslation Type: FixedTranslation Type: FourSpringReturn Type: BodyCylinder Type: BodyCylinder Type: JoystickJoint Type: FixedTranslation Type: JoystickJoint Type: BodyCylinder Type: BodyCylinder Type: SixSpringReturn Type: FixedTranslation Type: FixedTranslation Type: FixedShape2 Type: Fixed Type: FixedTranslation Type: FixedTranslation Type: FixedTranslation