Hello Johan and SystemModeler Community,
This post revives an old thread. I was forced to set my System Modeler learning process aside for about a month until backlog at work eased up. Im back at it now.
To simplify things a bit after my first post, I changed the CombiTimeTable input from the Prismatic joint length to the Bod Boxs pivot point (Revolute0). All of my previous concerns/questions still apply. In the following discussion, I am looking only at the position, velocity, and acceleration plots of the Resolute0 joint being driven by a CombiTimeTable and Rotary Position Source.
I started this project by creating a simple motion profile in excel. (File attached.) Over a 60 second total time interval, the profile assumes constant acceleration for 20 seconds, zero acceleration for twenty seconds, and constant deceleration for twenty seconds. I used the resulting radial joint position (in radians) to create the input CombiTimeTable to drive the position of Revolute0 in System Modeler.
When I run the simulation and plot the relative rotation angle of Revolute0 (phi), I get a plot that looks like the input that I built in excel. (This is hardly amazing. Im just looking at the position input into SystemModeler.) Then, when I check the rotational velocity of Revolute0 (first derivative of phi), I get a velocity profile that matches that of my original excel spreadsheet closely, but not perfectly. Then, when I look at the angular acceleration of Revolute0, the plot gets noisy - especially around the acceleration step changes at 20, 40, and 60 seconds. Through the noise, you can see that SystemModeler is following the acceleration profile that was originally created in my excel spreadsheet, but significant inaccuracies (noise) are superimposed on the acceleration profile.
I assume that this noise/inaccuracy is a result of the position input table that Im using. When I set the smoothness of combiTimeTable position input to Linear Segments I get the following stair-step angular velocity plot as expected. When I look at the angular acceleration, I get discontinuous spikes as shown below. I appreciate why the angular acceleration plot looks the way it does (a result of the velocity discontinuities) but Im trying to figure out how to get it to match the actual (non spiky) acceleration profile used to create the position input table.
![Acceleration with smoothness set to Linear Segments](/c/portal/getImageAttachment?filename=Linearsegments.jpg&userId=555342)
Changing the combiTimeTable Smoothness to Continuous Derivative improves the situation a bit. The angular velocity plot (shown below) now looks close to the one in excel. The concern here relates to the inaccurate profile that results at the acceleration step changes (at 20 seconds, 40 seconds, and 60 seconds). Not only is the angular velocity profile inaccurate, the acceleration profile is too.
![Acceleration with smoothness set to Continuous Derivative](/c/portal/getImageAttachment?filename=Continuousderivativea.jpg&userId=555342)
Im sure that Im not using SystemModeler properly. I know what the acceleration and velocity profiles look like that correspond to the position profile that I fed into SystemModeler via the CombiTimeTable. Since I do not know how to get SystemModeler to output velocity and acceleration profiles that match those that I used in excel, Im not yet comfortable using SystemModeler to analyze motions and forces of things that Im not already familiar with or have otherwise studied.
For Example: Lets say that I want to investigate the motion and forces at Resolute1 in the attached model. Right now, if I use the velocity, acceleration, and force data from SystemModeler as inputs to a bearing engineering/design effort, Ill be using bogus input data. My present use of a combiTimeTable to drive the mechanisms motion leads to inaccurate velocity and acceleration profiles at various mechanism points. Clearly this is a problem. So lets say that Im handed the desired motion profile of a mechanism's part A in an excel table by my boss or by a customer and Im tasked with designing a bearing at the mechanism's connected part B how do I use SystemModeler to get accurate data (forces, velocities, etc.) if my motion input table leads to inaccurate velocity and acceleration profiles throughout the model?
I did discover that I can reduce the noise in the System Modeler plots by reducing the critical filter frequency (fcrit) of the rotational position source (position1) to revolute0. When I lower the frequency enough to substantially eliminate the noise, the plots become less accurate. I fear that using fcrit for plot noise reduction is not the correct answer to my problem. Its a band-aid solution to deal with the issue being introduced by the use of an input table (vs a continuous function.)
Johan brought up a great point. I suspect that adding some damping will, indeed, reduce the acceleration noise that Im seeing. When I get further along in my modeling work and start building models that actually interest me I will certainly include friction, damping, and other model components. But right now, Im not trying to model anything for any particular purpose; this is just a learning exercise. It seems to me that if I build up a position profile in excel using a very simple acceleration profile and then send the resulting position profile into SystemModeler I should be able to get velocity and acceleration profiles back out of SystemModeler that closely (or even perfectly) match those originally used to build the position input table. Until I better understand how to work with SystemModeler Im loathe to move forward with more realistic models. I need to learn to walk before I run.
In addition to this question (a real show-stopper for me), I have a number of other questions about System Modelers use. Ill post these after I get past this roadblock. Thank you for any and all assistance!
Attachments: