Lab 6
Lab 6
Winter 2021
L d
α
Θ
Rm
Figure 1: The position of the ball d(t) can be controlled by the motor angle θ(t).
page 1 of 3
Control Systems Winter 2021
1. Develop a state space model where the output (ball position) is equal to the state x1 and the ball
velocity is x2 .
1. Find the controllability matrix for your system and show that this system is controllable.
2. Use the second order performance approximations and the desired performance objectives to find
desired values of ζ and ωn .
4. Use the place function in Matlab to design a state feedback controller that meets the objective.
5. In Simulink, create the plant and add the state feedback u = −Kx.
6. Simulate this from an initial condition of x1 = 0.3 meters and x2 = 0 m/s. Include a plot of your
results showing the system output.
7. Use this plot to determine your actual percent overshoot and settling time. Compare to the objec-
tives.
8. Add a saturation block immediately before the plant with saturation limits of ± π2 . This limits the
control angle to the achievable range.
9. Record your percent overshoot and settling time. As a note, you may not meet the control objectives,
but continue with this controller.
10. We will now try to simulate this system with an input offset. Set the initial condition to x1 = 0
and x2 = 0. Use u = r − Kx with constant r = 0.3. This is an attempt to control to the desired
location of 0.3 meters. Comment on your results.
1. Create an outer feedback loop with the integral controller. Simulate with initial condition x1 = 0
and x2 = 0.
page 2 of 3
Control Systems Winter 2021
Figure 2: Output feedback with integral control is added to reduce tracking error between y(t) and r(t).
2. Test several values of Ki to see how this value changes performance. You may choose any Ki gain
but discuss in your report how you arrived at your choice.
3. Simulate the control system with a square wave input that alternates between 0.2 m and 0.4 m.
Adjust the period of the square wave to make sure the output settles for about 10 seconds before
switching. Run this for three full periods, i.e. three times at each set point. Plot both the reference
input and system output on the same set of axes and include in your report.
4. Comment on your results in terms of control performance, steady state error, or other control system
considerations that you observe.
5. Make sure to compare the results of this simulation to your results from both your proportional
controller and PID controller from Lab 5.
5 Lab Report
This is the second part of a two part lab. For this lab, you will individually write and turn in a formal lab
report that the explains your work for Lab 5 and Lab 6. Your lab report should be organized into sections
such as Introduction, Ball and Beam System Identification, Proportional Control Design and Simulation,
PID Control Design and Simulation, State Space Model, State Feedback Design and Simulation, State
Feedback with Integral Control and Conclusions. Make sure to discuss your design process and your
simulation results. When you are designing more than one controller for a system, make comparisons
between the controllers to explain any differences you are seeing. As this is a formal report, use formal
writing and label all figures and tables.
page 3 of 3