Spring System Optimization
This project addresses the optimization of a spring system consisting of 21 nodes and 24 springs. The goal is to minimize the total spring energy by adjusting the positions of the nodes while ensuring that certain nodes remain fixed on a hoop. The energy of the spring system is given by:
\[ E = \frac{\kappa}{2} \sum_{\text{s springs}} \left( |r_{\text{spring}[0]} - r_{\text{spring}[1]}| - r_0 \right)^2 \]
where \( \kappa = 1 \) is the spring constant, \( r_0 = 1 \) is the equilibrium length of each spring, and the sum is taken over all springs.
Methodology
Two optimization methods were implemented to find the minimal energy configuration:
- Gradient Descent: A first-order method that iteratively updates parameters using the gradient.
- Conjugate Gradient: A more sophisticated method that uses gradient information and a conjugate direction search for faster convergence.
Results
Figures below show the convergence behavior of both methods:

Figure 1: Gradient Descent convergence behavior.

Figure 2: Conjugate Gradient convergence behavior.
Final Configurations

Figure 3: Final configuration using Gradient Descent.

Figure 4: Final configuration using Conjugate Gradient.
Summary of Results
Method | Final Energy | Norm of Gradient |
---|---|---|
Gradient Descent | 1.492451 | 2.32e-08 |
Conjugate Gradient | 1.492451 | 7.48e-08 |
Final Node Positions
Final positions of the nodes obtained using both methods are summarized in the tables below:
Gradient Descent
x | y |
---|---|
-2.1213 | 2.1213 |
0.0000 | 3.0000 |
Conjugate Gradient
x | y |
---|---|
-2.1213 | 2.1213 |
0.0000 | 3.0000 |