Skip to content
MathWorks - Mobile View
  • Melden Sie sich bei Ihrem MathWorks Konto anMelden Sie sich bei Ihrem MathWorks Konto an
  • Access your MathWorks Account
    • Eigener Account
    • Mein Community Profil
    • Lizenz zuordnen
    • Abmelden
  • Produkte
  • Lösungen
  • Forschung und Lehre
  • Support
  • Community
  • Veranstaltungen
  • MATLAB erhalten
MathWorks
  • Produkte
  • Lösungen
  • Forschung und Lehre
  • Support
  • Community
  • Veranstaltungen
  • MATLAB erhalten
  • Melden Sie sich bei Ihrem MathWorks Konto anMelden Sie sich bei Ihrem MathWorks Konto an
  • Access your MathWorks Account
    • Eigener Account
    • Mein Community Profil
    • Lizenz zuordnen
    • Abmelden

Videos und Webinare

  • MathWorks
  • Videos
  • Videos Homepage
  • Suche
  • Videos Homepage
  • Suche
  • Vertrieb kontaktieren
  • Testsoftware
4:56 Video length is 4:56.
  • Description
  • Full Transcript
  • Related Resources

Interactive Control Design Using Live Editor Tasks

Melda Ulusoy, MathWorks

Live Editor tasks are apps you can add to your live script to complete a set of different operations without writing any code. This video will walk you through the design of a controller from measured plant data using Live Editor tasks. You'll learn how you can interactively estimate a state-space model from measured data, discretize the identified model, and finally, design a PID controller, all in one place: your live script.

Interactive Control Design Using Live Editor Tasks

In 19b, we introduce Live Editor tasks, which are apps you can add to a live script to perform a specific set of operations. Let’s say this is the workflow you need to follow to design a controller from measured plant data. Live Editor tasks let you accomplish all the workflow steps in one place, saving you time and eliminating the need of writing code. Let’s see how you can use these Live Editor tasks to estimate a state-space model from measured plant data, discretize the identified model, and then design a controller for the discretized plant.

This code here loads and plots the measured plant data. You can display the output of this code either inline or on the right-hand side of the script. To work on the first step of this workflow, we’ll use the Estimate State-Space Model task. To find this task, we’ll go to the Live Editor tab and click task. Here you’ll find Live Editor tasks from different toolboxes. Here’s the one we need. Let’s insert it to our live script. As you see here, the Live Editor task lets you interactively specify parameters. When you select data, it automatically finds the appropriate pre-defined variables from the MATLAB workspace that you can choose in these drop-down menus. By clicking this circular icon, you can enable the task to run automatically and update and display the results every time you adjust values within the task. If you don’t have the knowledge of the plant order, you can simply try out different values. Since the task is running automatically, when you change the plant order, you’ll see updated results on the right. The increased order of 5 didn’t improve the estimation fit much. So let’s set the order back to 4. If you want, you can rename the identified model in this field here. Using the task, we easily estimated a model from measured data without writing any code. If you want to see the MATLAB commands that are used by this task, you can display them by clicking the arrow on the bottom of the task. You can also enable this feature from the options menu by selecting “controls and code.” This task also lets you adjust parameters of the estimation algorithm, such as the search method and maximum iterations. As we change some of the parameters here, you see how the appropriate arguments are automatically called by these functions. This saves you time and eliminates the need to search for the specific MATLAB functions and the different options they can be set up with.

Now, we’ll move on to the second step of the workflow to discretize the identified model. For that we’ll be using the Convert Model Rate task. If you already know the name of the task you want to use, you can simply start typing its name in the live script and add the task by selecting it from the suggested list. After choosing the model and specifying the sample time of your controller, you can try out different conversion methods to find the one that gives you a better match between the original and converted model.

The final step is to design a PID controller for the discretized plant. For that, we’ll add this task that’s available under Control System Toolbox. After selecting the discretized plant, you can experiment with different controller settings such as the degrees of freedom and controller type. You can then fine-tune your controller by using these sliders which helps you alter the balance between reference tracking and disturbance rejection. By checking this box, you can also display system response characteristics such as the rise time and overshoot, and make sure the controller meets your design requirements.

If you want to share your work with others, you can simply share this live script with them, and they can play with different parameters to come up with new controller designs. Alternatively, you can hide the interactive user interface by choosing this option on each task and then share the generated code.

For more information on Live Editor tasks, check out the documentation.

Related Products

  • Control System Toolbox

Learn More

Explore this example for more information on controller design using live tasks
What Are Live Editor Tasks?

3 Ways to Speed Up Model Predictive Controllers

Read white paper

A Practical Guide to Deep Learning: From Data to Deployment

Read ebook

Bridging Wireless Communications Design and Testing with MATLAB

Read white paper

Deep Learning and Traditional Machine Learning: Choosing the Right Approach

Read ebook

Hardware-in-the-Loop Testing for Power Electronics Control Design

Read white paper

Predictive Maintenance with MATLAB

Read ebook

Electric Vehicle Modeling and Simulation - Architecture to Deployment : Webinar Series

Register for Free

How much do you know about power conversion control?

Start quiz

Feedback

Featured Product

Control System Toolbox

  • Request Trial
  • Get Pricing

Up Next:

3:52
Control System Design with the Control System Designer App

Related Videos:

2:22
PID Control Design with Control System Toolbox
31:22
Data-Driven Control: How to Design a Controller When Plant...
5:57
State-Space Models, Part 2: Control Design
9:48
Using Bode Plots, Part 5: DC Motor Control Example

View more related videos

MathWorks - Domain Selector

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

  • Switzerland (English)
  • Switzerland (Deutsch)
  • Switzerland (Français)
  • 中国 (简体中文)
  • 中国 (English)

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • Vertrieb kontaktieren
  • Testsoftware

MathWorks

Accelerating the pace of engineering and science

MathWorks ist der führende Entwickler von Software für mathematische Berechnungen für Ingenieure und Wissenschaftler.

Entdecken Sie…

Produkte

  • MATLAB
  • Simulink
  • Software für Studierende
  • Hardware-Unterstützung
  • File Exchange

Testen oder Kaufen

  • Downloads
  • Testsoftware
  • Vertrieb kontaktieren
  • Preise und Lizenzierung
  • Store

Lernen

  • Dokumentation
  • Tutorials
  • Beispiele
  • Videos und Webinare
  • Schulungen

Support

  • Hilfe zur Installation
  • MATLAB Answers
  • Consulting
  • License Center
  • Support kontaktieren

Über MathWorks

  • Jobs & Karriere
  • Newsroom
  • Soziales Engagement
  • Berichte von Anwendern
  • Über MathWorks
  • Select a Web Site United States
  • Trust Center
  • Handelsmarken
  • Datenschutz
  • Datendiebstahl verhindern
  • Status von Anwendungen

© 1994-2022 The MathWorks, Inc.

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • LinkedIn
  • RSS

Folgen Sie uns