Through and across variables in Simscape Custom Block

1 view (last 30 days)
I am trying to create a custom gear box block with the Simscape language. The documentation says, that in future releases the syntx für declaring component through and across variables will be changed. So after that new syntax somthing like through(t, IN.t, OUT.t) will be replaced through the branches section where you define t: IN.t -> OUT.t
What I do not understand is how I can use this branch to influence my output variable, in case of the gear my output-torque. If I want to define any gear ratio i=OUT.t/IN.t need access to the input- and output-torque seperatly (this definition above does not work, because of unknwon variable t!?)

Answers (1)

Abe
Abe on 30 Sep 2014
I'm not sure that the branch does influence the output variable. Currently, I don't have access to Simscape but I think you need a seperate equation for the across variable.
Did you try taking a look at the source code for the gearbox in the foundation library? If I recall, source code is available for this block.

Categories

Find more on Creating Custom Components and Libraries in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!