C_R

2130 Reputation

19 Badges

4 years, 244 days

MaplePrimes Activity


These are answers submitted by C_R

Your general solution Sol1 should also simplify to an expression with signum(xc1-xc2) without the need to restrict the domain to real

sqrt((xc1 - xc2)^2)/(xc1 - xc2);
simplify(%);
                                    (1/2)
                      /           2\     
                      \(xc1 - xc2) /     
                      -------------------
                           xc1 - xc2     

                       signum(xc1 - xc2)
                      

Perhaps the radical is too complex and Maple overlooks this simplifcation or there is no simplification possible in the complex domain (for a reason I can't see at the moment).

Anyway, your substitution is equivalent to the assumption xc1 > xc2. You could use
 

simplify~(solve({eq1, eq2}, [x, y], explicit), radical) assuming (xc2 < xc1)

to avoid a call to realdomain and the substitution step. It's just a little bit neater.

 

Edit:

No simplification to an expression with signum possible in the complex domain without assumptions because the expression bellow is in general not zero

 

To change a style, navigate to style under format and modify 2d input this way



See https://www.maplesoft.com/support/help/maple/view.aspx?path=worksheet%2Fdocumenting%2Fstyles

to make it permanet for all worksheets

Without the model it is difficult to help.

In general:

What you have to do is to constrain the end effector position using parameters. There are several ways to do this.

https://fr.maplesoft.com/products/maplesim/modelgallery/detail.aspx?id=38

for example constrains the position a radar points to.

There are videos describing the whole process. Here is one

https://www.youtube.com/watch?v=7IKFqRkKqI0

Once constrained, MapelSim can generate and export algebraic constraints that you need to calulate the inverse kinematics.

The tricky part is to preserve the pulley coordinates in the algebraic constraints. For that you might find the following helpfull

https://www.mapleprimes.com/posts/217390-Equation-Extraction-For-Kinematics

Attached you will find a way in Maple. Since the problem is nonlinear there can be more minima (local or global). That's most likely the reason why the result from Maple and Mathcad do not agree in a first attempt.

NLPsolve (and the Optimization package in general) has a bunch of options Minerr in a solve block does not seem to have. If you want to reproduce whatever Minerr does you have to go through all the options and their combinations. I would start with methods first.

 

 

restart

H := Vector(9, {(1) = 210.84, (2) = 218.19, (3) = 219.17, (4) = 222.27, (5) = 226.35, (6) = 228.45, (7) = 230.44, (8) = 234.65, (9) = 239.75})

Vector[column](%id = 36893491118738273692)

(1)

Q := Vector(9, {(1) = 1800, (2) = 1750, (3) = 1730, (4) = 1700, (5) = 1650, (6) = 1635, (7) = 1600, (8) = 1570, (9) = 1500})

Vector[column](%id = 36893491118738263564)

(2)

A := 330.156

330.156

(3)

In Mathcad I used solve by using a solve block:

 

 

But what is the most efficient way to do this in Maple?

 

NULL

Supposing

Q^2in Mathcad is equivalent to `~`[`*`](Q, Q) in Maple

NULL

And in the same way

could be written using element wise operators

H = A*`~`[`-`](1, Q/Q0)-`~`[`*`](kf*Q, Q)-`~`[`*`](kl*`~`[`-`](Q, Qs), `~`[`-`](Q, Qs))

Vector[column](%id = 36893491118738273692) = Vector[column](%id = 36893491118738251396)

(4)

"res_v:=(lhs-rhs)(?);#` vector of residuals`"

Vector[column](%id = 36893491118738227316)

(5)

initial_points := {Q0 = 6413, Qs = 1416, kf = 10^(-5), kl = 10^(-5)}

{Q0 = 6413, Qs = 1416, kf = 1/100000, kl = 1/100000}

(6)

with(Optimization)

[ImportMPS, Interactive, LPSolve, LSSolve, Maximize, Minimize, NLPSolve, QPSolve]