Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.1K Views
|
5 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Obtain the initial value of inductance or capacitance set in Systemmodeler

Posted 2 years ago

How to obtain the initial value of inductance or capacitance set in Systemmodeler in Mathematica?

1) initial value of inductance
enter image description here

2)initial value of capacitance
enter image description here

Then attach my circuit in the attachments.

Attachments:
POSTED BY: James James
5 Replies

You can use the following function to get the integer value:

IntegerPart[(*variable*)]
POSTED BY: Ankit Naik
Posted 2 years ago

Sir, I tested it today and found that "the solution error was not caused by the dot in the initial value mentioned yesterday", but that after I set the initial values of capacitance and inductance, the state space equation could not be obtained normally using the SystemModelLinearize command. How can we solve it? enter image description here enter image description here

My code:

spacemodel = SystemModelLinearize["Model2", 
   Method -> {"SymbolicDerivative", 
       "SymbolicParameters" -> {"r", "l", "c", "k1", "k2"}}]

Then attach my circuit in the attachments.

Attachments:
POSTED BY: James James
model = SystemModel["Model2"];
model[{"InitialValues", {"inductor1.i", "capacitor1.v"}}]

You can load the model in Mathematica as a System Model, and use the "InitialValues" property.

POSTED BY: Ankit Naik
Posted 2 years ago
Attachments:
POSTED BY: James James
Posted 2 years ago

Thank you!!!

POSTED BY: James James
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard