how can I do an integration window of a signal both in MATLAB and Simulink?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi all,
I'm developing a Stochastic Knock Control and need to do an integration window of the in-cylinder pressure signal for a window of a 40 crank angle degrees. Any idea?
Also, I need to obtain the maximum amplitude of the signal within that integration window.
Many thanks!
0 commentaires
Réponse acceptée
Andy L
le 7 Août 2014
Hi Jorge.
Have you considered running your simulink model from a MATLAB function, using the function sim. You can set up your parameters in your function (make sure to write them in your simulink model too) and using to workspace blocks these will be passed back into the function workspace. You can then use these variables to plot onto a figure, find a max value etc.
I hope this helps.
5 commentaires
Andy L
le 8 Août 2014
Yes - I would look to structure your project in the following way:
- Import the data from Excel into MATLAB - xlsread will help with this.
- Pre process your data using MATLAB to prepare it for your simulink model.
- Run your Simulink Model from MATLAB as mentioned above.
- Post-Process your model outputs that have been passed back into your MATLAB function.
- Any plotting saving etc can be done.
Voir également
Catégories
En savoir plus sur Spectral Measurements 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!