Skip to content

Commit ec892f1

Browse files
Update Laplace Transform Basics documentation with practical usage notes and enhance index references
1 parent fe10cdf commit ec892f1

2 files changed

Lines changed: 23 additions & 4 deletions

File tree

src/docs/articles/laplace-basics.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ The transfer function describes how a linear block changes a signal. It can say
1212

1313
If you want the exact syntax supported by SpiceSharpParser, see [LAPLACE Transfer Sources](laplace.md). This page focuses on the intuition.
1414

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+
1517
## Running Example: Sensor To ADC
1618

1719
Imagine a sensor connected to an ADC input:
@@ -45,6 +47,23 @@ That one expression says:
4547
- High-frequency noise is reduced.
4648
- In the time domain, sudden changes become smoother and slower.
4749

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+
4867
This is the main trick: the same transfer function explains the frequency response and the time response of the same linear block.
4968

5069
## What You Can Use This For
@@ -429,7 +448,7 @@ Smaller `zeta` gives more peaking and ringing. Larger `zeta` gives a flatter, mo
429448
| Misconception | Better way to think about it |
430449
|---------------|------------------------------|
431450
| `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. |
433452
| 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. |
434453
| A good `.AC` plot guarantees every transient behavior is good. | Nonlinear effects, clipping, slew rate, and startup behavior may still matter. |
435454
| 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.
465484
| What is the DC gain of `10*wc/(s+wc)`? | Set `s = 0`, so the gain is `10`. |
466485
| Does `s/(s+wc)` pass DC? | No. At `s = 0`, the numerator is `0`. |
467486
| 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. |
469488
| What does lower `zeta` usually mean in a second-order block? | More peaking and more ringing. |
470489
| 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. |
471490

@@ -484,7 +503,7 @@ For the sensor-to-ADC example, this checklist says: the DC gain is `gain`, low-f
484503

485504
## SpiceSharpParser Subset
486505

487-
SpiceSharpParser intentionally supports a practical subset:
506+
SpiceSharpParser intentionally supports the practical subset introduced near the start:
488507

489508
- `E` and `G` LAPLACE sources.
490509
- Voltage input expressions: `V(node)` and `V(node1,node2)`.

src/docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Browse the documentation by category:
1515
- **Parameters**: [.PARAM](articles/param.md), [.FUNC](articles/func.md), [.LET](articles/let.md), [.SPARAM](articles/sparam.md)
1616
- **Structure**: [.SUBCKT](articles/subckt.md), [X (Subcircuit Instance)](articles/subcircuit-instance.md), [.INCLUDE](articles/include.md), [.LIB](articles/lib.md), [.GLOBAL](articles/global.md), [.APPENDMODEL](articles/appendmodel.md)
1717
- **Control**: [.STEP](articles/step.md), [.MC](articles/mc.md), [.TEMP](articles/temp.md), [.OPTIONS](articles/options.md), [.IC](articles/ic.md), [.NODESET](articles/nodeset.md), [.ST](articles/st.md), [.IF](articles/if.md), [.DISTRIBUTION](articles/distribution.md)
18-
- **Devices**: [R](articles/resistor.md), [C](articles/capacitor.md), [L](articles/inductor.md), [K (Mutual Inductance)](articles/mutual-inductance.md), [D](articles/diode.md), [Q](articles/bjt.md), [J](articles/jfet.md), [M](articles/mosfet.md), [V](articles/voltage-source.md), [I](articles/current-source.md), [B](articles/behavioral-source.md), [E (VCVS)](articles/vcvs.md), [F (CCCS)](articles/cccs.md), [G (VCCS)](articles/vccs.md), [H (CCVS)](articles/ccvs.md), [LAPLACE Transfer Sources](articles/laplace.md), [S (Voltage Switch)](articles/voltage-switch.md), [W (Current Switch)](articles/current-switch.md), [T (Transmission Line)](articles/transmission-line.md)
18+
- **Devices**: [R](articles/resistor.md), [C](articles/capacitor.md), [L](articles/inductor.md), [K (Mutual Inductance)](articles/mutual-inductance.md), [D](articles/diode.md), [Q](articles/bjt.md), [J](articles/jfet.md), [M](articles/mosfet.md), [V](articles/voltage-source.md), [I](articles/current-source.md), [B](articles/behavioral-source.md), [E (VCVS)](articles/vcvs.md), [F (CCCS)](articles/cccs.md), [G (VCCS)](articles/vccs.md), [H (CCVS)](articles/ccvs.md), [Laplace Transform Basics](articles/laplace-basics.md), [LAPLACE Transfer Sources](articles/laplace.md), [S (Voltage Switch)](articles/voltage-switch.md), [W (Current Switch)](articles/current-switch.md), [T (Transmission Line)](articles/transmission-line.md)
1919

2020
## API Reference
2121

0 commit comments

Comments
 (0)