Thursday, March 24, 2016

3/23/2016 FreeMat Assignments

Assignments

Starting out, we are given a circuit to solve using FreeMat using mesh analysis and matrices. The current running down the resistor between the meshes is the difference in current between the two meshes.


The answer given was I3 = -0.1857 A.

The next assignment deals with graphing and adding sinusoids. In this case, we work with a decay function. The legend is to better show which colored line belong to which function.

 
 

The next part of this assignment plots the addition of sinusoids. The red line is the sum of the other two.
 

Omega is changed to 10Hz:
 
 

FreeMat is capable of complex number arithmetic. The theoretical results are worked out in the comments in the script.
 
 The results match:
C =
  -1.0588 -  2.2353i
R_theory =
   -1.0588
I_theory =
   -2.2353
Here is a complex number matrix of a non-linear circuit. Conversion of polar takes an arc tangent of the imaginary and real parts (since imaginary here is mapped to the y-axis). A dot before multiplication or division of matrices make it an element-wise operation. The 360/(2*pi) converts it to degrees.

 Here are the results:
I =
   2.0588 +  2.9412i
   5.0000 -  3.5294i
I_polar =
   55.0080
  -35.2176 
 Finally, we find the roots of these polynomials:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home