43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
[U,iterations] = qp_mu(J_uu,(J_ux*x - J_uw*W),Gamma,gamma,mu); # QP solution for weights U
##U = qp(J_uu,(J_ux*x - J_uw*W),Gamma,gamma); # QP solution for weights U
##U = pd_lcp04(J_uu,(J_ux*x - J_uw*W),Gamma,gamma); # QP solution for weights U
u = Us0*U; # Control signal
else # Do the unconstrained solution
## Compute the open-loop gains
K_w = J_uu\J_uw;
K_x = J_uu\J_ux;
## Closed-loop control
U = K_w*W - K_x*x; # Basis functions weights - U(t)
u = Us0*U; # Control u(t)
endif
|
>
|
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
[U,iterations] = qp_mu(J_uu,(J_ux*x - J_uw*W),Gamma,gamma,mu); # QP solution for weights U
##U = qp(J_uu,(J_ux*x - J_uw*W),Gamma,gamma); # QP solution for weights U
##U = pd_lcp04(J_uu,(J_ux*x - J_uw*W),Gamma,gamma); # QP solution for weights U
u = Us0*U; # Control signal
else # Do the unconstrained solution
## Compute the open-loop gains
iterations = 0;
K_w = J_uu\J_uw;
K_x = J_uu\J_ux;
## Closed-loop control
U = K_w*W - K_x*x; # Basis functions weights - U(t)
u = Us0*U; # Control u(t)
endif
|