resistance_inductance_matrix_matlab
MATLAB Code for Extracting Resistance/Inductance Matrices
This MATLAB code extracts the resistance/inductance matrix of a system:
- Different operating points are provided (measured or simulated current excitations).
- The associated losses/energies are provided (measured or simulated values).
- The corresponding resistance/inductance matrix is extracted.
The following the quadratic form is linking the aforementionned variables:
U = 0.5*I_vec'*Q_mat*I_vec-
I_vecis the vector containing the applied currents -
Q_matis the resistance/inductance matrix -
Uis the loss/energy value
This code is handling the following cases:
-
n_opis the number of provided operating points -
n_varis the number of independent coefficients for the resistance/inductance matrix -
n_op<n_var: under-determined equation system => invalid problem -
n_op==n_var: determined equation system => linear equation system -
n_op>n_var: over-determined equation system => least-square fit
The condition number of the equation system and the residuum are computed. This is required to ensure that the resistance/inductance matrix is numerically robust. Finally, the code checks that the extracted matrix is physical (symmetric and positive definite).
Compatibility
- Tested with MATLAB R2021a.
- No toolboxes are required.
- Compatibility with GNU Octave not tested but probably easy to achieve.
Author
Thomas Guillod - GitHub Profile
License
This project is licensed under the BSD License, see LICENSE.md.
Cite As
Thomas Guillod (2026). resistance_inductance_matrix_matlab (https://github.com/otvam/resistance_inductance_matrix_matlab), GitHub. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Versions that use the GitHub default branch cannot be downloaded
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.1 | add tags |
|
|
| 1.0.0 |
|
