Prompt Detail:
To achieve closed-loop control, we can use a feedback controller that maps the error in tip position xerr = xdes −xact and yerr = ydes −yact to the pressures pc, p1, p2, and p3. We can use the kinematic model above to calculate ∆p1, ∆p2, and ∆p3 that will move the robot tip in the direction that will decrease the error by causing a change in tip position ∆x and ∆y. The steps for the algorithm are:
Measure the current position of the robot tip (xact, yact) and calculate the error in position (xerr, yerr) with respect to the desired position (xdes, ydes).
Determine the desired stiffness of the robot body, and calculate the value of pc based on this stiffness. If the desired stiffness is not known, we can choose a default value.
Calculate ∆p1, ∆p2, and ∆p3 using the following equations: ∆p1 = k(xerrcosψ2 + yerrsinψ2)/(ccos(ψ1−ψ2)) ∆p2 = k(xerrcosψ1 + yerrsinψ1)/(ccos(ψ2−ψ1)) ∆p3 = k(xerrsinψ3 − yerrcosψ3)/c
where k is a tuning parameter that controls the rate of change of the pressures, and c is a constant defined by the physical properties of the actuators.
Calculate p1, p2, and p3 by adding ∆p1, ∆p2, and ∆p3 to their current values. If any of the calculated pressures are negative, adjust them to the minimum value that will make them positive. If any of the pressures are zero, choose a new value for p3 that maximizes the workspace and minimizes stiffness, and recalculate p1 and p2.
Send the calculated pressures (pc, p1, p2, p3) to the actuators to move the robot tip in the desired direction.
Repeat steps 1-5 until the error in position is small enough or the desired trajectory is completed.
If the desired trajectory changes, recalculate the desired pressures (pc, p1, p2, p3) and