{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/electrical.mosfet.conduction_loss.input.json",
  "title": "MOSFET conduction loss — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "I": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Current in amperes. Meaning depends on current_basis: DC amps, RMS during the MOSFET ON interval, or full-cycle MOSFET RMS."
    },
    "Rds": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "On-resistance Rds(on) (Ω) at Tref (usually 25 °C). Use temperature_model to scale to Tj."
    },
    "D": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 1,
      "description": "Duty cycle fraction in (0, 1]. Used only when current_basis=on_interval_rms. Ignored (warning DUTY_NOT_APPLICABLE) for dc and full_cycle_rms. Default 1."
    },
    "current_basis": {
      "type": "string",
      "enum": [
        "dc",
        "on_interval_rms",
        "full_cycle_rms"
      ],
      "description": "How I is defined. Required. dc: continuous current, P=I²·Rds_Tj, D=1. on_interval_rms: I is RMS while the FET is on, P=I²·Rds_Tj·D. full_cycle_rms: I is MOSFET RMS over the switching period, P=I²·Rds_Tj (do not multiply by D). The engine will not infer a waveform factor."
    },
    "temperature_model": {
      "type": "string",
      "enum": [
        "none",
        "linear",
        "ratio"
      ],
      "description": "Rds(Tj) correction. none (default): use Rds as entered. linear: Rds_Tj=Rds·(1+α·(Tj−Tref)). ratio: Rds_Tj=Rds·rds_ratio. Omitting temperature_model infers ratio if rds_ratio is set (ratio wins even when Tj_C or alpha_per_C is also present), else linear if Tj_C or alpha_per_C is set, else none."
    },
    "Tj_C": {
      "type": "number",
      "description": "Junction temperature (°C). Required for temperature_model=linear."
    },
    "Tref_C": {
      "type": "number",
      "description": "Rds reference temperature (°C). Default 25."
    },
    "alpha_per_C": {
      "type": "number",
      "description": "Linear temperature coefficient (1/°C). Default 0.006 when linear and omitted — a Si MOSFET planning default, not a datasheet value."
    },
    "rds_ratio": {
      "type": "number",
      "exclusiveMinimum": 0,
      "description": "Normalized Rds(Tj)/Rds(Tref) from the datasheet curve. Required for temperature_model=ratio."
    }
  },
  "required": [
    "I",
    "Rds",
    "current_basis"
  ],
  "allOf": [
    {
      "if": {
        "properties": {
          "temperature_model": {
            "const": "linear"
          }
        },
        "required": [
          "temperature_model"
        ]
      },
      "then": {
        "required": [
          "Tj_C"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "temperature_model": {
            "const": "ratio"
          }
        },
        "required": [
          "temperature_model"
        ]
      },
      "then": {
        "required": [
          "rds_ratio"
        ]
      }
    }
  ],
  "description": "Compute MOSFET conduction loss from I, Rds(on), current_basis (dc / on-interval RMS / full-cycle MOSFET RMS), and optional Rds(Tj) via linear α or datasheet ratio. (calculation_version 1.2.2)"
}
