/ElementaryCircuitSimulationJava

Translation in Java of a C++ academic project (November 2020)

Primary LanguageJava

ElementaryCircuitSimulationJava

This repository is the implementation in Java of an elementary circuit simulator, computing an output voltage from a source voltage, passive components (resistor, inductor, and capacitor), and their parameters, using Euler's method.

Requirements

It is preferable to execute step 1 with IntelliJ IDEA, but any other IDE should do the job. Make sure to have a Java Development Kit (JDK) installed.

Step 1 : build and run Main.java

Choose the voltage source (rectangular, triangular, sine wave, Heaviside step function, etc.) and its characteristics (starting time, frequency, duty cycle, etc.). Then, choose your ciruit by picking A, B, C or D and pick the values of the circuit's components. image image

The program will generate output.txt containing three columns: time stamps, source voltage, and output voltage.

Step 2 : run traceSignal.m

From output.txt, this program will display and save the graphs showing the waveforms of source and output voltages over time.