##### These are Posts and Questions associated with the product, MapleSim Add-Ons

We are currently in the process of updating the support FAQs at https://faq.maplesoft.com. We’ve been working on updating the existing content for clarity, and have added several new articles already.

The majority of our FAQs are from questions people ask us in Technical Support at support@maplesoft.com, but we’d also like to like to add content from other sources.

Since we have such a great community here at MaplePrimes, we wanted to reach out and ask if there are any articles or questions that you'd like to see added to our FAQ.

We look forward to hearing your feedback!

## Constraints on Revolute Joints...

Hello,

I have an industrial robot model and I need to define constraints for the revolute joints. For example, R2 joint is only allowed to move between -165 to 165 degrees. Could you please tell me how I can impose these constraints?

Thank you.

Önder

## Complexity of some algorithm in computation of Gro...

Hi Dears,

I studied the concept of Grobner bases and some algorithm for computing them. I understood that the computation of grobner bases is related to the term ordering. Also, I knew that LEX ordering is very expensive. So, it is good idea to use the Grobner basis conversion algorithms such as FGLM and Grobner walk algorithm. Now, I want to know concerning the complexity of these algorithm (Buchbergers algorithm, F4 and F5 algorithm, FGLM algorithm and Grobner walk). I hope my question be appropriate in this site,

I am looking forward to hearing from you.

## how to animate plot in this example?...

sols = [1,1];

sols = [1,2];

sols = [5,10];

...etc

animate(plot, sols[A], A=1..20, frames = 20);

animate(plot, [sols], A=1..20, frames = 20);

this writing can be ploted, but when i play animation, can not see it draw step by step

## how to smooth signal in maplesim...

Hi I was wondering if theres a way to smoothen a signal in maplesim.
I was trying to create a simple moving average but it doesnt seem to be able to create a feed back loop?
Much appreciate any help, or if there are other ways within maplesim to do it.

thanks
pjf

## will license be consumed after activate in linux i...

if i install maple 2015 in amazon cloud, activate with my license

and i do not use amazon after several trial,

will the license be used and can not activate in future if i use amazon cloud again in future?

any command or configure needed when using large amount memory such as 100GB memory?

Hi all,

Is it possible, and how, to disable the automatic completion in the "Advanced Search / keyword" field ?

Underlying this question is my looking for informations about cmaple (beyond what the help page displays : if I can't find any I will ask some specific ones later). But every time I type "cmaple" in the keyword textfield, it is replaced by "campée" (which is a french word ... I guess english people will obtain something different)

Maplesoft regularly hosts live webinars on a variety of topics. Below you will find details on some upcoming webinars we think may be of interest to the MaplePrimes community.  For the complete list of upcoming webinars, visit our website.

Hollywood Math (with more new examples!)

Over its storied and intriguing history, Hollywood has entertained us with many mathematical moments in film. John Nash in “A Beautiful Mind,” the brilliant janitor in “Good Will Hunting,” the number theory genius in “Pi,” and even Abbott and Costello are just a few of the Hollywood “mathematicians” that come to mind.

Although the widespread presentation of mathematics on the silver screen is not always entirely accurate, it does serve as a great introduction to the study of mathematics in general. During this webinar Maplesoft will present a number of examples of mathematics in film. See relevant, exciting examples that you can use to engage your students.At the end of the webinar you’ll be given an opportunity to download an application containing all of the Hollywood examples that we demonstrate.

Applications of Symbolic Computation in Control Design

You may already use Maple and/or MapleSim within your organization to solve various problems, but did you know that they have capabilities for control design as well? In one of our upcoming featured webinars for this month, we will explore the Control Design toolbox including the ability to extract symbolic equations of plant models, perform symbolic linearization, design symbolic controllers, and generate very fast code for HIL testing.

The following examples will be demonstrated:

• PID Control

• LQR, Kalman filter design

• Gain scheduling

• Feedback linearization

## System of equations solve, solutions may be lost. ...

Hi MaplePrime-ers!

I've been using the Maple(17) toolbox in Matlab(2012b) to quickly enumerate systems of equations by: (i) solving them symbolically, (ii) using unapply to make them functions, (iii) then supplying the points (driver equations) to get the system solution.  Speed is a must, because there may be 3 million+ systems to solve.  Symbolics is also very important because I am evaluating topology, so the structure of the equations may change, and therefore a functional approach will not work.

I have had success (seen in the first code snippet).  I would like similiar behaviour in the second code snippet, but sometimes I get 'solutions may be lost' as an error message,  or 'Error, (in unapply) variables must be unique and of type name'

The system of equations include:  Linear equations, 5th order polynomials, absolute functions, and pieceiwse functions.

Here is code with a topology that solves:

#Interconnection Equations
eq2 := FD_T + EM2_T = 0;
eq2 := ICE_T + GEN_T = 0;
eq2 := EM2_A + GEN_A + BAT_A = 0;
eq2 := -FD_W + EM2_W = 0;
eq2 := -ICE_W + GEN_W = 0;
eq2 := -EM2_V + GEN_V = 0;
eq2 := -EM2_V + BAT_V = 0;

#ICE
eq_c := ICE_mdot_g=((671.5) + (-21.94)*ICE_T + (0.1942)*ICE_W + (0.5113)*ICE_T^2 + (-0.01271)*ICE_T*ICE_W + ( -0.0008761)*ICE_W^2 + (-0.006071)*ICE_T^3 + (9.867e-07)*ICE_T^2*ICE_W + (5.616e-05)*ICE_T*ICE_W^2 + (1.588e-06)*ICE_W^3 + (3.61e-05)*ICE_T^4 + (8.98e-07)*ICE_T^3*ICE_W + (-2.814e-07)*ICE_T^2*ICE_W^2 + (-8.121e-08)*ICE_T*ICE_W^3 + ( -8.494e-08 )*ICE_T^5 + (-2.444e-09)*ICE_T^4*ICE_W + (-9.311e-10)*ICE_T^3*ICE_W^2 + ( 5.835e-10)*ICE_T^2*ICE_W^3 ) *1/3600/1000 * ICE_T * ICE_W;

#BAT
eq_c := BAT = 271;

#EM2
EM2_ReqPow_eq := (-148.3) + (4.267)*abs(EM2_W) + (12.77)*abs(EM2_T) + (-0.0364)*abs(EM2_W)^2 + ( 1.16)*abs(EM2_W)*abs(EM2_T) + (-0.258)*abs(EM2_T)^2 + ( 0.0001181)*abs(EM2_W)^3 + (-0.0005994)*abs(EM2_W)^2*abs(EM2_T) + ( 0.0001171)*abs(EM2_W)*abs(EM2_T)^2 + (0.001739 )*abs(EM2_T)^3 + (-1.245e-07 )*abs(EM2_W)^4 + ( 1.2e-06)*abs(EM2_W)^3*abs(EM2_T) + ( -1.584e-06)*abs(EM2_W)^2*abs(EM2_T)^2 + ( 4.383e-07)*abs(EM2_W)*abs(EM2_T)^3 + (-2.947e-06)*abs(EM2_T)^4;
eq_c := EM2_P = piecewise( EM2_T = 0, 0, EM2_W = 0, 0, EM2_W*EM2_T < 0,-1 * EM2_ReqPow_eq, EM2_ReqPow_eq);
eq_c := EM2_A = EM2_P/EM2_V;

#GEN
GEN_ReqPow_eq:= (-5.28e-12) + ( 3.849e-14)*abs(GEN_W) + (-71.9)*abs(GEN_T) + (-1.168e-16)*abs(GEN_W)^2 +(1.296)*abs(GEN_W)*abs(GEN_T) + (2.489)*abs(GEN_T)^2 + (1.451e-19)*abs(GEN_W)^3 + (0.0001326)*abs(GEN_W)^2*abs(GEN_T) + (-0.008141)*abs(GEN_W)*abs(GEN_T)^2 + (-0.004539)*abs(GEN_T)^3 +(-6.325e-23)*abs(GEN_W)^4 + (-2.091e-07)*abs(GEN_W)^3*abs(GEN_T) + ( 3.455e-06)*abs(GEN_W)^2*abs(GEN_T)^2 + ( 2.499e-05)*abs(GEN_W)*abs(GEN_T)^3 + (-5.321e-05)*abs(GEN_T)^4;
eq_c := GEN_P = piecewise( GEN_T = 0, 0, GEN_W = 0, 0, GEN_W*GEN_T < 0,-1 * GEN_ReqPow_eq, GEN_ReqPow_eq);
eq_c := GEN_A = GEN_P/GEN_V;

#ASSUMPTIONS
assume(BAT_V::nonnegative);
assume(FD_W::nonnegative);

#FINAL EQUATIONS

sys_eqs2 := convert(eq2,set) union {eq_c,eq_c,eq_c,eq_c,eq_c,eq_c};

#Selecting which variables to solve for:

drivers2:= { ICE_T,ICE_W,FD_T,FD_W};
symvarnames2:=select(type,indets(convert(sys_eqs2,list)),name);
notdrivers2:=symvarnames2 minus drivers2;

#Symbolic solve

sol2:=solve(sys_eqs2,notdrivers2) assuming real:
symb_sol2:=unapply(sol2,convert(drivers2,list)):

#Enumerate (there will generally be about 40, not 6)

count := 0;
for i1 from 1 to 40 do
for i2 from 1 to 40 do
for i3 from 1 to 40 do
for i4 from 1 to 40 do
count := count + 1;
solsol2(count) := symb_sol2(i1,i2,i3,i4);
od;
od;
od;
od;
count;

This works great!  I would like simliar output in my second code snippet, but this time with more inputs to symb_sol.  However, if I try and change the interconnection equations a little, and add a piecewise function, and another driver... (differences in bold)

#Interconnection Equations
eq1 := FD_T+EM2_T = 0;
eq1 := ICE_T+GBb_T = 0;
eq1 := GEN_T+GBa_T = 0;
eq1 := EM2_A+GEN_A+BAT_A = 0;
eq1 := -FD_W+EM2_W = 0;
eq1 := -GEN_W+GBa_W = 0;
eq1 := -ICE_W+GBb_W = 0;
eq1 := -EM2_V+GEN_V = 0;
eq1 := -EM2_V+BAT_V = 0;

#ICE
eq_c := ICE_mdot_g=((671.5) + (-21.94)*ICE_T + (0.1942)*ICE_W + (0.5113)*ICE_T^2 + (-0.01271)*ICE_T*ICE_W + ( -0.0008761)*ICE_W^2 + (-0.006071)*ICE_T^3 + (9.867e-07)*ICE_T^2*ICE_W + (5.616e-05)*ICE_T*ICE_W^2 + (1.588e-06)*ICE_W^3 + (3.61e-05)*ICE_T^4 + (8.98e-07)*ICE_T^3*ICE_W + (-2.814e-07)*ICE_T^2*ICE_W^2 + (-8.121e-08)*ICE_T*ICE_W^3 + ( -8.494e-08 )*ICE_T^5 + (-2.444e-09)*ICE_T^4*ICE_W + (-9.311e-10)*ICE_T^3*ICE_W^2 + ( 5.835e-10)*ICE_T^2*ICE_W^3 ) *1/3600/1000 * ICE_T * ICE_W;

#BAT
eq_c := BAT = 271;

#EM2
EM2_ReqPow_eq := (-148.3) + (4.267)*abs(EM2_W) + (12.77)*abs(EM2_T) + (-0.0364)*abs(EM2_W)^2 + ( 1.16)*abs(EM2_W)*abs(EM2_T) + (-0.258)*abs(EM2_T)^2 + ( 0.0001181)*abs(EM2_W)^3 + (-0.0005994)*abs(EM2_W)^2*abs(EM2_T) + ( 0.0001171)*abs(EM2_W)*abs(EM2_T)^2 + (0.001739 )*abs(EM2_T)^3 + (-1.245e-07 )*abs(EM2_W)^4 + ( 1.2e-06)*abs(EM2_W)^3*abs(EM2_T) + ( -1.584e-06)*abs(EM2_W)^2*abs(EM2_T)^2 + ( 4.383e-07)*abs(EM2_W)*abs(EM2_T)^3 + (-2.947e-06)*abs(EM2_T)^4;
eq_c := EM2_P = piecewise( EM2_T = 0, 0, EM2_W = 0, 0, EM2_W*EM2_T < 0,-1 * EM2_ReqPow_eq, EM2_ReqPow_eq);
eq_c := EM2_A = EM2_P/EM2_V;

#GEN
GEN_ReqPow_eq:= (-5.28e-12) + ( 3.849e-14)*abs(GEN_W) + (-71.9)*abs(GEN_T) + (-1.168e-16)*abs(GEN_W)^2 +(1.296)*abs(GEN_W)*abs(GEN_T) + (2.489)*abs(GEN_T)^2 + (1.451e-19)*abs(GEN_W)^3 + (0.0001326)*abs(GEN_W)^2*abs(GEN_T) + (-0.008141)*abs(GEN_W)*abs(GEN_T)^2 + (-0.004539)*abs(GEN_T)^3 +(-6.325e-23)*abs(GEN_W)^4 + (-2.091e-07)*abs(GEN_W)^3*abs(GEN_T) + ( 3.455e-06)*abs(GEN_W)^2*abs(GEN_T)^2 + ( 2.499e-05)*abs(GEN_W)*abs(GEN_T)^3 + (-5.321e-05)*abs(GEN_T)^4;
eq_c := GEN_P = piecewise( GEN_T = 0, 0, GEN_W = 0, 0, GEN_W*GEN_T < 0,-1 * GEN_ReqPow_eq, GEN_ReqPow_eq);
eq_c := GEN_A = GEN_P/GEN_V;

#GB
FiveSpeedGearbox_R := proc(ig)
local i ,eq;
i:=3.32;
i:=2;
i:=1.36;
i:=1.01;
i:=0.82;
eq:= piecewise(ig=1,i,ig=2, i,ig=3,i,ig=4,i,ig=5,i,1);
return eq(ig);
end proc;

eq_c := GBb_T = -1/GB_R * GBa_T;
eq_c := GBb_W = GB_R * GBa_W;
eq_c := GB_R = FiveSpeedGearbox_R(ig);

#System Equations
sys_eqs := convert(eq1,set) union convert(eq_c,set);

#Solve for variables
symvarnames:=select(type,indets(convert(sys_eqs,list)),name);
drivers:= {ig, ICE_T,ICE_W,FD_T,FD_W};
not_drivers := symvarnames minus drivers;

#Assumptinons

assume(BAT_V::nonnegative);
assume(FD_W::nonnegative);

sol:=(solve(sys_eqs,not_drivers) assuming real);

symb_sol:=unapply(sol,convert(drivers,list)): ---> Error, (in unapply) variables must be unique and of type name

Subsequent parts don't work...

count := 0;
for i1 from 1 to 40 do
for i2 from 1 to 40 do
for i3 from 1 to 40 do
for i4 from 1 to 40 do
for i5 from 1 to 40 do
count := count + 1;
solsol2(count) := symb_sol2(i1,i2,i3,i4,5);
od;
od;
od;
od;
od;
count;

While running the last line sol:, 1 of 2 things will happen, depending on the solver. Maple17 will take a long time (30+ minutes) to solve, then report nothing, or sol will solve, but will report "some solutions have been lost".

Afterwards, evaluating symb_sol(0,0,0,0,0) will return a viable solution (real values for each of the variables).  Whereas evaluating symb_sol(0,X,0,0,0), where X <> 0, will return and empty list [].

Does anyone know how to (i) speed up the symbolic solve time?  (ii) Return ALL of the solutions?

Thanks in advance for reading this.  I've really no idea why this isn't working.  I've also attached two worksheets with the code: noGB.mw   withGB.mw

## MapleSim 6.4 is now available

MapleSim 6.4 includes more powerful tools for creating custom components, performance enhancements, and enhancements to the model generators for Simulink® and FMI.

We have also made important updates to the MapleSim Control Design Toolbox. This toolbox now offers a more complete set of algorithms for PID control, new commands for computing closed-loop transfer functions, and numerous improvements to existing commands. These enhancements allow engineers to design a greater variety of controllers and controller-observer systems while taking advantage of the greater flexibility and analysis options available through the use of symbolic parameters.

eithne

## MapleSim Connector C code api?...

Hello,

I have a model in MapleSim for which I've generated the optimized C code using the connector toolbox, and I'd like to work with it directly. I was wondering if there is any documentation or examples of how to do this? I haven't been able to find any online.

Thanks!

## About the Maple toolbox ?...

In the folders Maple 16: there is a file named MapleToolbox_Window.exe. What can I do with it?

## How do I solve a differential equation in Maple by...

I want to solve numerically the nonlinear problem

a*(diff(y(x), x, x))+2*(diff(y(x), x))+exp(y(x)) = 0, y(0) = 0, y(1) = 0

by defining my own method defined as

yn+1=yn+2*h*(-2*yn+2*ln(2/(1+x))-(1/2)*a)^2/(a*(-4*yn+4*ln(2/(1+x))-a-h*(4*yn-4*ln(2/(1+x))+a+x+1)/a))

where h is the step-size. Please help me by letting me know how can I do this using Maple 11.

## How do I define a road surface in the MapleSim Tir...

 1 2 Page 1 of 2