ExponentialProfile

class pmrf.models.components.lines.profiles.ExponentialProfile(start: Any, end: Any, *, name: str | None = None, metadata: Any = None)

Bases: AbstractProfile

A profile varying exponentially between two endpoint values.

The classic exponential taper. Its logarithm is linear in \(t\), so the midpoint value is the geometric mean of the endpoints rather than the arithmetic one, and evaluate(0) == start, evaluate(1) == end.

Mathematical Formulation

$$p(t) = p_0 expleft(t ln frac{p_1}{p_0}right)

= p_0 left(frac{p_1}{p_0}right)^{t}, qquad 0 leq t leq 1$$

where \(p_0\) is start and \(p_1\) is end. It is \(C^\infty\) in \(t\) for positive endpoints, so the smoothness requirement on AbstractProfile holds.

Both coefficients are constrained positive: the shape is defined through the ratio \(p_1/p_0\), which is undefined at zero and non-real for a sign change.

Example

from pmrf.models import ExponentialProfile

taper = ExponentialProfile(start=2.0, end=8.0)
taper.evaluate(0.5)   # 4.0, the geometric mean

References

Pozar, D. M. (2011). Microwave Engineering (4th ed.), Section 5.8. Wiley.

Collin, R. E. (1956). The optimum tapered transmission line matching section. Proceedings of the IRE, 44(4), 539-548. doi:10.1109/JRPROC.1956.274938

Parameters:
  • start (Param) – Value at t = 0, the port-1 end. Must be positive.

  • end (Param) – Value at t = 1, the port-2 end. Must be positive.

evaluate(t: Array | ndarray | bool | number | bool | int | float | complex) → Array | ndarray | bool | number | bool | int | float | complex

Evaluate the profile at a normalised position along the line.

This is elementwise: t may be a scalar or an array of any shape, and the result has that same shape. A caller sampling many positions, such as a profiled line sampling its section midpoints, passes the whole array in one call.

Parameters:

t (ArrayLike) – Normalised position along the line, in \([0, 1]\). t = 0 is at port 1 and t = 1 is at port 2.

Returns:

The profiled value at t, in the physical units of whatever parameter the profile is attached to. Same shape as t.

Return type:

ArrayLike

end: Param

Value at t = 1, the port-2 end

start: Param

Value at t = 0, the port-1 end