Difference between revisions of "Controls/Lab/Loudspeaker"

From PrattWiki
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
This page contains information related to the Loudspeaker Modeling lab for [[ME 125]] and [[ECE 141]]. It has been updated for Spring, 2011.  
+
This page contains information related to the Loudspeaker Modeling lab for [[ME 344]] and [[ECE 382]]. It has been updated for Fall, 2016.  
  
 
== Resources ==
 
== Resources ==
Line 7: Line 7:
 
** [http://electronics.howstuffworks.com/speaker6.htm How Speakers Work], from How Stuff Works
 
** [http://electronics.howstuffworks.com/speaker6.htm How Speakers Work], from How Stuff Works
 
* Files for the lab:
 
* Files for the lab:
** [http://www.duke.edu/~mrg/Controls/Loudspeaker/MakeNoise.mdl MakeNoise.mdl]
+
** [http://classes.pratt.duke.edu/FILES/Controls/Loudspeaker/MakeNoise.mdl MakeNoise.mdl]
** [http://www.duke.edu/~mrg/Controls/Loudspeaker/InitNoise.m InitNoise.m]
+
** [http://classes.pratt.duke.edu/FILES/Controls/Loudspeaker/InitNoise.m InitNoise.m]
** [http://www.duke.edu/~mrg/Controls/Loudspeaker/noiselayout.lay noiselayout.lay]
+
** [http://classes.pratt.duke.edu/FILES/Controls/Loudspeaker/noiselayout.lay noiselayout.lay]
** [http://www.duke.edu/~mrg/Controls/Loudspeaker/GetNoiseData.m GetNoiseData.m]
+
** [http://classes.pratt.duke.edu/FILES/Controls/Loudspeaker/GetNoiseData.m GetNoiseData.m]
** [http://www.duke.edu/~mrg/Controls/Loudspeaker/MakeNoiseHandles.m MakeNoiseHandles.m]
+
** [http://classes.pratt.duke.edu/FILES/Controls/Loudspeaker/MakeNoiseHandles.m MakeNoiseHandles.m]
  
 +
== MATLAB Skeletons ==
 +
The following shows the comments for a file that was written to graph the transfer function estimate and analytical values for the basic model.  You do not have to write your program in this order, but the skeleton may help you understand what needs to happen.
 +
<source lang=matlab>
 +
%% Loudspeaker Lab Spring 2016
 +
%  Solution - NAME
 +
%  Honor Code: [net id]
 +
 +
%% Initialize Workspace
 +
 +
%% Load Data - includes EstAccTF, EstAccF, ch1, ch2, and time
 +
 +
%% Set Constants
 +
%  Mechanical constants
 +
 +
%  Some work needed to get b
 +
 +
% Electrical constants
 +
 +
%% Experimental Transfer Function - go from Acc Voltage/Vs to Vel/Vs
 +
%  Convert to velocity by dividing by j 2 pi F and sensitivity in V / (m/s^2)
 +
 +
%% Generate Theoretical Transfer Function
 +
 +
%  Use bode command to analyze transfer function
 +
 +
%% Make and save plot
 +
</source>
 +
 +
The following shows the comments for a file that was written to graph the transfer function estimate and analytical values for the refined model.
 +
<source lang=matlab>
 +
%% Loudspeaker Lab Spring 2016
 +
%  Solution 2 - NAME
 +
%  Honor Code: [net id]
 +
 +
%% Initialize Workspace
 +
 +
%% Load Data - includes EstAccTF, EstAccF, ch1, ch2, and time
 +
 +
%% Set Constants
 +
%  Mechanical constants
 +
 +
%  Some work needed to get b
 +
 +
%  Electrical constants
 +
 +
%  Accelerometer constants
 +
 +
%% Experimental Transfer Function - go from Acc Voltage/Vs to Vel/Vs
 +
%  Convert to velocity by dividing by j 2 pi F and sensitivity in V / (m/s^2)
 +
 +
 +
%% Generate Theoretical Transfer Function
 +
 +
%  Use bode command to analyze transfer function
 +
 +
%% Make and save plot
 +
</source>
 
== Questions ==
 
== Questions ==
 
{{Questions}}
 
{{Questions}}
Line 22: Line 79:
  
  
[[Category: ECE 141]]
+
[[Category: ECE 382]]
[[Category: ME 125]]
+
[[Category: ME 344]]

Latest revision as of 22:51, 17 October 2016

This page contains information related to the Loudspeaker Modeling lab for ME 344 and ECE 382. It has been updated for Fall, 2016.

Resources

MATLAB Skeletons

The following shows the comments for a file that was written to graph the transfer function estimate and analytical values for the basic model. You do not have to write your program in this order, but the skeleton may help you understand what needs to happen.

%% Loudspeaker Lab Spring 2016
%  Solution - NAME
%  Honor Code: [net id]

%% Initialize Workspace

%% Load Data - includes EstAccTF, EstAccF, ch1, ch2, and time

%% Set Constants
%  Mechanical constants

%  Some work needed to get b

% Electrical constants

%% Experimental Transfer Function - go from Acc Voltage/Vs to Vel/Vs
%  Convert to velocity by dividing by j 2 pi F and sensitivity in V / (m/s^2)

%% Generate Theoretical Transfer Function

%  Use bode command to analyze transfer function

%% Make and save plot

The following shows the comments for a file that was written to graph the transfer function estimate and analytical values for the refined model.

%% Loudspeaker Lab Spring 2016
%  Solution 2 - NAME
%  Honor Code: [net id]

%% Initialize Workspace

%% Load Data - includes EstAccTF, EstAccF, ch1, ch2, and time

%% Set Constants
%  Mechanical constants

%  Some work needed to get b

%  Electrical constants
 
%  Accelerometer constants

%% Experimental Transfer Function - go from Acc Voltage/Vs to Vel/Vs
%  Convert to velocity by dividing by j 2 pi F and sensitivity in V / (m/s^2)


%% Generate Theoretical Transfer Function

%  Use bode command to analyze transfer function

%% Make and save plot

Questions

Post your questions by editing the discussion page of this article. Edit the page, then scroll to the bottom and add a question by putting in the characters *{{Q}}, followed by your question and finally your signature (with four tildes, i.e. ~~~~). Using the {{Q}} will automatically put the page in the category of pages with questions - other editors hoping to help out can then go to that category page to see where the questions are. See the page for Template:Q for details and examples.

External Links

References