You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/docs/articles/laplace-basics.md
+22-3Lines changed: 22 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,8 @@ The transfer function describes how a linear block changes a signal. It can say
12
12
13
13
If you want the exact syntax supported by SpiceSharpParser, see [LAPLACE Transfer Sources](laplace.md). This page focuses on the intuition.
14
14
15
+
Keep one practical boundary in mind as you read: SpiceSharpParser supports a focused `LAPLACE` subset. The transfer must be used on an `E` or `G` source, the input must be `V(node)` or `V(node1,node2)`, and the transfer must be a proper rational polynomial in `s` with finite DC gain. The examples below stay inside that subset.
16
+
15
17
## Running Example: Sensor To ADC
16
18
17
19
Imagine a sensor connected to an ADC input:
@@ -45,6 +47,23 @@ That one expression says:
45
47
- High-frequency noise is reduced.
46
48
- In the time domain, sudden changes become smoother and slower.
47
49
50
+
Written as a small supported netlist, that first model can look like this:
51
+
52
+
```spice
53
+
* Gain of 2 with one low-pass pole at 10 kHz
54
+
.PARAM gain=2
55
+
.PARAM fc=10k
56
+
.PARAM wc={2*PI*fc}
57
+
VIN IN 0 AC 1
58
+
EAAF OUT 0 LAPLACE {V(IN)} = {gain*wc/(s+wc)}
59
+
RLOAD OUT 0 10k
60
+
.AC DEC 40 10 1MEG
61
+
.SAVE V(OUT)
62
+
.END
63
+
```
64
+
65
+
Because `VIN` uses `AC 1`, the `.AC` magnitude of `V(OUT)` reads directly as the gain from the sensor voltage to the ADC input.
66
+
48
67
This is the main trick: the same transfer function explains the frequency response and the time response of the same linear block.
49
68
50
69
## What You Can Use This For
@@ -429,7 +448,7 @@ Smaller `zeta` gives more peaking and ringing. Larger `zeta` gives a flatter, mo
429
448
| Misconception | Better way to think about it |
430
449
|---------------|------------------------------|
431
450
|`s` is a normal variable I can set with `.PARAM`. |`s` is reserved for Laplace behavior inside the transfer expression. |
432
-
|`.AC 1` means the input is always 1 V in every simulation. |`AC 1` sets the small-signal AC magnitude; it is mainly a convenient way to read gain directly. |
451
+
|`AC 1`on a source means the input is always 1 V in every simulation. |`AC 1` sets that source's small-signal AC magnitude; it is mainly a convenient way to read gain directly during `.AC` analysis. |
433
452
| A Laplace source is a perfect replacement for a real op-amp. | It is a linear approximation of selected behavior, such as gain and bandwidth. |
434
453
| A good `.AC` plot guarantees every transient behavior is good. | Nonlinear effects, clipping, slew rate, and startup behavior may still matter. |
435
454
| Higher cutoff is always better. | Higher cutoff is faster, but it also lets more high-frequency noise through. |
@@ -465,7 +484,7 @@ These are quick checks for reading transfer functions.
465
484
| What is the DC gain of `10*wc/(s+wc)`? | Set `s = 0`, so the gain is `10`. |
466
485
| Does `s/(s+wc)` pass DC? | No. At `s = 0`, the numerator is `0`. |
467
486
| If `fc` increases in `wc/(s+wc)`, does the block get faster or slower? | Faster. Higher cutoff means shorter time constant. |
468
-
| What does `AC 1` help with in `.AC` analysis? |The output magnitude is directly the transfer gain from that source. |
487
+
| What does `AC 1`on an input source help with in `.AC` analysis? |It sets the input magnitude to 1, so the output magnitude is directly the transfer gain from that source. |
469
488
| What does lower `zeta` usually mean in a second-order block? | More peaking and more ringing. |
470
489
| Why avoid a pure integrator such as `1/s` here? | Its DC gain is singular, so it is outside the supported finite-DC-gain subset. |
471
490
@@ -484,7 +503,7 @@ For the sensor-to-ADC example, this checklist says: the DC gain is `gain`, low-f
484
503
485
504
## SpiceSharpParser Subset
486
505
487
-
SpiceSharpParser intentionally supports a practical subset:
506
+
SpiceSharpParser intentionally supports the practical subset introduced near the start:
488
507
489
508
-`E` and `G` LAPLACE sources.
490
509
- Voltage input expressions: `V(node)` and `V(node1,node2)`.
0 commit comments