how can I do an integration window of a signal both in MATLAB and Simulink?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuesta aceptada
Andy L
el 7 de Ag. de 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 comentarios
Andy L
el 8 de Ag. de 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.
Ver también
Categorías
Más información sobre Spectral Measurements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!