+ Post New Thread
Results 1 to 5 of 5
  1. #1
    Member level 1
    Points: 396, Level: 4

    Join Date
    Jul 2018
    Posts
    39
    Helped
    0 / 0
    Points
    396
    Level
    4

    electronic simulator

    Hi,
    How the simulator simulates? I mean what are the algorithms or steps it does from schematic to the drawing the output waveforms at any node.What functionality is in there in the simulator.
    Thanks in advance

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 77,731, Level: 67
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,755
    Helped
    3590 / 3590
    Points
    77,731
    Level
    67

    Re: electronic simulator

    Hi,

    It´s just calculting voltage and current in very tiny time steps.

    OK, this sounds too simple.

    But you can do the same with Excel.
    Test it with a single R or C.
    Then test it with RC.
    Then with RCR.
    Then with RCRC.

    Then add an ideal diode.
    Then a diode with threshod voltage.
    Then a diode with leakage resistor and series reistor...

    Soon you will see: the more nodes the more difficult it becomes.

    Klaus
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   AltAdvertisement

        
       

  3. #3
    Member level 1
    Points: 396, Level: 4

    Join Date
    Jul 2018
    Posts
    39
    Helped
    0 / 0
    Points
    396
    Level
    4

    Re: electronic simulator

    so, are there any algorithms which are used when the node becomes more?
    Like If i want to make a simulator to for very simple circuits then i what i need to know?
    Thanks Klaus for the information.



    •   AltAdvertisement

        
       

  4. #4
    Advanced Member level 5
    Points: 8,683, Level: 22

    Join Date
    Apr 2016
    Posts
    1,823
    Helped
    320 / 320
    Points
    8,683
    Level
    22

    Re: electronic simulator

    Quote Originally Posted by Akshaay View Post
    so, are there any algorithms which are used when the node becomes more?
    Like If i want to make a simulator to for very simple circuits then i what i need to know?
    Thanks Klaus for the information.
    there are researchers that spent a lifetime inventing the simulation methods used today in SPICE and other similar tools.
    you can check this if you want: http://www3.imperial.ac.uk/pls/porta.../1/7292571.PDF but I warn you that it is a rabbit hole...
    Really, I am not Sam.



  5. #5
    Super Moderator
    Points: 52,890, Level: 56

    Join Date
    Apr 2011
    Location
    Minneapolis, Minnesota, USA
    Posts
    12,941
    Helped
    2578 / 2578
    Points
    52,890
    Level
    56

    Re: electronic simulator

    Node voltage is determined by the net influence from neighboring branches. Each branch sends a certain volt level through a certain resistance, at a given instant.

    Determine net influence by calculating the weighted contribution from all branches.

    1) Take the reciprocal of each branch's resistance.

    2) Add all results.

    3) Take the reciprocal. The result is equivalent parallel resistance. (Similar to the approach with parallel wires.)

    4) For each branch, divide its resistance into the equivalent parallel resistance. This yields a weighting percentage for that branch.

    5) Multiply the weighting percentage times voltage coming from far end of branch. (Include capacitor charge levels, inductor emf, etc.)

    6) Add all results. The sum is the voltage at the node.

    7) Repeat for all nodes in the circuit.

    8) With these new values for the circuit, make an new evaluation of time-dependent components (capacitors, inductors, etc.).

    9) For complex circuits it may be necessary to perform further iterations, and to compare results until convergence is achieved.

    10) Display the new frame.

    11) Update power supply voltage. Repeat from Step 1.

    - - - Updated - - -

    The above is the algorithm I used to program my own home-brew circuit simulator. Being animated makes it useful as a tutorial. I turned many simulations into videos which I put on Youtube under my channel named 'patientbrad'.



--[[ ]]--