R TUTORIAL. Part 1.1: Electric circuits

Electrical circuits are built up of individual components, including three common passive elements---capacitor, resistor, and coil or inductor. Such a component can be characterized by the relationship between the current flowing through the device (I) and the electrical potential difference across the device (V). Current is the flow of electrical charge, so it is described by a derivative. Analysis of electrical circuits is based on accurate models for the relationship between voltage and current in the two-port models of the components of the system (some electrical circuit components have more than two ports, requiring more complex models). Modeling electric circuits is based on differential equations for currents and charges flowing between components. Therefore, it is important to plot basic electric components.

Basic Components of Electric Circuit

The resistor element can be plotted with R as follows

Basic Components of Electric Circuit

The resistor element can be plotted with R as follows
To plot a coil, we need to define some auxiliary functions.

Now we plot batteries.

Finally, we plot capacitors.

Now we are ready to plot a circuit with all three passive elements.

 

Plotting Electric Circuits


We demonstrate one of the possible approaches for plotting electric circuits.