Virginia Tech
Blacksburg, Virginia 24060 540.231.7385
E-mail: [email protected]
November 16, 2019
ME 5554 / AOE 5754 / ECE 5754 Students
Dr. Steve Southward
Phase II Development Program (i.e. your Final Project)
The final project will build off of your result from the Midterm Project. Before starting the final project, you must run the Midterm Project and save your open-loop state-space LTI model in a .mat file that can be loaded into the workspace by your Final Project livescript. You are NOT allowed to reproduce the code from your Midterm Project to generate the open-loop model in the Final Project! Make sure you use a corrected version of the open-loop model if you made any mistakes in the formulation from the Midterm Project.
Problem 1a. [5 pts.] Load your open-loop LTI state-space model from the Midterm Project. Use the LQR function in Matlab to design a full state feedback gain matrix. The LQR function requires a state weighting matrix Q and an actuator weighting matrix R to be defined. For the design of Q, you must use output weighting instead of state weighting. To accomplish this, you must use the following identities to define the equivalent state weighting matrix:
sysDate: To: From: Subject:
Background
y=C x OL
yTQ*y= xTCT Q* C x =xTQx
!#
output weighting
Choose individual weights for each of the outputs (i.e. the diagonal elements of Q*) and each of the control signals (the diagonal elements of R) to satisfy the control objective.
The closed-loop control objective is similar to the Midterm Project, but for the Final Project, there are a few additional constraints:
Control the AUV from the initial state (defined in Problem 7 of the Midterm Project) to enter the tunnel without contacting the barrier
None of the three control signals are allowed to exceed the maximum limit (defined in Problem 2 of the Midterm Project); however, now you must attempt to get the maximum value of each control signal to be within 10% of the peak limit
The 5% settling times for all three outputs must be less than 1 second.
Once you have designed LQR optimal state feedback gains, construct a closed-loop LTI state-space model. You may find it helpful to generate a table of the closed-loop poles, the natural frequencies and the damping ratios; although, this is not required.
VIRGINIA TECH
OL OL ! state
weighting
An equal opportunity, affirmative action employer
You must generate only ONE final design!
Note that Problem 1a is the design part and Problem 1b is the simulation part, so you will need to iterate both of these together to generate your solution.
Problem 1b. [5 pts.] Use the INITIAL function in Matlab to simulate the initial value response for the closed-loop system using the LQR optimal control gains from Problem 1a. Use the exact same initial condition from the Midterm Project. Note that you will still need to perform the coordinate translation like you did for the Midterm Project.
Use LSIMINFO to compute the 5% settling times for all three outputs and display this information in a formatted table.
Plot a single figure window where the x and z outputs are on a single axes (subplot) at the top of the figure, theta is on the middle axes (subplot), and all three control signals are on the bottom axes (subplot). Properly annotate each axes with clearly defined axis labels, grid lines, and legends.
Problem 2. [2 pts.] Show that the open-loop system is Completely Observable. Also determine (and clearly document) which subsets of outputs results in a Completely Observable system. Justify your results.
Problem 3a. [3 pts.] Design a Luenberger observer such that an output feedback control system using the LQR state feedback gains from problem 1 above meets the Final Project performance requirements when the closed-loop system is simulated using the same initial condition vector. Note: You must complete 3b to determine if your observer design for 3a meets the requirements!
On one figure, use unique markers to generate a plot of the open-loop poles, the closed-loop LQR state-feedback poles, and the observer poles on a pole diagram (real vs. imag). Use the SGRID function with your plot to draw lines of constant damping and lines of constant frequency. You must also use the AXIS EQUAL command to insure that the aspect ratio is correct between the real and imaginary axes. Properly annotate each axes with clearly defined axis labels, and legends.
Note that Problem 3a is the design part and Problem 3b is the simulation part, so you will need to iterate both of these together to generate your solution.
Problem 3b. [10 pts.] For this problem, you will simulate the complete output feedback controller using the LQR state-feedback control gains from Problem 1a, and
VIRGINIA TECH
An equal opportunity, affirmative action employer
the Luenberger observer feedback gains from Problem 3a; however, this simulation must be performed in two stages. For each stage, you will need to construct a separate closed-loop state-space LTI model.
The first stage LTI model will be an augmented system that includes the open loop plant and the observer with no state feedback control. The second stage LTI model will be the same augmented system, but it will include state feedback control. Both LTI models must output y, y , and the control vector u for plotting.
Construct an initial condition vector that uses the ICs from the midterm project for the initial plant states augmented with a zero vector for the initial observer states. Hint: Remember to apply the x-z translation to the observer ICs!
Use the INITIAL function in Matlab to simulate the first stage of the initial value response for the observer-only system. You will need to output y, t, and x from the INITIAL function. Use the final state at the end of the stage 1 simulation as the initial state vector for the second stage simulation.
Use the INITIAL function again to simulate the second stage of the simulation that includes complete output feedback control. You will need to append the solutions from both stages to generate outputs and control signals that can be plotted.
The challenge for this problem is that the duration of the initial stage will not be provided to you, i.e. you have to figure out a duration that works for your design. You are free to choose the duration of the initial stage simulation, but only within the range of 0.1 to 0.5 seconds. You are also free to choose your total simulation time, including both the stage 1 and stage 2 simulations, but the total time must be between 1.2 seconds and 2 seconds.
Compute the settling times for all three actual outputs and display this information in a formatted table. Use LSIMINFO to compute the 5% settling times. All three closed-loop settling times should still be below 1 second!
Plot a single figure window where the x and z outputs are on a single axes (subplot) at the top of the figure, theta is on the middle axes (subplot), and all three control signals are on the bottom axes (subplot). Properly annotate each axes with clearly defined axis labels, grid lines, and legends. When plotting the outputs, you must plot both the actual outputs y and the estimated outputs y . You must clearly identify which signals are
which (legend!). Your plot should clearly indicate that the estimated outputs converge to the actual outputs prior to turning on the state-feedback control law. Your plot should also show that none of the three control signals exceed the max limit.
You should also use the animation tool to demonstrate that your design achieves the objective of controlling the AUV position to enter the tunnel without making contact.
VIRGINIA TECH
An equal opportunity, affirmative action employer
Problem 4a. [10 pts.] Use the LQI function in Matlab to design a gain matrix for state feedback + integral control to enable the outputs to track reference inputs. Similar to Problem 1, you will need to choose individual weights for each of the outputs (diagonal
elements of Q*) and each of the control signals (diagonal elements of R), but also weights for each of the individual error terms associated with the integrators.
Once you have designed LQI optimal state feedback gains, separate out the state feedback gains G0 from the integral feedback gains GI.
Note that Problem 4a is the design part, Problem 4b is the augmented system generation part, and Problem 4c is the simulation part, so you will need to iterate all three of these sub-problems together to generate your solution.
Problem 4b. [15 pts.] Before simulating the closed-loop response of the LQI Output Feedback control system with integral control for reference tracking, you must first construct a closed-loop LTI object; however, this time you must use the Matlab APPEND and CONNECT functions to construct the augmented output feedback control system.
The figure below shows a helpful block diagram representation of the complete output feedback control system including integration for reference tracking. This diagram includes eight LTI object blocks that you need to define in Matlab before using the APPEND and CONNECT functions.
VIRGINIA TECH
An equal opportunity, affirmative action employer
You already have the ol_sys LTI object from the Midterm Project. Note that the obs_sys observer LTI model is new, and requires both u and y as inputs, but it must output the estimated state vector (for input to the G0_sys block) and the estimated outputs (for plotting). Even though the estimated outputs are also part of the estimated states, this problem will be easier if you duplicate the estimated outputs as indicated above.
To obtain the remaining LTI objects, you can use the following:
ref_sys = tf(eye(3));
sum_sys = tf(eye(3));
G0_sys = tf(-G0);
GI_sys = tf(-GI);
% Static gain identity matrix
% Static gain identity matrix
% Static gain G0 matrix (negated)
% Static gain GI matrix (negated)
The integrator LTI object is a diagonal matrix of integrators, i.e. (1/s). This is compactly constructed by converting the 33 identity matrix into a cell array to serve as the matrix of numerator coefficients, and then use [1 0] to represent the polynomial 1*s+0 for all denominators:
inte_sys = tf(num2cell(eye(3)),[1 0]);
You will next need to append all eight LTI blocks into a single LTI object with many inputs and many outputs. Read the Matlab help file for the APPEND function!
Next, you will define a connection matrix that properly connects all of the blocks together by defining which outputs of the appended system are connected to which inputs. Read the Matlab help for the CONNECT function starting with Index-based interconnection.
The only actual inputs to the final output feedback LTI control system are the three reference inputs. The outputs of the final output feedback LTI control system are y, y ,
and u. These definitions will be part of the input vectors that you must define for the Matlab CONNECT function.
Hint: You may find it valuable to define all of the inputs and outputs of each subsystem LTI object with labels that make physical sense in order to check your final CONNECTed system.
Problem 4c. [10 pts.] For this problem, you will simulate the complete output feedback controller with integral control using the LTI model constructed in Problem 4b. Note that this will NOT be a two-stage simulation as in Problem 3b!
Construct an initial condition vector that uses the ICs from the midterm project for the initial plant states, augmented with a zero vector for the initial observer states,
VIRGINIA TECH
An equal opportunity, affirmative action employer
augmented with a zero vector for the initial integrator states. Note that you should NOT apply the x-z coordinate translations for this problem!!
Construct appropriate reference input vectors, then use the LSIM function in Matlab to simulate the total closed-loop response for the output feedback control system due to initial conditions and reference inputs. You will need to output y, and t from the LSIM function.
Plot a single figure window where the x and z outputs are on a single axes (subplot) at the top of the figure, the q outputs are on a single axes (subplot) in the middle of the
figure, and all three control signals are on a single axes (subplot) at the bottom of the figure. Properly annotate each axes with clearly defined axis labels, grid lines, and legends. When plotting the outputs, you must plot the actual outputs y, the estimated outputs y , and the associated desired references r on the same axes. You must
clearly identify the signals (legend!). Your plot should clearly demonstrate the following:
1) all estimated outputs converge to the corresponding actual outputs
2) all actual outputs converge to the desired references with zero steady-state error
and within the required time limits defined above
3) the AUV enters the tunnel and stops at the desired location without contacting the
wall
You are not required to meet the actuator constraint limits for this problem. Because of this, and the fact that your observer error is large at startup, you can expect to see very un-natural behavior of the AUV. You may ignore this behavior as long as the AUV meets the other requirements.
Extra Credit. This is an all-or-nothing problem with NO partial credit! Your final LQI Output Feedback control design with integral feedback for reference tracking from problems 6, 7, and 8 above must achieve the following:
completely enter the tunnel with a tunnel height of 10.5m, which means that you only have a half-meter clearance because the AUV is 10m in height
no contact with the barrier
complete the objective within 2 seconds of simulation time
If your design meets the requirement of the Extra Credit problem, then it will automatically meet the requirement for the Final Project so you only need to submit this design as your final design. In other words, do NOT submit a Final Project and a separate document for the Extra Credit. Also do NOT submit a second final design in your Final Project just for the Extra Credit problem. You only need to state and demonstrate that your final design meets the requirements of the extra credit problem.
VIRGINIA TECH
An equal opportunity, affirmative action employer
Submission Rules:
You MUST use the Matlab LiveScript feature to generate your Final Project results. This will serve as a formatted report that includes your Matlab code, any outputs to the command window, and any plots you generate.
You MUST submit both the .mlx (LiveScript) file as well as a PDF version of your LiveScript output.
You MUST use the Output Inline option in LiveScript. You CANNOT use the Output on Right option which places plots on the right-hand side of the page and the code on the left-hand side.
You MUST insure that the plots you generate are sufficiently large that the PDF displays them at a publication-quality size (i.e. preferably with a width that is close to the margin-to-margin edges).
You MUST NOT display long columns of output data in your LiveScript!!
VIRGINIA TECH
An equal opportunity, affirmative action employer
Reviews
There are no reviews yet.