I am new to matlab , i am trying to simulate a simple circuit to check my calculation I have done on paper.

The circuit is the following, it has a gyrator and couple resistors.1 amp is flowing into the circuit.You can see the node names on matlab picture. enter image description here

I got the following equations:

enter image description here

Solved with calculator:

enter image description here

The results:

enter image description here

I built the circuit in matlab simulink but i got different results there. I am pretty sure missing something. Here is the matlab circuit: enter image description here

Values for the resistors and gyrator set correctly, the names show the resistors resistance. Gyrator conductance set :3.141592654

My problem is that i get different values for the nodes' potential not even close to that i have calculated.

So if you canfind what i am missing please tell me. Thank you

  • 1
    \$\begingroup\$ If solver A doesn't equal solver B then make a very, very simple circuit to solve and it should be obvious which method is correct. \$\endgroup\$ – Andy aka Mar 17 '18 at 19:30
  • \$\begingroup\$ What are \$\gamma\$ and \$\psi\$ suppose to represent? There's inconsistent notation in your equations. You appear to be switching variables. \$\endgroup\$ – user103380 Mar 17 '18 at 19:31
  • \$\begingroup\$ @Andy aka I have used matlab for solving a circuit that had more components then this. I am almost certain ,becaused i checked couple times ,that i didn't miss calculated or something. The problem is in my matlab skills . \$\endgroup\$ – Levente Bartos Mar 17 '18 at 19:41
  • \$\begingroup\$ @KingDuken Sorry for the various names for the variables. The psi and phi represents node potential relatively to 0V. I used psi on the calculator and phi on the matlab and the hand drawed circuit. Sorry for that . \$\endgroup\$ – Levente Bartos Mar 17 '18 at 19:43
  • \$\begingroup\$ @KingDuken I suppose the thing you think is a gamma that is actually is the gyrator conductance ,little r. \$\endgroup\$ – Levente Bartos Mar 17 '18 at 20:11

The problem is you missed the units of the gyrator. Your calculations were for resistance while the simscape gyrator is in Siemens

So you need to enter \$\frac{1}{\pi}\$ instead of \$\pi\$

enter image description here

  • \$\begingroup\$ Thank you for pointing that out! That solved the problem and now the simulation shows the calculated results : ) \$\endgroup\$ – Levente Bartos Mar 17 '18 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.