BME 210 Midterm2Solution

BME 210 Midterm2Solution - BME 210 Spring 2008 Name:

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: BME 210 Spring 2008 Name: ____________Solution____________ MIDTERM EXAMINATION #2 (1 hr 15 min) (15 points) 1. Consider the 9 element pixel grid shown below with the 10 projections indicted. Write down the W matrix for these projects, such that W = s ( , s are the vectors of CT numbers and projections). When a ray sum goes through a pixel, assume it goes through that pixel's center and therefore use a value of 1 for the weight for that pixel. S10 S5 S8 S9 1 4 7 2 5 8 3 6 9 S3 S6 S7 S4 S1 S2 1 0 0 0 0 W = 1 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 1 0 1 (15 points) 2. Solve the following system of equations for 1 , 2 , and 3 using forward and backward substitution. Follow the process of the forward and backward substitution algorithms. 1 0 0 2 3 5 1 1 0 - 0 3 3 1 - -5 1 0 0 3 -1 4 1 11 = 10 2 3 3 - 45 3 3 3 -1 y 1 2 1 -1 11 y = Let 2 0 3 3 2 3 y 3 45 0 0 3 Therefore, 1 5 3 1 - 3 0 y 4 1 = 10 y Solve this equation by forward substitution: 1 0 2 . 3 y - -5 1 3 0 y1 = 4 5 5 10 y2 = - y1 + 10, y2 = - 4 + 10 y2 = 3 3 3 1 1 10 y3 = y1 + 5 y2 - 3, y3 = 4 + 5 - 3 y3 = 15 3 3 3 3 -1 4 2 1 -1 10 0 11 2 by backward substitution: Now solve 3 = 3 3 15 45 3 0 0 3 3 3 = 15, 3 = 1 45 10 11 11 10 3 2 = -3 3 + - 3 1 + - , - = 2 = 1 3 3 3 3 3 3 = -1( -31 - 2 2 + 4 ) , - 1( -3*1 - 2*1 + 4 ) 1 = 1 2 (15 points) 3a. For each matrix given below, indicate which is a compartment matrix and which is not. For those that are compartment matrices, indicate if it represents a closed system and or an open system. - 2 2 0 -4 0 ii. 0 1 2 1 - 3 3 1 1 -4 2 0 1 iii. 1 1 -4 1 1 0 1 - 3 - 10 1 1 4 -6 0 2 3 -2 i. i. ii. iii. ____NO______________________________________________________________ ____YES - Open________________________________________________________ _____YES - Open_______________________________________________________ 3b. Draw the compartment model that corresponds to the following compartment matrix. Indicate the values for all non-zero rate constants. - 3 1 0 1 -3 1 0 2 0 1 -2 1 0 1 0 -5 K21=2 1 K01=1 K14=2 4 K34=2 K03=1 3 K12=2 2 K42=2 3 K42=2 K04=3 (20 points) 4. Gauss's method of least squares is routinely applied to the problem of fitting a function to some measurements. Assume the following equation for the function: y (t ) = a t 1+ t where t is the independent variable representing time, "a" is an unknown constant and y(t) is the value of the dependent variable at time t. Further assume that m measurements of y(t) are available at times t1, t2 ... tm. Let z(t1), z(t2), ..., z(tm) represent the correspoinding measured values. a. Write the equation for the sum of squared errors objective function, O(a), between the measurements, z(ti), and the values predicted by the above equation. Your equation should be in terms of z(ti), ti and a only (i.e., only these terms should appear on the right hand side of the equation). O(a ) = b. m i =1 ( z (ti ) - a ti ) 2 1 + ti Using your equation from part a, derive the equation for the necessary condition for the least squares estimate of "a" (i.e., a=?). Your equation should be in terms of the variables ti and z(ti) only (i.e., only these terms should appear on the right hand side of the equation). m dO( a) a = 2 (ti ) - z da 1 + ti i =1 -1 ti 1 + ti ti 0 = m ti ati2 a -1 2 z (ti ) - ti = - =* ti -2 z (ti ) 0 1 + ti 1 + ti 1 + ti (1 + ti ) 2 i =1 i =1 m t m ati2 z (ti ) i = 1 + t - i =1 + t )2 0 (1 i i =1 i m z (ti )ti 1+ t i a = m=1 2 i ti 2 i =1 (1 + ti ) m 4 (15 points) 5. Apply the Secant method, starting from x (1) = 4, x (2) = 3 , to find the next two approximate 3 solutions ( x (3) , x (4) ) to the root of the function f ( x ) = x - 4 x + 2 = 0. Clearly show each step of the Secant method along with your intermediate calculations. x i - xi -1 f ( x i ) - f ( xi -1 ) x i +1 = x i - f ( x i ) i = 1,K i 2 3 4 xi 3. 2.4848 2.0874 xi -1 4. 3. f ( xi ) 17. 7.4025 f ( xi -1 ) 50. 17. x i +1 2.4848 2.0874 5 (20 points) 6. Bacteria growth in a biochemical reactor can be measured as function of time. A researcher is interested in testing the polynomial model given below to represent the number of bacteria (N(t)) as a function of time: N (t ) = a + bt + ct 2 + dt 3 . Write a complete MATLAB program to determine the least squares estimates for the constants a, b, c and d using the MATLAB function "fminsearch" given the data in the table below. Your program should show the resulting least squares estimates for a, b, c and d . Also show a plot of N(t) given the estimates for the four constants. On the same graph plot the measured number of bacteria. t (min) Number bacteria clear all; close all; clc; time=[0 2 6 10 14 18 24]; number=[6 25 124 385 810 1589 2123]; guess=[1 1 1 1]; min= fminsearch(@bacteria,guess,,time, number); disp(min); time2 = [0:.1:24]; calculated=min(1)+min(2).*time2+min(3).*time2.^2+min(4).*time2.^3; plot(time,number,'o',time2,calculated); xlabel('time [minutes]'), ylabel('Number of Bacteria'); 0 6 2 25 6 124 10 385 14 810 18 1589 24 2123 6 title('Bioreactor Growth'); legend('Observed','Calculated'); %% % bacteria.m function error = bacteria(initial,time,number) a=initial(1); b=initial(2); c=initial(3); d=initial(4); t=time; z=number; error=sum((z(a+b.*t+c.*t.^2+d.*t.^3)).^2); 7 ...
View Full Document

This note was uploaded on 06/23/2008 for the course BME 210 taught by Professor D'argenio during the Spring '07 term at USC.

Ask a homework question - tutors are online