hw4sols - 'k,t,eb'k legend'y_b(t/r_o'e_b(t/r_o title'part b...

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

View Full Document Right Arrow Icon
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

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

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

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

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

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

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

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

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11

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

View Full DocumentRight Arrow Icon
clear all ; %clear old variables and reset graphics clf; % for all examples, assume ro = 1; all simulations will have outputs % [y(t) and e(t)] multiplied by the value of ro r = ones(1,200); t = [0:0.1:19.9]; % part a % define Ha(s) Ha = tf(2, [1 2]); % calculate the output signal and error signal % transpose makes row vector instead of column ya = step(Ha,t)'; ea = r-ya; subplot(2,2,1) plot(t,ya, 'k:' ,t,ea, 'k-' ); legend( 'y_a(t)/r_o' , 'e_a(t)/r_o' ) title( 'part a' ) xlabel( 't (sec)' ) % part b % define Hb(s) Hb = tf([2 0.2], [1 2.2 .4]); % calculate the output signal and error signal yb = step(Hb,t)'; eb = r-yb; subplot(2,2,2) plot(t,yb,
Background image of page 12
Background image of page 13

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

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

Unformatted text preview: 'k:' ,t,eb, 'k-' ); legend( 'y_b(t)/r_o' , 'e_b(t)/r_o' ) title( 'part b' ) xlabel( 't (sec)' ) % part c % define Hc(s) Hc = tf(2, [1 2]); % calculate the output signal and error signal yc = step(Hc,t)'; % transpose makes row vector instead of column ec = r-yc; subplot(2,2,3) plot(t,yc, 'k:' ,t,ec, 'k-' ); legend( 'y_c(t)/r_o' , 'e_c(t)/r_o' ) title( 'part c' ) xlabel( 't (sec)' ) % part d % % define Hd(s) % Hd = tf([2 0.2], [1 2.2 .2]); % calculate the output signal and error signal yd = step(Hd,t)'; ed = r-yd; subplot(2,2,4) plot(t,yd, 'k:' ,t,ed, 'k-' ); legend( 'y_d(t)/r_o' , 'e_d(t)/r_o' ) title( 'part d' ) xlabel( 't (sec)' )...
View Full Document

This note was uploaded on 04/07/2010 for the course ECE 351 taught by Professor Staff during the Spring '10 term at Ohio State.

Page1 / 14

hw4sols - 'k,t,eb'k legend'y_b(t/r_o'e_b(t/r_o title'part b...

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

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