digital control

loop shaping

inverted pendulum  two-link robot


The objective of this course is to provide students with the necessary knowledge to design, implement, and document a control engineering project.

The course has three components: lectures, prepared laboratories (in the form of a project that is the same for all students), and a design project (specific to each group of students).

The lectures and laboratories cover a range of special topics related to the practical implementation of control systems that are not covered in introductory control courses but that are likely to arise in the professional career of controls engineers. These include:

  • Model identification and parameter estimation (least-square identification of a auto-regressive model; nonparametric identification in the time domain; and nonparametric identification in the frequency domain)
  • Robust Control (Nyquist-plots, small-gain, and passivity)
  • Optimal control (LQR/LQG for state-space systems and time-optimal controller for the positioning of a mass using force actuation)
  • Nonlinear control (Lyapunov's stability method; feedback linearization controller for a fully actuated 2nd order mechanical system; backstepping for triangular nonlinear systems; actuator limitations)

The course is heavily project-oriented and the students will be required to design, implement, document, and present a significant control systems project, which requires them to address the issues covered in the lectures. All laboratory work is done in groups of 2-3 students working together as teams that persist throughout the quarter.


ECE147A or ME155A or equivalent. Open to all engineering majors.

Course's web page

All information relevant to the course will be continuously posted at the course's web page. The URL is


quick links




João P. Hespanha

phone: (805) 893-7042
office: Harold Frank Hall, 5157

Office hours: Please email me in advance to schedule for an appointment.

Teaching Assistant

Andrew Herdering


Office hours: Mondays 2:30-3:30pm in the ECE TA office, Trailer 699, Room 103

Assessment format: ME155C (3 units)

  • 1-2 homework assignments (individual, needed for the laboratory) – 5 %
  • Laboratories (group mid-term report) – 40%
  • Final Project (includes a group end-of-term report and a group in-class presentation) – 55%

Assessment format: ECE147C (5 units)

  • 5-6 homework assignments (individual) – 25 %
  • Laboratories (group mid-term report) – 35%
  • Final Project (includes a group end-of-term report and a group in-class presentation) – 40%


The course will be based on the following notes.

Please re-upload the notes periodically, as I sometimes update the notes as the course progresses.


The second half of the laboratory time is devoted to the final project. Possible projects include

  • Identification and control of the seesaw system [in hardware]
  • Identification and control of an inverted pendulum [in hardware]
  • Identification and control of system built by YOU [in hardware, fun but will likely require some work outside the lab]
  • Identification and control of a flexible beam [in simulation, model provided by instructor]
  • Identification and control of an F-16 [in simulation, model available, e.g., here]
  • Other options with references to papers and/or models can be found in the GauchoSpace page for the class.

The final project must make use of at least one or two out of the four topics taught in the lectures, which are Model Identification, Robust Control, LQG/LQR, Nonlinear Control.

See due dates below



Description Due date

1-2 paragraph description of your proposed final project. Please make sure that you include the following information:

  • Which system do you plan to control?
  • What variables to you plan to control, which variables can you measure?
  • What type of closed-loop specifications make sense for that problem?
  • Do you plan to use simulation or experiments?
    • In case you plan to use simulations, where will you get the model from? [We may be able to give you a hand here]
    • In case you plan to build the system, you need to provide details on the parts you plan to use (including sensorsa and actuators)
  • Which two out of the four topics taught in the lectures (Model Identification, Robust Control, LQG/LQR, Nonlinear Control) will the project make use?

The report, must follow the template in the Laboratory section of the web page.

There is a strict limit on the page length: at most 10 pages, 10pt. This must include all figures, plots, abstract, introduction, discussion of results, conclusions, etc.

To fit everything in 10 pages, you must be very selective in which figures to include. You will also need to overlay several plots. E.g., you may show the identified process bode plots for several different inputs all in the same figure (remember to label everything so that it is clear which line corresponds to what!).

Your report must also include text (and equations) to explain the process model, to justify the choices that you made, and to discuss the results that you obtained. The main objective of the report is to support the claim that the model that you identified is accurate and that the controller that you designed is good. You should think of the report as a conference paper and not as a homework assignment.

A significant portion of the grade will be based on the quality of the report (length, completeness, how well it reads, etc.)

The presentations of the final project should be 30 minutes long.

For group projects all students should participate in the presentation. The presentation should use a computer projector.

The presentation should include:

  • presentation outline
  • description of the system to be controlled, sensors, and actuators (use pictures!)
  • description of the control objectives
  • identification method and summary of the identification results (if the project involves identification)
  • control design method and summary of the closed-loop performance achieved
  • simulation results
  • hardware results (if the project involves hardware)
  • hardware demo (if the project involves hardware)
  • conclusions and discussion of future work

This report should follow the same guidelines as the mid-term project report.

Please read all comments that you will receive regarding the mid-term project report and make sure that you follow any advice given when you prepare the final project report.

A significant portion of the grade will be based on the quality of the report (length, completeness, how well it reads, etc.)



Study Guide


The following is a tentative schedule for the course. If revisions are needed they will be posted on the course's web page. The third column of the schedule contains the recommended reading for the topics covered on each class. Students are strongly encouraged to read these materials prior to the class.

Class Contents References Laboratory


Course overview

Computer-controlled systems

  • Continuous-time systems
  • Discrete-time systems
  • Discrete-time vs. continuous-time transfer functions
Chapter 1

Laboratory session enrollment

No laboratory class


Nonparametric identification

  • Time-domain identification
  • Frequency response identification
Chapter 2


Parametric identification using least-squares

  • Least-squares line fitting
  • vector least-squares
Chapter 3 Introduction to laboratory

Please read and bring to class the following handouts: Introductory laboratory handout, Hardware guide, and a couple of Simulink models that you can use to test the harware.


Parametric Identification of an ARX Modelno

  • ARX model
  • Identification of an ARX model
  • Dealing with known parameters
Chapter 4


Practical consideration in parametric identification

  • Choice of inputs
  • Scaling
  • Choice of the sampling frequency
  • Choice of the model order
  • Combination of multiple experiments
  • Closed-loop identification
Chapter 5

Identification of the two-cart system.


Part II — Robust Control

Robust stability

  • Model uncertainty
  • Nyquist stability criterion
  • Small gain condition

Chapter 8

MATLAB script used to generate the plots in the notes

Simulink file for Noisy identification Exercise 2


Control design by loop-shaping

  • Open-loop vs. closed-loop specifications
  • Open-loop gain shaping
Chapter 9


Review of state-space models

  • Input-output relations
  • Realizations
  • Controllability and observability
  • Stability
Chapter 10

Linear Quadratic Regulation (LQR)

  • Feedback configuration
  • Optimal regulation
  • state-feedback LQR
  • Stability and robustness
  • Loop-shaping control using LQR
Chapter 11

Closed-loop control of the identified model.

[Final project proposal due 5/3.]


LQG/LQR output feedback

  • output feedback
  • full-order observers
  • LQG estimation
  • LQG/LQR output feedback
  • Separation principle
  • Loop-gain recovery
Chapter 12

MATLAB script used to generate the plots in the notes


Set-point control

  • Nonzero equilibrium state and input
  • State feedback
  • Output feedback
Chapter 13


Part IV — Nonlinear Control

Feedback linearization controllers

  • Feedback linearization
  • Generalized model for mechanical systems
  • feedback linearization of mechanical systems
Chapter 14


Lyapunov stability
  • Lyapunov stability theorem
  • LaSalle's invariance principle
  • Lienard equation and generalizations
Chapter 15

Final project

[Mid-term project report due 5/17.]


Lyapunov-based designs

  • Lyapunov-based controllers
  • Application to mechanical systems
Chapter 16














Final project presentations

  [Final project report due 6/12.]


Final project presentations


Exams week (no exam for this class)




Schedule & Location:

Schedule: Mon or Thu 6-9pm (weekly 3 hour laboratory sessions)

Location: 3120A Harold Frank Hall (HFH)


There will be weekly laboratory sessions to complement the material covered in the lectures. A portion of the laboratory should be prepared before the lab session.

Most laboratories will require the use of MATLAB/Simulink with the CONTROL SYSTEMS and IDENTIFICATION Toolboxes.

The following document provides a general description of what the students are expected to do before and during the lab and it also serves as a template for the final lab report that will be turn in the middle of the quarter. The final project report (due at the end of the quarter) should also follow this basic template:

Laboratory project guide

See the Study Guide for an overview of the week-by-week laboratory activities.


Homework Assignments


Number Posted on Due date Exercises Relevant lectures



Exercises 2.1 and 2.2 of the notes.

Simulink file for Exercises 2.1 (impulse response) and 2.2 (correlation method)

The MATLAB scripts for exercise 2.2 will be useful to perform nonparametric identification with the data collected in the lab

Solutions cannot yet be found here

Chapters 1-2



Exercises 4.1, 5.1, 5.2 of the notes.

Data for Exercise 4.1 (known parameters)

Data for Exercise 5.1 (model order)

Simulink file Exercise 5.2 (input magnitude)

The MATLAB scripts for exercises 5.1, 5.2 will be useful to perform parametric identification with the data collected in the lab. However, you will need to adapt these scripts to take into account that the system has has integrator.

[If you are taking the course for 3 credit you do not need to turn in exercise 4.1]

Solutions cannot yet be found here

Chapter 3-5



Exercises 8.2, 8.4, 9.1 of the notes.

Data for Exercise 8.2 (Noisy identification)

[If you are taking the course for 3 credit you do not need to turn in these assignments]

Solutions cannot yet be found here

Chapters 8-9




Exercises 11.2, 12.1 of the notes.

[If you are taking the course for 3 credit you do not need to turn in these assignments]

Solutions cannot yet be found here

Chapters 10-12



Exercises 14.2, 15.2, 15.3 of the notes.

[If you are taking the course for 3 credit you do not need to turn in these assignments]

Solutions cannot yet be found here

Chapters 14-15