Simulation of crystal oscillator circuit a Simscape does not converge

13 ビュー (過去 30 日間)
Jan Kappen
Jan Kappen 2025 年 3 月 6 日
回答済み: Steve Miller 2025 年 3 月 24 日
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 件のコメント
Jan Kappen
Jan Kappen 2025 年 3 月 6 日
編集済み: Jan Kappen 2025 年 3 月 7 日
For some reasons the links and images in my post have gone. Trying to fix that.
Edit: fixed.

サインインしてコメントする。

回答 (1 件)

Steve Miller
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.

カテゴリ

Help Center および File ExchangeElectrical Sensors についてさらに検索

製品


リリース

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by