Modelling behaviour of simple sound source

4 views (last 30 days)
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);

Accepted Answer

Mischa Kim
Mischa Kim on 25 Mar 2014
Edited: Mischa Kim on 25 Mar 2014
Will, use
ut = F*i*om./(mt*(omt^2-om.^2) + i*gamt*om);
Notice the dot in front of the forward slash.
  2 Comments
Will
Will on 25 Mar 2014
Thanks Mischa, that's got me much closer: now getting a range of values for velocity. Graph's not quite what I'm expecting to see but I might need to tweak something there.
neel patel
neel patel on 10 May 2019
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.

Sign in to comment.

More Answers (0)

Categories

Find more on Just for fun in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!