explainer
Transfer functions: predict joint speed from torque
Derive a robot joint transfer function with the Laplace transform. Separate zero-state and natural responses, calculate a pole and time constant, and compare torque steps with pulses.
What you will learn
- Derive a torque-to-speed transfer function from a joint equation.
- Keep the initial-condition term when taking a Laplace transform.
- Separate motion caused by an input from motion caused by an initial state.
- Interpret the pole, DC gain, and time constant of a first-order system.
- Build a torque pulse response from two delayed step responses.
Before you start
A torque command takes time to change a joint's speed. The same command also produces different motion when the joint starts at rest or already spins.
A transfer function describes the input-to-output response from zero initial state. You will derive one for a robot joint, then add the initial motion back into the prediction.
Describe the relation between torque and speed
Suppose you apply 1 N·m to a joint with inertia 0.5 kg·m² and viscous damping 1 N·m·s/rad. Starting from rest, the speed reaches about 0.982 rad/s after two seconds. Its long-time limit is 1 rad/s.
We want a reusable model of this response. Changing the torque from a held step to a short pulse should change the input description while preserving the joint model.
The forward dynamics lesson calculates acceleration from an applied torque and a state. A transfer function gives another representation of the same linear dynamics, suited to input-output calculations and block diagrams.
Choose a linear time-invariant joint model
Use one rigid joint that rotates in a horizontal plane about a vertical axis. Gravity produces no torque about that axis. Let positive torque and positive angular speed share a direction.
Jω̇(t) + Bω(t) = τ(t), with J > 0 and B > 0
| Symbol | Meaning | Units |
|---|---|---|
| J | Constant effective inertia | kg·m² |
| B | Constant viscous damping coefficient | N·m·s/rad |
| τ(t) | Applied actuator torque, the input | N·m |
| ω(t) | Joint angular speed, the output | rad/s |
| ω₀ | Initial speed ω(0) | rad/s |
Physical damping torque is −Bω. It opposes either direction of motion. Both coefficients remain constant throughout a response.
This model is linear: scaled inputs and initial states produce scaled, additive responses. It is time-invariant: delaying an input by a given duration delays its response by that duration, provided the initial state is zero before the delayed input.
The model assumes ideal applied torque. It omits dry friction, torque limits, and elastic motion. Review friction models, actuator dynamics, or joint flexibility when those effects matter; a single constant-coefficient transfer function cannot represent every behavior of a real joint.
Move a derivative into the Laplace domain
The one-sided, or unilateral, Laplace transform describes a signal for t ≥ 0:
F(s) = ℒ[f(t)] = ∫₀∞ f(t)e−st dt
s = σ + jν, with j² = −1
The variable s is complex and has units 1/s, meaning inverse seconds. Its real part σ supplies exponential weighting; ν is angular frequency in rad/s. The letter s inside G(s) therefore represents a variable, not a time reading in seconds.
Use piecewise continuous signals of exponential order, and choose s where the integral converges. Here, Re(s) > 0 is sufficient for the step, pulse, and speed transforms. Speeds stay continuous, and the experiment uses finite torque jumps with no impulses.
For the ordinary derivative, integration by parts gives:
ℒ[ω̇(t)] = sΩ(s) − ω₀
The initial-value term comes from the lower boundary of the integral. MIT's Laplace transform reference states this ordinary-derivative rule with the initial value at 0+. Our continuous speed has the same value at the starting instant.
Derive the transfer function from rest
Write Ω(s) = ℒ[ω(t)] and T(s) = ℒ[τ(t)]. Apply the transform to the joint equation:
J[sΩ(s) − ω₀] + BΩ(s) = T(s)
(Js + B)Ω(s) = T(s) + Jω₀
Set ω₀ = 0 to define the transfer function:
G(s) = Ω(s)/T(s) = 1/(Js + B)
Ω(s) = G(s)T(s), when ω₀ = 0
G describes the joint's zero-state input-output relation. It stays the same when you choose a different torque waveform. MIT's transfer-function lecture derives this algebraic approach from linear differential equations and zero initial conditions.
The units of G are (rad/s)/(N·m). Both numerator and denominator signals acquire a factor of time through the transform, so their ratio retains the original output/input units. Speed per torque differs from angle per torque; the chosen input and output belong in every model description.
This is a causal model: current speed depends on initial motion and torque already applied. A future torque switch cannot change an earlier speed. The transfer function does not require the joint to react instantaneously.
Keep the motion from the initial condition
For a moving start, divide the complete transformed equation by Js + B:
Ω(s) = G(s)T(s) + Jω₀/(Js + B)
ω(t) = ω_zero-state(t) + ω_natural(t)
ω_natural(t) = ω₀e−Bt/J
The zero-state response contains the motion caused by the input when starting from rest. The natural response, also called the zero-input response here, contains the decay from the initial speed with torque set to zero. Their sum gives the full response.
The term Jω₀/(Js + B) belongs to this initial-value problem. It does not change G(s). In particular, a nonzero output at zero input can come from stored initial motion.
Superposition needs care when comparing experiments. Adding two full responses adds both initial states as well as both inputs. To add only input effects while retaining one chosen initial state, add the zero-state responses first, then include the natural response once.
Calculate a torque step response
Let τ(t) = τ₀ for t ≥ 0. This is a held step, with transform T(s) = τ₀/s for Re(s) > 0.
From rest, factor the output into familiar transform pairs:
Ω_zero-state(s) = τ₀/[s(Js + B)]
= (τ₀/B)[1/s − 1/(s + B/J)]
ω_zero-state(t) = (τ₀/B)(1 − e−Bt/J)
Add the initial response to obtain:
ω(t) = τ₀/B + (ω₀ − τ₀/B)e−Bt/J
For J = 0.5, B = 1, τ₀ = 1, ω₀ = 0, and t = 2, speed is 1 − e⁻⁴ = 0.981684 rad/s. Acceleration is (1 − 0.981684)/0.5 = 0.036631 rad/s², using unrounded values in the calculation.
Now start at ω₀ = 1 rad/s with the same torque. The natural response contributes e⁻⁴ = 0.018316 rad/s at two seconds. Full speed remains exactly 1 rad/s at every time because the initial speed already balances the applied torque and damping.
Read the pole, time constant, and DC gain
Write G in a normalized form:
G(s) = K_dc/(T_c s + 1)
K_dc = 1/B, T_c = J/B, pole = −B/J
| Property | What it tells you | Default value |
|---|---|---|
| DC gain K_dc | Long-time speed divided by a constant nonzero torque | 1 (rad/s)/(N·m) |
| Time constant T_c | Time for the natural response to fall to 1/e of its initial value | 0.5 s |
| Pole | Root of the transfer-function denominator | −2 s⁻¹ |
After one time constant, a step from rest reaches 1 − e⁻¹ ≈ 63.2% of its final signed change. The negative real pole corresponds to exponential decay. The University of Michigan's CTMS notes explain these first-order response properties.
Increasing J with B fixed slows the response without changing the DC gain. Increasing B with J fixed shortens the time constant and lowers the long-time speed for a fixed torque.
Poles and zeros extends this model to real and complex pole pairs. Its experiment also shows how a numerator zero changes the response and what exact pole-zero cancellation removes from an input-output relation.
The limit describes t → ∞. It does not say a finite plot window reaches that value. With J = 2 and B = 0.25, a 1 N·m step from rest gives 2.528482 rad/s at eight seconds, while its limit is 4 rad/s.
For this stable joint, evaluating G at s = jν also gives its sinusoidal steady-state frequency response: G(jν) = 1/(B + jJν). This describes gain and phase for a sinusoidal torque after transients decay. The lab below focuses on time responses.
Build a pulse from two delayed steps
Apply τ₀ from t = 0 until Tₚ = 2 seconds, then set torque to zero. Let H(t) denote a unit step, with H(t) = 0 before zero and H(t) = 1 from zero onward.
τ(t) = τ₀[H(t) − H(t − Tₚ)]
T(s) = τ₀(1 − e−Tₚs)/s
The factor e−Tₚs delays the second step by the pulse duration. Tₚ has units of time, so the exponent Tₚs is dimensionless.
Let S(t) be the zero-state step response above, with S(t) = 0 for t < 0. Linearity and time invariance give ω_zero-state(t) = S(t) − S(t − Tₚ). For t ≥ Tₚ, the same result has the simpler decay form:
ω_zero-state(t) = (τ₀/B)(1 − e−BTₚ/J)e−B(t−Tₚ)/J, t ≥ Tₚ
For the default parameters and zero initial speed, ω(2) = 0.981684 rad/s. Torque becomes zero at that instant, so acceleration becomes −1.963369 rad/s². Speed has no jump; changing a finite torque changes its derivative.
At t = 3 seconds, speed is 0.132857 rad/s. Any nonzero initial-speed contribution still follows ω₀ exp(−Bt/J) and joins the pulse response by addition. Once the pulse ends, the full speed decays toward zero.
Compare the three responses in the lab
The default shows Step from rest at two seconds. Blue marks full speed, dashed orange marks zero-state speed, and dotted purple marks natural speed. The torque plot makes the chosen input visible.
- Choose Already at the step equilibrium. Full speed stays at 1 rad/s while its two components change.
- Choose Two-second torque pulse. Move Response time through two seconds and compare torque with speed.
- Choose Initial motion, zero torque. The joint moves even though the zero-state response is zero.
- Choose A slow joint response and show the end. Compare the eight-second speed with the long-time limit.
- Change the initial speed to a negative value. The natural response can oppose the input response.
Each preset changes the model and input but preserves the selected time. Reset restores the default parameters and time. The curves describe exact solutions of this constant-coefficient model; the readouts round to six decimal places.
There is no feedback controller in this experiment. The open-loop and closed-loop lesson compares those signal paths. The feedback control lesson uses measured speed to adjust torque, which changes the dynamics of the complete loop.
Reproduce the responses in Python
This standard-library example evaluates the same equations. After the pulse ends, it decays the speed attained at Tₚ directly. That avoids subtracting two nearly equal step values late in a fast response.
from math import exp, expm1, log
def response(t, J=0.5, B=1.0, torque=1.0, initial=0.0, pulse=False):
decay = B / J
if pulse and t >= 2.0:
forced = torque / B * (-expm1(-2.0 * decay)) * exp(-decay * (t - 2.0))
applied = 0.0
else:
forced = torque / B * (-expm1(-decay * t))
applied = torque
natural = initial * exp(-decay * t)
speed = forced + natural
acceleration = (applied - B * speed) / J
return applied, forced, natural, speed, acceleration
for label, t, options in [
("step", 2.0, {}),
("initial", 2.0, {"initial": 1.0}),
("pulse edge", 2.0, {"pulse": True}),
("pulse later", 3.0, {"pulse": True}),
("slow at 8s", 8.0, {"J": 2.0, "B": 0.25}),
]:
applied, forced, natural, full, acceleration = response(t, **options)
print(f"{label}: torque={applied:.6f}, zero-state={forced:.6f}, "
f"natural={natural:.6f}, full={full:.6f}, acceleration={acceleration:.6f}")
print("exercise 1:", ", ".join(f"{v:.6f}" for v in response(2, J=1, B=0.5, initial=-1)))
print(f"pulse half-speed time: {2 + 0.5 * log(2):.6f} s")
Output:
step: torque=1.000000, zero-state=0.981684, natural=0.000000, full=0.981684, acceleration=0.036631
initial: torque=1.000000, zero-state=0.981684, natural=0.018316, full=1.000000, acceleration=0.000000
pulse edge: torque=0.000000, zero-state=0.981684, natural=0.000000, full=0.981684, acceleration=-1.963369
pulse later: torque=0.000000, zero-state=0.132857, natural=0.000000, full=0.132857, acceleration=-0.265713
slow at 8s: torque=1.000000, zero-state=2.528482, natural=0.000000, full=2.528482, acceleration=0.183940
exercise 1: 1.000000, 1.264241, -0.367879, 0.896362, 0.551819
pulse half-speed time: 2.346574 s
Try it yourself
Exercise 1: start against the input. Set J = 1 kg·m², B = 0.5 N·m·s/rad, τ₀ = 1 N·m, and ω₀ = −1 rad/s with a held step. Find G(s), its pole and time constant, and the full speed at t = 2 seconds. Explain whether ω₀ changes G.
Check the model and the two response components
G(s) = 1/(s + 0.5), the pole is −0.5 s⁻¹, and T_c = 2 s. DC gain is 2 (rad/s)/(N·m).
At two seconds, zero-state speed is 2(1 − e⁻¹) = 1.264241 rad/s. Natural speed is −e⁻¹ = −0.367879 rad/s. Their sum is 0.896362 rad/s.
The initial speed changes the natural response. G still describes the same torque-to-speed relation from rest. Enter these values in the lab or use the exercise line in the Python output to check the sum.
Exercise 2: let the pulse die away. Use J = 0.5, B = 1, τ₀ = 1, ω₀ = 0, and a pulse ending at Tₚ = 2 seconds. Does the speed jump at Tₚ? When does it first fall to half its value at switch-off?
Check the switch and the half-speed time
Speed stays at 1 − e⁻⁴ = 0.981684 rad/s through the switch. Acceleration changes from 0.036631 to −1.963369 rad/s² as torque drops by 1 N·m.
After switch-off, ω(t)/ω(2) = e⁻²⁽ᵗ⁻²⁾. Setting the ratio to 1/2 gives t = 2 + ln(2)/2 = 2.346574 s, where speed is about 0.490842 rad/s.
The time slider brackets this between 2.30 and 2.35 seconds. The Python output gives the exact formula's value to six decimal places. A zero torque after the pulse permits continuing motion because the joint still has kinetic energy.
Sources and further study
- MIT 18.03SC, Unit 3 practice exam and solutions, for the ordinary-derivative rule, transform pairs, time shifts, and the zero-initial-state convention.
- MIT 2.161, Lecture 5, for deriving transfer functions, the complex variable s, and evaluation on the imaginary axis.
- University of Michigan CTMS, Introduction: System Analysis, for the pole, time constant, and DC gain of a stable first-order system.
Continue with block diagrams to combine these input-output models. Keep each signal's units and each initial-state assumption visible as the system grows.