File: index.html

package info (click to toggle)
sch-rnd 1.0.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,696 kB
  • sloc: ansic: 119,120; awk: 1,502; makefile: 1,421; sh: 1,404; yacc: 905; lex: 172; xml: 160
file content (79 lines) | stat: -rw-r--r-- 2,986 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<html>
<body>
<h1> 04_passive_tr: time domain simulation: tran</h1>


<h2> Scope </h2>
<p>
In this simulation we are going to look at how a multi-stage RC filter behaves
when the input voltage is switched from 0 to 5V. 

<h2> The schematics </h2>
<p>
The single-sheet schematic contains the filter, directly usable in the PCB
workflow.
<p>
<center>
<a href="04_passive_tr.rs"><img src="04_passive_tr.svg" width=400px></a>
<br>Click the image to get the sch-rnd sheet; also requires this <a href="project.lht">project.lht</a> in the same directory</center>
<p>

<h2> SPICE: what a tran simulation is </h2>
<p>
In the tran(sient) analysis a DC solution is calculated first
then a simulation is run with a fixed time stepping, updating the internal
states of components (e.g. capacitor charges) and networks (voltages). The
result is typically a graph with time along the X axis and voltages/currents on
the Y axis.

<h2> Preparing for simulation </h2>
<p>
The process is largely the same as in the
<a href="../01_dc/index.html">base example of dc op point </a>. The simulation
setup in this example is called "dc transition". Below are
the summary of differences for the current example.

<h3> Modifications </h3>
<p>
Our input source is not a stable DC voltage source anymore, but a pulse. It's
still a 'V' for voltage source, connected to CN1-2, but the dc and ac
components are left empty and the time dependent value is set to pulse.
This exposes a set of pulse-specific fields. The setup in this example
uses a square wave that starts at 0V, goes up to 5V after 1 usec (TD). It's
not a perfect square, rather a trapezoid, with raise and fall time of 1 usec
each (TR and TF).
<p>
<center>
<img src="sim_mod.png">
<br>Simulation modification, adding a pulse source</center>
<p>
Note: details of the available functions and their fields can be found in
the relevant section of the <a href="https://ngspice.sourceforge.io/docs/ngspice-html-manual/manual.xhtml#magicparlabel-4164">ngspice manual</a>.

<h3> Sim setup: output config </h3>
<p>
Analysis is set to <i>transient (linear)</i>. Linear means the X axis will
be presented as a linear axis (common for time domain simulations). Start
time is not specified so it is assumed to be 0. Simulation stop time is set
to 200 miliseconds, sampling done at 1ms rate (resulting about 200 rows of data).
<p>
<center>
<img src="sim_out.png">
<br>Simulation output configuration for transient + plot</center>
<p>
Presentation is set to plot and the input and two output nets are listed by
net name.

<h3> Sim setup: run &amp; output </h3>
<p>
After running the simulation a plot is presented with three color
coded traces. The plot can be zoomed and panned with the mouse scroll
button. A left click at any point of the plot reads out the closest x
value and corresponding y values for the three traces; these are printed
above the plot.
<p>
<center>
<img src="sim_run.png">
<br>Simulation setup dialog, third tab, after execution</center>
<p>