MATLAB: Help in the model

Simscape Electricalsimulink

In my model i need that Switch charged or not charged the battery… Model: http://img64.imageshack.us/img64/9082/modelt.png
If SOC < 0.85 charged else not charged. My model make this, because in "m" out the scope is: http://img830.imageshack.us/img830/1569/switchu.png
Therefore, at the time ~3,75 switch closed. But SOC continues to charge, like in the image: http://img706.imageshack.us/img706/9263/socl.png
What's happened? Will the Series RLC Branch charged battery?

Best Answer

What is the value of your resistance and what's the amplitude of your current source? I suspect current's still flowing through the resistor when the switch is closed, charging the battery. If you think about it, with the switch closed, that's the only path left for the current to take.
Arnaud