> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/pe-add-on-opal-rt/model-in-schematic-editor/library-blocks-reference/switches-blocks/diode.md).

# Diode

## Description

<figure><img src="https://1300141755-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCyfrFRdgX5VC5iwM13Zm%2Fuploads%2FX3xWTHNRPclCi6rrR5Mv%2Fimage.png?alt=media&amp;token=1e309196-d542-47f7-93b4-289eb8fce7f3" alt=""><figcaption></figcaption></figure>

The **Diode** block allows current to flow in only one direction (from negative/anode to positive/cathode port) and restricts current from flowing in the opposite direction. The transition between blocking and conduction states depends only on the voltage applied across it (spontaneous commutation).

## Parameters

### In eHS circuit

<figure><img src="https://1300141755-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCyfrFRdgX5VC5iwM13Zm%2Fuploads%2Fvs5ndtUzub5TKm30Qhxx%2Fimage.png?alt=media&amp;token=3298446f-b9ac-4a5e-9583-3ec5662cba3d" alt="" width="563"><figcaption></figcaption></figure>

| Parameter                                                    | Description                                                                                                                                                                                            | Sets feature | I/O & Monitoring |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------ | ---------------- |
| **Internal on resistance (R**<sub>**on**</sub>**)**          | The diode internal on resistance, in ohms (Ω).                                                                                                                                                         | Yes          | N/A              |
| **Internal off Resistance (R**<sub>**off**</sub>**)**        | The diode internal off resistance, in ohms (Ω).                                                                                                                                                        | Yes          | N/A              |
| **Switching method (Sm)**                                    | Refer to [Select & Tune the Switching Method](https://www.opal-rt.com/docs/pe-add-on-opal-rt/model-in-schematic-editor/optimize-the-ehs-circuit/select-and-tune-the-switching-method.md) for guidance. | No           | N/A              |
| **Discrete-time switch conductance (G**<sub>**s**</sub>**)** | <p><em>Available only when Switching Method is set to Pejovic.</em><br>Switch conductance.</p>                                                                                                         | Yes          | N/A              |
| **Relaxation (Relax)**                                       | *Available only when Switching Method is set to Quasi-Supra.*                                                                                                                                          | Yes          | N/A              |
| **Damping resistance (R**<sub>**damp**</sub>**)**            | <p><em>Available only when Switching Method is set to Quasi-Supra.</em><br>Damping resistance value, in ohms (Ω).</p>                                                                                  | Yes          | N/A              |

### In HSCS circuit <a href="#conserving-ports" id="conserving-ports"></a>

| Parameter                                             | Description                                     | Sets feature | I/O & Monitoring |
| ----------------------------------------------------- | ----------------------------------------------- | ------------ | ---------------- |
| **Internal on resistance (R**<sub>**on**</sub>**)**   | The diode internal on resistance, in ohms (Ω).  | Yes          | N/A              |
| **Internal off Resistance (R**<sub>**off**</sub>**)** | The diode internal off resistance, in ohms (Ω). | Yes          | N/A              |

## Conserving ports <a href="#conserving-ports" id="conserving-ports"></a>

| Port   | Description   |
| ------ | ------------- |
| **p1** | Positive port |
| **n1** | Negative port |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/pe-add-on-opal-rt/model-in-schematic-editor/library-blocks-reference/switches-blocks/diode.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
