How can I make a pack of resistors and capacitors into one unit in Simscape?
5 views (last 30 days)
Show older comments
I wish to make a couple of connected resistors and capacitors into one unit, the unit input parameters are the values of the resistors and capacitors as well as voltage in, the output is voltage out. I know how to do this with labview but not sure how this is done in simulink. The desired subsystem should look like something below(Sorry I made with Labview) Thanks!

0 Comments
Accepted Answer
Sebastian Castro
on 25 Feb 2016
There's two ways you can do this.
The first way is to connect the resistor and capacitor blocks in whichever way you want and then group them inside a Subsystem. You then make the R, C parameters into MATLAB variables and create a masked subsystem out of the whole thing. This makes it so you can specify the values of those variables in the block dialog.
The second approach is to leverage the Simscape language and script your own composite component. This documentation page shows an example.
In both cases, your block's interfaces would be two Simscape electrical connection ports. This means that energy can flow bidirectionally so it doesn't matter which direction you connect your block (as long as it's made of RLC components, that is).
- Sebastian
More Answers (0)
See Also
Categories
Find more on Physical Units in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!