Project Lab Report. Michael Hall. Hao Zhu. Neil Nevgi. Station 6. Ta: Yan Cui

Similar documents
Feedback Control of Linear SISO systems. Process Dynamics and Control

CHAPTER 1 Basic Concepts of Control System. CHAPTER 6 Hydraulic Control System

DC Motor Position: System Modeling

SRV02-Series Rotary Experiment # 1. Position Control. Student Handout

C(s) R(s) 1 C(s) C(s) C(s) = s - T. Ts + 1 = 1 s - 1. s + (1 T) Taking the inverse Laplace transform of Equation (5 2), we obtain

Inverted Pendulum System

Lab 6a: Pole Placement for the Inverted Pendulum

Inverted Pendulum: State-Space Methods for Controller Design

Systems Analysis and Control

Systems Analysis and Control

SRV02-Series Rotary Experiment # 7. Rotary Inverted Pendulum. Student Handout

Lab 3: Quanser Hardware and Proportional Control

(b) A unity feedback system is characterized by the transfer function. Design a suitable compensator to meet the following specifications:

Digital Pendulum Control Experiments

PID Control. Objectives

Lab 5a: Pole Placement for the Inverted Pendulum

Mechatronic System Case Study: Rotary Inverted Pendulum Dynamic System Investigation

ME 375 Final Examination Thursday, May 7, 2015 SOLUTION

Quanser NI-ELVIS Trainer (QNET) Series: QNET Experiment #02: DC Motor Position Control. DC Motor Control Trainer (DCMCT) Student Manual

FEEDBACK CONTROL SYSTEMS

UNIVERSITY OF WASHINGTON Department of Aeronautics and Astronautics

Example: Modeling DC Motor Position Physical Setup System Equations Design Requirements MATLAB Representation and Open-Loop Response

Feedback Control Systems

Double Inverted Pendulum (DBIP)

MEAM 510 Fall 2011 Bruce D. Kothmann

EE 422G - Signals and Systems Laboratory

ECEN 420 LINEAR CONTROL SYSTEMS. Lecture 6 Mathematical Representation of Physical Systems II 1/67

EE 4443/5329. LAB 3: Control of Industrial Systems. Simulation and Hardware Control (PID Design) The Torsion Disks. (ECP Systems-Model: 205)

Table of Laplacetransform

MEAM 510 Fall 2012 Bruce D. Kothmann

1 x(k +1)=(Φ LH) x(k) = T 1 x 2 (k) x1 (0) 1 T x 2(0) T x 1 (0) x 2 (0) x(1) = x(2) = x(3) =

Inverted Pendulum. Objectives

Rotary Inverted Pendulum

Lecture 25: Tue Nov 27, 2018

Example: DC Motor Speed Modeling

Rotary Motion Servo Plant: SRV02. Rotary Experiment #11: 1-DOF Torsion. 1-DOF Torsion Position Control using QuaRC. Student Manual

Chapter 7 Control. Part Classical Control. Mobile Robotics - Prof Alonzo Kelly, CMU RI

CHAPTER 7 STEADY-STATE RESPONSE ANALYSES

Solution of ODEs using Laplace Transforms. Process Dynamics and Control

Lab 3: Model based Position Control of a Cart

School of Engineering Faculty of Built Environment, Engineering, Technology & Design

THE REACTION WHEEL PENDULUM

Friction. Modeling, Identification, & Analysis

Lab #2: Digital Simulation of Torsional Disk Systems in LabVIEW

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

Rotary Motion Servo Plant: SRV02. Rotary Experiment #01: Modeling. SRV02 Modeling using QuaRC. Student Manual

Mechatronics Engineering. Li Wen

State Space Representation

Spontaneous Speed Reversals in Stepper Motors

Appendix W. Dynamic Models. W.2 4 Complex Mechanical Systems. Translational and Rotational Systems W.2.1

Table of Contents 1.0 OBJECTIVE APPARATUS PROCEDURE LAB PREP WORK POLE-PLACEMENT DESIGN

The Damped Pendulum. Physics 211 Lab 3 3/18/2016

Performance of Feedback Control Systems

Stepping Motors. Chapter 11 L E L F L D

R a) Compare open loop and closed loop control systems. b) Clearly bring out, from basics, Force-current and Force-Voltage analogies.

Control of Electromechanical Systems

THE FLOATING DUTCHMEN Three Dimensional Driven-Arm Inverted Pendulum

Positioning Servo Design Example

ECE-320: Linear Control Systems Homework 8. 1) For one of the rectilinear systems in lab, I found the following state variable representations:

R10 JNTUWORLD B 1 M 1 K 2 M 2. f(t) Figure 1

The... of a particle is defined as its change in position in some time interval.

Lab Experiment 2: Performance of First order and second order systems

PARAMETER IDENTIFICATION, MODELING, AND SIMULATION OF A CART AND PENDULUM

Bangladesh University of Engineering and Technology. EEE 402: Control System I Laboratory

Rutgers University Department of Physics & Astronomy. 01:750:271 Honors Physics I Fall Lecture 20 JJ II. Home Page. Title Page.

sc Control Systems Design Q.1, Sem.1, Ac. Yr. 2010/11

Position Control Experiment MAE171a

Chapter 7. Digital Control Systems

YTÜ Mechanical Engineering Department

EXAMPLE: MODELING THE PT326 PROCESS TRAINER

Real-Time Implementation of a LQR-Based Controller for the Stabilization of a Double Inverted Pendulum

Professional Portfolio Selection Techniques: From Markowitz to Innovative Engineering

IC6501 CONTROL SYSTEMS

Conventional Paper-I-2011 PART-A

YTÜ Mechanical Engineering Department

Step input, ramp input, parabolic input and impulse input signals. 2. What is the initial slope of a step response of a first order system?

University of Utah Electrical & Computer Engineering Department ECE 3510 Lab 9 Inverted Pendulum

Control Systems. University Questions

EEE 184 Project: Option 1

Introduction to Process Control

(Refer Slide Time: 1:42)

D(s) G(s) A control system design definition

Laboratory Exercise 1 DC servo

Physics 41 HW Set 1 Chapter 15 Serway 8 th ( 7 th )

Lab #2 - Two Degrees-of-Freedom Oscillator

EE C128 / ME C134 Fall 2014 HW 6.2 Solutions. HW 6.2 Solutions

THE subject of the analysis is system composed by

Transient Response of a Second-Order System

MAE143a: Signals & Systems (& Control) Final Exam (2011) solutions

Lab 12: Periodic Motion

ECE3510 Lab #5 PID Control

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Mechanical Engineering 2.04A Systems and Controls Spring 2013

LABORATORY IV OSCILLATIONS

Video 5.1 Vijay Kumar and Ani Hsieh

Index. Index. More information. in this web service Cambridge University Press

Application Note #3413

Experiment # 5 5. Coupled Water Tanks

Introduction to Controls

Big Idea 4: Interactions between systems can result in changes in those systems. Essential Knowledge 4.D.1: Torque, angular velocity, angular

2.004 Dynamics and Control II Spring 2008

Transcription:

Project Lab Report Michael Hall Hao Zhu Neil Nevgi Station 6 Ta: Yan Cui Nov. 12 th 2012

Table of Contents: Executive Summary 3 Modeling Report.4-7 System Identification 7-11 Control Design..11-15 Simulation and Experiment..15-17 Appendix..18-19 2

Executive Summary: The final report for the inverted pendulum lab contains information that covers the modeling, system identification, control design and simulation and experimental response of the system. Beginning with free body diagrams and developing transfer functions for each component of the system allowed for a simulation of the system to be done. In order to achieve a balancing inverted pendulum on the rotating disk, controllers needed to be developed. Using the simulations of the components of the system and basic controller design concepts which are explained within the report, controllers were designed to keep the inverted pendulum upright while also keeping the table close to stationary. Testing of these controllers on the real system was done by using a combination of LabVIEW, the Crio and a FPGA. Creating a nested feedback loop in LabVIEW and implementing the controllers led to the creation of a system that was able to stand keep the inverted pendulum upright without causing a large displacement in the rotational angle of the disk. The basic idea behind the inverted pendulum staying upright is as follows. The inverted pendulum starts at an angle close to vertical (which is known as 0 degrees in this case). The pendulum is naturally unstable and will begin to fall to either side. As the pendulum begins to fall, the disk below moves in the direction of the falling pendulum thereby moving the pendulum closer to the 0 degree mark. Doing this can cause the pendulum to overshoot the 0 degree mark and move the opposite direction. This will cause the disk to rotate back towards the pendulum causing an oscillatory motion that is in a constant check and balance state without causing a major displacement in the rotating disk. 3

Modeling: The first step in the modeling process was identifying our systems and creating a free body diagram of each system. Three systems existed, an electrical system for the drive motor, the radial disk and the vertical rod. Next, free body diagrams were created for each system. From these diagrams, equations relating our inputs and outputs were created; specifically one transfer function for table angle to rod angle and another for input voltage to table angle. The steps for these processes can be seen below in the following equations and figures. This led to the following Equations: Figure 1: Components Equation 1: ' 0 U RM IM KM N (from circuit) Note: Inductance was neglected in the above equation and free body diagram due to its negligible effect on the system. Equation 2: Tt KtNI M (from Disk) Solving equation 2 for I and substituting into equation 1 leads to the following: 4

Equation 3: Tt 0 U RM[ ] KMN KN t ' The torque is also a function of phi and needs to be converted. By combining equation 4 with equation 3, equation 5 is found. Equation 4: Equation 5: T J F R '' ' t n table (Mu is friction coefficient) '' ' ( J Fn Rtable ) U RM[ ] KMN KN t ' Now converting to the S domain will give a transfer function for the table angle relative to the input voltage. ( J) U R K N R R FR '' ' n table M [ ] [ M M ] M Kt N Kt N KtN ( J) U s R S s K N R S s 2 ( ) M [ ] ( ) [ M M ] ( ) KtN KtN ( J) U( s) S( RM [ ] S [ KM N RM ]) ( s) K N K N t t Equation 6: ( s) 1 Us () JRM RM S( S ( KM N) K N K N t t This resembles the first order equations that are commonly used. 1 TF K S ( S 1) Now there is one more transfer function to get, specifically one that related the table angle, phi, with the rod angle, theta. Equations are now developed starting with Newton s law and Newton s law as it relates to angular motion. F M X F MY '' '' Equation 7: ' '' Jrod FY Lrod FX Lrod rod 5

Then to expand equation 7 further, Y and X need to be solved for. This is done using the inverted pendulum free body diagram and solving the X and Y components and then taking the derivative twice. Y L R Y' L cos( ) R sin( ) ' Y '' L sin( ) '' L cos( ) ' R Assu min g : cos( ) 1,sin( ) '' 0 R Equation 8: Y'' L ' R Equation 9: X L L T sin( ) X ' L ' L cos( ) ' T X '' L '' L cos( ) '' L sin( ) ' Re ducing... X '' L '' L '' R R T R R T R A substitution of equations 8 and 9 into equation 7 leads to a differential equation that relates theta and phi to one another. Converting this equation into the S domain then gives the needed transfer function. The assumptions made to reduce X and Y were done because the values of the cosine of theta is always so close to one and the value of sine of theta multiplied by theta double prime was so small it could be considered zero. '' J ml L '' ml '' mgl 2 ' rod T R R rod R 2 ' [ Jrod mlr ] '' rod mglr mlt LR '' 2 2 2 [ Jrod mlr ] S ( s) rods ( s) mglr ( s) mlt LRS ( s) 2 2 2 2 [ JrodS mlr S rods mglr ] ( s) mlt LRS ( s) 6

Equation 10: () s ml L S 2 T R 2 2 2 ( s) [ Jrod S mlr S rod S] mglr Converting this into a more usable form gives another representation of the same transfer function: Equation 11: LT W 2 2 R S () s g ( s) S 2 W S] W 2 2 rod R R (Where the ± depends on the orientation of the pendulum) These equations show that we need to identify certain unknown values for the transfer functions to be complete. The values of K, tau, Lt, damping coefficient of the rod and Wr need to be found. This can be done through system identification. System Identification: Now that the system models exist, the parameters for each model need to be identified. In order to solve for these parameters, testing of the actual system needed to be done. In order to test the actual system, we needed to create a VI to control the system. Taking the VI s from lab 4 and updating them to read two separate encoders allowed us to measure the position of the table and the inverted pendulum. The VI still needed to only control one motor so very little updating had to be done to the other VI. The measurement VI can be seen below. Figure 1: Measurement VI 7

The value of the encoder per rotation of the servo table as well as per rotation of the pendulum was calculated. These values are listed below: Encoder value for 1 rotation of Inverted Pendulum: 3720 Encoder value for 1 rotation of Servo Table: 17139 Once the VI s were complete, it was possible to record the response of the servo table to a step input and the response of the inverted pendulum to an impulse. The graph for the inverted pendulum was taken while the pendulum was upside down. Figure 2: Servo Table Response 8

Figure 3: Inverted Pendulum Response Using information taken from these graphs will allow for the coefficients needed to be solved for. First we will solve the first order equation from figure 3. Finding tao is done by simply finding the time it takes the system to reach 63.2% of its final value. The graph settles at 5.25. Sixty three point two percent of 5.25 is 3.318. The graph reaches 3.318 approximately 3.2 seconds after the step impulse is initiated. This results in: 3.2 Next the gain of the first order system is calculated. This is done by taking the settling value of 5.25 and dividing it by the magnitude of the step impulse. This leads to the following value of K. 5.25 K 2.625 2 This gives us the following transfer function to simulate the servo table: Equation 12: T F 2.625 S(3.2S1) 9

Next the coefficients of the second order system will be calculated. This is again simply done by using values taken from figure 4. First we will calculate the resonant frequency. This is done by measuring the number of cycles and the time for the number of cycles, then dividing the two. The first eight cycles happen over 8.2 seconds. This leads to a resonant frequency of: W R rad 6.1299 s Now that the resonant frequency is known, it is possible to calculate the damping coefficient. The damping coefficient is found by taking the value at peaks from figure 4 and using them in the following equation. Equation 13: X X 1 ln( ) X (2 ) ln( ) X 2 2 1 2 2 Using values of.24 and.224 (the value of the second and third peak) for X1 and X2 respectively leads to a value of:.01098 The final unknown value is the value of the radius of the table; Lt. This was measured to be 13.5 cm LT.0135Meters Now that all of these values have been found it is possible to create our final transfer functions to simulate the response of the system. These final transfer functions can be seen below: Servo Table: Inverted Pendulum: T F T F 2.625 1 S (3.2 S 1) S 2 2.05171S.134613S37.5757 10

Now that the system has been analyzed it will be possible to design a controller to control the system. The next step will be to use the above information in a simulation with different controller designs to see what type of control will create the optimum performance in regards to the necessary specifications. Control Design: After the system identification, we defined the system transfer function, invert rod and rotational table. TF of the rotational table: TF of the inverted rod: Gr = Gt = 2.625 s(3.2 + s) 0.0522 s 2 s 2 + 0.135 s 37.576 Using feedback control, the structure of the system is shown below: Cr Ct Gt Gr Figure 4: system structure The table position control stays inside and the rod position control stay in the outside loop, which allows the system ability to keep tracking two sensor values. Table controller design: Initially, we only consider the table and the inside loop. If we want zero steady state error, with respect to ramp input, the system type should be at least type 1. Therefore, in the controller, Ct, there is at least one s, integrator, in the denominator. And we also need a proper controller which means the denominator order should be equal or greater than the order of numerator. The smallest order controller we can choose is shown below: Ct = b2 s2 + b1 s + b0 s (s + a) 11

With this controller, the CLCE of the inside loops should be 4 th order, which means there will be 4 close loop poles. The performance of the table position control we desired is less 40% overshot and settled in 1 second. Based on this, we begin to draw root locus and placed or pole at performance region. However, when we attempted to solve the CLCE; there are 4 variables but 5 equations, which is unsolvable. This led to the following modification: Ct = b2 s2 + b1 s + b0 k s (s + a) By doing this, 5 unknowns and 5 equations are given. Detailed calculations are shown in appendix Matlab code. From the performance region, we place poles at: X1=-15+15i; x2=-15-15i; X3=-18; X4=-18; And the simulations with unit step input showed below: Figure 5: system simulation of unit step response The settling time is about 0.8 second which is good enough, but the overshot is 55%, larger than the desired, which is because of zeros. If the initial input is not large, is will not be a problem in the system. 12

The final table controller: Ct = 571.4888 s2 + 8100 s + 45563 0.3846 s (s + 65.6154) Rod controller design: After designed the table controller, we begin to design the rod controller. To simplify the system we assumed the inner loop was equal to 1. The total gain of the table controller is close to 1 and table controller should much faster than the rob controller, which because of that the table should be fast enough to balance the rod. If the rod controller is faster, the position control of the table will be hardly reached. From the experimental test, we assume that the table controller should be at least 5 times faster than the rod controller. When designing the controller structure of the rod, we thought that the rod comes with some initial angle which is not zero; we need an s, differentiator, as filter on the numerator. The order of the numerator should be at least 2 nd, which means the order of the denominator should be at least 2 nd. Then, we choose the structure of the controller as below: Cr = s (s + a) b3 s 3 + b2 s 2 + b1 s + b0 By combining with the rod, the CLCE of the system become 5 th order, which give 5 close loop poles. However, there is a similar problem as designing table controller. When solving the CLCE, there are 5 variables but 6 equations. This leads to the addition of a constant gain, K. Cr = k s (s + a) b3 s 3 + b2 s 2 + b1 s + b0 By following the rule that the table controller should be 5 times faster than the rod controller, we decided to put close loop pole at region from -1 to -3 which are slow enough. Even though some of the poles will not be dominate poles, they still cannot be too fast to disturb the table control system. Then we choose the outside loop close loop poles at: X1=-1+1i; X2=-1-1i; X3=-3; X4=-3; X5=-3; The final rod controller: Cr = 21.7133 s (s + 7.7781) 1 s 3 2.6830 s 2 2.8790 s 1.4369 13

And the simulations with unit step input showed below: Figure 6: rod system simulation of unit step response Figure 7: entire system simulation of unit step response 14

From figure 6, we can see that in the simulation, the rod will be settled in about 6 second, but the over shot will be very large. However, since the input rod angle will very small, the overshot will not affect the system very much. If the rod angle is very large, the linear model build for invert pendulum system is not valid anymore, with large rod angle, the center of mass will be further away from the center of the table, which will affect the transfer function assumed for the rob. From figure 7, the step response of the entire system, we can see that if the initial value is very close to the equilibrium point, the system will settle very fast with small overshoot. However, use step input to simulate the motor run system is not proper technically, because in reality, the motor is operated by ramp input. Simulation and experiment Unit step response simulations of the rod and servo table systems were conducted using Matlab as can be referred to in the Appendix. The simulation of the total system can be referred to in Figure 7 in the Control Design section of this report. Using these simulations, closed loop stable responses were tested experimentally by connecting the servo table to the NI CompactRIO hardware of LabView. A LabView project was created such that the servo table could be controlled using pre designed controllers with the system structure schematic as can be seen in Figure 4. A screenshot of the LabView VI file following this schematic can be seen in the figure below: 15

Figure 8: LabView VI file s Control Simulation loop following system controller schematic The designed controllers were inputted into the LabView VI as transfer functions and the VI was run after compiling the files at the FPGA level of the project. Specific care was taken when conducting these experiments where the emergency stop of the CompactRIO box was kept in handy distance. Additionally, an attempt was made at manually setting the initial rod angle to as close to zero as possible. After the VI was in operation, the rod was intentionally offset in order to obtain readable data. The response recorded can be reviewed in figure 6 below: Figure 9: Experimental response of inverted pendulum using controller structure Significant discrepancies were observed between the simulation and experimental response of the controller structure. It should be noted that the responsiveness of the feedback loop in a system is compromised when using a LabView-Windows interface. A delay of up to 20 milliseconds per feedback loop could be observable when running the experiment. It should also be noted that the designed system uses nested feedback loops which could further hamper the 16

delay in the signal. Additionally, it was noted that the actuator did not respond completely accurately. This could be sourced to the fact that the actuator involved a system of gears which could have had been prone to stiction where the term stiction refers to the static friction the gears would have to counter in order to enable relative motion. Additionally, with the use of an actuator, the risk of actuator saturation is imminent. Actuator saturation has the potential of seriously hampering performance that could result in the controller response not meeting performance specifications. The controller system would need to be redesigned using a control law to counter actuator saturation and variable dynamics. Thus, it is learnt that a successfully performing controller system would have to account for these ever-present non-linearity s in order to further better performance. From figure 9, we observe that the system reaches steady state in XXX seconds. It should be addressed that the assumption that the rod was held perpendicular to the servo table needs to hold in order for the controller system to perform within the required parameters. If the rod was offset at an angle, the relation between the center of mass and servo table would change with the changing equations of motion. In order for the controller to perform with the offset angle, the transfer function modeling the rod would need to be redefined to account for this angle. A filter could model the relation that can be derived between this angle and the transfer function of the rod so that the rod could achieve steady state regardless of its initial position. It should also be noted that at extreme angles of the rod, the actuator would not be responsive or fast enough to achieve a state of oscillation. 17

Appendix: Calculations shown in Matlab Program: (code below) Table controller calculation and simulation program: clear; clc; s=tf('s'); x1=-15+15i; x2=-15-15i; x3=-18; x4=-18; A=[1; (-x1-x2-x3-x4); x3*(x1+x2)+x1*x2+x4*(x1+x2+x3); -x4*(x3*(x1+x2)+x1*x2)- x1*x2*x3; x1*x2*x3*x4]; k=0.3846; a=(a(2)-k)*0.3846/k; b2=(a(3)-a*k)*0.3125; b1=a(4)*0.3125; b0=a(5)*0.3125; sysp=tf([2.625],[3.2 1 0]); sysc=tf([b2 b1 b0],k*[1 a 0]); sysf=tf([10],[1 10 10]); sys=feedback(sysp*sysc,1); figure(1) step(sys) grid on; 18

Rod controller calculation, simulation and entire system simulation program: clear; clc; s=tf('s'); x1=-1+1i; x2=-1-1i; x3=-3; x4=-3; x5=-3; A=[1; (-x1-x2-x3-x4-x5)-13/25; (x5*(x1+x2+x3+x4)+x3*(x1+x2)+x1*x2+x4*(x1+x2+x3)); (- x5*(x3*(x1+x2)+x1*x2+x4*(x1+x2+x3))-x4*(x3*(x1+x2)+x1*x2)-x1*x2*x3); (x5*(x4*(x3*(x1+x2)+x1*x2)+x1*x2*x3)+x1*x2*x3*x4); -x1*x2*x3*x4*x5]; b0=-a(6)*50/1879; b3=a(1); b1=-(a(5)-27*b0/200)*50/1879; b2=-(a(4)-27*b1/200-b0)/1879*50; k=(a(2)-b2-27*b3/200)*25/15; a=(a(3)+1879/50*b3-27/200*b2-b1)*25/13/k; sysp=tf([0.52 0 0],[1 0.135-37.58]); sysc=tf([1 a 0]*k,[b3 b2 b1 b0]); Ct=tf([571.4888 8100],[0.3846 25.2357 0]); Gt=tf([2.635],[3.2 1 0]); systable=feedback(ct*gt,1); sysr=feedback(sysp*sysc,1); systotal=feedback(sysp*systable*sysc,1); figure(1); step(sysr); figure(2) step(systotal); 19