HW2_2 - 0 -w2/g w2/g 0]; D = [ 0 0; 0 -fu]; eig(A) e syms t...

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

% Linear Systems, Homework 2 % Date: 11/13/06 % File: HW2_2.m % Note: bicycle-rider system % Name: Feng-Li Lian, [email protected] % close all; clear all; c % specifications % g = 9.8; h = 0.08; V = 10; V mvg = 136.0; mv = 136.0/g; mhg = 9.11; mh = 9.11/g; hv = 0.334; hh = 0.465; Iv = 2.25; Ih = 0.201; L = 0.665; Lr = 0.313; L h = 0.08; V = 1; B1 = 1/L; B2 = Lr/L; l = 0.7; l w2 = ( mvg * hv + mhg * hh ) / ( Iv + Ih + mv*hv^2 + mh*hh^2 ); fu = ( mh*hh^2 + Ih )*h / ( hh*( Iv + Ih + mv*hv^2 + mh*hh^2 )); f0 = mh*h / ( mv*hv + mh*hh ); F = (f0 - fu)*g; F % state-space model % A = [ 0 0 0 0; -V 0 0 0; 0 0 0 1; 0 -w2 w2 0]; B = [ B1*V 0; -B2*V 0; 0 0; 0 F]; C = [ -l 1 0 0;

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.

Unformatted text preview: 0 -w2/g w2/g 0]; D = [ 0 0; 0 -fu]; eig(A) e syms t tau s s %xp0 = zeros(2,1); x0 = [ 0 0 0 0 ]'; x %u = [1 1]'; u = [ 0 0.1*sin(5*pi*tau) ]'; u expA = expm( A * t ); e zi = expA * x0; z zs = int( expm( A*(t-tau) ) * B * u, tau, 0, t ); z xt = zi + zs; x subs( xt, t, 1 ) s for i=1:21 time1(i) = (i-1)*0.1; state1(:,i) = subs( xt, t, time1(i) ); %u1 = u; u1 = subs( u, tau, time1(i) ); output1(:,i) = C*state1(:,i) + D*u1; end e figure(11) subplot(211) plot(time1,state1) xlabel('time'); ylabel('state'); subplot(212) plot(time1,output1,'g') xlabel('time'); ylabel('output'); x...
View Full Document

This note was uploaded on 07/21/2009 for the course EE 901-43400 taught by Professor Feng-lilian during the Fall '08 term at National Taiwan University.

Page1 / 2

HW2_2 - 0 -w2/g w2/g 0]; D = [ 0 0; 0 -fu]; eig(A) e syms t...

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

View Full Document
Ask a homework question - tutors are online