ngspice analog circuit simulation
An ngspice 47 study of a common-emitter transistor amplifier covering bias, gain, bandwidth, transient response, noise, distortion, temperature, supply variation, and component tolerance.

Software compatibility
The netlists, models, controls, and result scripts are prepared for ngspice 47. LTspice, PSpice, Multisim, and Cadence schematic project files are not included.
Project definition
Problem statement
Analogue-circuit behaviour changes with bias, device model, source and load impedance, frequency, signal level, temperature, and component tolerance.
Project objectives
- Model a 12 V common-emitter NPN amplifier in native ngspice 47.
- Verify the operating point and midband gain against hand calculations.
- Measure AC bandwidth, transient response, noise, and harmonic distortion.
- Study input amplitude, temperature, supply voltage, and component tolerance.
- Produce reproducible raw data, summary tables, plots, and verification evidence.
Project structure
Project components
Circuit model
Defines the divider-biased common-emitter stage, source, load, coupling capacitors, split emitter resistance, and documented educational transistor model.
Netlist generator
Creates consistent ngspice cases from the versioned study configuration.
Simulation runner
Executes operating-point, AC, transient, noise, amplitude, temperature, supply, and tolerance studies.
Result analyser
Calculates bias, gain, phase, cut-off frequencies, distortion, noise, sensitivity, and statistical ranges.
Verification suite
Checks analytical values, netlist contents, result counts, repository completeness, and reproducibility.
Methodology
Project workflow
- 01Generate
The Python generator writes the baseline and parameter-study netlists.
- 02Simulate
The pinned ngspice 47 container runs 214 cases and exports 226 raw data files.
- 03Analyse
Python calculates performance metrics and builds tables and plots.
- 04Compare
Operating point and gain are checked against independent hand calculations.
- 05Verify
Unit tests, document audits, smoke tests, and repository validation confirm the delivery.
Demonstration scenario
The amplifier is checked at its 12 V baseline, where it produces 27.50 dB gain at 1 kHz with lower and upper cut-offs of 7.59 Hz and 3.71 MHz. The study then measures distortion, noise, three temperatures, three supplies, and 200 fixed-seed tolerance samples.
Engineering
Tools and method
- Tools
- The project uses ngspice 47, Python, NumPy, Matplotlib, Jupyter for subject analysis, simulation, and results.
- Environment
- ngspice 47 is built from its verified official source archive in a pinned Ubuntu 26.04 Docker image.
- Circuit
- A 12 V divider-biased common-emitter amplifier uses a documented generic NPN educational model, 600 ohm source, and 10 kohm load.
- Automation
- Python generates cases, runs ngspice in batch mode, parses outputs, calculates metrics, and produces plots.
- Verification
- Hand calculations, fixed-seed tolerance sampling, unit tests, file-count checks, and a complete smoke test are included.
Testing
Evaluation
Evaluation measures
- Collector bias voltage and current
- Midband gain and phase at 1 kHz
- Lower and upper cut-off frequencies
- Transient waveform and total harmonic distortion across seven input amplitudes
- Integrated output and input-referred noise
- Temperature, supply, and 200-sample component-tolerance sensitivity
Project boundaries
- Only ngspice 47 netlists and result files are delivered.
- The generic transistor model supports reproducible education and is not a claim about a particular manufactured device.
- Layout parasitics, ageing, thermal coupling, manufacturing variation beyond the defined tolerance model, and hardware measurement are outside the completed scope.
- Physical construction requires component ratings, electrical safety, measurement, and qualified review.
Included
- 01Native ngspice 47 common-emitter amplifier netlist
- 02Operating-point, AC, transient, noise, distortion, temperature, supply, and tolerance analyses
- 03214 completed simulation cases and 226 raw result files
- 04Gain, bandwidth, waveform, noise, distortion, sensitivity, and tolerance plots
- 05Complete project files, models, calculations, and analysis material in a private GitHub repository
- 0674-page project documentation in PDF and editable Word formats
- 0716-page setup and usage guide
Project record
No information is collected on this page.
- Permanent project ID
- GP-EC-0MBTTED
- Catalogued
- 22 Aug 2026
- Completed
- 22 Aug 2026
- Verified
- 22 Aug 2026
- Demonstration
- Included in repository
Handover
After purchase
- 01Payment is confirmed
The project is marked unavailable and cannot be purchased again.
- 02Repository access is granted
The buyer's submitted GitHub account receives access to the private repository.
- 03The purchase record is delivered
The certification sheet is prepared from the reviewed buyer details and sent privately by email.