Skip to content

Commit b14df29

Browse files
committed
Feat: Add ACVoltageSource for small-signal analysis
Jira-Ticket: FXC-1655
1 parent 631e780 commit b14df29

File tree

14 files changed

+600
-11
lines changed

14 files changed

+600
-11
lines changed

docs/api/spice.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ Sources
1010
:toctree: _autosummary/
1111
:template: module.rst
1212

13+
tidy3d.ACVoltageSource
1314
tidy3d.DCVoltageSource
15+
tidy3d.GroundVoltageSource
1416
tidy3d.DCCurrentSource
1517

1618

docs/lectures/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ Welcome to our lecture series!
1010
fdtd101
1111
fdtd_workshop
1212
inversedesign
13+
small_signal_analysis
1314

1415

1516
.. include:: /lectures/fdtd101.rst
1617
.. include:: /lectures/fdtd_workshop.rst
17-
.. include:: /lectures/inversedesign.rst
18+
.. include:: /lectures/inversedesign.rst
19+
.. include:: /lectures/small_signal_analysis.rst
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
Small Signal Analysis Guide |:zap:|
2+
####################################
3+
4+
This guide explains how to perform small signal AC analysis using Tidy3D's TCAD simulation capabilities.
5+
6+
Overview
7+
========
8+
9+
Small signal analysis (SSAC) is a technique used to analyze the frequency response of electronic devices around a DC operating point. It's particularly useful for:
10+
11+
- Analyzing frequency-dependent behavior of semiconductor devices.
12+
- Computing small-signal parameters like transconductance and output conductance.
13+
- Studying AC characteristics of transistors, diodes, and other electronic components.
14+
15+
Key Components
16+
==============
17+
18+
GroundVoltageSource
19+
-------------------
20+
21+
The :class:`GroundVoltageSource` class provides an explicit way to specify ground references in simulations:
22+
23+
.. code-block:: python
24+
25+
import tidy3d as td
26+
27+
# Create a ground boundary condition
28+
ground_bc = td.VoltageBC(source=td.GroundVoltageSource())
29+
30+
ACVoltageSource
31+
---------------
32+
33+
The :class:`ACVoltageSource` class defines small-signal AC excitations:
34+
35+
.. code-block:: python
36+
37+
# Define DC bias voltages and AC source amplitude
38+
bias_voltages = [0.0, 0.5, 1.0, 1.5, 2.0] # V
39+
ac_amplitude = 1e-3 # 1mV (small signal amplitude)
40+
41+
ac_source = td.ACVoltageSource(
42+
voltage=bias_voltages,
43+
amplitude=ac_amplitude
44+
)
45+
46+
SteadyChargeDCAnalysis with SSAC
47+
------------------------------
48+
49+
The :class:`SteadyChargeDCAnalysis` class now supports small signal analysis through the ``ssac_freqs`` parameter:
50+
51+
.. code-block:: python
52+
53+
ssac_frequencies = [1e3, 1e4, 1e5, 1e6] # AC analysis frequencies (Hz)
54+
55+
isothermal_spec = td.SteadyChargeDCAnalysis(
56+
ssac_freqs=ssac_frequencies,
57+
# ... other parameters
58+
)
59+
simulation = td.HeatChargeSimulation(
60+
analysis_spec=analysis,
61+
# ... other parameters
62+
)
63+
64+
Best Practices
65+
==============
66+
67+
1. **Ground Reference**: Specify exactly one ground reference using :class:`GroundVoltageSource`. If no ground is specified, the smallest voltage source will be considered as the ground voltage.
68+
69+
2. **Small Signal Amplitude**: Keep the AC amplitude small (typically 1-10 mV) to ensure linear operation.
70+
71+
3. **Frequency Range**: Choose frequencies that cover the relevant bandwidth of your device.
72+
73+
4. **Convergence**: Use appropriate tolerance settings for the charge analysis to ensure convergence.
74+
75+
5. **Validation**: The simulation will automatically validate that one :class:`ACVoltageSource` is present when ``ssac_freqs`` is specified.
76+
77+
Common Use Cases
78+
================
79+
80+
- **MOSFET Analysis**: Study transconductance and output conductance vs. frequency.
81+
- **Diode Characterization**: Analyze junction capacitance and conductance.
82+
- **BJT Small-Signal**: Compute h-parameters and frequency response.
83+
84+
Troubleshooting
85+
==============
86+
87+
- **No AC Source Error**: Ensure at least one :class:`ACVoltageSource` is present when using ``ssac_freqs``.
88+
- **Multiple Grounds Error**: Only one ground reference is allowed per simulation.
89+
- **Convergence Issues**: Adjust tolerance settings or decrease the discretization size.

schemas/HeatChargeSimulation.json

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,37 @@
11
{
22
"additionalProperties": false,
33
"definitions": {
4+
"ACVoltageSource": {
5+
"additionalProperties": false,
6+
"properties": {
7+
"amplitude": {
8+
"default": 1.0,
9+
"type": "number"
10+
},
11+
"attrs": {
12+
"default": {},
13+
"type": "object"
14+
},
15+
"name": {
16+
"minLength": 1,
17+
"type": "string"
18+
},
19+
"type": {
20+
"default": "ACVoltageSource",
21+
"enum": [
22+
"ACVoltageSource"
23+
],
24+
"type": "string"
25+
},
26+
"voltage": {
27+
"type": "ArrayLike"
28+
}
29+
},
30+
"required": [
31+
"voltage"
32+
],
33+
"type": "object"
34+
},
435
"AnisotropicMedium": {
536
"additionalProperties": false,
637
"properties": {
@@ -3042,6 +3073,7 @@
30423073
"type": "number"
30433074
},
30443075
"name": {
3076+
"minLength": 1,
30453077
"type": "string"
30463078
},
30473079
"type": {
@@ -3065,6 +3097,7 @@
30653097
"type": "object"
30663098
},
30673099
"name": {
3100+
"minLength": 1,
30683101
"type": "string"
30693102
},
30703103
"type": {
@@ -4105,6 +4138,23 @@
41054138
],
41064139
"type": "object"
41074140
},
4141+
"GroundVoltageSource": {
4142+
"additionalProperties": false,
4143+
"properties": {
4144+
"attrs": {
4145+
"default": {},
4146+
"type": "object"
4147+
},
4148+
"type": {
4149+
"default": "GroundVoltageSource",
4150+
"enum": [
4151+
"GroundVoltageSource"
4152+
],
4153+
"type": "string"
4154+
}
4155+
},
4156+
"type": "object"
4157+
},
41084158
"HammerstadSurfaceRoughness": {
41094159
"additionalProperties": false,
41104160
"properties": {
@@ -4505,6 +4555,10 @@
45054555
"default": false,
45064556
"type": "boolean"
45074557
},
4558+
"ssac_freqs": {
4559+
"default": [],
4560+
"type": "ArrayLike"
4561+
},
45084562
"temperature": {
45094563
"default": 300,
45104564
"exclusiveMinimum": 0,
@@ -7456,6 +7510,10 @@
74567510
"default": false,
74577511
"type": "boolean"
74587512
},
7513+
"ssac_freqs": {
7514+
"default": [],
7515+
"type": "ArrayLike"
7516+
},
74597517
"tolerance_settings": {
74607518
"allOf": [
74617519
{
@@ -9454,9 +9512,15 @@
94549512
"type": "object"
94559513
},
94569514
"source": {
9457-
"allOf": [
9515+
"anyOf": [
9516+
{
9517+
"$ref": "#/definitions/ACVoltageSource"
9518+
},
94589519
{
94599520
"$ref": "#/definitions/DCVoltageSource"
9521+
},
9522+
{
9523+
"$ref": "#/definitions/GroundVoltageSource"
94609524
}
94619525
]
94629526
},

schemas/HeatSimulation.json

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,37 @@
11
{
22
"additionalProperties": false,
33
"definitions": {
4+
"ACVoltageSource": {
5+
"additionalProperties": false,
6+
"properties": {
7+
"amplitude": {
8+
"default": 1.0,
9+
"type": "number"
10+
},
11+
"attrs": {
12+
"default": {},
13+
"type": "object"
14+
},
15+
"name": {
16+
"minLength": 1,
17+
"type": "string"
18+
},
19+
"type": {
20+
"default": "ACVoltageSource",
21+
"enum": [
22+
"ACVoltageSource"
23+
],
24+
"type": "string"
25+
},
26+
"voltage": {
27+
"type": "ArrayLike"
28+
}
29+
},
30+
"required": [
31+
"voltage"
32+
],
33+
"type": "object"
34+
},
435
"AnisotropicMedium": {
536
"additionalProperties": false,
637
"properties": {
@@ -3042,6 +3073,7 @@
30423073
"type": "number"
30433074
},
30443075
"name": {
3076+
"minLength": 1,
30453077
"type": "string"
30463078
},
30473079
"type": {
@@ -3065,6 +3097,7 @@
30653097
"type": "object"
30663098
},
30673099
"name": {
3100+
"minLength": 1,
30683101
"type": "string"
30693102
},
30703103
"type": {
@@ -4105,6 +4138,23 @@
41054138
],
41064139
"type": "object"
41074140
},
4141+
"GroundVoltageSource": {
4142+
"additionalProperties": false,
4143+
"properties": {
4144+
"attrs": {
4145+
"default": {},
4146+
"type": "object"
4147+
},
4148+
"type": {
4149+
"default": "GroundVoltageSource",
4150+
"enum": [
4151+
"GroundVoltageSource"
4152+
],
4153+
"type": "string"
4154+
}
4155+
},
4156+
"type": "object"
4157+
},
41084158
"HammerstadSurfaceRoughness": {
41094159
"additionalProperties": false,
41104160
"properties": {
@@ -4505,6 +4555,10 @@
45054555
"default": false,
45064556
"type": "boolean"
45074557
},
4558+
"ssac_freqs": {
4559+
"default": [],
4560+
"type": "ArrayLike"
4561+
},
45084562
"temperature": {
45094563
"default": 300,
45104564
"exclusiveMinimum": 0,
@@ -7456,6 +7510,10 @@
74567510
"default": false,
74577511
"type": "boolean"
74587512
},
7513+
"ssac_freqs": {
7514+
"default": [],
7515+
"type": "ArrayLike"
7516+
},
74597517
"tolerance_settings": {
74607518
"allOf": [
74617519
{
@@ -9454,9 +9512,15 @@
94549512
"type": "object"
94559513
},
94569514
"source": {
9457-
"allOf": [
9515+
"anyOf": [
9516+
{
9517+
"$ref": "#/definitions/ACVoltageSource"
9518+
},
94589519
{
94599520
"$ref": "#/definitions/DCVoltageSource"
9521+
},
9522+
{
9523+
"$ref": "#/definitions/GroundVoltageSource"
94609524
}
94619525
]
94629526
},

0 commit comments

Comments
 (0)