Implementation of Intelligent Control on TITech Pendulum

Slides:



Advertisements
Similar presentations
Chapter 6 Matrix Algebra.
Advertisements

S i m u l i n k Prof. Muhammad Saeed Mathematical Modeling and Simulation UsingMATLAB 1.
Learning Objectives To apply the summation and product notation To define a matrix To solve problems on matrix summation, subtraction and multiplication.
The Complex Number System
OUTPUT – INPUT STABILITY Daniel Liberzon Coordinated Science Laboratory and Dept. of Electrical & Computer Eng., Univ. of Illinois at Urbana-Champaign.
Chapter 28 – Part II Matrix Operations. Gaussian elimination Gaussian elimination LU factorization LU factorization Gaussian elimination with partial.
Graphical Technique of Inference

Figure 4.1. The function f (x1, x2, x3) =  m(0, 2, 4, 5, 6).
Properties of State Variables
Systems of Linear Equations
MF-852 Financial Econometrics
Zeros of Polynomial Functions Section 2.5. Objectives Use the Factor Theorem to show that x-c is a factor a polynomial. Find all real zeros of a polynomial.
Ch 7.2: Review of Matrices For theoretical and computation reasons, we review results of matrix theory in this section and the next. A matrix A is an m.
Linear and generalised linear models
Linear Algebra and Matrices
1 Operations with Matrice 2 Properties of Matrix Operations
1 Chapter 2 Matrices Matrices provide an orderly way of arranging values or functions to enhance the analysis of systems in a systematic manner. Their.
Normalised Least Mean-Square Adaptive Filtering
역운동학의 구현과 응용 Implementation of Inverse Kinematics and Application 서울대학교 전기공학부 휴먼애니메이션연구단 최광진
Algebra Review. Polynomial Manipulation Combine like terms, multiply, FOIL, factor, etc.
An Introduction to Scilab Tsing Nam Kiu 丁南僑 Department of Mathematics The University of Hong Kong 2009 January 7.
Applied Numerical Analysis Chapter 2 Notes (continued)
Chapter 10 Review: Matrix Algebra
Eigenvalue Problems Solving linear systems Ax = b is one part of numerical linear algebra, and involves manipulating the rows of a matrix. The second main.
Matrices Square is Good! Copyright © 2014 Curt Hill.
EM and expected complete log-likelihood Mixture of Experts
Copyright © 2007 Pearson Education, Inc. Slide 7-1.
CMPS 1371 Introduction to Computing for Engineers MATRICES.
Lecture 1 - Introduction June 3, 2002 CVEN 302. Lecture’s Goals General Introduction to CVEN Computer Applications in Engineering and Construction.
Matrix Algebra and Regression a matrix is a rectangular array of elements m=#rows, n=#columns  m x n a single value is called a ‘scalar’ a single row.
Warm-up. Solving Multi-Step Equations A.1 How do you solve Multi-step equations?
Fuzzy Logic Controller Intelligent System course.
SAS Interactive Matrix Language Computing for Research I Spring 2012 Ramesh.
Warm Up Simplify the following x + 2x x + 2 – 3x Copyright © by Houghton Mifflin Company, Inc. All rights reserved. 1.
Matlab 14.html Cost: $100 Available in labs on Windows and Unix machines.
OUTLINE Overview Numbers, variables and similar in Matlab
Practical Considerations When t , the supp, then there will be a value of t when supp folds, it becomes multi-w-to-one-x mapping.
Solving Linear Systems Solving linear systems Ax = b is one part of numerical linear algebra, and involves manipulating the rows of a matrix. Solving linear.
MathematicalMarketing Slide 3a.1 Mathematical Tools Chapter 3: Mathematical Tools We will be reviewing  Exponents and Logarithms.  Scalar Calculus 
Professor Walter W. Olson Department of Mechanical, Industrial and Manufacturing Engineering University of Toledo Linear Systems m k u x m k u x Fixed.
Matlab Tutorial for State Space Analysis and System Identification
Signal & Weight Vector Spaces
1 Lecture 3 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
Chapter 2-OPTIMIZATION G.Anuradha. Contents Derivative-based Optimization –Descent Methods –The Method of Steepest Descent –Classical Newton’s Method.
Section 2.1 Determinants by Cofactor Expansion. THE DETERMINANT Recall from algebra, that the function f (x) = x 2 is a function from the real numbers.
MathematicalMarketing Slide 5.1 OLS Chapter 5: Ordinary Least Square Regression We will be discussing  The Linear Regression Model  Estimation of the.
Introduction to Programming Lecture # 43. Math Library Complex number Matrix Quadratic equation and their solution …………….…
2 - 1 Chapter 2A Matrices 2A.1 Definition, and Operations of Matrices: 1 Sums and Scalar Products; 2 Matrix Multiplication 2A.2 Properties of Matrix Operations;
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 3 - Chapter 8 Linear Algebraic Equations and Matrices.
NoViC, Dept. of Mechanical Eng Acoustics Lab., NoViC 1. Download Matlab 2.
ASEN 5070: Statistical Orbit Determination I Fall 2014
Boyce/DiPrima 10th ed, Ch 7.2: Review of Matrices Elementary Differential Equations and Boundary Value Problems, 10th edition, by William E. Boyce and.
Matrices and vector spaces
Solving Two-Step Equations
INDIAN INSTITUTE OF TECHNOLOGY ROORKEE Design Of Multiloop P and PI controllers based on quadratic optimal approach.
Introduction To Intelligent Control
College Algebra Real Number System, Algebraic Expressions, Exponents, Polynomials, Factoring, Rational Expressions, Radicals, Complex Numbers.
Systems of First Order Linear Equations
Digital Control Systems (DCS)
Digital Control Systems (DCS)
Discrete Mathematics CS 2610
Case Study on Robotic Systems Using Intelligent Approach
دانشگاه صنعتي اميركبير
Intelligent Control, Its evolution, Recent Technology on Robotics
Dept. of Mechanical and Control Systems Eng.
Basics of Linear Algebra
Using Conjugate Symmetries to Enhance Simulation Performance
Functions and Tables.
Matlab Basics.
Presentation transcript:

Implementation of Intelligent Control on TITech Pendulum M.Yamakita Dept. of Mechanical and Control Systems Eng. Tokyo Inst. Of Tech. 2018/11/20

TITech Pendulum Top View TITech pendulum is a rational type pendulum which was developed for control algorithm test bed by prof. K.Furuta at Tokyo Institute of Technology. Side View Coordinate System 2018/11/20

Dynamic Equation and Parameters Non-Linear Dynamic Equation Linearlized Dynamic Equation at Upright Position 2018/11/20

Stabilizing Control at Upright Position Standard Regulator Problem Linear Quadratic Optimal Regulator(LQR) Optimal Feedback Control State Observer (Minimal Order Observer) 2018/11/20

Swing Up Control of TITech Pendulum Assume Input Sequence (Bang-Bang Control) Determination of T1, T2, T3, and T4 Constrained Successive Optimization Open Loop Control 2018/11/20

Reduction of Degree of the System Assumption Reduced Model used for Non-Linear Control 2018/11/20

Non-Linear State Feedback Control Controlled Vector Field of the System U = 0 U = +Max U = -Max Combine ! 2018/11/20

Control Result Let’s use this controller as a expert. 2018/11/20

Fuzzy Set Allocation to the Problem ZO NS NM NB1 NB2 PS PM 2018/11/20

If-THEN Rule for the Problem PM If x is NM and y is ZO then z is PB. If x is NB1 and y is PS then z is NB. If x is NM and y is PS then z is NB. If x is NS and y is PS then z is NB. If x is NB1 and y is ZO then z is ZO. If x is NS and y is ZO then z is ZO. If x is NB2 then z is ZO. If x is ZO then z is ZO. If y is NS then z is ZO. If y is PM the z is ZO. PS ZO NS NB2 NB1 NM NS ZO 2018/11/20

Simulation Environment MaTX/RtMaTX: Prof.Masanobu KOGA      Matrix Operation Language Useful Functions for Control System Design (Similar to Matlab) Free Software Running on Windows, Unix, DOS … Download→http://www.matx.org/#machines Scherzo:Mr. Masaaki HARA       3D Animation Software(Free) X Window+Open GL(Mesa,glut) Download→http://www.matx.org/#machines 2018/11/20

2018/11/20

2018/11/20

2018/11/20

Matrix Element Operation Using MaTX at Glance (Matrix) A, B; A = Z(2,2); B = I(2,2); A(1,2) = 3.0; B(2,2) = A(2,2); 2018/11/20

Matrix Operation Using MaTX at Glance Matrix A, B,C; 1. Addition, Subtraction, Multiplication, Division C = A+B; C = A-B; C= A*B; C = A\B (C = A~*B) 2. Transpose, Complex Conjugate Transpose C = A’; C = B#; 3. Eignevalue, Eignevector eigenvalues(A); {D,X} = eig(A) ; 4. Determinant, Inversion, Rnak det(A); C = A~; rank(A); 5. Singular Decomposition, Schur Decomposition {U,S,V} = svd(A); {UT} = schur(A); 2018/11/20

Structure of the Simulator diff_eqs(dx,t,u,x) link_eqs(u,t,x) t x u Logging Data Simulation Functions: {t,x,u} = OdeAuto(ts,te,x0,diff_eqs,link_eqs); {t,x,u} = OdeHybrid(ts,te,T,x0,diff_eqs,link_eqs); 2018/11/20

Fuzzy Set Allocation on Real Line (Matrix Representation) 1 h1 l2 C2 h2 … x S1 S2 Sx(:,1) stands for fuzzy set S1 Sx(:,2) stands for fuzzy set S2 … S1’ S2’ 1 C1’ l1’ h1’ l2’ C2’ h2’ y 1 C1’’ C2’’ z (S1’’) (S2’’) (Singletons) 2018/11/20

IF-THEN Rules and Function Realization R1:If x is S1 and y is S1’ then z is S1’’’. R2:If x is S2 and y is S2’ then z is S2’’’. … We assume system output and control input are real values not are fuzzy sets. w2 w1 z C1’’ C2’’ (Normalized weighted sum) 2018/11/20

Functions and Variables in the Sample Program FIsMember(x0, Sx,1) Fand(a,b) w(1,i) 2018/11/20

2018/11/20 Real I0,L0,C0,m1,J1,l1,C1, g; Matrix f; Real Umax;   Real MF, PF; Integer NO_OF_RULES, MAX_DIV; Matrix FSet1, FSet2, FSet3; Func void main() {    Matrix x0;    Array tc, xc, uc;    Real T, h;    Integer i, N;    Matrix A, B, D, C, G, Q, r, P;    void diff_eqn(), link_eqn(), Set_FSets();    Integer IsNear(); /* Setting for Fuzzy Control */    Set_FSets();    Umax = 1.25; L0 = 0.215; I0 = 1.75e-2; C0 = 0.118;   m1 = 5.38e-2; J1 = 1.98e-4; l1 = 0.113; C1 = 8.3e-5; g = 9.81; D = [[I0+m1*L0^2, m1*l1*L0] [m1*l1*L0, J1+m1*l1^2]]; C = [[C0, 0] [0, C1]]; G = [[0, 0] [0, -m1*l1*g]]; A = Z(4,4); A(1,3)= 1.0; A(2,4)= 1.0; A(3:4,1:4) = D~*[-G, -C]; B = Z(4,1); B(3:4,1) = D~*[1.0,0]'; r = I(1,1); Q = [[30,0,0,0][0,2000,0,0][0,0,0.1,0][0,0,0,10]]; {f,P} = lqr(A, B, Q, r); x0 = Z(4,1); x0(2,1) = -3.14;   h = 5.0e-3; {tc, xc, uc}    = OdeHybrid(0.0, T, h, x0, diff_eqn, link_eqn,h,1/30.0); N =Cols(tc); for(i=1;i<=N;i++) {     xc(2,i) = -xc(2,i) + PI; } print [[tc] [xc] [uc]] >> "results.mat"; } 2018/11/20

Func void diff_eqn(dx,t,x,u) Matrix dx,x,u; Real t; { Matrix D,C,G,th,dth; Real c1,s1, s2;   th = x(1:2,1); dth= x(3:4,1); s1 = sin(th(2,1)); c1 = cos(th(2,1)); s2 = sin(2*th(2,1)); D = [[I0 +m1*(L0^2+l1^2*s1*s1), m1*l1*L0*c1] [m1*l1*L0*c1, J1+m1*l1^2]]; C = [[C0+m1*l1^2*s2*dth(2,1)/2.0,-m1*l1*L0*s1+m1*l1^2*s2*dth(2,1)/2.0] [-m1*l1^2*s2*dth(2,1), C1]]; G = [0, -m1*l1*g*s1]'; dx = [[dth] [D~*([1.0,0.0]'*u - C*dth-G)]]; } 2018/11/20

Func void link_eqn(u, t, x) Real t; Matrix u, x; { Matrix FControl(); if(IsNear(x)) { u = -f*(x - [0, 0, 0, 0]'); } else { u = FControl(x); }   if(u(1,1) > Umax) { u(1,1) = Umax; if(u(1,1) < -Umax) { u(1,1) = -Umax; 2018/11/20

2018/11/20 Func Matrix FControl(xx) Matrix xx; { Func Real Defuzzy(S) Integer i; Real x,y, z, m; Real FIsMember(), FAnd(); Matrix FSet3d; Real Defuzzy(); void FOr();   NO_OF_RULES = 9; x = xx(2,1); y = xx(4,1); FSet3d = FSet3; for(i=1;i<=Cols(FSet3d);i++) { FSet3d(2,i) = 0.0; } FOr(FAnd(FIsMember(x, FSet1, 3), FIsMember(y, FSet2, 2)), FSet3d, 1); FOr(FAnd(FIsMember(x, FSet1, 2), FIsMember(y, FSet2, 3)), FSet3d, 3); FOr(FAnd(FIsMember(x, FSet1, 3), FIsMember(y, FSet2, 3)), FSet3d, 3); FOr(FAnd(FIsMember(x, FSet1, 4), FIsMember(y, FSet2, 3)), FSet3d, 3); FOr(FAnd(FIsMember(x, FSet1, 2), FIsMember(y, FSet2, 2)), FSet3d, 2); FOr(FIsMember(y, FSet2, 1), FSet3d, 2); FOr(FIsMember(y, FSet2, 4), FSet3d, 2); FOr(FIsMember(x, FSet1, 1), FSet3d, 2); FOr(FIsMember(x, FSet1, 5), FSet3d, 2); z = Defuzzy(FSet3d); return([z]); Func Real Defuzzy(S) Matrix S; { Integer i, n; Real z, w;   n = Cols(S); z = 0.0; w = 0.0; for(i=1;i<=n;i++) { z = z + S(1,i)*S(2,i); w = w + S(2,i); } return(z/w); 2018/11/20

Open Loop Control Crisp Logic Control Fuzzy Logic Control 2018/11/20

2018/11/20 Func void Set_FSets() { Integer i,j; MF = -1e+8; PF = 1e+8;   MF = -1e+8; PF = 1e+8; /* Fuzzy Set */ FSet1 = Z(3,5); FSet1(:,1) = [MF, -6.5, -3.85]'; FSet1(:,2) = [-5.3, -3.85, -3.3]'; FSet1(:,3) = [-3.5, -3.3, -2.66]'; FSet1(:,4) = [-3.3, -2.66, -1.11]'; FSet1(:,5) = [-2.66, 0.0, PF]'; FSet2 = Z(3,4); FSet2(:,1) = [MF, -26.0, 3.18]'; FSet2(:,2) = [-17.53, -1.82, 5.42]'; FSet2(:,3) = [3.0, 12.17, 26.0]'; FSet2(:,4) = [17.17, 26, PF]'; FSet3 = Z(1,3); FSet3(1,1) = -Umax; FSet3(1,2) = 0.0; FSet3(1,3) = Umax; } 2018/11/20

Simulation Results (1) 2018/11/20

Simulation Result (2) 2018/11/20

References K.Furuta, M.Yamakita, S.Kobayashi:Swing-up control of inverted pendulum using pseudo-state feedback, Proc. Inst. Mech. Engrs. Vol.206 (1992) M.Koga: MaTX reference manual (1995) 2018/11/20