Skip to content

Commit ad0018a

Browse files
Update sim_fiction_compensation.m
In line 15, q(3) (z) should have been q(5) (z_tilde). This drastically improves the friction observer. z is not observable and should not be used in your control law.
1 parent 2c1369e commit ad0018a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sim_fiction_compensation.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
% here we use similar values as in Table I
1313
k = 10;
1414
zdot_tilde = q(2) - ( (q(5)*abs(q(2))*sigma_0) / (Fc+(Fs-Fc)*exp(-(q(2)/vs)^2)) ) -k*e;
15-
F_tilde = sigma_0*q(3) + sigma_1 * zdot_tilde + sigma_2*q(2);
15+
F_tilde = sigma_0*q(5) + sigma_1 * zdot_tilde + sigma_2*q(2);
1616

1717
u = -Kv*q(2)-Kp*e-Ki*q(4) + F_tilde; % the input here is a step function, second derivative of xd is zero
1818

@@ -25,4 +25,4 @@
2525
qdot_4 = e;
2626
qdot_5 = zdot_tilde;
2727
xdot = [qdot_1 ; qdot_2; qdot_3; qdot_4; qdot_5];
28-
end
28+
end

0 commit comments

Comments
 (0)