Classic Scalar JA Model Implementation Code

Resource Overview

Code implementation of the classic scalar JA (Jiles-Atherton) model, ideal for hysteresis modeling beginners. The package includes two implementation approaches: one using fixed-point iteration method (easily convertible to C) and another using Simulink implementation (suitable as a sub-function in control diagrams).

Detailed Documentation

In this article, we explore the code implementation of the classic scalar JA (Jiles-Atherton) hysteresis model. This model serves as an excellent starting point for beginners studying hysteresis modeling. I present two distinct implementation approaches: first, a fixed-point iteration method implementation that can be readily converted to C language, and second, a Simulink-based implementation designed to function as a sub-module within control diagrams. The fixed-point iteration implementation demonstrates numerical stability through iterative convergence algorithms, typically employing while-loops with tolerance checks to solve the nonlinear JA equations. The Simulink version utilizes library blocks for mathematical operations and integration, making it suitable for control system integration and real-time simulation applications. These implementations help beginners grasp fundamental hysteresis modeling concepts while providing advanced learners with implementation insights and extension possibilities. The code can be further enhanced through additional comments and explanatory documentation to facilitate better understanding and utilization by readers. Both implementations include core model parameters (a, alpha, k, c, Ms) and demonstrate proper initialization procedures for magnetic field strength (H) and flux density (B) calculations.