Solved

Reversing the Kiwi-Drive formula

Posted on 2011-02-25
3
484 Views
Last Modified: 2016-05-20
We've recently build a kiwidrive robot, and now we want to use it as a musical instrument.
It has three wheels, each with a motor that produces a distinct tone.
The formulas used to calculate motor speeds are as follows:

M1 = 0.5 * X - 0.866 * Y + R
M2 = 0.5 * X + 0.866 * Y + R
M3 = X + R

Since we are no good at math, we need help reversing these formulas so that for a given M1, M2 and M3, we want to calculate X, Y and R.

Thanks!
0
Comment
Question by:JasonMewes
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 500 total points
ID: 34978990
solveing the three equations, for the three unkowns (X,Y and R)

R =  0.5 * M1 + 1.5 * M2 - M3
X = -0.5 * M1 - 1.5 * M2 + 2* M3
Y = (1/1.732)*(M2 - M3)

do you need to see the details?

AW


0
 

Author Comment

by:JasonMewes
ID: 34979544
Didn't look quite right, so I double checked:

x = 50, y = 12, r = 97

M1 = 0.5 * x - 0.866 * y + r
M2 = 0.5 * x + 0.866 * y + r
M3 = x + r

r = 0.5 * M1 + 1.5 * M2 - M3
x = -0.5 * M1 - 1.5 * M2 + 2 * M3
y = (1 / 1.732) * (M2 - M3)

yields: x = 39.608, y = -8,43418013856813, z = 107,392

In any case my initial formula was wrong but I would have given you your points anyways if the answer had been correct, but as demonstrated above it doesn't seem to be. Correct me if I made a mistake.

The correct formula should have been:

M1 = -0.5 * X - ( sqrt( 3 ) / 2 ) * Y + R
M2 = -0.5 * X + ( sqrt( 3 ) / 2 ) * Y + R
M3 = X + R

For which the solution seems to be:

X = ( -2 * M3 + M2 + M1 ) / -3
Y = ( M1 - M2 ) * ( sqrt( 3 ) / -3 )
R = ( M3 + M2 + M1 ) / 3

Points to anyone who can verify the validity of the solution.
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 34981319
the original question stated:

M1 = 0.5 * X - 0.866 * Y + R
M2 = 0.5 * X + 0.866 * Y + R
M3 = X + R



now you indicate that the 'correct' formula should have been

M1 = -0.5 * X - ( sqrt( 3 ) / 2 ) * Y + R
M2 = -0.5 * X + ( sqrt( 3 ) / 2 ) * Y + R
M3 = X + R

notice the sign difference on the first factor of M2.

with the new formulae,

M1 +M2 = -X + 2 * R
M3 = X + R

hence R = (M1 + M2 + M3)/3

X = - (M1 + M2) + 2 *(M1 + M2 + M3)/3 = (2 * M3 - M1 - M2)/3 (which is the same as  ( -2 * M3 + M2 + M1 ) / -3)

Y = (M2 - M1) /sqrt(3) = (M2 - M1) * Sqrt(3)/3  which is the same as  ( M1 - M2 ) * ( sqrt( 3 ) / -3 )


AW
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
My 2003 Land Rover discovery 2 key for code for car alarm 7 158
Dual bridge protection 18 189
Currency Conversion? 1 133
Smoothing a rectified sine wave DDS 32 157
Okay. So what exactly is the problem here? How often have we come across situations where we need to know if two strings are 'similar' but not necessarily the same? I have, plenty of times. Until recently, I thought any functionality like that wo…
Lithium-ion batteries area cornerstone of today's portable electronic devices, and even though they are relied upon heavily, their chemistry and origin are not of common knowledge. This article is about a device on which every smartphone, laptop, an…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question