Unformatted text preview:

ECE-320 Linear Control SystemsHomework 7Due: Tuesday October 26, 20041 Preparation for Laba) Assume we have the plant transfer functionG(s) =kclg1ω2ns2+2ζωns + 1If the input is u(t) and the output is x(t) we can represent this system with the differentialequation1ω2n¨x(t) +2ζωn˙x(t) + x(t) = kclgu(t)Assume q1(t) = x(t) and q2(t) = ˙x(t). Show that in terms of these variables we can write astate variable description of the system asddt"q1(t)q2(t)#="0 1−ω2n−2ζωn#"q1(t)q2(t)#+"0kclgω2n#u(t)y(t) = [1 0]q(t)b) Assume we are using state variable feedback of the form u(t) = kpfr(t) − kq(t), so thenew form of the system equations is˙q(t) = (A − Bk)q + Bkpfr(t)y(t) = Cq(t)Assume the input r(t) is a unit step with amplitude Amp. Show that in steady state for y(t)to equal Amp we must choose the prefilter kpfas (the ECP used kpffor the prefilter)kpf= −1/[C(A − Bk)−1B]You must recompute kpfevery time you change the state feedback gain vector k!!!c) Consider the system with transfer functionGp(s) =9.290.00087s2+ 0.00118s + 1Determine the state variable model for this system (Find the A, B, C and D matrices.)Now we need to choose the state feedback gain matrix k. We need to keep a few things inmind:• The system must remain stable.• k1is multiplying the position of the cart and k2is multiplying the derivative of theposition, which is not measured directly but is calculated, and tends to be noisy. Hence,we want k1> k2.• To avoid positive feedback, we generally want k1and k2to be positive values. (Negativevalues will work fine in a simulation, but they tend to not work very well on our systemsin the lab unless they have a small magnitude.)• We need to try and keep the gains small to keep our motor from not frying.To determine if the system is stable, we could compute the transfer function for the closeloop system and look at the poles, but you’ll get to do that enough on next weeks homework,so , we’ll be clever and assume we actually remember something from MA 221. Whenever wecompute the transfer function, the denominator is the determinant of sI − A, which meansthe poles of the closed loop system are actually equal to the eigenvalues of the A matrix.Hence, to determine the closed loop poles when we have state variable feedback, we need tocompute the eigenvalues of A − Bk.We will use the program state variables 1cart.m on the web site to simulate the statevariable system both on this homework and in lab. The program state variables 1cart.mhas the following input arguments• the amplitude of the step input (in cm)• the system A matrix• the system B matrix• the system C matrix (D is assumed to be 0)• the state feedback gain matrix k = [k1k2].• the length of time to run the simulation for.• the filename containing the ECP data. If the ECP data is not yet available, enter ‘’(two single quotes).d) By trial and error, find two different values of k so that• Your system is stable (closed loop poles in the LHP)• You system has a position error of less than 0.15• Your system reaches steady state within 1 seconds (the faster the better)• Your system has as little overshoot as you can manage• k2is less than 0.05 and k1less than 1.0.Simulate your system and turn in the plots.An alternative method for determining the state feedback gains is to use the Linear QuadraticRegulator (LQR) method. The Linear Quadratic Regulator finds the gain k to minimizeJ =Z∞0hxT(t)Qx(t) + u(t)Ru(t)idtwhere˙x(t) = Ax(t) + Bu(t)u(t) = −kx(t)Here Q is a (usually diagonal) matrix which penalizes deviations of states from their finalvalues, and R is a scalar that penalizes gains that produce large control signals. For oursecond order systems, we are actually finding the state feedback gains to minimizeJ =Z∞0hq11x1(t)2+ q22x2(t)2+ Ru(t)2idtThis is very similar to the quadratic optimal control we already discussed in class for a singleinput single output system.The Matlab routine lqr is used to estimate the feedback gains k1and k2. The arguments tothis routine are• the A matrix of the system• the B matrix of the system• a penalty matrix Q• a penalty matrix R(Note there is one more possible argument, but we won’t use it. Type help lqr for moreinformation). In our case Q is a two by two positive definite matrix, and R is a scalar. SinceQ is most likely a diagonal matrix, it’s easiest to iterate using the following command inMatlab> K = lqr(A,B,diag([q11 q22]),R)where q11 and q22 are the desired diagonal elements of Q and R is a scalar. In general, as Rgets larger (it may have to get very large), the size of the gains goes down. Also if the cartseems to move too much (i.e. has a large overshoot) we make q11 much larger than q22.e) Using the LQR method, find two different values of k so that• Your system is stable (closed loop poles in the LHP)• You system has a position error of less than 0.15• Your system reaches steady state within 1 seconds (the faster the better)• Your system has as little overshoot as you can manage• k2is less than 0.05 and k1less than 1.0.Simulate your systems and turn in your plot.As the order of the system gets larger (we will eventually be making all three carts move), itbecomes much more difficult to find values of the feedback gain k by trial and error, and theLQR method is much better.2 For the system shown below:-½¼¾»-Lag-2s(s+1)-6+-a) show that without the lag compensator,Kv= 2, andev= 1/2b) Include the lag compensator, with z = 0.01, so the steady state velocity error will be 0.01,ev= 0.01. (Ans: p = 0.0002)3 For the system shown below:-½¼¾»-Lag-5s(s+2)-6+-a) show that without the lag compensator, ep= 0, Kv= 5/2, and ev= 2/5b) Include the lag compensator, with z = 0.01, so the steady state velocity error will be 0.01,ev= 0.01. (Ans: p = 0.00025)In the following problem, you need to simulate the closed loop system, given an open looptransfer function. Assume we have chosen values for z and p. Then to do the simulations inMatlab type something like:G = tf(1,[1 4 3 0]);To = feedback(G,1); % original system with unity feedbackGc = tf([1 z],[1 p]);Tc = feedback(G*Gc,1); % compensated system with unity feedbackt = [0:0.01:35];ustep = ones(1,length(t));uramp = t;%% do the step response%yo = lsim(To,ustep,t);yc = lsim(Tc,ustep,t);%orient tall % makes the figure take up the page, you might try orient landscape%subplot(2,1,1);plot(t,yo,’:’,t,yc,’-’,t,ustep,’.-’);grid; legend(’Original’,’With


View Full Document

Rose-Hulman ECE 320 - ECE 320 Homework 7

Documents in this Course
Load more
Download ECE 320 Homework 7
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view ECE 320 Homework 7 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view ECE 320 Homework 7 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?