Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.9K Views
|
5 Replies
|
1 Total Like
View groups...
Share
Share this post:

SystemModelLinearize or TransferFunctionModel seems to produce unexpected result

Posted 1 year ago
POSTED BY: Fabián Peña
5 Replies

Using the option Method -> "NumericDerivative" in SystemModelLinearize may work better for this model when selecting "InitialValues" as operating point.

POSTED BY: Sergio Vargas

We have discussed possible improvements that may help in symbolic linearization, like the reworking of the code that performs the fetching and processing of model equations, but this is not a simple task and unfortunately it is not possible for us to determine at the moment how large of an impact this may have in the end. As you indicate, the intrinsic (reduced) math of this model is not particularly complex, even when considering the rotational degrees of freedom. The challenge lays in the reduction and effective translation of component based modeling into WL equations. This can be seen when you work with models that are not component-based, by which I mean models that instead use raw equations. For those, the current symbolic linearization functionality struggles far less.

POSTED BY: Sergio Vargas
Posted 1 year ago

Dear Sergio,

Thank you very much for your reply again.

I tried making the example even simpler. Instead of using a revolute joint driven by an rotational spring, I adapted the revolute constraint to accept a torque. The modification worked using the numerical linearization method, but the symbolic one still fails.

I have the impression it's not possible to make the example simpler. It's just a single angular spring acting on a single body with rotational inertia. It's the angular equivalent of the classical spring with a mass attached. I'm not an expert, but I guess the difficulty lies in dealing with the three-dimensional space rotations matrices of the MultiBody library.

Sadly, for the project I have in mind, this limitation rules out the use of System Modeler (and maybe Modelica) with Mathematica. Is there a way to know if future development of SystemModelLinearize would include dealing with this kind of problem? This information would be useful for me to decide a way forward.

Thank you very much.

Regards,

Fabián

POSTED BY: Fabián Peña

Unfortunately, I think you have probably already reached the model size/complexity at which the current symbolic differentiation method won't be able to preserve symbolic parameters.

One long-shot of a workaround I could think of is to try to do a fit, using several numerically-linearized versions of your model that have different parameter values. Whether this is doable or not would depend on how complicated the dependence of the transfer function on the parameters is.

POSTED BY: Sergio Vargas
Posted 1 year ago

Dear Sergio,

Thank you very much for your reply.

Using "NumericDerivative" as an option does indeed produce the correct result.

I wonder if there is a workaround that would allow me to use "SymbolicDerivative" instead. In my model, I require to keep all the spring constants symbolic during linearization, in order to later replace them by complex values and analyze the transfer functions in frequency space.

I tried using "SymbolicDerivative" with "EquilibriumValues" instead of "InitialValues". However, after a long time, it failed with a message saying that I should use "NumericDerivative". In my model, the initial values equal the equilibrium values.

By any chance, is there a way to identify the feature in my model that produces this condition? In such a case, perhaps I would be able to modify my model accordingly.

Any suggestion would be highly appreciated.

Cheers,

Fabián

POSTED BY: Fabián Peña
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard