520 likes | 666 Views
Outline. Introduction Modeling Simulation Implementation Demo Conclusion. Outline. Introduction Modeling Simulation Implementation Demo Conclusion. Introduction. Rotating arm and inverted pendulum. Rotating arm is actuated by a DC motor.
E N D
Outline • Introduction • Modeling • Simulation • Implementation • Demo • Conclusion
Outline • Introduction • Modeling • Simulation • Implementation • Demo • Conclusion
Introduction • Rotating arm and inverted pendulum. • Rotating arm is actuated by a DC motor. • The angular disturbance will be sensed by the potentiometer.
Introduction • The system is controlled by a PID control circuit. • Two equilibrium points existed. • Use a cut-off device to protect the system.
Outline • Introduction • Modeling Find the transfer function of input voltage and the angle of inversed pendulum. • Equation of motion. • Linearization • Laplace transform • Transfer function • Simulationment • Implementation • Demo • Conclusion
Modeling -Equation of motion • Step 1 : Find the equation of motion by Lagrange equation
Modeling -Linearization • Step 2 : Linearization • To do the linearization, we have to find the equilibrium points first. • Find the position where the extreme value of the potential energy exist.
Modeling -Linearization • In this case, we set the equilibrium point at θ=0° • Expand the nonlinear terms in Taylor series.
System modeling -Linearization • If the angle of disturbance is 5°, the max. error between linear and nonlinear model is 0.046°, less then 1%.
System modeling -Laplace transform • Step 3 : Laplace transform of the motion equations
System modeling -Transfer function • Step 4 : Find the transfer function of a DC motor • According to Kirchhoff’s voltage law (KVL) Where is the voltage of coil is the induced voltage of the motor is the torque generate by motor Equivalent circuit of a DC motor
System modeling -Transfer function • Step 5 : Transfer function of the system
Modeling -Transfer function • Set the values we need • Assume the values we need but we don’t know Ref. : Stephen J. Chapman “Electric Machinery Fundamentals” Chap. 9 McGraw. Hill
Modeling -Transfer function • Transfer function.
Modeling -Transfer function • Unit step command test
Modeling -Transfer function • Command unit step and disturbance is zero to check transfer function.
Modeling –Routh-Hurwitz Stability • Using Routh-Hurwitz stability to find the stable range of the gain of PID or PD controller.
Modeling -Reference • S. Awtar, N. king, T. Allen, I. Bang, M, Hagan, D.Skidmore, K. Craig, “Inverted pendulum systems: rotary and arm-driven- a mechatronic system design case study.” Mechatronic 12 (2002) • Y. Yavin, “Control of a Rotary Inverted Pendulum.” Applied Mathematics Letters 12 (1999)
Outline • Introduction • Modeling • Simulation • Open loop • PD controller • PI controller • PID controller • Implementation • Demo • Conclusion
Simulation • Use SimMechanics to build a nonlinear system model
Simulation • Use Simulink to build a nonlinear system model
Simulation • Use Simulink to build a linear system model
Simulation-PD controller • Response simulation.(PD controller) • Absolute error between the simulation of SimMechanics and Simulink.
Simulation -PI controller • Response simulation.(PI controller) • Absolute error between the simulation of SimMechanics and Simulink.
Simulation-PID controller • Response simulation.(PID controller) • Absolute error between the simulation of SimMechanics and Simulink.
Outline • System introduction • System modeling • Simulation • Implementation • Inversed pendulum • Control circuit • Demo • Conclusion
Implementation • System block diagram
Implementation -Inversed pendulum • The length and mass of pendulum:32 cm and 28.41g • The length and mass of rotating arm: 10 cm and 46 g • Gear ratio: 5
Implementation -Control circuit • Circuit block diagram
Implementation -Control circuit • Circuit board Cut-off circuit Powersupply I Limit switch Signal light On/Off Motor Power amplifier PID controller Sensor Powersupply II
Implementation -Potentiometer • Use a variable resistor as a potentiometer. Inverted pendulum Potentiometer
Implementation - Potentiometer • How does it work?
Implementation -PID controller • Use 17741 operational amplifier • Modes switch • Elements shiftable PID controller
Implementation -Cut-off circuit, signal light 500 ohm resistances 7404 NOT Resistance with signal light 7408 AND NPN transistor Relay 5V 2 Form C Contact 7408 7404
Implementation -Power amplifier NPN TIP41 Diode NPN TIP107
Implementation • Why we use two power supply? • The DC motor turns on, the voltage of power supply drops. Output: DC power supply +15V port normal Input: triangular ±200mV;2Hz The DC motor use the power from +15V port
Outline • Introduction • Modeling • Simulation • Implementation • Demo • Conclusion
Demo -PD controller • Steady state error exist
Demo -PID controller • Steady state error is zero