Request for help with Simulink DC Circuit Simulation: No Output on Scopes Despite Correct Setup

9 views (last 30 days)
Hallo MATLAB Community,
I am a beginner learnier of Matlab and Simulink. I am trying to simulate a simple cricuit consist of a Resistor and DC voltage source and sesor tomeasure current and voltage. I’m encountering an issue with my Simulink model where I’ve set up a simple DC circuit simulation, but I’m not seeing any output on the scopes despite making several adjustments. Here’s a detailed breakdown of the steps I’ve taken so far and the problems I’ve faced:
Initial Setup:
  • Circuit: I have a DC voltage source (5V) connected to two resistors (each 3Ω) in series. I am using a Current Sensor and Voltage Sensors to measure the current and voltage in the circuit. The sensors are connected to Scopes for visualization.
  • Simulink Blocks:
  • DC Voltage Source (5V)
  • Two Resistors (3Ω each)
  • Current Sensor and Voltage Sensor
  • PS-Simulink Converters (to connect sensors to scopes)
  • Scopes to visualize current and voltage
Changes and Issues Faced:
  1. Initial Problem: No Signal on ScopesI initially set up the circuit but saw no signal output on any of the Scopes. I added PS-Simulink Converters to ensure the signals were converted properly, but the issue persisted.
  2. Solver Configuration Error:After adding the converters, I encountered an error regarding missing solver configuration. The error message was:“Each physical network must be connected to exactly one Solver Configuration block.”I added the Solver Configuration block, which resolved this error.
  3. Missing Electrical Reference Error:The next error I encountered was:“Initial conditions solve failed to converge. Nonlinear solver: Linear Algebra error. Failed to solve using iteration matrix. Tie variable 'Voltage_Sensor.p.v' (Voltage) to a definite value, for example by connecting an appropriate domain reference block.”To fix this, I added an Electrical Reference block to the circuit, which removed the error.
  4. Final Issue: No Output on ScopesAfter making the above adjustments, I re-ran the simulation but the Scopes are still not showing any output, despite all settings appearing correct. I tried autoscaling the Scope and adjusting the solver (set to auto) but no changes were seen on the output. I also checked the connections, voltage source (5V), and resistors (3Ω each), which are correct.
Request for Help:
I would greatly appreciate any guidance or suggestions on what could be going wrong. Despite following standard steps and resolving the errors, I am still unable to see any current or voltage outputs on the Scopes.
I am attaching the relevant Simulink files for further review. Thank you in advance for your help!
Best regards,
Avi

Accepted Answer

Cris LaPierre
Cris LaPierre on 25 Oct 2024
Edited: Cris LaPierre on 25 Oct 2024
One correction - your DC voltage source is 10 V, not 5 V. Also note that, because you have connected the electrical reference to the + terminal of your DC voltage source, the plus terminal is 0 V and the negative terminal is -10 V.
You have a Simscape model here. Simscape models physical domains. Here, you are modeling using Simscape Electrical (note the connections between electrical components are blue). All physical domains must include a domain reference and a solver configuration block.
I get no errors when running your model in R2024a. I see a current of 1.667 A, a voltage across the first resistor of 5 V, and a voltage across the second resistor of 5 Volts. That matches the theoretical values.
V = 10;
R = 3;
c = V/(2*R)
c = 1.6667
Vr1 = c*R
Vr1 = 5

More Answers (0)

Tags

Products


Release

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!