Message Boards Message Boards

0
|
9001 Views
|
8 Replies
|
0 Total Likes
View groups...
Share
Share this post:
GROUPS:

New to SystemModeler - How do I smooth acceleration?

Posted 9 years ago

Hello. I'm new to SystemModeler. I'm attempting to learn the software with highly simplified experiments/models. At the moment, I'm trying to model a rotating a mass that is moved by a prismatic joint (representing a simplified hydraulic cylinder) as shown in Image1. Cartoon of mechanical arrangement to be modeled

With a combiTimeTable and position source, I animated the model. The smoothness of the combiTimeTable was set to ContinuousDerivative. The relative distance between the prismatic joint's frames, s, is shown below in Image2. This is a screen grab in Simulation Center. This is, indeed, the profile that I intended to input.

enter image description here

The velocity profile of the prismatic joint, v, is about what I expected it to be as displayed in Simulation Center. (Please see Image3) As you can see, the initial position profile that I built in Excel for the combiTimeTable is based upon nearly constant acceleration and deceleration. The velocity profile isn't quite as smooth as I'd like it to be at the end of the acceleration phase and at the start of the deceleration phase, but things here aren't horrible. My main concern relates to the acceleration profile.

enter image description here

And here is the meat of my question... When I plot the prismatic joint's acceleration, a, I get a very noisy plot. Considering my use of a combiTimeTable to control the length of the prismatic joint, can I control the filtering/averaging of the prismatic joint's acceleration? I'm quite sure I'm doing something foolish here. Thanks in advance for any help/advice that might be offered.

enter image description here

POSTED BY: Dave F
8 Replies
Posted 9 years ago

Hello Johan. I just finally found time to check your suggestion. It worked perfectly. You just helped me better understand where and when to use position, velocity, and accelerate to "drive" motions with combiTimeTables. Thank you.

I have a few more things that I'm trying to sort out. If I can't these things sorted through on my own today - I may post about these stumbling blocks soon.

Again, thank you for so kindly helping me get past my combiTimeTable confusion.

Dave

POSTED BY: Dave F
Posted 9 years ago

Dave, after looking at your spreadsheet I see that you start by defining the acceleration and then calculate the speed and position from that. In that case I'd use an Accelerate component, with: Modelica.Mechanics.Rotational.Sources.Accelerate accelerate(phi.start = 3.141592) and "drive" the model that way.

Attachments:
POSTED BY: Johan Rhodin
Posted 9 years ago

Hi Johan,

Thank you very much for the help. I can't believe that in all of my playing around with this, I never actually checked the documentation for the Position source. Your reply was very helpful.

So the resulting revolute acceleration in SystemModeler looks like this: enter image description here

The acceleration profile used to build my position table looked like this: enter image description here

Understanding now how the acceleration profile is developed by the Position source, it seems that I either have to live with the acceleration approximation that results from a position input table or, perhaps, use a Speed or Accelerate source with an appropriate table when I'm inclined to use a combiTimeTable input for one reason or another.

Before I close out this question in my mind, may I ask you for your advice here? Suppose that a customer or employer of mine sends me the excel sheet that I attached in my earlier post. If I need to use this tabulated motion profile with a SystemModeler model, what would be the most accurate way to drive the revolute? Should I use a combiTimeTable to input position, speed, or acceleration to the revolute and use some appropriate f_crit filter frequency? Should I fit a curve to the tabulated position, speed, or acceleration data and then use a RealExpression block with an appropriate rotational source? Or is there a better way to "instruct" the SystemModeler revolute to accurately follow the motion profile in excel that I'm not thinking of?

Thank you for all of your help!

POSTED BY: Dave F
Posted 9 years ago

Dave, I quickly looked at your model. You're using a Modelica.Mechanics.Rotational.Sources.Position to drive the revolute joint. Position has to somehow derive the angular velocity and acceleration from the numerical input. From the documentation of Position:

The reference angle is filtered and the second derivative of the filtered curve is used to compute the reference acceleration of the flange. This second derivative is not computed by numerical differentiation but by an appropriate realization of the filter. For filtering, a second order Bessel filter is used. The critical frequency (also called cut-off frequency) of the filter is defined via parameter f_crit in [Hz]. This value should be selected in such a way that it is higher as the essential low frequencies in the signal.

I changed the f_crit in a simplifed version of your system to 0.1, and that gave a nice angular velocity and acceleration.

Model with revolute and position

Attachments:
POSTED BY: Johan Rhodin
Posted 9 years ago
Attachments:
POSTED BY: Dave F
Posted 9 years ago

Hello Johan,

I am very sorry about this delayed response. I tried to reply about a week ago and after considerable work my computer crashed and everything was lost. Since then, I have been completely tied up with pressing work issues and haven't had the time to send a proper response. Things are still crazy here, but I will respond as soon as I can. Thanks.

Dave

POSTED BY: Dave F
Posted 9 years ago

The timetable is forcing the movement very hard. You can add a spring damper and some friction between it and the prismatic joint. Uploading your model would help bring in more advice.

POSTED BY: Johan Rhodin
Posted 9 years ago

Just in case I wasn't clear in my first post, I used a combiTimeTable source as a position input to the prismatic joint. The table is cut and pasted here for reference. Thanks.

0 2.591168 2 2.598947 4 2.622508 6 2.662497 8 2.719908 10 2.795967 12 2.891991 14 3.009233 16 3.14873 18 3.311175 20 3.496825 22 3.695442 24 3.895987 26 4.097293 28 4.298366 30 4.498345 32 4.696479 34 4.892109 36 5.084647 38 5.273567 40 5.458393 42 5.629791 44 5.779403 46 5.908291 48 6.017506 50 6.108045 52 6.180806 54 6.23656 56 6.275927 58 6.299362 60 6.307143

POSTED BY: Dave F
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract