[SciPy-Dev] Strange problem with Kanes Method and Lagrange Method
Roberto Bucher
roberto.bucher at supsi.ch
Thu Mar 8 09:26:49 EST 2018
I have two scripts which implement method to model a wheeled inverted
pendulum, the first one implementing a Kanes method, the second one with
Lagrange.
Using Kane, I obtain the right result into the "fr+frstar" variable, but
after linearization the matrices A and B are completely wrong.
The same behavior seems to append with the Lagrange script, where after
the Lagrange Method the
"form_lagranges_equations()" output is correct but the generated
matrices A and B not...
In my opinion the right matrices should be:
A= np.matrix([ [0, 0, 1, 0], [0, 0, 0, 1],
[((L_w*M_w+L_p*M_p)*g)/(L_w^2*M_w-J_w+J_p), 0, 0, 0],
[-((L_w*M_w+L_p*M_p)*g)/(L_w^2*M_w-J_w+J_p), 0, 0, 0]] )
B = np.matrix( [0], [0], [-K_t/(L_w^2*M_w-J_w+J_p)],
[(K_t*L_w^2*M_w+J_p*K_t)/(J_w*L_w^2*M_w-J_w^2+J_p*J_w)] )
Both scripts are attached
Thanks in advance
Best regards
Roberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20180308/9f8b524f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pendolo_kane.py
Type: text/x-python
Size: 2731 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20180308/9f8b524f/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pendolo_lagrange.py
Type: text/x-python
Size: 2604 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20180308/9f8b524f/attachment-0001.py>
More information about the SciPy-Dev
mailing list