## 1 Introduction  
Determining the optimal sizing in regard to applications, such as power electronics systems, based on time-domain and frequency-domain characteristics presents a formidable challenge. This is particularly true for models governed by ordinary differential equations (ODEs) that exhibit unpredictable variations throughout the process. Consequently, a dynamic simulation must be executed within the optimization loop to accurately compute these characteristics. A sizing problem includinga dynamic simulation can be exemplified through a simple use case in the mechanical domain of ballistic shooting. The physical parameters of the ball must be determined, so that its trajectory adheres to certain constraints. Referring to the notation in Figure 1, the sizing inputs are the mass \(m\) and the radius \(R\) of the ball, as well as the initial conditions of the throw, such as the initial velocity \(v0\) and launch angle \(\alpha\). The goal in terms of addressing the sizing problem is to minimize the _apex_ of the trajectory, while satisfying the equality constraints, such as the abscissa of the ball's final position, \(xf\), along its path. In this scenario, the throwing of the ball serves as the dynamic simulation, which must be encapsulated within an optimization loop. The contemporary landscape of optimization algorithms encompasses several distinct categories, as follows:  
* Heuristic methods, which are devoid of derivatives, including techniques such as differential evolution and particle swarm optimization [1; 2]. However, the intricate nature of optimization problems associated with power electronic systems, characterized by numerous constraints and complex models, renders the application of derivative-free algorithms quite challenging [3; 4];
* Gradient-based algorithms, on the other hand, comprise Interior Point Methods [5], Sequential Quadratic Programming (SQP) [6], the Augmented Lagrangian Method, and Stochastic Gradient Descent, tailored for machine learning [7]. To enhance the speed of optimization, one may also employ surrogate-based optimization algorithms that leverage statistical models. These include surrogate models [8; 9], such as Bayesian frameworks, Radial Basis Functions, Polynomial Regression, Gaussian Process Regression (including Kriging), and Artificial Neural Networks. Another stochastic approach is the Expected Improvement method [10]. Nevertheless, while surrogate-based optimization algorithms prove advantageous in the realm of time-intensive black-box models, they are limited in regard to their capacity to handle numerous parameters and substantial variations, as such conditions may lead to pronounced nonlinear behaviors that are challenging for the surrogate to accurately capture. **The research inquiry**, thus, revolves around the efficient computation of gradients for intricate dynamic models and their subsequent integration within an optimization framework. However, the application of gradient-based algorithms to these optimization challenges presents several significant hurdles that must be addressed, as follows:  
* For instance, the gradients of such dynamic models in relation to the optimization inputs are particularly elusive due to the occurrence of unpredictable events that can alter the ODE system throughout the dynamic simulation process;
* Furthermore, the sizing criteria must be determined after the steady state of the application has been identified, a condition that remains indeterminate during the design phase. Consequently, it is preferable to simulate the transient state without storing it, thereby conserving memory and eliminating the need for data file writing and reading;
* Regarding Fast Fourier Transform (FFT), many existing methodologies [11; 12; 13] tend to impose certain prerequisites on the operational model, such as the derivation of frequency-domain characteristics through analytical formulas [14]. Nevertheless,  
Figure 1: The throwing of the ball; an illustration of the sizing problem.