{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW2_Soln

# HW2_Soln - 1 2 BENG 186B HWK#2 Matlab code for...

This preview shows pages 1–10. Sign up to view the full content.

1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2
3 % BENG 186B HWK #2 % Matlab code for problem #1 (can copy and paste into Matlab workspace or % save it as a .m file and run it % % Questions to be addressed to: [email protected] % Plot of the magnitude of the transfer function as a function of ? = [0 -> % 100] for 5 different R values between R=1-10? clear all ; % clear all variables close all ; % close all opened figures clc % clear screen w = 0:1:100; % w ranges from 0 to 100 with step intervals = 1 a = @(R) ((5 + R) .* R .* w.^2) ./ (4 + (5 + R)^2 .* w.^2); % define a as a function of R b = @(R) (2 * R .* w) ./ (4 + (5 + R)^2 .* w.^2); % define b as a function of R TF = @(R) a(R) + b(R) * i ; % define the transfer function as a function of R magTF = @(R) abs(TF(R)); % magnitude of the transfer function (also a function of R) : abs(a + bi) = sqrt(a^2 + b^2) figure(1); ColorMap = [ 'r' , 'g' , 'b' , 'k' , 'c' ]; % define a colormap to be able to differentiate plots for different values of R i = 1; % counter that will be used as an idex for the colormap for Romega = 1:2:10 % Romega varies between 1 and 10 with step intervals = 2 => 5 values in total plot(w, magTF(Romega), ColorMap(i)); % plot of magTF as a fcn of w (notice that magTF(Romega) is equivalent to magTF(1), magTF(3) .... i = i + 1; % increment counter hold on ; % keeps same plot for the other values of R instead of creating a new plot for each (effect can be tested by omitting this line) end ; legend( 'R = 1' , 'R = 3' , 'R = 5' , 'R = 7' , 'R = 9' ); hold off ; xlabel( 'w(rd/s)' ); % display labels and title ylabel( '|V_{out}/V_{in}|' ); title( 'Magnitude of the Transfer Fcn V_{out}/V_{in} as a function of the angular frequency w' );

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4
5

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6
7

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
8
4) (14 points) A piezoelectric sensor is made of quartz and is rectangular in shape with a thickness of 2mm and sensor area of 5cm 2 . It is used to measure applied force (in grams) in terms of output voltage (in mV). What is the static sensitivity of the sensor? Equation: v = kf = kfx +5 points Remember that f = ma (or mg in this case) C ε 0 ε r A k = 2.3 x 10 -12 C/N ε 0 = 8.8 x 10 -12 F/m ε r = 3.7-4.5 ( -2 pts for using ε r = 1) **Note: Must look up value for ε r . Credit given for correctly back-calculating ε r from example in the book, however this value is much higher than the typical values.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern