Improvements
We will not discuss here the software improvements but give another approach that might improve the results. As explained in the result section, the fact that the incoming pulse is not a Dirac impulse decreases the sinewave quality and then the precision of the results. Some modifications of the fitted mathematical model could be done to take the pulse shape into account. Figures 1 & 2 show the real pulse shape when arriving in the filter.
Figure 1 - Pulse shape. It does not look exactly as a Dirac
pulse
Figure 2 - Zoom on the pulse shape
Once the corresponding mathematical model of the pulse is found, its Laplace transform can be multiplied with the LC circuit transfer function (Expressed in the following equation).
The inverse Laplace transform of the system "pulse + filter" can be deduced, giving a best suited mathematical model for the fitting. Indeed, the distortion should now be taken into account in the model.
The hardest part of the job is to find a best suited mathematical model for the pulse than can be easily converted in the Laplace domain. Tests were done with the following model giving the result plotted in figure 3.
Figure 2 - Plot of the example of the mathematical model
17th of January - Nicolas Boucquey