Main Content

Nonlinear Rotational Spring

R2026b

Torsional spring based on polynomial or table lookup parameterizations

  • Nonlinear Rotational Spring block

Libraries:
Simscape / Driveline / Couplings & Drives / Springs & Dampers

Description

The Nonlinear Rotational Spring block represents a torsional spring with a nonlinear torque-displacement curve. You can specify the torque-displacement relationship by using a polynomial or by table lookup. The spring torque can be symmetric or asymmetric with respect to zero deformation.

When you set Parameterization to By polynomial and set Symmetry to Symmetric, the block defines the spring torque, such that:

T=k1θ+sign(θ)k2θ2+k3θ3+sign(θ)k4θ4+k5θ5,

where:

  • T is the spring torque.

  • k1, k2, ...,k5 are the spring coefficients.

  • θ is the relative displacement between ports R and C, θ=θinit+θRθC

  • θinit is the initial spring deformation.

  • θR is the absolute angular position of port R.

  • θC is the absolute angular position of port C.

At simulation start, θR and θC are 0, making θ = θinit.

To avoid zero-crossings that slow simulation, eliminate the sign function from the polynomial expression by specifying an odd polynomial, where b2,b4 = 0.

When you set Parameterization to By polynomial and set Symmetry to Two-sided, the block defines the spring torque, such that:

T={k1tθ+k2tθ2+k3tθ3+k4tθ4+k5tθ5,θ0k1cθk2cθ2+k3cθ3k4cθ4+k5cθ5,θ<0

where:

  • k1t, k2t, ..., k5t are the spring tension coefficients.

  • k1c, k2c, ..., k5c are the spring compression coefficients.

Both polynomial parameterizations use a fifth-order polynomial expression. To use a lower-order polynomial, set the unneeded higher-order coefficients to zero. To use a higher-order polynomial, fit to a lower-order polynomial or set Parameterization to By table lookup.

The table lookup parameterization defines spring torque based on a set of torque and angular velocity vectors. If not specified, the block automatically adds a data point at the origin that corresponds with zero angular velocity and zero torque.

Variables

To set the priority and initial target values for the block variables prior to simulation, use the Initial Targets section in the block dialog box or Property Inspector. For more information, see Set Priority and Initial Target for Block Variables.

Nominal values provide a way to specify the expected magnitude of a variable in a model. Using system scaling based on nominal values increases the simulation robustness. Nominal values can come from different sources, one of which is the Nominal Values section in the block dialog box or Property Inspector. For more information, see Modify Nominal Values for a Block Variable.

Ports

Conserving

expand all

Mechanical rotational conserving port associated with the spring rod.

Programmatic Use

Port: R

Mechanical rotational conserving port associated with the spring case.

Programmatic Use

Port: C

Parameters

expand all

Whether to parameterize by polynomial or table lookup. Select from these options:

  • By polynomial — Specify nonlinear spring function in terms of polynomial coefficients.

  • By table lookup — Specify nonlinear spring function by using one-dimensional table lookup.

Programmatic Use

Parameter: parameterization
Values: "sdl.enum.polynomialTLU.polynomial" | "sdl.enum.polynomialTLU.tlu"

Whether to use symmetric or two-sided polynomial coefficients. Select from these options:

  • Symmetric — Specify one set of polynomial coefficients governing spring torque in both tension and compression.

  • Two-sided — Specify two sets of polynomial coefficients governing spring torque, one for positive deformation, the other for negative deformation.

Dependencies

To enable this parameter, set Parameterization to By polynomial.

Programmatic Use

Parameter: symmetry
Values: "sdl.enum.symmetry.symmetric" | "sdl.enum.symmetry.twoSided"

Five-element vector with polynomial spring coefficients. The highest non-zero order must be positive. Physical units are for the first coefficient.

Dependencies

To enable this parameter, set Parameterization to By polynomial and set Symmetry to Symmetric.

Programmatic Use

Parameter: coefficient_vector

Five-element vector containing the coefficients of the polynomial spring tension function. The highest order non-zero coefficient must be positive. The specified physical unit is the unit of the first polynomial coefficient.

Dependencies

To enable this parameter, set Parameterization to By polynomial and set Symmetry to Two-sided.

Programmatic Use

Parameter: tension_coefficient_vector

Five-element vector containing the coefficients of the polynomial spring compression function. The highest order non-zero coefficient must be positive. The specified physical unit is the unit of the first polynomial coefficient.

Dependencies

To enable this parameter, set Parameterization to By polynomial and set Symmetry to Two-sided.

Programmatic Use

Parameter: compression_coefficient_vector

Vector containing the deformation values used in the table lookup. The vector must contain a minimum number of elements based on the interpolation method: two for Linear, and three for Smooth. The vector must also contain the same number of elements as the Torque vector parameter.

Dependencies

To enable this parameter, set Parameterization to By table lookup.

Programmatic Use

Parameter: deformation_vector

Torque values that correspond element-wise to the Deformation vector parameter values. The vector must contain a minimum number of elements based on the interpolation method: two when you select Linear, and three when you select Smooth. The vector must be the same length as the Deformation vector parameter. The block includes a point at the (0,0) deformation–torque coordinate if your values do not specify one.

Dependencies

To enable this parameter, set Parameterization to By table lookup.

Programmatic Use

Parameter: torque_vector

Method to use to calculate deformation-torque values between table lookup data points. Select from these options.

  • Linear — Select this option to get the best performance.

  • Smooth — Select this option to produce a continuous curve with continuous first-order derivatives.

For more information on interpolation algorithms, see the PS Lookup Table (1D) block reference page.

Dependencies

To enable this parameter, set Parameterization to By table lookup.

Programmatic Use

Parameter: interp_method
Values: "simscape.enum.interpolation.linear" | "simscape.enum.interpolation.smooth"

Method to use to calculate deformation-torque values outside the table lookup data range. Select from these options.

  • Linear — Select this option to produce a curve with continuous first-order derivatives in the extrapolation region and at the boundary with the interpolation region.

  • Nearest — Select this option to produce an extrapolation that does not go above the highest point in the data or below the lowest point in the data.

  • Error — Select this option to issue an error if the input is outside the data range.

For more information on extrapolation algorithms, see the PS Lookup Table (1D) block reference page.

Dependencies

To enable this parameter, set Parameterization to By table lookup.

Programmatic Use

Parameter: extrap_method
Values: "simscape.enum.extrapolation.linear" | "simscape.enum.extrapolation.nearest" | "simscape.enum.extrapolation.error"

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2013a