Skip to content
Rotational.TorqueToAngleAdaptor.md

Rotational.TorqueToAngleAdaptor ​

Usage ​

TranslatedComponents.Rotational.TorqueToAngleAdaptor()

Parameters: ​

NameDescriptionUnitsDefault value
use_w–true
use_a–true

Connectors ​

  • flange - This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. (Spline)

  • phi - This connector represents a real signal as an output from a component (RealOutput)

  • w - This connector represents a real signal as an output from a component (RealOutput)

  • a - This connector represents a real signal as an output from a component (RealOutput)

  • tau - This connector represents a real signal as an input to a component (RealInput)

  • w_internal - This connector represents a real signal as an input to a component (RealInput)

  • a_internal - This connector represents a real signal as an input to a component (RealInput)

Behavior ​

julia
using TranslatedComponents #hide
using ModelingToolkit #hide
@named sys = TranslatedComponents.Rotational.TorqueToAngleAdaptor() #hide
full_equations(sys) #hide
<< @example-block not executed in draft mode >>

Source ​

dyad
component TorqueToAngleAdaptor
  flange = Spline()
  phi = RealOutput()
  w = RealOutput() if use_w
  a = RealOutput() if use_a
  tau = RealInput()
  w_internal = RealInput()
  a_internal = RealInput()
  structural parameter use_w::Boolean = true
  structural parameter use_a::Boolean = true
relations
  connect(w, w_internal)
  connect(a, a_internal)
  phi = flange.phi
  if use_w
    w_internal = der(phi)
  else
    w_internal = 0.0
  end
  if use_a
    a_internal = der(w_internal)
  else
    a_internal = 0.0
  end
  flange.tau = tau
end
Flattened Source
dyad
component TorqueToAngleAdaptor
  flange = Spline()
  phi = RealOutput()
  w = RealOutput() if use_w
  a = RealOutput() if use_a
  tau = RealInput()
  w_internal = RealInput()
  a_internal = RealInput()
  structural parameter use_w::Boolean = true
  structural parameter use_a::Boolean = true
relations
  connect(w, w_internal)
  connect(a, a_internal)
  phi = flange.phi
  if use_w
    w_internal = der(phi)
  else
    w_internal = 0.0
  end
  if use_a
    a_internal = der(w_internal)
  else
    a_internal = 0.0
  end
  flange.tau = tau
metadata {}
end


Test Cases ​

No test cases defined.

  • Examples

  • Experiments

  • Analyses