Thread Subject: How to make connection of components from different libraries in Simulink

Subject: How to make connection of components from different libraries in Simulink

From: Peng Lei

Date: 24 Apr, 2009 22:12:02

Message: 1 of 3

Hi, I had difficulty to connect components from different libraries in Simulink. I'm using Matlab 2007b. I tried to construct a circuit using the components from both SimPower toolbox and Simscape toolbox. But I could not build link between the componnets. i.e, I drag a DC voltage from SimPower and d a resistor from Simscape, both are electric components, and want to connect them. However, no matter how hard I try. It seems I could not make a link between them. What am I supposed to do to solve this problem? Or the elements from different libraries are not compatible at all? I should use the components from the same library?

Subject: How to make connection of components from different libraries in Simulink

From: Arnaud Miege

Date: 25 Apr, 2009 20:03:08

Message: 2 of 3


"Peng Lei" <penglei@uwm.edu> wrote in message
news:gstdfi$md2$1@fred.mathworks.com...
> Hi, I had difficulty to connect components from different libraries in
> Simulink. I'm using Matlab 2007b. I tried to construct a circuit using the
> components from both SimPower toolbox and Simscape toolbox. But I could
> not build link between the componnets. i.e, I drag a DC voltage from
> SimPower and d a resistor from Simscape, both are electric components, and
> want to connect them. However, no matter how hard I try. It seems I could
> not make a link between them. What am I supposed to do to solve this
> problem? Or the elements from different libraries are not compatible at
> all? I should use the components from the same library?

Hi,

SimPowerSystems and Simscape use two different technologies, you can't
directly connect a SPS component to a Simscape one or vice-versa. If part of
your model is in SPS and the other part in SPS, here's how to interface the
two:
* measure the voltage in SPS and inject it in Simscape with a controlled
voltage source
* measure the current in Simscape (at the same point as you're injecting the
voltage) and inject it in SPS using a controlled current source (at the same
point where you measured the voltage).

You can also try it the other way: measure current in SPS & inject in
Simscape + measure voltage in Simscape & inject in SPS. One approach works
better than the other, but I can't remember which one.

HTH,

Arnaud

Subject: How to make connection of components from different libraries in Simulink

From: Arnaud Miege

Date: 25 Apr, 2009 20:08:53

Message: 3 of 3


"Peng Lei" <penglei@uwm.edu> wrote in message
news:gstdfi$md2$1@fred.mathworks.com...
> Hi, I had difficulty to connect components from different libraries in
> Simulink. I'm using Matlab 2007b. I tried to construct a circuit using the
> components from both SimPower toolbox and Simscape toolbox. But I could
> not build link between the componnets. i.e, I drag a DC voltage from
> SimPower and d a resistor from Simscape, both are electric components, and
> want to connect them. However, no matter how hard I try. It seems I could
> not make a link between them. What am I supposed to do to solve this
> problem? Or the elements from different libraries are not compatible at
> all? I should use the components from the same library?

PS: obviously, an easier solution is to stick to either SPS or Simscape, but
not both. However, that depends what you are trying to do. Each software
addresses different needs:
* SPS is for electrical power systems, 3-phase systems, power generation,
power distribution , etc..
* Simscape and its add-on SimElectronics are for electromechanical systems,
analog electronic components, semiconductors, etc...

HTH,

Arnaud

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
simpower Peng Lei 24 Apr, 2009 18:17:55
simscape Peng Lei 24 Apr, 2009 18:17:55
rssFeed for this Thread

Contact us at files@mathworks.com