  This paper presents an automated algorithm to analyze the stability of
piecewise affine (PWA) dynamical systems due to their broad applications. We
parametrize the Lyapunov function as a PWA function, with polytopic regions
defined by the PWA dynamics. Using this parametrization, Stability conditions
can be expressed as linear constraints restricted to polytopes so that the
search for a Lyapunov function involves solving a linear program. However, a
valid Lyapunov function might not be found given these polytopic regions. A
natural response is to increase the size of the parametrization of the Lyapunov
function by dividing regions and solving the new linear program. This paper
proposes two new methods to divide each polytope into smaller ones. The first
approach divides a polytope based on the sign of the derivative of the
candidate Lyapunov function, while the second divides it based on the change in
the vector field of the PWA dynamical system. In addition, we propose using
Delaunay triangulation to achieve automated division of regions and preserve
the continuity of the PWA Lyapunov function. Examples involving learned models
and explicit MPC controllers demonstrate that the proposed method of dividing
regions leads to valid Lyapunov functions with fewer regions than existing
methods, reducing the computational time taken for stability analysis
