I use Boolean signals to control the opening and closing of the switch. The state space equation obtained by using the Systemmodeler command is inconsistent with the correct result. What is the reason? Or how did the number 100000 in the result come from?
1) Buck circuit with Boolean switch 
2) State space equation with boolean switch 
3) Buck circuit without Boolean switch 
4) State space equation without Boolean switch (correct) 
My code:
spacemodel = SystemModelLinearize["Model2",
Method -> {"SymbolicDerivative",
"SymbolicParameters" -> {"r", "l", "c", "k1", "k2"}}];
rule1 = {QuantityVariable["r", IndependentPhysicalQuantity[""]] -> r,
QuantityVariable["l", IndependentPhysicalQuantity[""]] -> l,
QuantityVariable["c", IndependentPhysicalQuantity[""]] -> c,
QuantityVariable["k1", IndependentPhysicalQuantity[""]] -> k1,
QuantityVariable["k2", IndependentPhysicalQuantity[""]] -> k2};
A = spacemodel[[1, 1]] /. rule1 // UnitSimplify // FullSimplify
B = spacemodel[[1, 2]] /. rule1 // UnitSimplify // FullSimplify
Attachments: