Electronic – Matlab Simulink interface problem(Simpower Systems vs Simscape)

batteriesbattery-chargingMATLABsimulink

For my rechargeble battery model in Simulink,i need a switch that needs to control the voltages across 2 points and according to a certain level it changes its state. To implement this in Simulink i use Voltage-Controlled Switch which belongs to a different library than by cells whose voltages are 12 Volts each. After connecting "Voltage-Current Interface(Ground)" to my circuit to connect these two objects of two different libraries i get an error stating the following. How can i fix this problem. Do you have any suggestions that i can do to accomplish my task. You can find the design and the error message below.enter image description here
enter image description here
enter image description here

Best Answer

Is there any reason you are mixing SimPowerSystems & SimScape?

With the introduction of SimScape "SimPowerSystems", the legacy method of dealing with electrical simulations has become redundant EXCEPT for some legacy blocks and specialised technologies.

The legacy SimPowerSystems does have a more specialised battery model so I can understand why you would want to use that IF it provides features the simscape battery does not (or that you cannot reproduce...)

enter image description here

you can run with both as long as you provide the needed pre-requisites.
I don't see a SimScape reference block nor a solver block. Do they exist.


The actual problem here is an algebraic loop.

the subsystem highlighted within the 1st post. What EXACTLY is in there? I suspect there is some form of SimPowerSystem voltage sensor to bring a signal into the simulink domain, a Simulink-PS converter block to take it into the SimScape domain. This is where it needs to be solved.

Add a memory block in the simulink domain should break the loop and provided the needed initial condition (if you are running continuous consider adding a TF with a small timeconstant todo the same thing)

Related Topic