Simulink - Triangular wave form simulation
1 回表示 (過去 30 日間)
古いコメントを表示
Rashmil Dahanayake
2013 年 11 月 28 日
回答済み: Rashmil Dahanayake
2013 年 11 月 28 日
Hi, I'm trying to generate simple triangular wave and connect the output to a scope.
I used the repeating sequence block and the parameters were set as bellow.
I assume this is something to do with simulation settings.(Continuous function, ODE45)
Furthermore I recieved following warning:Warning: The model 'test22' does not have continuous states, hence Simulink is using the solver 'VariableStepDiscrete' instead of solver 'ode45'. You can disable this diagnostic by explicitly specifying a discrete solver in the solver tab of the Configuration Parameters dialog, or by setting the 'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics tab of the Configuration Parameters dialog
Any ideas to fix? thanks
0 件のコメント
採用された回答
その他の回答 (1 件)
venkat
2013 年 11 月 28 日
You need to select correct solver configuration. Take solver type Fixed step and make sure the fixed step size is relatively small compared to the repeating sequence signal time period for better accuracy (Since it takes more steps to construct the signal)
Check this
Change solver type to Fixed Step and Fixed -step size to 1/1000/20
For repeating sequence block Take time values as [1/1000/4 1/1000/2 3/1000/4 1/1000]
output values as [0 1 0 -1 0]
Here i am generating a triangular waveform whose frequency is 1000Hz and solver takes 20 steps to constuct each cycle of the waveform.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Configure Simulation Conditions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!