Using Simulink's Averaging Spectrum Analyzer
15 次查看(过去 30 天)
显示 更早的评论
Hi,
I built a model of a dynamic system in Simulink. Now I want to get its Bode diagram, using Averaging Spectrum Analyzer. The question is: how should I set values of block parameters to get proper result of a simulation?
I've tried many options, but none of them let me get a Bode diagram I achieved solving this problem analytically.
2 个评论
Kaustubha Govind
2012-4-25
Which Blockset Library does this block belong to? I can't find anything from a documentation search.
回答(1 个)
Andreas Goser
2012-4-26
Maybe this is only a partial answer, but hopefully helps on the way to a full answer.
Some years ago, I learned that the blocks in "Simulink Extras" are purposely in this library and that it means they are undocumented and unsupported. I personally compare this with a situation where you download a free blockset from FileeExchange.
But what you always can do is to look under the mask of the blocks to see how they work. In this case, the block is actually an S-Function written in MATLAB Code:
edit msfuntf
And this code is documented and may answer your question:
%MSFUNTF an MATLAB S-function which performs transfer function analysis using ffts.
% This MATLAB file is designed to be used in a Simulink S-function block.
% It stores up a buffer of input and output points of the system
% then plots the frequency response of the system based on this information.
%
% The input arguments are:
% npts: number of points to use in the fft (e.g. 128)
% HowOften: how often to plot the ffts (e.g. 64)
% offset: sample time offset (usually zeros)
% ts: how often to sample points (secs)
% averaging: whether to average the transfer function or not
%
% The spectrum analyzer displays three plots: the time history,
% the phase and magnitude of the transfer function.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio Processing Algorithm Design 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!