Edukit Rotary Inverted Pendulum Control System

An Open and Configurable System with Digital Motor Control Technology

Introduction

Control systems engineering increases in importance ever more rapidly with the appearance of self-driving vehicles, novel aerial vehicles, medical robotics, and countless consumer products. These applications require not only engineers with hands-on experience in control systems, but also very importantly, in the management and control of electric motor actuators and precise position sensors. Control systems engineering design skill relies on understanding of both theory and practice. However, understanding of control systems practice through hands-on-experience, has not been readily available in the past.

The Edukit Systems is a hands-on, low cost control system personal kit. It includes capability for both classic control system design as well as state space modern control systems. Both stable and unstable plants are included in the physical system. This is based on real time control hosted on an STM32 microprocessor system along with an accurate and highly configurable interface to a stepper motor actuator enabled by the STMicroelectronics L6474 integrated system. The motor interface may be adjusted by design and also updated in real time during control action. The real time C code implementation is open and available for any advanced development. Also, students, professional engineers, and controls researchers may apply Mathworks Matlab and Simulink to access the platform for real time graphical animated viewing of operation as well as for configuration and design.

A complete tour of control system design and implementation is included in the Tutorial Sequence (please see below).

Edukit System Operation

With

New Automated Swing Up Developed by Markus Dauberschmidt

Edukit Real Time Control System Workbench


Edukit Quickstart


1) System Assembly Video Guidance Sequence

Assembly Guide procedure that includes a soldering step

Assembly Guide procedure that does not require soldering, but includes two additional low cost components.

2) Installation of Firmware and Startup on Mac OSX Catalina or Big Sur

Use this guide if your computing platform is an Apple Mac

3)Installation of Firmware and Startup on Windows

Use this guide if your computing platform operates on the Windows OS

4) Edukit Firmware

The Edukit Firmware is at this link.

5) Edukit Project for Import into STM32CubeIDE

The Edukit source code is available at this link for direct download as a zip archive and then import into STM32CubeIDE

6) Edukit Project Github Repository

The Edukit source code is available at this link for viewing or direct download and import into STM32CubeIDE

Edukit Tutorials

Introduction

The Edukit Tutorials provide a complete introduction to Control Systems with Hands-On experience. These begin with introduction to Control Systems and then provide background and example developments for Design and Performance Measurement methods for stable and unstable systems. The Tutorials are developed to support new engineers first exploring control systems as well as expert control system designers.

The Real Time Control Systems Workbench supports each Tutorial for operation and experimental measurement of the Edukit system. Also, Each Tutorial is supported with tools for Design and Performance Analysis. Software development is not required, however, all source code for the Tools is provided. Feedback and questions regarding any topic are welcome (please contact kaiser@ee.ucla.edu).

All Tutorials apply tools developed for users to design, acquire data, and analyze performance.

These are available through links in each document for both Mathworks Matlab and the open source Octave system. Please see Edukit Resources, below for guidance on installation of Octave.

1) Tutorial 1: Introduction to Control Systems and Development of Controller and Real Time Performance Visualization with Edukit

This first Tutorial is an introduction to Control Systems with direct experimental experience with the Edukit system. This Tutorial provides background and experience in control of the Digital Motor Actuator. This will also provide experience in usage of the Real Time Control Systems Workbench and Design Tools. Tutorial videos are included to provide a complete introduction and guidance for this first development.

2) Tutorial 2: Design of Rotor Control Systems with Analysis of Sensitivity Functions and Example Development with Edukit

This Tutorial also includes guidance videos on configuration of the Edukit System for a specific experimental session and the usage of the Design and Performance Analysis Tools.

3) Tutorial 3: Design of Multiple Input Multiple Output (MIMO) Control Systems with Analysis of Control Effort and Example Development with Edukit

This Tutorial introduces the exciting concepts of MIMO control systems providing control over both Rotor Angle and Pendulum Angle. This focuses on design and performance analysis of suspended pendulum stable system.

4) Tutorial 4: Design of MIMO Control Systems with Sensitivity Function Performance Analysis

This Tutorial introduces MIMO control system design with the critical concept of Sensitivity Function Performance Analysis. This focuses on Stable suspended pendulum operating mode.

5) Tutorial 5: Design of MIMO Control Systems with Example Development for Unstable Systems

This Tutorial introduces MIMO control system design with the critical concepts of Stability and Sensitivity Function Performance Analysis. This focuses on Unstable inverted pendulum operating mode. A PDF Version is available as well as a Word Version with Animation. This Word version and its animation may be downloaded or viewed directly in Google Docs within the Chrome browser.

6) Tutorial 6: Design of Control Systems with Precise Steady State Characteristics with Example Development for the Rotary Inverted Pendulum

This Tutorial introduces the critical concept of Integral Action for assuring Steady State performance. This includes analysis of digital motor and actuator systems and steady state error. This includes an example development for the Edukit system.

7) Tutorial 7: Design for Robust Performance with Example Development of Control for Unstable Systems

This Tutorial introduces the essential Robust design approach. Here, measures of system Robustness are included in the Design Tools and Performance Measurement Tools. This includes application to the Edukit System with Inverted Pendulum operating mode.

8) Tutorial 8: Root Locus Design with Example Development of Rotor Control System for the Rotary Inverted Pendulum

This Tutorial introduces the Root Locus Design method with application to Rotor Control design for the MIMO Edukit system. This includes a Root Locus Design Tool. This also includes an example development and performance evaluation for the Edukit System. A PDF Version is available as well as a Word Version with Animation.

9) Tutorial 9: Introduction to Full State Feedback with Rotor Control

This Tutorial introduces the Full State Feedback architecture with application to Rotor Control design for the MIMO Edukit system. This includes a Full State Feedback Rotor Control Design Tool. This also includes an example development and performance evaluation for the Edukit System. This Tutorial introduces Optimal Design with the Linear Quadratic Regulator. This is directed to the Full State Feedback architecture with application to Rotor Control. This includes an LQR Full State Feedback Rotor Control Design Tool. This also includes an example development and performance evaluation for the Edukit System. This provides an introduction to optimal design of Full State Feedback of stable Suspended Pendulum Mode and unstable Inverted Pendulum Mode operation.

10) Tutorial 10: Introduction to Optimal Design for Full State Feedback with Rotor Control

This Tutorial introduces Optimal Design with the Linear Quadratic Regulator. This is directed to the Full State Feedback architecture with application to Rotor Control. This includes an LQR Full State Feedback Rotor Control Design Tool. This also includes an example development and performance evaluation for the Edukit System. This provides an introduction to optimal design of Full State Feedback of stable Suspended Pendulum Mode and unstable Inverted Pendulum Mode operation.

11) Tutorial 11: Full State Feedback with Integral Action

This Tutorial introduces the Full State Feedback architecture with Integral Action for the MIMO Edukit system. Integral Action is an important capability for Full State Feedback through a method that integrates and ultimately eliminates Steady State Error. This Tutorial also includes a Full State Feedback Rotor Control Design Tool including Integral Action. This also includes an example development and performance evaluation for the Edukit System Rotor Control System.

12) Tutorial 12: Development and Operation of the Automated Inclination Angle Calibration System

A new automated system has been developed for the Rotary Inverted Pendulum. The Rotary Inverted Pendulum architecture is unique with its characteristic sensitivity to the inclination "tilt" of the platform as it may rest on a surface that is not level, but rather tilted relative to the gravity vertical direction. An automated system operates at Edukit startup that measures the angle dependent tilt contribution and provides a calibration. This is a most interesting phenomenon and a high performance solution. This is described in this Tutorial.

13) Tutorial 13: Optimal Design for Full State Feedback of the Suspended Mode Pendulum

This Tutorial provides an example of Optimal Design of Full State Feedback with the Linear Quadratic Regulator. This is directed to the complete MIMO Edukit architecture operating in Suspended Pendulum mode. This includes an LQR Full State Feedback Design Tool. This also includes an example development and performance evaluation for the Edukit System. This also includes an example of the unique Edukit capability for Rotor Plant Design.

14) Tutorial 14: Optimal Design for Full State Feedback of the Unstable Inverted Mode Pendulum

This Tutorial provides an example of Optimal Design of Full State Feedback with the Linear Quadratic Regulator. This is directed to the complete MIMO Edukit architecture supporting the Unstable Inverted Pendulum mode. This includes an LQR Full State Feedback Design Tool. This also includes an example development and performance evaluation for the Edukit System. This also includes an example of the unique Edukit capability for Rotor Plant Design applied to this unstable system.


The Edukit Manual includes a complete system description along with classic PID control system design , modern State Space design, and experimental implementation and experimental data. Both stable (suspended pendulum) and unstable (inverted pendulum) control modes are included. Also, a description of the digital motor control system, its configuration and its response modeling are included.

Edukit Resources

Hands-on experience in control systems with advanced digital motor control is immediately available. There are many paths for development with this open and configurable system. These include:

1) Edukit Manual an Introduction to Control and with Digital Motor Actuators: An introduction to control systems can be gained by users who access the Edukit from any computer over a serial interface to command and configure its real-time controller, configure control system architectures, acquire performance real time data with time series and frequency response as well as design advanced control methods.

2) Serial Terminal Command Line Access: The user may connect to the Edukit platform over Mac OSX or Windows systems and also command and configure the system using a Serial Terminal. This includes selecting classic PID output feedback with dual controllers or Full State Feedback. This also includes selection of test modes as well as a Rotor Plant Transfer function designer. This is described in Appendix D of the Edukit Manual

Please see this Serial Interface Guide this includes information on installing a terminal utility on Windows

2) Matlab and Octave Real Time Control System Workbench: The Real Time Control System Workbench displays real time data at the 500 Hz control loop cycle rate. The user can configure and adjust the control system in real time and observe system response. This system and a Start Up guided are described in Appendix B of the Edukit Manual.

Select Matlab or Octave and your machine and operating system:

A) Matlab version Real Time Control System Workbench for Windows and Mac OSX

Please see the Real Time Control System Workbench Guide

B) Octave version Real Time Control System Workbench for Mac OSX and Windows.

C) Octave animatedline.m file required for operation of Octave Real Time Workbench. Download this file and include in your directory with Edukit_Real_Time_Control_System_Workbench_Octave_Mac_Win.m

Installation Guides for Octave

A) Installation guide for Octave 6.2 for Mac OSX is here:

B) Installation guide for Octave 6.4 for Windows is here:

3) Sensitivity Function Frequency Response System: The Real Time Control System Workbench enables display and data recording of the performance metrics for control systems including the four Sensitivity Functions. These may be measured and observed in real rime. Recorded Sensitivity Function data is also processed by the Sensitivity Frequency Response System to produce frequency domain measurements of each of the Sensitivity Functions. This system and its usage is described in Appendix C of the Edukit Manual.

Sensitivity Function Frequency Response (see Tutorials 1, 2, and 3 for an introduction on usage).

Matlab: Edukit_Sensitivity_Function_Freq_Response_Computation_Matlab.m

Octave: Edukit_Sensitivity_Function_Freq_Response_Computation_Octave.m


Stability and Sensitivity Function Analysis (see Tutorials 4, 5, and 6 1, 2, and 3 for an introduction on usage).


Matlab: Edukit_Stability_and_Sensitivity_Function_Computation_Matlab.m

Octave: Edukit_Stability_and Sensitivity_Function_Computation_Octave.m

5) Open Source C-Code Real Time Development: The real time C-Code control systems may be examined, modified, or replaced by users, offering a very wide range of instruction and research opportunities in advanced control systems. This is supported by the STM32 system and STM32CubeIDE Integrated Development Environment (IDE) tools compatible with Windows and Apple OS X operating system platforms. The Edukit STM32 complete Project is available here. This may be directly imported into the STM32CubeIDE.

6) Example Instruction Sequences: The Edukit is designed to support Control Systems, Mechatronics, and Embedded Systems course curriculum with a sequence of projects focusing on PID control of stable systems, PID control of unstable systems, and State Space modern control. This includes reference simulation and design in Matlab, Simulink, and Octave.

7) Example Advanced Instruction Sequences: The Integrated Rotary Inverted Pendulum control systems can also be used in advanced Control Systems course, mechatronics courses, and embedded systems courses where users have direct access to the real-time C-code implementation of the control system and the ability to view the control system template, modify and replace any or all components.

7) Individualization for Each Student: An important characteristic of the Edukit is its adaptability to enable individualization for each student and for each development. This enables each student to pursue independent objectives.

8) Shared and Open Environment:.First, our objective is to continuously adapt and advance the Edukit to address the needs of students and instructors. All requests for new features, new analyses, and new instructional approaches will be pursued. Also, all components are open and available for any innovations at any level by all users.


Edukit Design Systems

1) PID Classic Control Design: Control system design tools for the Edukit system are available for classic control design with single PID controllers for rotor control systems and dual PID controllers for stable suspended pendulum and unstable inverted pendulum configurations. Please note that each of these is described in the Tutorial Sequence above. These are available for Mathworks Matlab and open source Octave.


Introduction to PID Control System Design (see Tutorials 1, 2, and 3 for an introduction on usage).

Matlab: Edukit_PID_Motor_Control_Design.m

Octave: Edukit_PID_Motor_Control_Design_Octave.m


Introduction to PID Control System Design for Stable Plants (see Tutorials 3 and 4 for an introduction on usage).

Matlab: Edukit_Single_Rotor_PID_Suspended_Mode_Design.m

Octave: Edukit_Single_Rotor_PID_Suspended_Mode_Design_Octave.m


Introduction to PID Control System Design for Unstable Plants (see Tutorial 5 for an introduction on usage).

Matlab: Edukit_Single_Rotor_PID_Inverted_Mode_Design.m

Octave: Edukit_Single_Rotor_PID_Inverted_Mode_Design_Octave.m


Introduction to PID Control System Design by Root Locus Methods for Unstable Plants (see Tutorial 8 for an introduction on usage).

Matlab: Edukit_Single_Rotor_PID_Inverted_Mode_Root_Locus_Design.m

Octave: Edukit_Single_Rotor_PID_Inverted_Mode_Root_Locus_Design_Octave.m


2) Full State Feedback Control Design: Control system design tools for the Edukit system are available for Full State Feedback control design for rotor control as well as stable suspended pendulum and unstable inverted pendulum configurations. Please note that each of these is described in the Tutorial Sequence above. These are available for Mathworks Matlab and open source Octave.

Introduction to Full State Feedback with Rotor Control (see Tutorial 9 for an introduction to usage).

Matlab: Edukit_Full_State_Rotor_Design.m

Octave: Edukit_Full_State_Rotor_Position_Controller_Octave.m

Introduction to Optimal Design of Full State Feedback with Rotor Control (see Tutorial 10 for an introduction to usage).

Matlab: Edukit_Full_State_Rotor_Design_with_LQR.m

Octave: Edukit_Full_State_Rotor_Design_with_LQR_Octave.m

Introduction to Optimal to Full State Feedback with Rotor Control (see Tutorial 11 for an introduction to usage).

Matlab: Edukit_Full_State_Rotor_Design_with_Integral_Action.m

Octave: Edukit_Full_State_Rotor_Design_with_Integral_Action_Octave.m


Optimal Design for Full State Feedback of the Suspended Mode Pendulum (see Tutorial 13 for an introduction to usage).

Matlab: Edukit_Full_State_Suspended_Mode_LQR_Design.m

Octave: Edukit_Full_State_Suspended_Mode_LQR_Design_Octave.m


Optimal Design for Full State Feedback of the Inverted Mode Pendulum (see Tutorial 14 for an introduction to usage).

Matlab: Edukit_Full_State_Inverted_Mode_LQR_Design.m

Octave: Edukit_Full_State_Inverted_Mode_LQR_Design_Octave.m


3) Control System Stability and Performance Analysis: Control system design tools for the Edukit system are available for classic control design with single PID controllers for rotor control systems and dual PID controllers for stable suspended pendulum and unstable inverted pendulum configurations. Please note that each of these is described in the Tutorial Sequence above. These are available for Mathworks Matlab and open source Octave.

Sensitivity Function Frequency Response (see Tutorials 1, 2, and 3 for an introduction on usage).

Matlab: Edukit_Sensitivity_Function_Freq_Response_Computation_Matlab.m

Octave: Edukit_Sensitivity_Function_Freq_Response_Computation_Octave.m


Stability and Sensitivity Function Analysis (see Tutorials 4, 5, and 6 1, 2, and 3 for an introduction on usage).


Matlab: Edukit_Stability_and_Sensitivity_Function_Computation_Matlab.m

Octave: Edukit_Stability_and Sensitivity_Function_Computation_Octave.m


Full State Feedback Control System Performance Analysis (see Tutorial 9 for an introduction on usage).


Matlab: Edukit_Full_State_Performance_Measurement.m

Octave: Edukit_Full_State_Performance_Measurement_Octave.m


4) PID Classic Control Design with Simulink: Control system design tools for the Edukit system are available for classic control design where dual PID controllers are designed to stabilize both Pendulum Angle and Rotor Angle. These design tools provide end-to-end introduction to this method and follow the Edukit Manual. The control system design tools above are also available in Simulink:

a) Simulink Dual PID Frequency Response Design for Suspended Mode - Stable Plant Operation

b) Simulink Dual PID Frequency Response Design for Inverted Mode - Unstable Plant Operation

5) Full State Feedback Control Design with Simulink: Control system design tools for the Edukit system are available for full state feedback where dual PID controllers are designed to stabilize both Pendulum Angle and Rotor Angle. These design tools provide end-to-end introduction to this method and follow the Edukit Manual. These include:

a) Full State Feedback Design for Suspended Mode - Stable Plant Operation

b) Full State Feedback Design for Inverted Mode - Unstable Plant Operation

6) Full State Feedback Control Design with Simulink: The full state feedback control system design tools above are also available in Simulink:

a) Simulink Full State Feedback Design for Suspended Mode - Stable Plant Operation

b) Simulink Full State Feedback Design for Suspended Mode with Integral Action - Stable Plant Operation

c) Simulink Full State Feedback Design for Inverted Mode - Unstable Plant Operation

d) Simulink Full State Feedback Design for Inverted Mode with Integral Action - Unstable Plant Operation