BME 251 HW 2

BME 251 HW 2 - Matthew Thompson BME 251 HW 2 FUNCTION CODE...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: Matthew Thompson BME 251 HW 2 FUNCTION CODE function output_y = system_response(A,B,C,D,d) %Declare variables ii = 1; jj = 1; output_y = zeros(1,30); if nargin < 5, for t = (-10):20 if t < 0 d = 0; else d = 1; end output_y(ii) = (d + D + B*C)/(1 + D*A + C*B*A); ii=ii+1; end t = (-10):20; plot(t,output_y) xlabel( 'Time (seconds)' ) ylabel( 'Output of System (y)' ) title( 'Response of Control System' ) else for t = (-10):20; output_y(jj) = (d + D + B*C)/(1 + D*A + C*B*A); jj=jj+1; end t = (-10):20; plot(t,output_y) xlabel( 'Time (seconds)' ) ylabel( 'Output of System (y)' ) title( 'Response of Control System' ) end end Matthew Thompson BME 251 HW 2 OUTPUT PLOT i. A=0, B=0.5, C=2, D=1, d=0 (no feedback, no disturbance) system_response(0,.5,2,1,0)-10-5 5 10 15 20 0.5 1 1.5 2 2.5 3 3.5 4 Time (seconds) Output of System (y) Response of Control System ii. A=1, B=0.5, C=2, D=1, d=0 (weak feedback, no disturbance) system_response(1,.5,2,1,0)-10-5 5 10 15 20-0.5 0.5 1 1.5 2 Time (seconds) Output of System (y) Response of Control System Matthew Thompson BME 251 HW 2 iii. A=10, B=0.5, C=2, D=1, d=0 (strong feedback, no disturbance) system_response(10,.5,2,1,0)-10-5...
View Full Document

This note was uploaded on 02/08/2012 for the course EECE 213 taught by Professor Mendenhall during the Spring '11 term at Vanderbilt.

Page1 / 5

BME 251 HW 2 - Matthew Thompson BME 251 HW 2 FUNCTION CODE...

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

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