Message Boards Message Boards

0
|
282 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Symbolic linearization fails using SystemModelLinearize

Posted 20 days ago

I have a model written with the MultiBody Modelica Library, and I'm trying to symbolically calculate a linear approximation in Mathematica using SystemModelLinearize, however, the procedure freezes at the stage of "Preparing variables": enter image description here I wonder if it's possible to simplify the model such that the symbolic linearization can proceed.

I assume it could be challenging to identify the exact the problem, but I have a suspect model. Changes in this model led to the freezing of the linerization procedure. Here is a screenshot of the FlexureLowerEnergy model:

enter image description here

The aim of some components is to set a boundary condition. The frame frame_b of fixedTranslation3 must remain parallel to the ground frame, i.e., it can translate in Z and Y but not rotate. At the outside, frame frame_a is connected to the bottom of a pendulum (blue and pink in the figure below) that oscillates, and frame_b is connected to a Body object: enter image description here

The boundary condition is set by the prismatic constraint prismatic1 and the revolute planar loop constraint revolute. Thus, the component fixedTranslation3 remains vertical as the pendulum oscillates. The boundary condition holds without the spring, but the spring is necessary to calculate potential energy and other relevant physical quantities.

I suspect the symbolic linearization procedure is not able to cope with the prismatic constraint. Is there a more suitable way to set this boundary condition?

Please note that the method suggested in this post does not work for symbolic linearization because it uses an angular position source which uses a numerical low pass-filter. Even when the linearization is numerical, this low pass filter produces problems in transfer functions at high frequencies.

I attach the System Modeler file with the model and a Mathematica file. I'm using System Modeler 13.2.0 and Mathematica 13.2.

Any help will be highly appreciated.

Regards,

Fabián

POSTED BY: Fabián Peña
2 Replies
Posted 17 days ago

Hello,

Thank you very much for checking.

I followed your suggestion and simplified the model by removing elements that were not absolutely necessary for the linearized system. Namely,

  • I removed the equations I wrote to calculate kinetic and potential energies.
  • I moved all the components from models flexureLower1 and flexureUpper1 to the uppermost level.
  • I disabled some components that are necessary but I can do without for now for the sake of solving this problem.
  • I set world.enableAnimation to False.

Despite the simplification, the problem remains: enter image description here The process stays in "Preparing Variables" forever.

The model seems relatively simple, is it feasible that it is still too large for the symbolic linearization procedure? Is it possible that there's a particular component creating the problem instead?

It seems relevant to add that when "InitialValues" is chosen as the operating point, the linearization produces an error and fails: enter image description here According to this, there's an equation without variables to solve for. See the attached model and notebook for details. This error is also produced for numerical linearization: enter image description here

Numerical linearization with "EquilibriumValues" is successful.

It's important to point out that the setup is such that the initial values are the same as the equilibrium values. The pendulum remains still at the equilibrium position at all times. The initial conditions are set in component revolute1.

Any help will be appreciated. Thank you very much in advance.

Cheers,

Fabián

POSTED BY: Fabián Peña
Posted 19 days ago

With some experimentation I believe the constraint is not the issue, but simply the size of the model is too large for the current symbolic linearization. To check this I tried to linearize the SuspensionBeamEnergy model but with two changes:

1) setting world.enableAnimation to false in order to reduce the number of variables

2) replacing both flexureLower1 and flexureUpper1 with just direct connections between the frames they connect to

3) with the components above removed, I also replaced the equation for energyPE with

energyPE = 0;

in order to keep the system balanced.

The symbolic linearization made it a little farther beyond but unfortunately still failed.

POSTED BY: Updating Name
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