TWiki > Rise Web>ClimbingRobot > ForceSensingAnkle>PentaForceGait (15 Sep 2005, SalomonTrujillo)
Using the concepts behind the VirtualSpring, an impedance control algorithm has been created. An example of this algorithm can be seen in the pentapedal force-controlled gait:

The robot uses a pentapedal gait that is hard-wired into the code. This demonstration does not take advantage of CustomGait, (which is a topic for future work.) The gait is defined by a series of cubic splines through joint space. Each segment is associated a desired position, force and stiffness curve. For this demonstration, desired forces are set to zero (desired velocities are hard-code to zero.) Also, the control law exists in joint-space and the force sensor uses its own local frame. (another topic for future work is to transform everything into the robot frame.)

The higher-level algorithm above the PD control loop is as follows:

```x_command = (Fs - Fd) / k + Xd
xdot_command = 0
```
When we subsitute this control law into the PD control we get:
```torque = (Kp / k)(Fs - Fd) + Kp(Xd - X) - Kd( Xdot )

Kf = Kp / k
```
So, we can think of the stiffness as a ratio between force and position terms. (Sidenote: if Kp goes to zero but Kf remains finite, then the control law becomes a pure-force control law.)
```Key:
Fs = Force Sensor Signal  Fd = Desired Force
k = Desired Stiffness     Xd = Desired Position
X = Actual Position       Xdot = Actual Velocity
Kp = Propitional Gain     Kd = Derivative Gain
Kf = Force Gain
```

-- SalomonTrujillo - 15 Sep 2005

Copyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback