Teaching computations in Controls, Signals, and Robotics with MATLAB

Carlotta Berry, Electrical and Computer Engineering, Rose-Hulman Institute of Technology

Teaching computations in Controls, Signals, and Robotics with MATLAB
In order to share my experiences teaching computation using MATLAB, I will focus on various courses I have taught in the electrical and computer engineering curriculum at Rose-Hulman. The courses that I will highlight are circuits, controls, signals and systems, and robotics.
In the circuits courses, MATLAB was used to solve a simultaneous system of equations for example to find voltages using the node-voltage method or currents using the mesh-current method. This can be done for DC or AC circuits where the key difference is whether the results include real or complex numbers. It as also helpful for phasor computation such as converting between rectangular and exponential form.
In controls courses, MATLAB, Simulink and SISOtool have been used to model, analyze, and design control systems. For example, by creating a root locus or Bode plot to design a system to meet given transient, steady-state or frequency requirements. For example, to design a system to meet the settling time, percent overshoot, bandwidth, phase margin, or steady-state error. Simulink and MATLAB scripts were use to model first-order and second-order step response of a given system.
In the signals and systems course, MATLAB was used for Fourier analysis, to plot Fourier series and finding the frequency response before and after filtering. It was also used to design filters to meet given design specifications for the gain, passband, and cutoff frequencies.
In the mobile robotics course, MATLAB was used to solve for the forward and inverse kinematics as the robot moved with respect to the global and local reference frame. Also, used to solve for the location of a landmark in the world, given a sensor reading and location with respect to the robot. It was also used for discrete Bayes filters for path planning, localization, mapping etc. Some students also used it for creating a GUI to control a remote robot to illustrate path planning, mapping and localization.
The primary challenge with MATLAB was the way that it was introduced in the ECE curriculum. The students take Python or C during their freshman year but MATLAB is initially introduced as part of their school work. They are given tutorials and documents to review to learn how to use MATLAB but there is no course where MATLAB is explicitly taught. Although, faculty would assume that computational thinking would translate to MATLAB given they had learned other languages, it did not translate the same way to students.
The solutions to this problem were the addition of another class in the freshman year that introduced MATLAB to the students in the context of in introduction to signal processing including audio, images, and videos. Instead of encountering for the first time in an upper level course, they learned to implement phasor representation of sinusoidal signals, complex arithmetic, sampling signal spectra, linear time-invariant systems, frequency response, convolution, and filter implementation in MATLAB. Most of the courses in the ECE curriculum have an integral lab component so one way to help make connections between the theory and real-world application or hands-on activity is to complete a prelab in MATLAB. They have also done similar scaffolding activities with PSpice, MultiSim or other software like Tinkercad.
Another solution, I have tried in my advanced course is to show an example of how to solve a solution to a problem using a recitation video and then in a MATLAB video. Afterwards, the students are given either a homework problem or quiz where they can use the video or their notes as a guide to complete similar problems. Live scripts have proven to be very helpful in creating handouts and videos to illustrate real time computation.
The course content is based upon the textbook Probabilistic Robotics http://probabilistic-robotics.org/ and the materials at the following website. http://ais.informatik.uni-freiburg.de/teaching/ss21/robotics/
The lectures for this course can be found at the following link: https://youtube.com/playlist?list=PLBK7yyieyrAYyvfgPyqoPAaG9JRDTfm78
Examples for some of the examples problems are given at the following list:
- Discrete Bayes Filter – Posterior Belief that a robot is a position in the world given a sensor measurement. https://youtu.be/IsaV3YTA9MI
- Landmark-Based Sensor Model - Given robot pose and sensor measurement, fin the probability of a given measurement. https://youtu.be/7xwHe3vAqZc
- Velocity-Based Motion Model – Given a robot, find the probability of a controlling a robot to a given location by modeling sensor and motion error. https://youtu.be/OgZjtae2RQ8
- Odometry-Based Motion Model – Given a robot, find the probability of controlling a robot from an initial pose to final pose, given encoder measurements. https://youtu.be/YQ_V5EqOk4Q
- Controls Frequency Response Analysis – Phase and Gain Margin - https://youtu.be/kK_7a8_fVE4
- Frequency Response Design -Lead Compensation - https://youtu.be/ltdvX7IZBQM
- Filter Design – Chebyshev Filters - https://youtu.be/Vm11ImDIDaI
- Mapping with MATLAB Human-Robot Interface - https://youtu.be/wbPvOUkTyJE
- Metric Path Planning with MATLAB Human-Robot Interface - https://youtu.be/6H680H2A3sA
- Localization with MATLAB Human-Robot Interface - https://youtu.be/cSuI0hD30Us
________________________________________

Downloadable version of this essay

Teaching computations in Controls, Signals, and Robotics with MATLAB (Acrobat (PDF) 161kB Sep6 22)
Lag Compensation Design Live Script (Acrobat (PDF) 117kB Sep6 22)
Lead Compensation Design Live Script (Acrobat (PDF) 63kB Sep6 22)