MapleSim Questions and Posts

These are Posts and Questions associated with the product, MapleSim

example.msim

I want to get an adjustable parameter in maplesim. For example, here is a pulse voltage source, i  want to make its amplitude controlled by another voltage output (doesn't exist in this .msim).

ac-dc-dc1.msim

When i click off the "Plot events", the figure of Probe2 is pretty different comparing with "Plot events" is turned on. Here is my assumption: the simulation duration is 500 seconds and the plot points are 2000. Considering the frequency of sine current is 40HZ, many points cannot be ploted in the figure. So it is not a big deal for curve like Probe1 and Probe5 because  they tend to be a constant and Probe2 just reflect the tendency.

MapleSim is a fantastic tool to model multi-domain physical systems at a level that was unthinkable not so long ago. This post is about a simple problem that can be solved by hand, but where I failed with MapleSim using online resources.

For some time, I have been looking for answers to two questions:

  • How to control which variables (and parameters) are included in MapleSims equation exports? This question is crucial to derive forward and inverse kinematics.
  • Can the Equation Extraction App (in principle) provide a similar set of equations than the Multibody Analysis App? This question is rather academic until multidomain exports are desired (which the Multibody Analysis can’t provide).

The attached model helped me to clarify a few things and discover a real hidden secret (at least it was for me). I hope it can help others.

The model is a rather simple 3DOF mechanism. The task was to get a set of equations to derive the two rotations and the one displacement of the mechanism as a function of x,y,z coordinates.

After watching videos and inspecting models from the model gallery on inverse kinematics, I placed motion drivers for the input variables, added sensors for the output variables and wrapped the mechanism into a subsystem. However, as explained in more detail in the attachment, the set of exported variables was incomplete in both apps (AEs exports in the Equation Extraction Export and Position Constraints in the Multibody Analysis Export). Furthermore, the number of extracted equations did not match the three degrees of freedom.

After numerous trials it turned out that in addition to the motion drivers and sensors, initial conditions (ICs) had to be set. This is the hidden secret.  The crucial initial conditions (detailed in the attachment) are not required to assemble and run the model. So, introducing them temporarily for equation extraction is not obvious and never came to my mind. Setting ICs is, if I am not completely mistaken, also not highlighted in the documentation. This little trick of additionally setting initial conditions answered the above questions positively (at least for this 3DOF mechanism). In fact, it worked so well that all other failed attempts of conditioning the model for equations extraction worked immediately:

  • Immobilizing the assembly with a Fixed Frame (using parameters for the fixed frame position to represent input variables; the fixed frame can be inside or outside the subsystem model).
  • Using one Prescribed Translation component Instead of 3 motion drivers
  • Using variables to pass motion signals into the model subsystem instead of using signals and ports (using From variable and To Variable components)

These attempts underline the effort and the time spend to get the relevant equations for that simple problem. As it turned out, all approaches work but are not even required for the mechanism. The key to success was setting the ICs of the joints.  One can even strip the model down to its skeleton (removing all motion drivers and sensors as in the screen shot bellow) and still get the desired simple set of equations, provided the ICs are set.

 

It has to be noted, that the mechanically coupled (highlighted in yellow) prismatic joints contributed to the problems: MapleSim does not seem to take this mechanical constraint into account (as I would have expected). The ICs of both coupled components must be set to get the three equations containing all desired in and output variables.

If my finding is correct and of general relevance, I like to suggest including such kind of tips and tricks in training or reference material.  From an application engineer or developers’ perspective, knowing the underlying algorithms, its probably obvious what has to be done. But from a user’s perspective MaplsSim is a black box that works magically well in most cases. If it does not, trial and error is often the only alternative to make it work, because models are either too complex or too confidential to be shared with others.   

What I am addressing here is only the initial step of getting the desired equations. There is more to master. Save manipulation of equations too big to be inspected visually is also important. This has been well covered in several videos. Unfortunately, the quality of some of the footage does not allow to capture details of Maple commands. If possible, such material should be updated or replaced.

Overall, a collection of tips&tricks and dos&don’ts could establish some kind of best practice in deriving kinematics. If others would share their experience and findings, we all could save allot of time. A collection of valuable posts, questions, models, videos, and webinars could be a start. This collection not necessarily has to meet the high Maple standards of mathematical exactness and consistency. Engineers also accept pragmatic solutions to solve a problem.

If my findings are incorrect or you have better advise, please let us know.

MBA_and_equation_extraction.msim

piezoelectric_equivalent_with_ac-dc_(1).msim

I try to build a piezoelectric equivalent circuit (a sine current source, a capacitor and a resistor), but it doesn't act as a voltage source. I also try to change the forward voltage of the ideal diode in full-bridge rectifier and find that the output voltage of piezoelectric equivalent circuit cannot exceed forward voltage.

By the way, the parameters of piezoelectric equivalent circuit are well set according to a paper.

Could you give me some advice?

v2i2v_circuit.msim

I try to design a circuit to make a voltage-current-voltage translation. In my assumption, probe1.v is equal to probe2.v and it will generate a current(probe2.v / R4) through NMOS. The NMOS acts as a closed switch. Probe3.v is equal to CV3 and i can get "Probe4.v = CV1 + CV3". However, when the circuit operates, probe3.v isn't equal to CV3 and probe1.v isn't equal to probe2.v. I have tried to rise the differential input resistance and differential amplifier to make the Uin+ close to Uin- in op amp, but it doesn"t work effectively.
In addition, the closed resisitance of NMOS is also taken into consideration and i try to make it pretty below Kohm.

Could you help me fix the problem? 

battery_charging_circuit.msim

I am trying to design a charge circuit for Li battery, but i don't think it is a good idea to discharge the battery by a resistor or a cuurent source. So, how can i set the parameters to make the battery discharged initially?

I try to design a half rectifier circuit in MapleSim, but the simulation is so slow and the console output says "Warning: many small integration steps are being taken at a very small proportion of integration range at t=2.9653230e-006, absolute/relative tolerance may be too tight for problem, or problem may require a stiff solver". So how should i improve the circuit to make the simulation faster?

By the way, i don't want to change the basic design of the circuit, so the circuit should consist of both diode and op amp. I know the diode only circuit can achieve the same goal.

half_rectifier.msim

current_mirror.msim

I try to simulate a current mirror model, but it doesn't work and say "cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up". Maybe some incorrect parameters are set there, could you fix it? 

In a multibody assembly I have three instances of identically connected prismatic joints (flanges not conneted and identical componets at the frames)

In the simulation results the joints are listed with the following variables:

Why are the variables not the same for three identical components and what do the Fi and Mi stand for?

Is there any documentation on variables listed in the simulation results? It seems that more variables can be available than listed in the component documentation.

I have seen that this is possible (for example in the example:  2-D Flexible Spin-up Beam).

When I copy an image to the Windows10 clipboard it does paste to other applications but not to MapleSim. Instead, I get an audio notification from the system that is played on other instances when an action cannot be performed.

Within MapleSim copy and paste works (also between models). However, copying an image from a Maplesim Model to another Windows App does not work.

Can someone confirm that pasting images works in recent verions?

(Clearing the Clipboard removes images copied with MapleSim.

Observed on 2 Windows 10 installations with the version 2022 and 2021.)

I have not found anything in the corresponding help page and mouse over does not work.

 

In a video (watch from 7 min onwards) I have seen the definition of solution types in custom components. Is this possible in newer versions of MapleSim using the custom component app? If yes, how?

I need 4400 N of friction and not 2200N, so in wich direction operate it?Whit 2200N i I have mauch oscillation.fall_elevator_on_spring.msimfall_elevator_on_spring.msimthanks

Explorer 1 was the first satellite sent into space by the United States. It was a scientific instrument that led to the discovery of the Van Allen radiation belt. In order to keep its orientation, the satellite was spin stabilized. Unexpectedly, shortly after launch, Explorer 1 flipped the axis of rotation. The animation below shows, on the left, Explorer 1 in its initial state after launch, rotating about the axis of minimum moment of inertia. On the right side, 100 minutes later in the simulation, Explorer 1 rotates about the axis of maximum moment of inertia. This unintended behavior could not be explained immediately. Finally, structural damping in the four whip-like antennas was made responsible for the flip (explained here).

The flip can be reproduced with MapleSim using flexible beam components with damping enabled. Without damping and without slight angular misalignment at launch the flip does not manifest.

The simulation is only of qualitative nature since data of the antennas could not be found. On images of Explorer 1, the antennas look prebend and show large deflections of about 45 degrees under gravity. Since rotation of the satelite stretches the antennas, no modeling of large deflections needed to be considered in the simulation and rather stiff antennas (2 mm in diameter) without spheres at their ends were used. (Modeling large deflections with high fidelity might only be considered if the unfolding process of the antennas at launch is of interest. This should be modeled with several flexible beam components.)  

The graph bellow shows the evolution of the angular velocity in x direction. Conservation of angular momentum reduces the angular velocity when the satellite starts flipping towards a rotation about the axis of maximum moment of inertia.

Not long ago such simulations would have been worth a doctoral thesis. Today its rather straight forward to reproduce the flip with MapleSim.

Not so easy is the calculation of energy and angular momentum (for the purpose of observing how well numerics preserve physical quantities in rather long calculations. After all, the solver does not know the physical context). Such calculations would require access to the inertia matrix of the cylinder component including a coordinate transform into the frame of reference where the vector of rotation can be measured.

In case such calculations are possible with MapleSim, it would be nice if someone can update the model or at least indicate how calculations can be done.

Explorer_1_Parameters_and_links.mw

Explorer_1.msim

On a side note: I learned from the flip in an excellent series of lectures on dynamics. Wherever our professor could, he came up with animation in hardware. In this case, he could only provide an exciting story about the space race and sometimes fruitful mistakes in science. That’s why I still remember it.

When defining 2 frames as shown here

only one additional port is shown in the workspace. Mouse over indictes an array of 2 ports.

I could not find any examples or explanations how to connect to an array of frames.

Can someone connect two ridig body frames to it?

Box.msim

1 2 3 4 5 6 7 Last Page 1 of 37