Lab4 Updated
Lab4 Updated
1 Objectives
Note that in work to this point you have built a simple Matlab/Simulink simulation model of the closed-
loop Motor Gear System with PID controller, looking something like Figure 1 below. Note – these are
just approximate example numbers, but should be pretty close to what you obtained in Lab #2. For the
rest of this lab please use your own model results (Kmot and a) which you developed in Lab #2, i.e.,
your Simple Transfer Function (STF) model.
Figure 1: Simple (STF) Simulation Model for Closed Loop Control System
Note that the open-loop servo motor has a transfer function of the form:
Y (s) K mot
=
G (s) =
U (s) s(s + a)
Figure 2: Open Loop Plant Transfer Function
1 of 3
ECE411 Lab 4
and the PID controller is of the form:
KI
K PID ( s ) = K P + + KDs
s
Figure 3: PID Controller
where the gains KP, KI, KD are to be chosen by the controller designer.
Experiment with the PID controller gains in your Simulink model. Try to manually tune the controller
for “optimal” settings (in your opinion) for each of the following types of controllers: P, PI, PD, PID.
Note that in order to remove any parameter from the control system, simply set its gain to zero, i.e., to
make a PD controller, tune KI to zero. Record your settings for comparison with the actual Motor Gear
System settings.
Now try experimenting with the PID controller gains in the actual Motor Gear System Simulink model
(you can be guided to good starting points by your studies with the STF model) shown in figure 4 below.
Try to manually tune the controller for “optimal” settings (in your opinion) for each of the following
types of controllers: P, PI, PD, PID. Compare to your earlier settings for the STF model.
Include relevant plots of your controller designs in both simulation and experiment. You should of
course show step responses but you should also experiment with other types of inputs (e.g., sine sweeps).
2 of 3
ECE411 Lab 4
1. Describe the process of creating a control input to the servo motor from the point where the feedback
goes to the summing junction (see Figure 1). Address each term P, I, D in terms of the error. Use
mathematical descriptions as appropriate (e.g., what does the integration term actually do?).
2. Give an explanation of the role of each of the P, I, and D terms for maintaining the stability and
performance of the system. Relate the root locus plot for the plant to your explanation.
3. Were the optimal settings similar between the simple (STF) model and the accurate simulation
(Motor Gear System) model? What are some physical items that could cause a difference?
4. Comment on the effectiveness of the P, PI, PD, and PID controllers in this application.
5. Comment on the response of the controllers as the frequency/speed of the set point signal (to be
tracked) increases. Specifically, look at tracking sine waves at various frequencies.
6. Why would an engineer use one particular type of controller over another?
Please include at least the items listed above. Label each item, and number each item (including
commentaries) according to its section. Be sure to clearly label all plots, and also include relevant
discussion with all your plots and calculations. See the instructions regarding lab write-up format on the
Canvas Assignments page.
3 of 3