PLECS doesn’t natively support fractional time-domain derivatives. After a bit of research, it seems like the most common approach is to approximate the Constant Phase Element (CPE) with a Oustaloup Recursive Approximation.
Here’s the PLECS model implementing the theory below: CPE_example.plecs (21.3 KB)
Constant Phase Element
A CPE has impedance:
Z(s) = \frac{1}{C_\alpha \, s^\alpha}, \quad 0 < \alpha < 1
where C_\alpha is the CPE coefficient and \alpha is the fractional exponent. For \alpha = 1 this reduces to a pure capacitor; \alpha = 0 gives a pure resistor R = 1/C_\alpha.
Oustaloup Recursive Approximation
The ORA approximates s^\alpha as a rational transfer function over a finite frequency band [\omega_b, \omega_h] using N pole-zero pairs:
s^\alpha \approx \omega_h^\alpha \prod_{k=1}^{N} \frac{s + z_k}{s + p_k}
The zeros and poles are log-spaced across the band:
z_k = \omega_b \left(\frac{\omega_h}{\omega_b}\right)^{\frac{2k-1-\alpha}{2N}}, \qquad p_k = \omega_b \left(\frac{\omega_h}{\omega_b}\right)^{\frac{2k-1+\alpha}{2N}}
with z_k < p_k for all k, alternating in pairs across the band.
The CPE impedance approximation follows directly:
Z(s) \approx K \prod_{k=1}^{N} \frac{s + p_k}{s + z_k}, \qquad K = \frac{1}{C_\alpha \, \omega_h^\alpha}
Order selection: N = 5 or N = 7 is a typical order, with higher order being a better fit. One can also extend the frequency match band for a better fit within a smaller frequency sub-interval.
State-Space Realisation
Cascading N first-order sections yields an N-th order state-space system
\dot{x} = Ax + Bu\\
y = Cx + Du
with input u = I (current) and output y = V (voltage).
The matrices have a closed-form lower-triangular structure:
A_{ij} = \begin{cases} -z_i & i = j \\ p_j - z_j & i > j \\ 0 & i < j \end{cases}
B = \mathbf{1}_N, \qquad C = K\begin{bmatrix} p_1 - z_1 & \cdots & p_N - z_N \end{bmatrix}, \qquad D = K
Note that C directly mirrors the sub-diagonal structure of A (scaled by K), so only the pole/zero pairs and K are needed to fully specify the system.
PLECS Implementation
The model uses a State Space block with matrices A, B, C, D as computed above. The block models the CPE as a voltage-controlled current relationship:
- Input u: current through the CPE branch [A]
- Output y: voltage across the CPE [V]
The output is driven via a controlled voltage source. Initial conditions x(0) = 0 are appropriate for a discharged element but could be added to the model. Given the voltage source implementation will be some restrictions on what elements can be connected in parallel with the component (state source dependency).
Results
Here’s the theoretical match when \alpha is 0.5. Note the approximation is only valid within [F_\text{min},\, F_\text{max}]. Choose this range to cover all significant spectral content of the excitation signal. In this case the range was 1 to 10 kHz. This is generated by the model initialization commands.
Here’s the results comparing the case where \alpha = 1 between the CPE element and a capacitor: