Group Abstract Group Abstract

Message Boards Message Boards

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

Screening out state space equations that match the actual situation

Posted 2 years ago

A professor taught me a method to obtain all the state space equations of a circuit, but there are some state space matrices that do not conform to the actual situation. How can I remove them?

The code:

spacemodel = SystemModelLinearize["Model2", 
    Method -> {"SymbolicDerivative", 
        "SymbolicParameters" -> {"r", "l", "c", "k1", "k2"}}];
kVals = Thread[{QuantityVariable[
       "k1",IndependentPhysicalQuantity[""]], QuantityVariable[
       "k2",IndependentPhysicalQuantity[""]]} -> #] & /@ 
   Tuples[{{True, False}, {True, False}}];
{#, spacemodel /. #} & /@ kVals // TableForm

As shown in the following code run results, (k1->True k2->True) and (k1->False k2->False) are not what I need because they do not meet the actual situation. How can I remove the state space equations for these two situations? Circuit file attached at the end.

Attachments:
POSTED BY: James James
4 Replies

If all you want to do is restrict the list of replacements then you can use these kVals instead:

kVals = Thread[{QuantityVariable["k1", 
       IndependentPhysicalQuantity[""]], 
      QuantityVariable["k2", 
       IndependentPhysicalQuantity[""]]} -> #] & /@ {{True, 
    False}, {False, True}};
POSTED BY: Sergio Vargas
Posted 2 years ago

Hello, sir! Yes, that's the method you taught me. Based on your method, I assigned Ron and Goff values of 0 in system modeler, and the running results are shown in the following figure. I have an idea that if "Indeterminate" appears in the matrix using a judgment method, then remove this matrix. Is my idea feasible? If possible, what command statements can be used to remove the matrix?

enter image description here

Attachments:
POSTED BY: James James
POSTED BY: Sergio Vargas
Posted 2 years ago
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