laboratory guide 2 DOF Inverted Pendulum Experiment for MATLAB /Simulink Users



Similar documents
INSTRUCTOR WORKBOOK Quanser Robotics Package for Education for MATLAB /Simulink Users

EDUMECH Mechatronic Instructional Systems. Ball on Beam System

QNET Experiment #06: HVAC Proportional- Integral (PI) Temperature Control Heating, Ventilation, and Air Conditioning Trainer (HVACT)

DCMS DC MOTOR SYSTEM User Manual

THE EDUCATIONAL IMPACT OF A GANTRY CRANE PROJECT IN AN UNDERGRADUATE CONTROLS CLASS

Laboratory 4: Feedback and Compensation

POTENTIAL OF STATE-FEEDBACK CONTROL FOR MACHINE TOOLS DRIVES

ECE 516: System Control Engineering

EE 402 RECITATION #13 REPORT

dspace DSP DS-1104 based State Observer Design for Position Control of DC Servo Motor

ECE 495 Project 3: Shocker Actuator Subsystem and Website Design. Group 1: One Awesome Engineering

ECE 3510 Final given: Spring 11

Matlab and Simulink. Matlab and Simulink for Control

Mini-Lab Projects in the Undergraduate Classical Controls Course

MATLAB Control System Toolbox Root Locus Design GUI

Proceeding of 5th International Mechanical Engineering Forum 2012 June 20th 2012 June 22nd 2012, Prague, Czech Republic

Module 2 Introduction to SIMULINK

19 LINEAR QUADRATIC REGULATOR

Servo Motors (SensorDAQ only) Evaluation copy. Vernier Digital Control Unit (DCU) LabQuest or LabPro power supply

Modeling and Simulation of a Three Degree of Freedom Longitudinal Aero plane System. Figure 1: Boeing 777 and example of a two engine business jet

Current Loop Tuning Procedure. Servo Drive Current Loop Tuning Procedure (intended for Analog input PWM output servo drives) General Procedure AN-015

Stabilizing a Gimbal Platform using Self-Tuning Fuzzy PID Controller

Loop Analysis. Chapter Introduction

AC : MATHEMATICAL MODELING AND SIMULATION US- ING LABVIEW AND LABVIEW MATHSCRIPT

MECE 102 Mechatronics Engineering Orientation

System Modeling and Control for Mechanical Engineers

ELECTRICAL ENGINEERING

Figure 1. The Ball and Beam System.

Positive Feedback and Oscillators

Real-Time Systems Versus Cyber-Physical Systems: Where is the Difference?

The purposes of this experiment are to test Faraday's Law qualitatively and to test Lenz's Law.

Design-Simulation-Optimization Package for a Generic 6-DOF Manipulator with a Spherical Wrist

Manufacturing Equipment Modeling

E x p e r i m e n t 5 DC Motor Speed Control

Speed Control Methods of Various Types of Speed Control Motors. Kazuya SHIRAHATA

ABSTRACT. Keyword double rotary inverted pendulum, fuzzy logic controller, nonlinear system, LQR, MATLAB software 1 PREFACE

Control System Definition

The Real-time Network Control of the Inverted Pendulum System Based on Siemens Hardware**

Simulation of Offshore Structures in Virtual Ocean Basin (VOB)

A Design of a PID Self-Tuning Controller Using LabVIEW

EE289 Lab Fall LAB 4. Ambient Noise Reduction. 1 Introduction. 2 Simulation in Matlab Simulink

Motor Modeling and Position Control Lab Week 3: Closed Loop Control

Power Electronics. Prof. K. Gopakumar. Centre for Electronics Design and Technology. Indian Institute of Science, Bangalore.

Online Tuning of Artificial Neural Networks for Induction Motor Control

Research Methodology Part III: Thesis Proposal. Dr. Tarek A. Tutunji Mechatronics Engineering Department Philadelphia University - Jordan

AP1 Waves. (A) frequency (B) wavelength (C) speed (D) intensity. Answer: (A) and (D) frequency and intensity.

Implementation of Fuzzy and PID Controller to Water Level System using LabView

Time Response Analysis of DC Motor using Armature Control Method and Its Performance Improvement using PID Controller

ASEN Structures. MDOF Dynamic Systems. ASEN 3112 Lecture 1 Slide 1

The Calculation of G rms

2.6. In-Laboratory Session QICii Modelling Module. Modelling Module Description

Active Queue Management of TCP Flows with Self-scheduled Linear Parameter Varying Controllers

Degree programme in Automation Engineering

Scicos is a Scilab toolbox included in the Scilab package. The Scicos editor can be opened by the scicos command

Controller and Platform Design for a Three Degree of Freedom Ship Motion Simulator

TEACHING AUTOMATIC CONTROL IN NON-SPECIALIST ENGINEERING SCHOOLS

DISTURBANCE REJECTION CONTROL APPLIED TO A GANTRY CRANE

AC : MEASUREMENT OF OP-AMP PARAMETERS USING VEC- TOR SIGNAL ANALYZERS IN UNDERGRADUATE LINEAR CIRCUITS LABORATORY

Recall the basic property of the transpose (for any A): v A t Aw = v w, v, w R n.

Eigenvalues and Eigenvectors

CONTROLLER DESIGN USING POLYNOMIAL MATRIX DESCRIPTION

Simple Harmonic Motion

Performance Analysis of Speed Control of Direct Current (DC) Motor using Traditional Tuning Controller

HYDRAULIC ARM MODELING VIA MATLAB SIMHYDRAULICS

Inner Product Spaces

Current and Temperature Ratings

Mathematical Modeling and Dynamic Simulation of a Class of Drive Systems with Permanent Magnet Synchronous Motors

EECE 460 : Control System Design

CHAPTER 11: Flip Flops

How to program a Zumo Robot with Simulink

FUZZY Based PID Controller for Speed Control of D.C. Motor Using LabVIEW

Parameter identification of a linear single track vehicle model

Frequency Response of Filters

Echtzeittesten mit MathWorks leicht gemacht Simulink Real-Time Tobias Kuschmider Applikationsingenieur

Lab 3: Introduction to Data Acquisition Cards

HITACHI INVERTER SJ/L100/300 SERIES PID CONTROL USERS GUIDE

Drivetech, Inc. Innovations in Motor Control, Drives, and Power Electronics

A More Efficient Way to De-shelve 137 Ba +

YAW RATE AND VELOCITY TRACKING CONTROL OF A HANDS-FREE BICYCLE

Linear-Quadratic Optimal Controller 10.3 Optimal Linear Control Systems

FREE FALL. Introduction. Reference Young and Freedman, University Physics, 12 th Edition: Chapter 2, section 2.5

Z-Knipsers Team Description Paper for RoboCup 2016

COMPUTER SIMULATION OF REAL TIME IDENTIFICATION FOR INDUCTION MOTOR DRIVES

Active Vibration Isolation of an Unbalanced Machine Spindle

PID, LQR and LQR-PID on a Quadcopter Platform

CALIBRATION OF A ROBUST 2 DOF PATH MONITORING TOOL FOR INDUSTRIAL ROBOTS AND MACHINE TOOLS BASED ON PARALLEL KINEMATICS

Position Control and Anti-Swing Control of Overhead Crane Using LQR

A Distributed Architecture for Teleoperation over the Internet with Application to the Remote Control of an Inverted Pendulum

Back to Elements - Tetrahedra vs. Hexahedra

G(s) = Y (s)/u(s) In this representation, the output is always the Transfer function times the input. Y (s) = G(s)U(s).

PID Control. Proportional Integral Derivative (PID) Control. Matrix Multimedia 2011 MX009 - PID Control. by Ben Rowland, April 2011

Closed-Loop Motion Control Simplifies Non-Destructive Testing

Chapter 12 Modal Decomposition of State-Space Models 12.1 Introduction The solutions obtained in previous chapters, whether in time domain or transfor

Interactive applications to explore the parametric space of multivariable controllers

[1] Diagonal factorization

1. Oscilloscope is basically a graph-displaying device-it draws a graph of an electrical signal.

A few words about imaginary numbers (and electronics) Mark Cohen

Transcription:

laboratory guide 2 DOF Inverted Pendulum Experiment for MATLAB /Simulink Users Developed by: Jacob Apkarian, Ph.D., Quanser Hervé Lacheray, M.A.SC., Quanser Michel Lévis, M.A.SC., Quanser Quanser educational solutions are powered by: Captivate. Motivate. Graduate.

PREFACE Preparing laboratory experiments can be time-consuming. Quanser understands time constraints of teaching and research professors. That s why Quanser s control laboratory solutions come with proven practical exercises. The courseware is designed to save you time, give students a solid understanding of various control concepts and provide maximum value for your investment. Quanser 2 DOF Inverted Pendulum courseware materials are supplied in a format of the Laboratory Guide. The Lab Guide contains lab assignments for students. This courseware material sample is prepared for users of The MathWorks s MATLAB/Simulink software in conjunction with Quanser s QUARC real-time control software. A version of the course material for National Instruments LabVIEW users is also available. The following material provides an abbreviated example of in-lab procedures for the 2 DOF Inverted Pendulum experiment. Please note that the examples are not complete as they are intended to give you a brief overview of the structure and content of the courseware materials you will receive with the plant.

TABLE OF CONTENTS PREFACE... PAGE 1 INTRODUCTION TO QUANSER 2 DOF INVERTED PENDULUM COURSEWARE SAMPLE... PAGE 3 LABORATORY GUIDE TABLE OF CONTENTS... PAGE 3 BACKGROUND SECTION SAMPLE... PAGE 4 LAB EXPERIMENTS SECTION SAMPLE... PAGE 5

1. INTRODUCTION TO QUANSER 2 DOF INVERTED PENDULUM COURSEWARE SAMPLE Quanser courseware materials provide step-by-step pedagogy for a wide range of control challenges. Starting with the basic principles, students can progress to more advanced applications and cultivate a deep understanding of control theories. Quanser 2 DOF Inverted Pendulum courseware covers topics, such as: Obtain an open-loop state-space representation of a 1 DOF Rotary Inverted Pendulum system Design and tune an LQR-based state-feedback controller Simulate the closed-loop response of the 1 DOF Rotary Inverted Pendulum system. Implement state-feedback controller on the 2 DOF Inverted Pendulum system and evaluate its actual performance 2. LABORATORY GUIDE TABLE OF CONTENTS The full Table of Contents of the Quanser 2 DOF Inverted Pendulum Laboratory Guide is shown here: 1. INTRODUCTION 2. BACKGROUND 2.1. MODELING 2.1.1.1. MODEL CONVENTION 2.1.2. NONLINEAR EQUATIONS OF MOTION 2.1.3. LINEARIZING 2.1.4. LINEAR STATE-SPACE MODEL 2.2. CONTROL 2.2.1. STABILITY 2.2.2. CONTROLLABILITY 2.2.3. LINEAR QUADRATIC REGULAR (LQR) 2.2.4. FEEDBACK CONTROL 3. LAB EXPERIMENTS 3.1. SIMULATION 3.1.1. PROCEDURE 3.1.2. ANALYSIS 3.2. IMPLEMENTATION 3.2.1. PROCEDURE 3.2.2. ANALYSIS 4. SYSTEM REQUIREMENTS 4.1. OVERVIEW OF FILES 4.2. SETUP FOR SIMULATION 4.3. SETUP FOR RUNNING ON 2 DOF INVERTED PENDULUM REFERENCES

3. BACKGROUND SECTION - SAMPLE Control In Section 2.1, we found a linear state-state space model that represents a single rotary inverted pendulum system. This model is used to investigate the stability properties of the system in Section 2.2.1. In Section 2.2.2, the notion of controllability is introduced. Using the Linear Quadratic Regular algorithm, or LQR, is a common way to find the control gain and is discussed in Section 2.2.3. Lastly, Section 2.2.4 describes the state-feedback control used to control the servo position while minimizing link deflection. Stability The stability of a system can be determined from its poles ([8]): Stable systems have poles only in the left-hand plane Unstable systems have at least one pole in the right-hand plane and/or poles of multiplicity greater than 1 on the imaginary axis Marginally stable systems have one pole on the imaginary axis and the other poles in the left-hand plane The poles are the roots of the system's characteristic equation. From the state-space, the characteristic equation of the system can be found using (2.12) where det() is the determinant function, s is the Laplace operator, and I the identity matrix. These are the eigenvalues of the state-space matrix A. Controllability If the control input, u, of a system can take each state variable, x i where i = 1... n, from an initial state to a final state then the system is controllable, otherwise it is uncontrollable ([5]). Rank Test The system is controllable if the rank of its controllability matrix equals the number of states in the system, (2.13) (2.14) Linear Quadratic Regular (LQR) If (A,B) are controllable, then the Linear Quadratic Regular optimization method can be used to find a feedback control gain. Given the plant model in Equation 2.6, find a control input u that minimizes the cost function (2.15) where Q and R are the weighting matrices. The weighting matrices affect how LQR minimizes the function and are, essentially, tuning variables. Given the control law u = -Kx, the state-space in Equation 2.3 becomes

4. LAB EXPERIMENTS SECTION - SAMPLE Simulation In this section we will use the Simulink diagram shown in Figure 3.1 to simulate the closed-loop control of the 1 DOF Rotary Inverted Pendulum system. Recall in Section 2.1 the 2 DOF Inverted Pendulum is modeled as two independent and identical rotary pendulum systems. We will only be examining the 1 DOF portion. The Rotary Inverted Pendulum is simulated using the obtained linear state-space model. The Simulink model uses the state-feedback control described in Section 2.2.4. The feedback gain K is found using the Matlab LQR command (LQR is described briefly in Section 2.2.3). The goal is to find a gain that will stabilize the pendulum while tracking a given servo setpoint. Figure 3.1: Simulink diagram used to simulate 1 DOF Rotary Inverted Pendulum. IMPORTANT: Before you can conduct these experiments, you need to make sure that the lab files are configured according to your setup. If they have not been configured already, then you need to go to Section 4 to configure the lab files first. Procedure Follow these steps to simulate the rotary pendulum: 1. Make sure the LQR weighting matrices in setup_2dip.m are to and 2. This automatically generates the gain

Remark: When tuning the LQR, Q(1; 1) effects the servo proportional gain while Q(3; 3) effects the servo derivative gain (which reduces the overshoot). Increasing Q(4; 4) attenuates the motions of the pendulum. Finally, tuning Q(5; 5; ) effects the servo integral gain. 3. To generate a 0.025 Hz square wave reference, ensure the Signal Generator is set to the following: Signal type = square Amplitude = 1 Frequency = 0.025 Hz 4. Set the Amplitude (deg) gain blocks to 30 to generate a step with an amplitude of 30 degrees (i.e. square wave goes between 30 which results in a step amplitude of 60). 5. Open the servo gear position scope, theta l (rad), the pendulum angle scope, alpha (deg), and the motor input voltage scope, Vm (V). 6. Start the simulation. By default, the simulation runs for 50 seconds. The scopes should be displaying responses similar to Figure 3.2. Note that in the theta l (rad) scopes, the yellow trace is the setpoint position while the purple trace is the simulated position. Figure 3.2: Simulated closed-loop response.

Over ten rotary experiments for teaching fundamental and advanced controls concepts Rotary Servo Base Unit 2 DOF Inverted Pendulum Inverted Pendulum Flexible Link Flexible Joint Ball and Beam Double Inverted Pendulum Gyro/Stable Platform 2 DOF Robot 2 DOF Gantry Multi-DOF Torsion Quanser s rotary collection allows you to create experiments of varying complexity from basic to advanced. Your lab starts with the Rotary Servo Base Unit and is designed to help engineering educators reach a new level of efficiency and effectiveness in teaching controls in virtually every engineering discipline including electrical, computer, mechanical, aerospace, civil, robotics and mechatronics. For more information please contact info@quanser.com 2013 Quanser Inc. All rights reserved. INFO@QUANSER.COM +1-905-940-3575 QUANSER.COM Solutions for teaching and research. Made in Canada.