Modelling behaviour of simple sound source
1 次查看(过去 30 天)
显示 更早的评论
I am trying to plot the behaviour of a simple sound source (a harmonically oscillating piston) as the driving frequency passes through the resonant frequency of the piston.
However, the graph I get doesn't look like what I am expecting to see: i.e. it doesn't look like an increase in sound pressure level (dB) up to resonance, and a reduction thereafter. What I get returned in matlab looks more like a graph of the form ln x .
I think I have identified where the problem lies - in the expression for the velocity of the piston (which is then fed into another equation to obtain the air pressure...)
Given that omega (the angular driving frequency) takes a range of values, I would expect the velocity also to display an array of different values, each depending on the particular driving frequency.
However, I appear to be getting just one value for velocity (ut) of the piston, and can't see why. Perhaps it's something to do with the complex numbers in the expression...
Anyway, in the hope that someone can point out the error, this is the relevant code (the expression for velocity has been squeezed down the bottom, along with a couple of other variables):
%-------------------------------------------------------------------------- % Parameters %--------------------------------------------------------------------------
mt=0.07; % mass of radiator
At=0.0430; % area of radiator
Rt=3.0; % damping coefficient, t
Kt=68000; % equivalent t stiffness
c2=340^2; % speed of sound squared rho=1.205; % density of air V = 0.015; %Vol of box
pref=50;
kappa=c2*rho/V;
%-------------------------------------------------------------------------- % Uncoupled natural frequency %--------------------------------------------------------------------------
omt=sqrt( (Kt + kappa*At^2)/mt);
%-------------------------------------------------------------------------- % % frequency, angular frequency % %--------------------------------------------------------------------------
f=(172:0.1:180);
om=2*pi*f; %-------------------------------------------------------------------------- % Velocity %-------------------------------------------------------------------------- >> F=0.4; >> gamt=Rt/mt; >> ut=F*i*om/(mt*(omt^2-om.^2)+i*gamt*om);
采纳的回答
Mischa Kim
2014-3-25
编辑:Mischa Kim
2014-3-25
Will, use
ut = F*i*om./(mt*(omt^2-om.^2) + i*gamt*om);
Notice the dot in front of the forward slash.
2 个评论
neel patel
2019-5-10
Hallo,
I want to do some work on MatLab. I want to create sound (means of giving the properties of sound). Sound is going from source(one point) to another point. So for particular time set i want to plot sound pressure with reference to time and length.
Thank you for the help.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!