How to reference the plant input value to a solver variable in motionview?

sudo
sudo Altair Community Member

I am trying to integrate this AI model that predicts the primary and secondary pulley radius of a motorcycle with CVT in twin activate co simulation.

I have created python block which contains the AI model. This accepts inputs that should come from the motionsolve block during simulation.

I have already setup the plant input and output in my motorcycle model and I already established a communication between this motionsolve block and python block and the AI model is already providing the output (primary and secondary pulley radius) to the motionsolve block.

image.png

Here is how i setup my plant input which should receive the output from the python block.

image.png

How can I reference this input values to this primary and secondary pulley solver arrays of the motorcycle model so that it will use the values coming from the ai model throughout the simulation instead of using their default expressions.

image.png

Is this the proper approach? Need some advice. Thanks in advance!

Answers

  • GTT Adam
    GTT Adam
    Altair Employee
    Answer ✓

    Hi @sudo,

    I believe you have the correct approach. If you want the Twin Activate model to supply you with a primary and secondary pulley radius throughout the simulation, the respective solver variables must be assigned to a plant input. Therefore, as the simulation progresses, the values from your Twin Activate model will overwrite the values in the solver arrays.

    Hope this helps!

    Adam Reid

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.