## 2230 Reputation

4 years, 277 days

## convert,unit_free not effective...

I have rewritten your worksheet with equations to see what is substituted in the RMS expression. As you can see, value is not effective and convert,unit_free throws the same error you are encountering. This does not look good either.

Attached is a simple example where piecewise integration of constant functions worked well with units. Test wise, instead of constant functions I tried to integrate squared cosine functions and took the square root of it. This is equivalent to your RMS calculation and worked well. So, it is really strange what you are encountering.

I hope my additional observations can give a clue what is going on.  Or you can use my file to start from scratch.

 >

Definition of current functions

 >
 >
 >
 >
 >

Calculation of RMS values

 >
 (1)
 >
 (2)
 >
 >
 (3)
 >
 (4)

simple_piecewise_integration_with_units.mw

## Alternative with indets...

I missed dharr's answer. Anyway, here is a less specific way that checks for any other function.

 > expr:=(sin(x)*EllipticF(k, y)/(BesselI(z, l)*arctan(y, x)))^WhittakerW(mu, nu, z) - my_funct(alpha);
 (1)
 > indets(expr, function);
 (2)
 The 26 functions in the "elementary" class are:
 (3)
 > all_funct := {op(subs({seq(i = op(0, i), i in indets(expr, function))}, indets(expr, function)))};
 (4)
 > oth_funct:=(el_funct union all_funct) minus el_funct;
 (5)

If the set is not empty, there are other than elementary functions in the expression

 > is(oth_funct = {});
 (6)
 >

## Mapleflow allows you to enter Maple comm...

Mapleflow allows you to enter Maple commands.

Try the Maple command convert(expr, units, 'N/m^3') on the expression expr with kg/m2s2

## For sind:Try help(Degrees,sind) and open...

For sind:

Try help(Degrees,sind) and open the help page in a worksheet (Crtl O). Then execute the commands to see if sind works.

For RPMs:

Why should the unit be meter per second?

## Unwrap: Maybe an alternative...

Have you considered using the unwrap option of help(SignalProcessing[Phase])

## The last statement is the problem. Do no...

The last statement is the problem. Do not assign a value to wx (which is used in GainQ1). This changes the definition of GainQ1 and thus the output (if you execute the last line again)

## Linearization point...

I assume that the state equations you posted correspond to the linearization point for the "initial configuration" (see linearization options of the linearisation app of MapleSim).

If you choose a different linearization point (see yellow highlight below), the zeros disappear.

You might find more on the equation export here: help(DynamicSystems[Linearize])

(Update: I could not find a description on the option  "format=all")

If you are interesed in the nonlinear differential equations you can also use the equation extraction app of MapleSim.

Update2:

If you change the initial conditions of the angular velocity of the revolute joint R_1 to a non zero value you will get accelerating terms in the state equations also for the inital configuration.

So to answer your question: The inital accelation you see in the result window comes from the integration process that uses a linearized model having no "accelerating terms".

## Why not sampling?...

Couldn't you use the sampler component to discretize the continuous functions (signals in MapleSim, I assume) and use your working Modellica code?

The general problem I see is that MapleSim does not provide means/components that allow us to see/simulate into the future (e.g. there are no infinite impulse response filters). At which point in time (MapleSim simulation time) do you want to perform the convolution?

What you tried is basically correct. You should have added simply rad to omega1

Note that the unit of rad is 1, which is the reason for the inconsistencies in your worksheet

Alternatively, as I would do it, the same without assignemt statement (":="), which requires re-execution of the whole document every time you change parameters.

 (1)

 (2)

 (3)

 (4)

 (5)

General solution

 (6)

Parameters

 (7)

 (8)

 (9)

Convert to rad/s (does not work on equations -> complicated command required)

 (10)

## 2 times interrupt button...

works in Maple 22.

At the first click you get: Waring computation interrupted. At the second click evaluation stops and Maple returns to ready (lower left corner)

## Display type...

If you are using a high resolution screen: Try adjusting the compatibility settings (High dpi) under the properties of maplew.exe (try different settings).

I have done this and Maple In and Output display excellent on a 4K screen (much better than Word and other office applications).

If you are still running a Maple 2020 version: Is the quality as bad? I noticed a difference between the current JDK Java platform and the earlier Java platform.

Note: In high res mode Maple 2022 menus are still a mix of low and high renderings. Changing the display within a session can also degrade the rendering of In and Output

## Plot points = Events?...

Interesting question and topic!

I interpreted "plot events" equals 2000 events plotted.

But if you turn on: Solver Diagnostics you will find much more events. (Whatever such events might be?!?)

Zoom into the two plots to find the 40Hz

I would have expected that the "plot without plot events" would match the mean amplitude of the plot "with plot events".

If this your question/assumption: It seems not to be a sampling issue.

If you increase the number of plot point to 20000, plot 2 changes completely.

At this point would inspect the circuit for electronic modeling issues, which is beyond my field of expertise.

## Correct thinking...

On a related topic, I stumbled across this question. You are correct in your assumption. A more realistic IK should alternate between the two solutions. However, with the input variables Tx and Ty, I don't see a simple switching condition as one can guess from the animation.
I would be interested in a better IK as well.

## Just a guess...

since it seems to work with an ideal opAmp: verify the opAmp parameters and/or set initial conditions of the opAmp

## Maple does not know the value of x^2+y^2...

Others have answered your question implicitly by suggesting assumptions. An answer to your title could be: Because Maple does not know where to locate x^2+y^2 in the complex plane. Depending on where it is located the simplified result can differ in sign.
If x and y were imaginary for example, Maple could simplify to something that does not appear equal, such as:

 (1)

 (2)

 (3)

In your example simplify with the option symbolic works as well (but assumptions are the safer way, seeQues_Mapleprime_symbolic.mw)