Simulation of crystal oscillator circuit a Simscape does not converge
8 次查看(过去 30 天)
显示 更早的评论
Hi all,
I'm trying to simulate the effect of load capacitors on a oscillator circuit using the Crystal Simscape block. This is in fact a simple Pierce oscillator, see e.g. https://www.elprocus.com/pierce-oscillator-working-and-its-applications/

I'm following Guidelines for oscillator design on https://www.st.com/resource/en/application_note/cd00221665-oscillator-design-guide-for-stm8afals-stm32-mcus-and-mpus-stmicroelectronics.pdf to parametrize the passives and added an initial voltage to the crystal to (hopefully) start the oscillation.

Unfortunately, the model does not run at all:
Error:An error occurred during simulation and the simulation was terminated
Caused by:
['crystal_model_simplified/Solver Configuration']: Transient initialization at time 7.414431651271723e-06, solving for consistent states and modes, failed to converge.
Nonlinear solver: failed to converge, residual norm too large.
Here is the set of components with unconverged equations:
'crystal_model_simplified/Inverter'
Equation location is:
'ee.ic.logic.logic_1ip_eqn'(no line number info)
'crystal_model_simplified/Crystal'
Equation location is:
'foundation.electrical.elements.inductor' (line 34)
Equation location is:
'foundation.electrical.elements.inductor' (line 34)
'crystal_model_simplified/Inverter'
Equation location is:
'foundation.electrical.elements.capacitor' (line 36)
The model is attached.
Do you have ideas what's going wrong?
Thanks!
回答(1 个)
Steve Miller
2025-3-24
While I can't say for sure what is going wrong, if I set Rf to 1e9 the simulation runs to completion and the value on the Scope looks unchanged. Perhaps look at the quantities you care about and see if that modification is acceptable.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Electrical Sensors 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!