Effacer les filtres
Effacer les filtres

Simulink derivative block giving zero when implemented

8 vues (au cours des 30 derniers jours)
Daniel Lowe
Daniel Lowe le 14 Nov 2017
Commenté : Daniel Lowe le 14 Nov 2017
I have a simulink model with a sine wave input which then gets differentiated. When I test just the sine wave and derivative block, it seems to work fine, but then when I add in the rest of the model after that, it gives an output of zero as shown. I can't work out why the blocks after is are affecting the derivative.
Thanks for any help you can offer.
<<
>>
  2 commentaires
Birdman
Birdman le 14 Nov 2017
Can you share the model(export to R2017a)?
Daniel Lowe
Daniel Lowe le 14 Nov 2017
Hi,
Ive attached 2 files, the model itself, and the parameters used in the model.
Thanks :)

Connectez-vous pour commenter.

Réponse acceptée

Birdman
Birdman le 14 Nov 2017
Well, the problem with your model is that you use variable step solver, which adjusts the step size according to the characteristics of the model. But what I noticed is that, when the simulation starts, the simulation goes really slow. The solver minimizes step size so much that the derivative of your signal becomes too high. Therefore, it looks like that the derivative is zero but if you look at the order of the magnitude of the signal, it is really big. When you zoom in, you will see that the signal is not zero. Please check the attached figures.
Also, when I limited the min step size from Configuration Parameters(to 1e-4), the simulation gave an error. This means that your model is too sensitive to be solved numerically. You might need some modifications. Please see this for yourself.
Hope this helps.
  1 commentaire
Daniel Lowe
Daniel Lowe le 14 Nov 2017
Thanks for that. I'll look into adjusting the step size and modifying the model appropriately.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by