MATLAB Thevenin: Find Solution to Impedance Problem

  • Context: MATLAB 
  • Thread starter Thread starter studderbox
  • Start date Start date
  • Tags Tags
    Matlab Thevenin
Click For Summary
SUMMARY

This discussion focuses on solving Thevenin's theorem using MATLAB for circuits involving complex impedances. The user encounters issues with imaginary numbers in their equations, specifically when calculating the Thevenin equivalent for a circuit with a current source, inductor (xL), and capacitor (xC) in series. The MATLAB code provided results in a singular matrix warning, indicating that the equations may not be properly set up for the given values of xL and xC. The user seeks assistance in resolving this issue and requests a circuit diagram for clarity.

PREREQUISITES
  • Understanding of Thevenin's theorem in electrical engineering
  • Familiarity with complex numbers and impedance in AC circuits
  • Proficiency in MATLAB programming, specifically matrix operations
  • Knowledge of circuit components such as inductors and capacitors
NEXT STEPS
  • Review MATLAB's matrix manipulation functions to avoid singular matrix errors
  • Learn about complex impedance calculations in AC circuit analysis
  • Explore Thevenin's theorem applications in MATLAB with example circuits
  • Investigate circuit simulation tools for visualizing complex circuits
USEFUL FOR

Electrical engineers, students studying circuit analysis, and MATLAB users looking to solve impedance problems in AC circuits.

studderbox
Messages
2
Reaction score
0
Hello all, been a fan for a long time but finally joined to ask a question =P

Solving Thevenin using MATLAB

Problem is when i add in imaginary numbers

ex: find Thevenin of circuit;
current source xL and xC all in series.

i get equations

-i + xL(i1-i2) + xC(i1-i2) = 0
xL(i2-i1) + xC(i2-i1) +/- 1 = 0

inputting into MATLAB =>

i= 0.96195 +.871557i
xL = 1ki
xC = -10ki

f=[(1000i-10000i) (-1000i+10000i); (-1000i+10000i) (1000i-10000i)]
c=[9.96195+.871557i; 1]
v1=1
is=f\c

>> results in

Warning: Matrix is singular to working precision.

ans =

NaN + NaNi
NaN + NaNi
 
Physics news on Phys.org
Can you upload the circuit diagram
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
4
Views
2K
  • · Replies 29 ·
Replies
29
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 26 ·
Replies
26
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 11 ·
Replies
11
Views
5K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 7 ·
Replies
7
Views
4K