0

I'm trying to simulate a circuit in Simulink but it's starting to get a bit messy due to the size of the circuit. I want to know if there is a way to set labels that I can input a signal into and reuse in other parts of the circuit rather than drawing long lines between them, similar to in LTspice (see image).

node labels in LTspice

I am aware of the Goto and From blocks which seem to do what I want, however, it appears that this answer describes the only way to use the Goto and From blocks in a circuit. This would be fine if I wanted to simulate a purely digital circuit, however, my circuit is analog so there are many times that I am concerned about both the voltage and the current. Basically, I need a way to just move a signal from one part of the circuit to another while keeping all the information about the signal. Is this possible?

Just to clarify what I want, imagine I have this circuit below:

enter image description here

This is just a minimal example, not my actual circuit. Say I want to get rid of those long wires by "wirelessly" connecting the inductor to the rest of the circuit. We would expect the circuit to resonate. This would work in other simulation tools, but the Goto and From labels cannot be used to achieve this because there is no way for the inductor to return any energy to the left side of the circuit (if the labels go from the left side to the right side).

JolonB
  • 170
  • 1
  • 9
  • I would use a circuit simulator. – TimWescott Nov 23 '20 at 20:22
  • You may just have to carry the voltage and current as separate signals -- particularly because whichever one you consider to be the "output" signal, the matching one is going to be an input. I.e., if you're driving a voltage to a load, you'll be getting a current back. – TimWescott Nov 23 '20 at 20:23
  • @TimWescott Ideally it wouldn't matter which one is the input and which is the output (which Goto and From unfortunately are). It'd be best if they could work as invisible wires, just like labels in LTspice. I guess I'd also be happy if there was a way to make the wires invisible and I could just add annotations to make it clearer. I would use a circuit simulator, but there are other features that I need from Simulink. – JolonB Nov 23 '20 at 20:28
  • I don't think that a systems simulator like Simulink "understands" the notion of a wire that carries an interaction between a source and a load, though. There are simulators (I think Mentor Graphics sells one) that will integrate a circuit simulator with a block diagram simulator -- but they're not cheap. – TimWescott Nov 23 '20 at 21:28
  • @JolonB I don't understand. That answer describes how to use the `From` and `Goto` labels, they seem to be used exactly the way LTspice does (except maybe the shapes). There's nothing specifically digital in that answer. That means you can readily use them axactly as you want: to eliminate too many wires. So, what's the problem, why can't you use them? Do they not work as intended? – a concerned citizen Nov 23 '20 at 21:36
  • @aconcernedcitizen When I refer to digital, I not caring about current or anything else; only being concerned with high/low values. Goto and From work well for that, however, they can't carry electrical values, so these must be converted to a Simulink signal by means of a voltage sensor. This doesn't carry current information. They also only operate in one direction. As in, if I had an RLC circuit with the capacitor/resistor connected to a Goto and the inductor connected to From, then I wouldn't get any oscillations – JolonB Nov 23 '20 at 22:39
  • @JolonB As far as I can tell from their hep pages, those sensors are needed in order to interface SPICE-like elements with the rest of the circuit, so they'll be needed one way, or another. And as for the directionality, maybe the way to solve it is to add them as one way and reverse on the same connection? Or with a dummy splitter? Just guessing, I don't have Matlab. – a concerned citizen Nov 24 '20 at 09:54

0 Answers0