HW2_Soln

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

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

View Full Document Right Arrow Icon
1
Background image of page 1

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

View Full DocumentRight Arrow Icon
2
Background image of page 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: helen.saad@ieee.org % 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' );
Background image of page 3

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

View Full DocumentRight Arrow Icon
4
Background image of page 4
5
Background image of page 5

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

View Full DocumentRight Arrow Icon
6
Background image of page 6
7
Background image of page 7

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

View Full DocumentRight Arrow Icon
8
Background image of page 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. Sensitivity (V/kg) = v
Background image of page 9

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

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/30/2010 for the course BENG 186B taught by Professor Peterchen during the Winter '08 term at UCSD.

Page1 / 13

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

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online