Simulation of crystal oscillator circuit a Simscape does not converge
조회 수: 14 (최근 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!