Control Tutorials for MATLAB and Simulink (2024)

Below you will find an extensive list of hardware-based activities that instructors and individuals can employ to learn the concepts behind the modeling, controller design, and controller implementation for dynamic systems. The activities as outlined employ an Arduino board (Uno, Mega 2560, etc.) interfaced with a host computer running MATLAB/Simulink, though the essence of the various activities can be achieved with alternative hardware and software platforms. Most of the activities employ the ArduinoIO package, though you can also use the standard Arduino Hardware Support Package. Both packages are freely available with the standard MATLAB/Simulink license. Details on these packages and their installation can be found by following the link below.

- ArduinoIO Package Installation and Introduction

Contents

  • RC Circuit
  • LRC Circuit
  • Simple Pendulum
  • Lightbulb
  • Boost Converter Circuit
  • DC Motor

RC Circuit

Overview: These activities employ a simple electrical circuit consisting of only a resistor and a capacitor. This type of circuit is a simple, but important, example of a dynamic system. The activities explore the modeling, analysis, and control of the circuit. The Arduino board is employed for generating the input to the circuit (via a digital output) and for reading the output of the circuit (via an analog input). The Arduino board also communicates the recorded data to Simulink for visualization and analysis.

Equipment: Arduino board, breadboard, resistor, capacitor, jumper wires, ohmmeter (optional), capacitance meter (optional); for Activity 1C you will also need three potentiometers (10k, 50k, 500k), three operational amplifiers, one AA battery, and two 9V batteries

Activity 1A: Time-Response Identification of a Resistor Capacitor (RC) Circuit

Topics covered: modeling electrical systems, first-order systems, system identification

The purpose of this activity is to demonstrate how to model a simple electrical system. Specifically, a first principles approach based on the underlying physics of the circuit and a blackbox approach based on recorded data are employed. The associated experiment is employed to demonstrate the blackbox approach, as well as to demonstrate the accuracy of the resulting models. This activity also provides a physical example of the common class of first-order systems.

Activity 1B: Frequency-Response Identification of a Resistor Capacitor (RC) Circuit

Topics covered: modeling electrical systems, first-order systems, system identification, frequency response, bode plots

In the previous activity we examined the time response of an RC circuit. The purpose of this activity is rather to understand the frequency response of the same circuit. Specifically, we experimentally construct the magnitude plot portion of the Bode plot for the RC circuit.

Activity 1C: Control of a Resistor Capacitor (RC) Circuit

Topics covered: model-based design, root locus, PI control, steady-state error, analog control

In this activity we learn how to implement a controller in order to modify a system's dynamic response. In particular, we employ a system's root locus to help tune a feedback controller in the presence of uncertainties in the model. This activity also demonstrates how to implement a control law using analog electronics.

LRC Circuit

Overview: These activities continue to explore the modeling and analysis of electrical circuits that was begun in Activity 1. Specifically, an inductor is added to the circuits. The Arduino board is still employed for reading the circuit's output and for communicating the data to the host computer, but now the input to the circuit is supplied by a battery via a pushbutton switch (or a transistor).

Equipment: Arduino board, breadboard, inductor, resistors, capacitors, jumper wires, switch (pushbutton), AA battery, transistor (optional), operational amplifier (optional), ohmmeter (optional), capacitance meter (optional)

Activity 2A: Time Response of an Inductor Resistor Capacitor (LRC) Circuit

Topics covered: modeling electrical systems, underdamped second-order systems, system identification

The purpose of this activity is to demonstrate how to model a simple electrical system. Specifically, a first-principles approach based on the underlying physics of the circuit is be employed. The associated experiment is employed to determine the accuracy of the resulting model and to demonstrate how the individual circuit components affect the response. This activity also provides a physical example of the common class of (underdamped) second-order systems.

Activity 2B: Electrical Circuits in Series

Topics covered: modeling electrical systems, loading, higher-order systems, filtering, isolation

The purpose of this activity is to demonstrate how to model circuits in series. In particular, the phenomenon of loading is investigated. Also, how to predict the response of higher-order systems is discussed.

Simple Pendulum

Overview: This activity employs a simple pendulum. A pendulum is an illustrative example of a mechanical system whose dynamics are periodic and nonlinear. The Arduino board is simply used to record and transmit the pendulum's angular position as indicated by a rotary potentiometer employed as a sensor.

Equipment: Arduino board, simple pendulum (slender metal bar with end weight), rotary potentiometer

Activity 3: Modeling of a Simple Pendulum

Topics covered: modeling rotational mechanical systems, nonlinear systems, underdamped second-order systems, sampling effects (aliasing, quantization), system identification

The purpose of this activity is to demonstrate how to model a rotational mechanical system. Specifically, the theory of modeling is discussed with an emphasis on which simplifying assumptions are appropriate in this case. The associated experiment is employed to demonstrate how to identify different aspects of a physical system, as well as to demonstrate the accuracy of the resulting model.

Lightbulb

Overview: In this activity we model a thermal system (a lightbulb) and implement different strategies for controlling the system's temperature using an inexpensive temperature sensor for feedback. The Arduino board is used for generating the control input to the system and for recording the system's output (its temperature). The control logic is developed in Simulink and is alternately run on the host computer or embedded on the Arduino board.

Equipment: Arduino board, lightbulb, AC solid-state relay, temperature sensor

Activity 4: Temperature Control of a Lightbulb

Topics covered: blackbox modeling, first-order systems, ON/OFF control, PI control, steady-state error, embedded control, autocode generation

The purpose of this activity is to demonstrate how to control switched systems. The lightbulb is a binary system with only two states, on or off. The lightbulb is either connected to the AC source or it is not; its intensity cannot be modulated. In this experiment, we observe the resulting "chattering" behavior of the lightbulb and investigate alternative methodologies for reducing the frequency of this chatter, or smoothing the chatter, through the use of deadbands, low-pass filters, and Pulse-Width Modulation. This activity also provides exposure to Proportional (P) control, Proportional-Integral (PI) control, and first-order systems.

Boost Converter Circuit

Overview: These activities employ a type of DC-DC converter circuit called a boost converter circuit. A boost converter circuit takes a DC voltage input (i.e. from a battery) and can be controlled to produce a higher level of DC voltage at its output. This type of circuit has many important applications. The Arduino board is used for measuring the output of the circuit (via an analog input) and for controlling the level of the circuit's output voltage (via a digital output). The control logic is developed in Simulink and is alternately run on the host computer or embedded on the Arduino board.

Equipment: Arduino board, breadboard, AA battery, inductor, resistor, capacitor, diode, transistor (MOSFET), jumper wires

Activity 5A: Time-Response Analysis of a Boost Converter Circuit

Topics covered: modeling electrical systems, time-response analysis, system identification, pulse-width modulation

The purpose of this activity is to build intuition regarding the operation of a boost converter circuit. The activity also demonstrates two techniques for modeling and analyzing a simple electrical system. The first approach models the circuit based on its underlying physics and compares the predicted time response of the circuit to data taken from a physical implementation of the circuit. The second approach models the circuit based on experimentally obtained frequency response data and can be found in Part (b) of the activity.

Activity 5B: Frequency Response Identification of a Boost Converter Circuit

Topics covered: frequency response analysis, system identification, nonlinear systems, pulse-width modulation, bode plots

In this part of the activity we model the boost converter circuit based on experimentally obtained frequency response data. This technique provides intuition regarding frequency response analysis and demonstrates a blackbox approach for generating an approximate (local) model of a nonlinear system.

Activity 5C: Feedback Control of a Boost Converter Circuit

Topics covered: frequency response analysis, system identification, lead compensation, embedded control, autocode generation

The purpose of this activity is to demonstrate how to design a controller using frequency response techniques based on an empirically derived, and imperfect, plant model. Furthermore, this activity demonstrates how embedded controllers are often designed and implemented in practice using modern design and code generation tools.

DC Motor

Overview: These activities employ a simple DC motor which is a common and important type of actuator found in many industrial applications and consumer products. In particular, the motor is modeled, analyzed, and controlled to achieve a desired speed response. The motor's speed is estimated from the output of a quadrature encoder which is read via two digital inputs of the Arduino board. The motor's speed is controlled using pulse-width modulation via one of the board's digital outputs. The logic for estimating the motor's speed based on encoder counts and the logic for controlling the motor's speed is developed in Simulink. Initially this logic is run on the host computer, but subsequently all of the logic is downloaded to the Arduino board.

Equipment: Arduino board, breadboard, DC motor with quadrature encoder, battery (ex: lantern battery), diode, transistor (MOSFET), jumper wires

Activity 6A: Time-Reponse Analysis of a DC Motor

Topics covered: modeling electromechanical systems, time-response analysis, system identification, reduced-order models, pulse-width modulation, filtering

The purpose of this activity is to build intuition regarding the operation of an armature-controlled DC motor. The activity also generates a blackbox model for the motor based on its step response. This type of model is compared to a physics-based model. The need and effects of filtering are also explored.

Activity 6B: PI Speed Control of a DC Motor

Topics covered: pulse-width modulation, PI control, pole placement, steady-state error, disturbance rejection, saturation, integrator wind-up, embedded control

The purpose of this activity is to build intuition regarding the design and implementation of a PI controller for the speed control of a DC motor in the presence of an array of real-world complications. Specifically, we consider how to design the controller when we have an uncertain plant model and are limited in the amount of control effort we can supply. Furthermore, we analyze our system's performance in the presence of unwanted exogenous inputs, which in this case is a constant load disturbance.


Published with MATLAB® 8.2

Control Tutorials for MATLAB and Simulink (2024)

FAQs

Is MATLAB Simulink hard to learn? ›

Although Matlab is not considered to be a programming language, it really is easy to learn. When you write code on Matlab you actually don't care about declaring data types, allocating memories e.t.c like you do in other programming languages.

Which engineers use MATLAB the most? ›

Mechanical engineers of Design and manufacturing field use MATLAB and Simulink heavily.

How much time does it take to learn MATLAB? ›

If you're a novice programmer, you can expect it to take like 4 weeks than if you were a more seasoned programmer. Someone who can afford to devote all their time to MATLAB can finish learning the language in two weeks. If you have a lot of other responsibilities, however, it will take you longer to complete.

Does anyone still use MATLAB? ›

As of May 2022, LinkedIn searches return about 7.6 million Python users and 4.1 million MATLAB users. People who do not work in engineering or science are often surprised to learn how widespread MATLAB is adopted, including: Millions of users in colleges and universities. Thousands of startups.

Is MATLAB harder than Python? ›

Learning curve: Python is significantly simpler than Matlab and doesn't require as much background knowledge. Matlab is structured in a very logical and comprehensible way but is aimed at users with a deep knowledge of math.

What is the salary of MATLAB Simulink engineer? ›

Average Annual Salary
Engineering - Software & QA Matlab Simulink Developer Salary 1 - 4 years exp.₹4.3 Lakhs ₹2.9 L/yr - ₹8.1 L/yr
Project & Program Management Matlab Simulink Developer Salary 3 years exp.₹6.8 Lakhs ₹6.1 L/yr - ₹7.8 L/yr
3 more rows
Jun 28, 2024

Does NASA use MATLAB? ›

Scientists use a MATLAB and Simulink based simulator maintained by NASA's Ames Research Center to verify algorithms before testing them aboard the space station. They visualize the results of SPHERES experiments using Simulink 3D Animation™.

Is MATLAB or Python better for mechanical engineering? ›

While MATLAB has Simulink for graphical programming and simulation, Python offers libraries such as SimPy for event-based simulation and Modelica (via PyModelica) for modeling and simulation of complex systems. The functionality might not be as integrated as Simulink, but Python provides powerful alternatives.

Why do engineers use MATLAB instead of Python? ›

MATLAB is platform independent and its roots lie in numerical computing. Like Python it is intuitive and easy to use, and its Simulink toolbox provides a rich visual platform to manipulate data graphically and model and visualize block diagrams easily.

Is MATLAB enough for a job? ›

Conclusion. The industry has some familiar buzz that learning MATLAB will not be a good opportunity for a better career. But this is not fully true. Yes, it is an acceptable reason that salary or company structure will never be able to touch available popular jobs on other programming technologies.

Is MATLAB in high demand? ›

It is an essential tool for engineers, data analysts, scientists, and researchers who work with large amounts of data. In today's job market, the demand for professionals with MATLAB skills is on the rise, and many employers prefer candidates who have experience working with MATLAB.

Can I learn MATLAB on my own? ›

MATLAB's official website provides comprehensive resources, including documentation, tutorials, and examples. The MATLAB documentation covers all aspects of the language and its various toolboxes. It's an excellent starting point for learning MATLAB from scratch.

Is there anything better than MATLAB? ›

GNU Octave

If you are looking for anything closer to Matlab in terms of compatibility and computational ability, then Octave is the best Matlab alternative. Most of the projects developed for Matlab run on Octave too.

Can Python fully replace MATLAB? ›

For all of these reasons, and many more, Python is an excellent choice to replace MATLAB as your programming language of choice. Now that you're convinced to try out Python, read on to find out how to get it on your computer and how to switch from MATLAB! Note: GNU Octave is a free and open-source clone of MATLAB.

Is MATLAB useful in 2024? ›

Mathematical Power

MATLAB excels in matrices and array manipulation and handles complex data structures easily. It also allows you to create 2D & 3D models with good graphics. Plus, it helps you seamlessly sail through linear algebra, from algebraic equations to statistics.

Is Simulink better than MATLAB? ›

Simulink blocks provide a visual representation of your system, which can help you to verify its logic and behavior. On the other hand, MATLAB code requires you to write and edit text commands, which can be more complex and error-prone.

Is MATLAB easy for beginners? ›

MATLAB® is not hard to learn if you go for any professional course. It is ideal for engineering graduates and IT professionals willing to develop MATLAB® skills in their related fields.

Is MATLAB Simulink useful? ›

Simulink is particularly helpful in two stages of our development process. Early on, it helps us try new ideas and visualize how they will work. After generating code and conducting in-vehicle tests, we can run multiple simulations, refine the design, and regenerate code for the next iteration.”

Is MATLAB coding hard? ›

if someones struggling the only response is to get good at it then lol, instead of facing the fact that matlab is the hardest language I've ever learned and incredibly different from most other languages that picking it up from zero expirience to alot of expirience can be hard especially when its not formally taught in ...

Top Articles
JAY Z - The Brooklyn Don: Instrumentals - Vinyle (2xLP) • EUR 37,39
Santa Rosa Junior College hiring 2023/2024 -FACULTY (ASSOCIATE) - SIGN LANGUAGE, AMERICAN in Santa Rosa, CA | LinkedIn
myrtle beach motorcycles/scooters - by dealer - craigslist
Fen No Results
208000 Yen To Usd
Magickwoods Elements Brighton
Retire Early Wsbtv.com Free Book
Joes Barbershop Maricopa Az
Craigslist Pasco Kennewick Richland Washington
Best Insulation for 2x4 and 2x6 Walls
Rescare Training Online
Royal Cuts Kentlands
P.o. Box 3002 Phoenixville Pa 19460
Ky Smartgov
Xfinity Dublin Appointment
Quooker Nordic Zeepdispenser Zwart ZPNBLK | bol
What is the most flexible type of life insurance?
Stigmata Of Sacrilege F95
Hewn New Bedford
Rock Hill Sc Craigslist
Azpeople Self Service
Ari Tapio Nikki
Wilmington Pets Craigslist
„The Boogeyman“: Kritik zum Kinostart
Affidavit Of Non Liability Illinois Tollway
Noemie Lili: A Tale of Triumph and Inspiration - This Week in Libraries
How Old is Reyna: All Valorant Agent's Age, Name, & More - Unigamesity
Magicseaweed Jacksonville Fl
Oh When Your Cold I'll Be There
Craiglist Quad Cities
Hannibal Mo Craigslist Pets
Baris Atay Twitter
Volkswagen For Sale Craigslist
Craigslist Colville Wa Rentals
Medfusion/Toa Portal
Jessica Ann Ussery Wiki
Premier Solto Hotel by Corendon (Cesme)
Plaza Bonita Sycuan Bus Schedule
Ice Dodo Unblocked 76
Brenda89 Camsoda
417-990-0201
Marshalls Home Goods Near Me
Hamptonfuneralnc Obituaries
Mccommons Funeral Home Obituaries
Odu Csnbbs
Wanted Old Motorcycles 📞 www.wantedoldmotorcycles.com - wanted - by dealer - sale - craigslist
Minecraft Astral Sorcery Guide | DiamondLobby
Senior Houses For Sale Near Me
art-labeling activity: mitosis and cytokinesis
Latest Posts
Article information

Author: Otha Schamberger

Last Updated:

Views: 5295

Rating: 4.4 / 5 (75 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Otha Schamberger

Birthday: 1999-08-15

Address: Suite 490 606 Hammes Ferry, Carterhaven, IL 62290

Phone: +8557035444877

Job: Forward IT Agent

Hobby: Fishing, Flying, Jewelry making, Digital arts, Sand art, Parkour, tabletop games

Introduction: My name is Otha Schamberger, I am a vast, good, healthy, cheerful, energetic, gorgeous, magnificent person who loves writing and wants to share my knowledge and understanding with you.