Simulink - Triangular wave form simulation
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Rashmil Dahanayake
le 28 Nov 2013
Réponse apportée : Rashmil Dahanayake
le 28 Nov 2013
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 commentaires
Réponse acceptée
Plus de réponses (1)
venkat
le 28 Nov 2013
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 commentaires
Voir également
Catégories
En savoir plus sur Configure Simulation Conditions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!