Homework3_2008

Homework3_2008 - MAE 170 Problem set 3 handout problems...

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

View Full Document Right Arrow Icon
MAE 170 Problem set 3 handout problems Problem 1 This problem is to simulate the car PI cruise control system discussed in class. The dynamic model for the car is d mv f f = ± ) d , and the cruise controller is ()( pd i f kvv k vv =− d t . Using the state vector v x z ⎧ ⎫ = ⎨ ⎬ ⎩⎭ with and output vector 0 () , ( 0 ) 0 , t d zv v d t z = v y f = , define the system in state space form, that is, define A,B,C,D. Hint: The system has two inputs: and d v d f . Problem 2 Assume that the system parameters are as stated below, and that the initial velocity of the car is 20 m/s, with a desired cruise velocity of 30 m/s. Using Matlab’s lsim function, simulate the response of this system. Assume that the disturbance force f d (t) is defined as fdvec, below. Turn in your code and a plot of both outputs as functions of time (0-25 s). m = 1000; kp = 500; ki = 200; %You define A,B,C,D Gss = ss(A,B,C,D); t = (0:.05:25)'; one_vec = ones(size(t)); fdvec = 1000*one_vec + 500*sign(sin(t)) + 500*(rand(size(t))-.5); %You define the input u, hint: u=[vdvec fdvec].
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.
Ask a homework question - tutors are online