Simulink - Triangular wave form simulation
6 次查看(过去 30 天)
显示 更早的评论
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!