I want to set an electrical model by simulink. I need to use current controlled current source, which is only available in simscape. However, the rest of the model is set by simpowersystems. I find I can't connect the blocks of these two libraries.
I once found Arnaud Miege's comments here, that is,
"You can create an interface between SimPowerSystems and Simscape by measuring current in SimPowerSystems and injecting it in Simscape, and measuring voltage in Simscape and injecting it in SimPowerSystems."
I tried in this way but I still failed to connect the models:(
Can anybody give me some idea or help?
Hi.
I am facing the same problem. I tried the Simulink-PS converter. It
does allow Simulink library to connect to SimScape. But it doesnt
allow from simpowersystem to the simscape. i wanted to use the
variable resistor in simscape in my simpowersystem. weird though it is
not available to simpowersystem library. please help.
edit: some of block in the simpowersystem can be connected to the
simulink-ps converter. I am trying to connect Electrical Source &
Elemental item in the simpowersystem, like AC Voltage source and RLC
Branch.
In SimPowerSystems, measure the voltage (in parallel) with a voltage measurement block, which outputs a Simulink signal. Feed this signal into a S-PS block to convert it to a physical signal and inject this to a controlled voltaged source in Simscape.
On the Simscape side, measure the current (in series) with a current sensor block, which outputs a physical signal. Feed this signal to a PS-S block to convert it to a Simulink signal, and inject this to a controlled current source in SimPowerSystems.
Note that this introduces an algebraic loop in the model, which may cause numerical problems. Note also that you can't have two current sources in series, so you may need to insert a small resistor to make it work, depending on how the rest of your model is structured.
HTH,
Arnaud
Have a look at this:
http://www.mathworks.com/support/solutions/en/data/1-5RIPXJ/?solution=1-5RIPXJ
HTH,
Arnaud