-
Notifications
You must be signed in to change notification settings - Fork 50
Admittance model
To ensure a perfectly fluid, hysteresis-free force feedback experience, the physical linear movement of the motor (Actuator Space) must be accurately translated into the rotational movement of the human foot (Task Space). This requires precise Forward and Inverse Kinematics.
We model the pedal as a multi-body system forming two triangles. We want to find the total pedal incline angle
The pivot points are defined as follows:
-
$A$ : Lower pedal plate pivot (Origin$0,0$ ) -
$B$ : Pivot where the loadcell rod connects to the sled -
$C$ : Pivot where the loadcell rod connects to the pedal arm
The known mechanical lengths are:
-
$a$ : Length of the loadcell rod (Distance$B \leftrightarrow C$ ) -
$b$ : Length of the lower pedal arm (Distance$A \leftrightarrow C$ ) -
$c_{\text{vert}}$ : Vertical distance from origin to the sled spindle -
$c_{\text{hor,0}}$ : Horizontal distance from origin to the sled at its minimum (0%) position.
As the motor moves the sled, the absolute horizontal distance
First, we calculate the diagonal distance
The angle between the horizontal
The angle between the pedal arm
Rearranging for
The total pedal faceplate angle
The admittance control model (
The arc length
Because the lever arm
This mathematically proves that we can natively map the normalized position of the physics engine (g_vModelPos_01) directly to the target pedal angle, completely bypassing the non-linearities of the loadcell pushrod.
To command the stepper motor, we must translate the target pedal angle
Previously, this was approximated using a Newton-Raphson solver. However, iterative solvers can couple with physical motor lag (tracking error) upon direction reversals, inducing mathematical deadbands and perceived mechanical hysteresis (stiction).
To achieve
We define the coordinates of the pedal pivot
$C_x = b \cdot \cos(\phi)$ $C_y = b \cdot \sin(\phi)$
We know the coordinates of the sled pivot
-
$B_x = c_{\text{hor}}$ (The unknown variable we need to solve for) -
$B_y = c_{\text{vert}}$ (A constant mechanical parameter)
Because the loadcell rod
Substituting our known coordinates:
Let
Substitute
Taking the square root (we only use the positive root, as the sled
Finally, we subtract the mechanical offset
This provides an exact, immediate target position for the motor driver that is completely decoupled from previous physical states, entirely eliminating mechanical turnaround lag.
The core of the pedal's haptic feedback is the Admittance Control loop. Unlike position control, admittance control measures an input force and calculates a resulting motion based on a virtual physical model.
We simulate a 1-Degree-of-Freedom (1-DOF) Mass-Spring-Damper system. The behavior is governed by the fundamental equation of motion:
Where:
-
$F_{\text{net}}$ : The sum of all forces acting on the virtual mass. -
$M$ : Virtual mass (Inertia) – determines how "heavy" the pedal feels to accelerate. -
$C$ : Virtual damping – determines the "viscosity" or resistance to movement. -
$K$ : Virtual stiffness – derived from your custom Force-Travel Curve.
Every control cycle (e.g., 4000 times per second), the firmware calculates the net force:
-
$F_{\text{human}}$ : The force you apply, measured by the loadcell and converted to the pedal faceplate (Task Space). -
$F_{\text{spring}}(s)$ : The target force retrieved from your S-Curve or Linear spline based on the current virtual position$s$ . -
$F_{\text{damping}}(\dot{s})$ : Calculated as$C \cdot \dot{s}$ to provide resistance and prevent oscillations.
To find the new position from the calculated force, we must integrate twice. For high stability and to prevent the "hard pedal" feel or jitter, the implementation uses the Tustin (Bilinear) Transformation.
The continuous transfer function in the Laplace domain is:
Using the Tustin substitution
This ensures that the virtual velocity
-
Input: Loadcell measures raw force
$\rightarrow$ Kinematics convert this to$F_{\text{human}}$ . -
Physics:
$F_{\text{net}}$ is fed into the Tustin integrator$\rightarrow$ Outputs new virtual positiong_vModelPos_01. -
Task Space: Normalized position maps linearly to target angle
$\phi$ (as proven in Section 2). -
Output: Analytical Inverse Kinematics convert
$\phi$ to the exact motor step position$x$ .
Please find the different entries on the right hand side.