MATLAB Answers

Why can't I connect my Simscape circuit to a PS-Simulink converter -- only a dashed red line appears?

56 views (last 30 days)
George on 21 Aug 2016
Commented: James Le on 5 May 2018
I have an electrical circuit driven by a controlled current source. I gather that, to view a voltage at a node, I need to connect a PS-to-Simulink converter. I've placed a couple on the diagram, but when I attempt to drag a line from an existing line to the input of the converter, only a dashed red line appears. Connecting the converter to a scope works. I'm also in trouble on the input end, where I thought I'd need to drive the current source via a Simulink=to-PS converter which in turn takes its input from a step generator. Again, attempting to drag a line from the converter to the triangle-marked port on the constant current source results only in a dashed red line.


Sign in to comment.

Answers (1)

Qu Cao
Qu Cao on 23 Aug 2016
Hi, George,
To view the voltage at a circuit node, you should use the Voltage Sensor block:
In the Controlled Current Source block, you can see that the 'S' port has a '^' shape, which represents Simulink signal. Therefore, you can directly connect the Step block to the 'S' port without using Simulink-PS Converter.


George on 23 Aug 2016
Thanks -- that's coming along, having success with driving current source from Simulink square wave. Now if I can just figure out how to set an initial condition charge on the capacitor in the cirtuit! Setting both the parameters "capacitor voltage" and "voltage" doesn't seem to work. I'm attempting to simulate the peripheral vasculature which, at zero current (cardiac output) has a certain starting pressure (voltage) determined by initial distribution of starting volume (charge) amongst the capacitors (elastic elements of vasculature)
Qu Cao
Qu Cao on 24 Aug 2016
1) Double slick the 'Capacitor' block;
2) Click the 'Variables' tab;
3) Select the 'Override' check box;
4) Type a new number into the 'Beginning Value' field and change the unit, if desired;
5) Click 'OK'.
You can find more information at the following link:
James Le
James Le on 5 May 2018
Hi there, I have the same problem. However, even I've tried to used both ps converter and voltage/current sensor, seem it doesn't work properly. It just shows a dash-red line so I can't connect to a scope. I'm using Matlab 2017a. Can you help me pls???

Sign in to comment.

Sign in to answer this question.