Control Systems With Embedded Implementation (CSEI) Dr. Imtiaz Hussain Assistant Professor URL : Lecture-6 Case Study: Microcontroller based Lag-Lead Control of Inverted Pendulum 1
Outline Case Study-1: Inverted Pendulum 2
Introduction 3
Root Locus of the System
Design Requirements The desired parameters are: – Rise time of 0.5 seconds or less – Damping ratio of 0.32 – Lag gain of 92 These parameters will be used as a guide to the design of a lead and lag compensator. 5
Lead Control 6
Combined Response The root locus of the plant transfer function with the effects of the lead compensator is shown in following figure. 7
Lag Control The pole and zero of the lag compensator should be close together so as not to cause the poles to shift right, which could cause instability or slow convergence. Additionally, since their purpose is to affect the low frequency range they should be near zero 8
Lag-Lead Control The root locus of the transfer function with the lead-lag compensator is show in Figure 9
Discrete-time Transfer Function 10
Error Calculation The error is calculated by subtracting the current position from the desired position and then multiplying by a scale factor which includes the gain. This value is then divided by the approximate maximum position which non-dimensionalized the error. 11
Transfer Function Implementation 12
Simulation of Continuous time Model 13
Analog PID Controller 14
Digitally implemented PID Controller 15
Digitally implemented PID Controller (Microcontrollers) 16
Digitally implemented PID Controller (CPLD or FPGA) 17
END OF LECTURE-6 To download this lecture visit 18