how can I do an integration window of a signal both in MATLAB and Simulink?
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Andy L
2014-8-7
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 个评论
Andy L
2014-8-8
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!